resolve merge conflicts of eafd58a to nyc-dev am: a43c5c5f18 am: 4d220d4777 am: 47feeee8ee
am: 838049884f
Change-Id: I54b2fc3ed0958a928a75575ba111374aa3c5a69c
This commit is contained in:
@@ -24,6 +24,8 @@ import android.os.Bundle;
|
|||||||
import com.android.messaging.Factory;
|
import com.android.messaging.Factory;
|
||||||
import com.android.messaging.datamodel.data.PendingAttachmentData;
|
import com.android.messaging.datamodel.data.PendingAttachmentData;
|
||||||
import com.android.messaging.ui.UIIntents;
|
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.ImageUtils;
|
||||||
import com.android.messaging.util.SafeAsyncTask;
|
import com.android.messaging.util.SafeAsyncTask;
|
||||||
|
|
||||||
@@ -111,12 +113,23 @@ public class DocumentImagePicker {
|
|||||||
new SafeAsyncTask<Void, Void, String>() {
|
new SafeAsyncTask<Void, Void, String>() {
|
||||||
@Override
|
@Override
|
||||||
protected String doInBackgroundTimed(final Void... params) {
|
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(
|
return ImageUtils.getContentType(
|
||||||
Factory.get().getApplicationContext().getContentResolver(), documentUri);
|
Factory.get().getApplicationContext().getContentResolver(), documentUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(final String contentType) {
|
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.
|
// Ask the listener to create a temporary placeholder item to show the progress.
|
||||||
final PendingAttachmentData pendingItem =
|
final PendingAttachmentData pendingItem =
|
||||||
PendingAttachmentData.createPendingAttachmentData(contentType,
|
PendingAttachmentData.createPendingAttachmentData(contentType,
|
||||||
|
|||||||
Reference in New Issue
Block a user