diff options
4 files changed, 13 insertions, 5 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 80c2a1318a6a..99fbf951c77a 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -3094,7 +3094,7 @@ <!-- Choice in the ringtone picker. If chosen, the default ringtone will be used. This fills in the actual ringtone's title into the message. --> <string name="ringtone_default_with_actual">Default ringtone (<xliff:g id="actual_ringtone">%1$s</xliff:g>)</string> <!-- Choice in the ringtone picker. If chosen, there will be silence instead of a ringtone played. --> - <string name="ringtone_silent">Silent</string> + <string name="ringtone_silent">None</string> <!-- The title of the ringtone picker dialog. --> <string name="ringtone_picker_title">Ringtones</string> <!-- If there is ever a ringtone set for some setting, but that ringtone can no longer be resolved, t his is shown instead. For example, if the ringtone was on a SD card and it had been removed, this woudl be shown for ringtones on that SD card. --> diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index 8502d78e6b61..94cd0b55b79c 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -286,6 +286,11 @@ public class KeyguardHostView extends KeyguardViewBase { showPrimarySecurityScreen(false); updateSecurityViews(); + + // Make sure at least this view is focusable in case nothing below it is. Otherwise, + // requestFocus() on this view will fail and allow events, such as volume keys, to be + // handled by the fallback handler. See bug 7546960 for details. + setFocusableInTouchMode(true); } private boolean shouldEnableAddWidget() { @@ -881,6 +886,7 @@ public class KeyguardHostView extends KeyguardViewBase { if (mViewStateManager != null) { mViewStateManager.showUsabilityHints(); } + requestFocus(); } @Override @@ -900,6 +906,7 @@ public class KeyguardHostView extends KeyguardViewBase { if (cameraPage != null) { cameraPage.onScreenTurnedOff(); } + clearFocus(); } public void clearAppWidgetToShow() { diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java index efd09e0d0ade..dac852a862bb 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java @@ -216,6 +216,7 @@ public class KeyguardViewManager { if (force || mKeyguardView == null) { inflateKeyguardView(options); + mKeyguardView.requestFocus(); } updateUserActivityTimeoutInWindowLayoutParams(); mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); diff --git a/services/java/com/android/server/BluetoothManagerService.java b/services/java/com/android/server/BluetoothManagerService.java index 7f52157d54d8..5a2088ce01c7 100755 --- a/services/java/com/android/server/BluetoothManagerService.java +++ b/services/java/com/android/server/BluetoothManagerService.java @@ -513,8 +513,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } } public String getAddress() { - mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, - "Need BLUETOOTH ADMIN permission"); + mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, + "Need BLUETOOTH permission"); if ((Binder.getCallingUid() != Process.SYSTEM_UID) && (!checkIfCallerIsForegroundUser())) { @@ -538,8 +538,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } public String getName() { - mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, - "Need BLUETOOTH ADMIN permission"); + mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, + "Need BLUETOOTH permission"); if ((Binder.getCallingUid() != Process.SYSTEM_UID) && (!checkIfCallerIsForegroundUser())) { |