OSDN Git Service

Make Bluetooth encryption aware
authorAjay Panicker <apanicke@google.com>
Mon, 11 Apr 2016 23:45:52 +0000 (16:45 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 3 May 2016 00:39:22 +0000 (00:39 +0000)
Allow the Bluetooth application to be bound to before the user
enters their lock pattern. Also move the file used for sharing
text blobs to private storage as that could contain private data.

Bug: 27332939
Change-Id: Iefa15939967afeb34c088957834ad5c35d7fd8fe

AndroidManifest.xml
src/com/android/bluetooth/opp/BluetoothOppLauncherActivity.java

index 24ded6a..4c739eb 100644 (file)
@@ -76,7 +76,9 @@
         android:persistent="false"
         android:label="@string/app_name"
         android:supportsRtl="true"
-        android:usesCleartextTraffic="false">
+        android:usesCleartextTraffic="false"
+        android:directBootAware="true"
+        android:defaultToDeviceProtectedStorage="true">
         <uses-library android:name="javax.obex" />
         <provider android:name=".opp.BluetoothOppProvider"
             android:authorities="com.android.bluetooth.opp"
index 39116a0..0d4b5b2 100644 (file)
@@ -123,7 +123,7 @@ public class BluetoothOppLauncherActivity extends Activity {
                 } else if (extra_text != null && type != null) {
                     if (V) Log.v(TAG, "Get ACTION_SEND intent with Extra_text = "
                                 + extra_text.toString() + "; mimetype = " + type);
-                    final Uri fileUri = creatFileForSharedContent(this, extra_text);
+                    final Uri fileUri = creatFileForSharedContent(this.createCredentialProtectedStorageContext(), extra_text);
                     if (fileUri != null) {
                         Thread t = new Thread(new Runnable() {
                             public void run() {