diff --git a/res/values/strings.xml b/res/values/strings.xml index 194dafd4cfc..0766120d6c5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -12193,4 +12193,17 @@ Bluetooth will turn on + + + Untrusted device wants to access your messages. Tap for details. + + Allow access to messages? + + An untrusted Bluetooth device, %1$s, wants to access your messages.\n\nYou haven\u2019t connected to %2$s before. + + Untrusted device wants to access your contacts and call log. Tap for details. + + Allow access to contacts and call log? + + An untrusted Bluetooth device, %1$s, wants to access your contacts and call log. This includes data about incoming and outgoing calls.\n\nYou haven\u2019t connected to %2$s before. diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java index be383dc02ba..e40e30dd0a0 100644 --- a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java +++ b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java @@ -99,9 +99,9 @@ public class BluetoothPermissionActivity extends AlertActivity implements if (mRequestType == BluetoothDevice.REQUEST_TYPE_PROFILE_CONNECTION) { showDialog(getString(R.string.bluetooth_connection_permission_request), mRequestType); } else if (mRequestType == BluetoothDevice.REQUEST_TYPE_PHONEBOOK_ACCESS) { - showDialog(getString(R.string.bluetooth_phonebook_request), mRequestType); + showDialog(getString(R.string.bluetooth_phonebook_access_dialog_title), mRequestType); } else if (mRequestType == BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) { - showDialog(getString(R.string.bluetooth_map_request), mRequestType); + showDialog(getString(R.string.bluetooth_message_access_dialog_title), mRequestType); } else if (mRequestType == BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) { showDialog(getString(R.string.bluetooth_sap_request), mRequestType); } @@ -136,9 +136,9 @@ public class BluetoothPermissionActivity extends AlertActivity implements p.mView = createSapDialogView(); break; } - p.mPositiveButtonText = getString(R.string.yes); + p.mPositiveButtonText = getString(R.string.allow); p.mPositiveButtonListener = this; - p.mNegativeButtonText = getString(R.string.no); + p.mNegativeButtonText = getString(R.string.deny); p.mNegativeButtonListener = this; mOkButton = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); setupAlert(); @@ -168,7 +168,7 @@ public class BluetoothPermissionActivity extends AlertActivity implements String mRemoteName = Utils.createRemoteName(this, mDevice); mView = getLayoutInflater().inflate(R.layout.bluetooth_access, null); messageView = (TextView)mView.findViewById(R.id.message); - messageView.setText(getString(R.string.bluetooth_pb_acceptance_dialog_text, + messageView.setText(getString(R.string.bluetooth_phonebook_access_dialog_content, mRemoteName, mRemoteName)); return mView; } @@ -177,7 +177,7 @@ public class BluetoothPermissionActivity extends AlertActivity implements String mRemoteName = Utils.createRemoteName(this, mDevice); mView = getLayoutInflater().inflate(R.layout.bluetooth_access, null); messageView = (TextView)mView.findViewById(R.id.message); - messageView.setText(getString(R.string.bluetooth_map_acceptance_dialog_text, + messageView.setText(getString(R.string.bluetooth_message_access_dialog_content, mRemoteName, mRemoteName)); return mView; } diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java index 5fffa3a2356..177bd893558 100644 --- a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java +++ b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java @@ -140,13 +140,13 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver { switch (mRequestType) { case BluetoothDevice.REQUEST_TYPE_PHONEBOOK_ACCESS: title = context.getString(R.string.bluetooth_phonebook_request); - message = context.getString(R.string.bluetooth_pb_acceptance_dialog_text, - deviceAlias, deviceAlias); + message = context.getString( + R.string.bluetooth_phonebook_access_notification_content); break; case BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS: title = context.getString(R.string.bluetooth_map_request); - message = context.getString(R.string.bluetooth_map_acceptance_dialog_text, - deviceAlias, deviceAlias); + message = context.getString( + R.string.bluetooth_message_access_notification_content); break; case BluetoothDevice.REQUEST_TYPE_SIM_ACCESS: title = context.getString(R.string.bluetooth_sap_request); @@ -172,6 +172,7 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver { .setContentTitle(title) .setTicker(message) .setContentText(message) + .setStyle(new Notification.BigTextStyle().bigText(message)) .setSmallIcon(android.R.drawable.stat_sys_data_bluetooth) .setAutoCancel(true) .setPriority(Notification.PRIORITY_MAX) diff --git a/src/com/android/settings/users/EditUserPhotoController.java b/src/com/android/settings/users/EditUserPhotoController.java index a20513a3664..60f720eacf7 100644 --- a/src/com/android/settings/users/EditUserPhotoController.java +++ b/src/com/android/settings/users/EditUserPhotoController.java @@ -36,6 +36,7 @@ import android.os.UserHandle; import android.os.UserManager; import android.provider.ContactsContract.DisplayPhoto; import android.provider.MediaStore; +import android.util.EventLog; import android.util.Log; import android.view.Gravity; import android.view.View; @@ -116,6 +117,14 @@ public class EditUserPhotoController { } final Uri pictureUri = data != null && data.getData() != null ? data.getData() : mTakePictureUri; + + // Check if the result is a content uri + if (!ContentResolver.SCHEME_CONTENT.equals(pictureUri.getScheme())) { + Log.e(TAG, "Invalid pictureUri scheme: " + pictureUri.getScheme()); + EventLog.writeEvent(0x534e4554, "172939189", -1, pictureUri.getPath()); + return false; + } + switch (requestCode) { case REQUEST_CODE_CROP_PHOTO: onPhotoCropped(pictureUri, true);