diff options
author | Gabriele M <moto.falcon.git@gmail.com> | 2017-04-05 21:53:15 +0200 |
---|---|---|
committer | Arne Coucheron <arco68@gmail.com> | 2017-04-09 18:13:13 +0000 |
commit | dd3c70c996c8678e2bb655362932174e2d4766fa (patch) | |
tree | 95d3b2940269acaaa3a46a5cfbe2b2253cb2a133 | |
parent | 8caae26b264a3ecb1f9e5b22123e75caf58c4c10 (diff) | |
download | android_packages_apps_Bluetooth-staging/cm-14.1_android-7.1.2_r2.tar.gz android_packages_apps_Bluetooth-staging/cm-14.1_android-7.1.2_r2.tar.bz2 android_packages_apps_Bluetooth-staging/cm-14.1_android-7.1.2_r2.zip |
Revert "Bluetooth: handle opening incoming APK files"staging/cm-14.1_android-7.1.2_r2
Exposing file:// beyond the current app is no longer possible.
PackageInstaller seems to handle content URIs now, so revert this.
See 344744b49633 ("Exposing file:// beyond your app is bad, m'kay?")
in frameworks/base for more info.
This reverts commit d219b0cb8990f82cb825087857459c671c05a85c.
Change-Id: I6900a8011ba82e6d48369834eadbe399be951143
(cherry picked from commit cca216e4ff0997c0aca7eddecf0b8fd3ac84242f)
-rw-r--r-- | src/com/android/bluetooth/opp/BluetoothOppUtility.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/com/android/bluetooth/opp/BluetoothOppUtility.java b/src/com/android/bluetooth/opp/BluetoothOppUtility.java index 15f4a8932..c386349b9 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppUtility.java +++ b/src/com/android/bluetooth/opp/BluetoothOppUtility.java @@ -207,14 +207,6 @@ public class BluetoothOppUtility { return; } - CustomIntent activityIntent = new CustomIntent(Intent.ACTION_VIEW); - if ("application/vnd.android.package-archive".equals(mimetype)) { - // PackageInstaller doesn't like content URIs, so open file - activityIntent.setDataAndType(Uri.fromFile(f), mimetype); - context.startActivity(activityIntent); - return; - } - Uri path = FileProvider.getUriForFile(context, "com.google.android.bluetooth.fileprovider", f); // If there is no scheme, then it must be a file @@ -223,6 +215,7 @@ public class BluetoothOppUtility { } if (isRecognizedFileType(context, path, mimetype)) { + CustomIntent activityIntent = new CustomIntent(Intent.ACTION_VIEW); activityIntent.setDataAndTypeAndNormalize(path, mimetype); List<ResolveInfo> resInfoList = context.getPackageManager() |