resolve merge conflicts of eafd58a to nyc-dev am: a43c5c5f18 am: 4d220d4777 am: 47feeee8ee am: 838049884f am: 0c37f58fa0
am: d918dfbcd7
Change-Id: Ica18f2cbe878d9c7ba111a2678610eeb47a688ac
This commit is contained in:
@@ -24,6 +24,8 @@ import android.os.Bundle;
|
||||
import com.android.messaging.Factory;
|
||||
import com.android.messaging.datamodel.data.PendingAttachmentData;
|
||||
import com.android.messaging.ui.UIIntents;
|
||||
import com.android.messaging.util.LogUtil;
|
||||
import com.android.messaging.util.FileUtil;
|
||||
import com.android.messaging.util.ImageUtils;
|
||||
import com.android.messaging.util.SafeAsyncTask;
|
||||
|
||||
@@ -111,12 +113,23 @@ public class DocumentImagePicker {
|
||||
new SafeAsyncTask<Void, Void, String>() {
|
||||
@Override
|
||||
protected String doInBackgroundTimed(final Void... params) {
|
||||
if (FileUtil.isInPrivateDir(documentUri)) {
|
||||
// hacker sending private app data. Bail out
|
||||
if (LogUtil.isLoggable(LogUtil.BUGLE_TAG, LogUtil.ERROR)) {
|
||||
LogUtil.e(LogUtil.BUGLE_TAG, "Aborting attach of private app data ("
|
||||
+ documentUri + ")");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return ImageUtils.getContentType(
|
||||
Factory.get().getApplicationContext().getContentResolver(), documentUri);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(final String contentType) {
|
||||
if (contentType == null) {
|
||||
return; // bad uri on input
|
||||
}
|
||||
// Ask the listener to create a temporary placeholder item to show the progress.
|
||||
final PendingAttachmentData pendingItem =
|
||||
PendingAttachmentData.createPendingAttachmentData(contentType,
|
||||
|
||||
Reference in New Issue
Block a user