diff options
author | Gabriele M <moto.falcon.git@gmail.com> | 2017-04-05 21:53:15 +0200 |
---|---|---|
committer | Gabriele M <moto.falcon.git@gmail.com> | 2017-04-05 20:05:30 +0000 |
commit | cca216e4ff0997c0aca7eddecf0b8fd3ac84242f (patch) | |
tree | 6842830dd7a1b9d4a9ecc143a47ceafe46ce57d0 | |
parent | f4196b3baf2f7bcc7b78ecbc385b4ac14736a43f (diff) | |
download | android_packages_apps_Bluetooth-cm-14.1_old.tar.gz android_packages_apps_Bluetooth-cm-14.1_old.tar.bz2 android_packages_apps_Bluetooth-cm-14.1_old.zip |
Revert "Bluetooth: handle opening incoming APK files"cm-14.1_old
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
-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() |