Skip to content

Commit 2b847c3

Browse files
Winson ChungAndroid (Google) Code Review
authored andcommitted
Merge "Removing unecessary additional lock metadata from QuickSettings user tile." into jb-mr1.1-dev
2 parents ab972a6 + f7614fc commit 2b847c3

File tree

5 files changed

+3
-23
lines changed

5 files changed

+3
-23
lines changed

core/java/com/android/internal/widget/LockPatternUtils.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,6 @@ public class LockPatternUtils {
115115
*/
116116
public static final String KEYGUARD_SHOW_APPWIDGET = "showappwidget";
117117

118-
/**
119-
* Options used to lock the device upon user switch.
120-
*/
121-
public static final Bundle USER_SWITCH_LOCK_OPTIONS = new Bundle();
122-
123-
static {
124-
USER_SWITCH_LOCK_OPTIONS.putBoolean(KEYGUARD_SHOW_USER_SWITCHER, true);
125-
USER_SWITCH_LOCK_OPTIONS.putBoolean(KEYGUARD_SHOW_SECURITY_CHALLENGE, true);
126-
}
127-
128118
/**
129119
* The bit in LOCK_BIOMETRIC_WEAK_FLAGS to be used to indicate whether liveliness should
130120
* be used

packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ public void onClick(View v) {
305305
(UserManager) mContext.getSystemService(Context.USER_SERVICE);
306306
if (um.getUsers(true).size() > 1) {
307307
try {
308-
WindowManagerGlobal.getWindowManagerService().lockNow(
309-
LockPatternUtils.USER_SWITCH_LOCK_OPTIONS);
308+
WindowManagerGlobal.getWindowManagerService().lockNow(null);
310309
} catch (RemoteException e) {
311310
Log.e(TAG, "Couldn't show user switcher", e);
312311
}

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,6 @@ private void inflateKeyguardView(Bundle options) {
243243
}
244244

245245
if (options != null) {
246-
if (options.getBoolean(LockPatternUtils.KEYGUARD_SHOW_USER_SWITCHER)) {
247-
mKeyguardView.goToUserSwitcher();
248-
}
249-
if (options.getBoolean(LockPatternUtils.KEYGUARD_SHOW_SECURITY_CHALLENGE)) {
250-
mKeyguardView.showNextSecurityScreenIfPresent();
251-
}
252246
int widgetToShow = options.getInt(LockPatternUtils.KEYGUARD_SHOW_APPWIDGET,
253247
AppWidgetManager.INVALID_APPWIDGET_ID);
254248
if (widgetToShow != AppWidgetManager.INVALID_APPWIDGET_ID) {

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,7 @@ public void onUserSwitched(int userId) {
315315
// We need to force a reset of the views, since lockNow (called by
316316
// ActivityManagerService) will not reconstruct the keyguard if it is already showing.
317317
synchronized (KeyguardViewMediator.this) {
318-
Bundle options = new Bundle();
319-
options.putBoolean(LockPatternUtils.KEYGUARD_SHOW_USER_SWITCHER, true);
320-
options.putBoolean(LockPatternUtils.KEYGUARD_SHOW_SECURITY_CHALLENGE, true);
321-
resetStateLocked(options);
318+
resetStateLocked(null);
322319
adjustStatusBarLocked();
323320
// Disable face unlock when the user switches.
324321
KeyguardUpdateMonitor.getInstance(mContext).setAlternateUnlockEnabled(false);

services/java/com/android/server/am/ActivityManagerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14168,7 +14168,7 @@ public boolean switchUser(int userId) {
1416814168

1416914169
// Once the internal notion of the active user has switched, we lock the device
1417014170
// with the option to show the user switcher on the keyguard.
14171-
mWindowManager.lockNow(LockPatternUtils.USER_SWITCH_LOCK_OPTIONS);
14171+
mWindowManager.lockNow(null);
1417214172

1417314173
final UserStartedState uss = mStartedUsers.get(userId);
1417414174

0 commit comments

Comments
 (0)