Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a6a1b12 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "RESTRICT AUTOMERGE Fix phishing attacks over Bluetooth due to unclear...

Merge "RESTRICT AUTOMERGE Fix phishing attacks over Bluetooth due to unclear warning message" into pi-dev
parents 2117006b 01a50db6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -10085,4 +10085,17 @@
    <!-- Title for Connected device shortcut [CHAR LIMIT=30] -->
    <string name="devices_title">Devices</string>
    <!-- Bluetooth message permission alert for notification content [CHAR LIMIT=none] -->
    <string name="bluetooth_message_access_notification_content">Untrusted device wants to access your messages. Tap for details.</string>
    <!-- Bluetooth message permission alert for dialog title [CHAR LIMIT=none] -->
    <string name="bluetooth_message_access_dialog_title">Allow access to messages?</string>
    <!-- Bluetooth message permission alert for dialog content [CHAR LIMIT=none] -->
    <string name="bluetooth_message_access_dialog_content">An untrusted Bluetooth device, [<xliff:g id="device_name" example="My device">%1$s</xliff:g>], wants to access your messages.\n\nYou haven\u2019t connected to [<xliff:g id="device_name" example="My device">%2$s</xliff:g>] before.</string>
    <!-- Bluetooth phonebook permission alert for notification content [CHAR LIMIT=none] -->
    <string name="bluetooth_phonebook_access_notification_content">Untrusted device wants to access your contacts and call log. Tap for details.</string>
    <!-- Bluetooth phonebook permission alert for dialog title [CHAR LIMIT=none] -->
    <string name="bluetooth_phonebook_access_dialog_title">Allow access to contacts and call log?</string>
    <!-- Bluetooth phonebook permission alert for dialog content [CHAR LIMIT=none] -->
    <string name="bluetooth_phonebook_access_dialog_content">An untrusted Bluetooth device, [<xliff:g id="device_name" example="My device">%1$s</xliff:g>], wants to access your contacts and call log. This includes data about incoming and outgoing calls.\n\nYou haven\u2019t connected to [<xliff:g id="device_name" example="My device">%2$s</xliff:g>] before.</string>
</resources>
+6 −6
Original line number Diff line number Diff line
@@ -101,9 +101,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);
        }
@@ -138,9 +138,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();
@@ -170,7 +170,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;
    }
@@ -179,7 +179,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;
    }
+5 −4
Original line number Diff line number Diff line
@@ -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)