Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +17 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import android.os.IRemoteCallback; import android.os.Message; import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; Loading Loading @@ -259,10 +260,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { handleFinishedGoingToSleep(msg.arg1); break; case MSG_STARTED_WAKING_UP: Trace.beginSection("KeyguardUpdateMonitor#handler MSG_STARTED_WAKING_UP"); handleStartedWakingUp(); Trace.endSection(); break; case MSG_FACE_UNLOCK_STATE_CHANGED: Trace.beginSection("KeyguardUpdateMonitor#handler MSG_FACE_UNLOCK_STATE_CHANGED"); handleFaceUnlockStateChanged(msg.arg1 != 0, msg.arg2); Trace.endSection(); break; case MSG_SIM_SUBSCRIPTION_INFO_CHANGED: handleSimSubscriptionInfoChanged(); Loading @@ -277,7 +282,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { handleScreenTurnedOn(); break; case MSG_SCREEN_TURNED_OFF: Trace.beginSection("KeyguardUpdateMonitor#handler MSG_SCREEN_TURNED_ON"); handleScreenTurnedOff(); Trace.endSection(); break; } } Loading Loading @@ -399,6 +406,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void onFingerprintAuthenticated(int userId) { Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated"); mUserFingerprintAuthenticated.put(userId, true); // If fingerprint unlocking is allowed, this event will lead to a Keyguard dismiss or to a Loading @@ -411,6 +419,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onFingerprintAuthenticated(userId); } } Trace.endSection(); } private void handleFingerprintAuthFailed() { Loading @@ -436,6 +445,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void handleFingerprintAuthenticated() { Trace.beginSection("KeyGuardUpdateMonitor#handlerFingerPrintAuthenticated"); try { final int userId; try { Loading @@ -452,6 +462,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } finally { setFingerprintRunningState(FINGERPRINT_STATE_STOPPED); } Trace.endSection(); } private void handleFingerprintHelp(int msgId, String helpString) { Loading Loading @@ -690,8 +701,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED, intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId()), 0)); } else if (ACTION_FACE_UNLOCK_STARTED.equals(action)) { Trace.beginSection("KeyguardUpdateMonitor.mBroadcastAllReceiver#onReceive ACTION_FACE_UNLOCK_STARTED"); mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 1, getSendingUserId())); Trace.endSection(); } else if (ACTION_FACE_UNLOCK_STOPPED.equals(action)) { mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 0, getSendingUserId())); Loading Loading @@ -731,7 +744,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { @Override public void onAuthenticationSucceeded(AuthenticationResult result) { Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationSucceeded"); handleFingerprintAuthenticated(); Trace.endSection(); } @Override Loading Loading @@ -906,6 +921,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } protected void handleStartedWakingUp() { Trace.beginSection("KeyguardUpdateMonitor#handleStartedWakingUp"); updateFingerprintListeningState(); final int count = mCallbacks.size(); for (int i = 0; i < count; i++) { Loading @@ -914,6 +930,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onStartedWakingUp(); } } Trace.endSection(); } protected void handleStartedGoingToSleep(int arg1) { Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +17 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.os.Bundle; import android.os.Debug; import android.os.IBinder; import android.os.Process; import android.os.Trace; import android.util.Log; import com.android.internal.policy.IKeyguardDrawnCallback; Loading Loading @@ -73,21 +74,27 @@ public class KeyguardService extends Service { @Override // Binder interface public void verifyUnlock(IKeyguardExitCallback callback) { Trace.beginSection("KeyguardService.mBinder#verifyUnlock"); checkPermission(); mKeyguardViewMediator.verifyUnlock(callback); Trace.endSection(); } @Override // Binder interface public void keyguardDone(boolean authenticated, boolean wakeup) { Trace.beginSection("KeyguardService.mBinder#keyguardDone"); checkPermission(); // TODO: Remove wakeup mKeyguardViewMediator.keyguardDone(authenticated); Trace.endSection(); } @Override // Binder interface public void setOccluded(boolean isOccluded) { Trace.beginSection("KeyguardService.mBinder#setOccluded"); checkPermission(); mKeyguardViewMediator.setOccluded(isOccluded); Trace.endSection(); } @Override // Binder interface Loading Loading @@ -122,20 +129,26 @@ public class KeyguardService extends Service { @Override // Binder interface public void onStartedWakingUp() { Trace.beginSection("KeyguardService.mBinder#onStartedWakingUp"); checkPermission(); mKeyguardViewMediator.onStartedWakingUp(); Trace.endSection(); } @Override // Binder interface public void onScreenTurningOn(IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardService.mBinder#onScreenTurningOn"); checkPermission(); mKeyguardViewMediator.onScreenTurningOn(callback); Trace.endSection(); } @Override // Binder interface public void onScreenTurnedOn() { Trace.beginSection("KeyguardService.mBinder#onScreenTurningOn"); checkPermission(); mKeyguardViewMediator.onScreenTurnedOn(); Trace.endSection(); } @Override // Binder interface Loading @@ -152,8 +165,10 @@ public class KeyguardService extends Service { @Override // Binder interface public void onSystemReady() { Trace.beginSection("KeyguardService.mBinder#onSystemReady"); checkPermission(); mKeyguardViewMediator.onSystemReady(); Trace.endSection(); } @Override // Binder interface Loading @@ -176,8 +191,10 @@ public class KeyguardService extends Service { @Override public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { Trace.beginSection("KeyguardService.mBinder#startKeyguardExitAnimation"); checkPermission(); mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration); Trace.endSection(); } @Override Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +73 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; Loading Loading @@ -520,7 +521,9 @@ public class KeyguardViewMediator extends SystemUI { @Override public void keyguardDoneDrawing() { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDoneDrawing"); mHandler.sendEmptyMessage(KEYGUARD_DONE_DRAWING); Trace.endSection(); } @Override Loading @@ -530,6 +533,7 @@ public class KeyguardViewMediator extends SystemUI { @Override public void keyguardDonePending(boolean strongAuth) { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDonePending"); mKeyguardDonePending = true; mHideAnimationRun = true; mStatusBarKeyguardViewManager.startPreHideAnimation(null /* finishRunnable */); Loading @@ -538,20 +542,25 @@ public class KeyguardViewMediator extends SystemUI { if (strongAuth) { mUpdateMonitor.reportSuccessfulStrongAuthUnlockAttempt(); } Trace.endSection(); } @Override public void keyguardGone() { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardGone"); mKeyguardDisplayManager.hide(); Trace.endSection(); } @Override public void readyForKeyguardDone() { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#readyForKeyguardDone"); if (mKeyguardDonePending) { // Somebody has called keyguardDonePending before, which means that we are // authenticated KeyguardViewMediator.this.keyguardDone(true /* authenticated */); } Trace.endSection(); } @Override Loading Loading @@ -892,6 +901,7 @@ public class KeyguardViewMediator extends SystemUI { * Let's us know when the device is waking up. */ public void onStartedWakingUp() { Trace.beginSection("KeyguardViewMediator#onStartedWakingUp"); // TODO: Rename all screen off/on references to interactive/sleeping synchronized (this) { Loading @@ -903,15 +913,20 @@ public class KeyguardViewMediator extends SystemUI { } KeyguardUpdateMonitor.getInstance(mContext).dispatchStartedWakingUp(); maybeSendUserPresentBroadcast(); Trace.endSection(); } public void onScreenTurningOn(IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardViewMediator#onScreenTurningOn"); notifyScreenOn(callback); Trace.endSection(); } public void onScreenTurnedOn() { Trace.beginSection("KeyguardViewMediator#onScreenTurnedOn"); notifyScreenTurnedOn(); mUpdateMonitor.dispatchScreenTurnedOn(); Trace.endSection(); } public void onScreenTurnedOff() { Loading Loading @@ -1025,6 +1040,7 @@ public class KeyguardViewMediator extends SystemUI { * @see android.app.KeyguardManager#exitKeyguardSecurely */ public void verifyUnlock(IKeyguardExitCallback callback) { Trace.beginSection("KeyguardViewMediator#verifyUnlock"); synchronized (this) { if (DEBUG) Log.d(TAG, "verifyUnlock"); if (shouldWaitForProvisioning()) { Loading Loading @@ -1075,6 +1091,7 @@ public class KeyguardViewMediator extends SystemUI { } } } Trace.endSection(); } /** Loading @@ -1088,16 +1105,19 @@ public class KeyguardViewMediator extends SystemUI { * Notify us when the keyguard is occluded by another window */ public void setOccluded(boolean isOccluded) { Trace.beginSection("KeyguardViewMediator#setOccluded"); if (DEBUG) Log.d(TAG, "setOccluded " + isOccluded); mHandler.removeMessages(SET_OCCLUDED); Message msg = mHandler.obtainMessage(SET_OCCLUDED, (isOccluded ? 1 : 0), 0); mHandler.sendMessage(msg); Trace.endSection(); } /** * Handles SET_OCCLUDED message sent by setOccluded() */ private void handleSetOccluded(boolean isOccluded) { Trace.beginSection("KeyguardViewMediator#handleSetOccluded"); synchronized (KeyguardViewMediator.this) { if (mHiding && isOccluded) { // We're in the process of going away but WindowManager wants to show a Loading @@ -1112,6 +1132,7 @@ public class KeyguardViewMediator extends SystemUI { adjustStatusBarLocked(); } } Trace.endSection(); } /** Loading Loading @@ -1300,11 +1321,13 @@ public class KeyguardViewMediator extends SystemUI { * @see #handleShow */ private void showLocked(Bundle options) { Trace.beginSection("KeyguardViewMediator#showLocked aqcuiring mShowKeyguardWakeLock"); if (DEBUG) Log.d(TAG, "showLocked"); // ensure we stay awake until we are finished displaying the keyguard mShowKeyguardWakeLock.acquire(); Message msg = mHandler.obtainMessage(SHOW, options); mHandler.sendMessage(msg); Trace.endSection(); } /** Loading @@ -1312,9 +1335,11 @@ public class KeyguardViewMediator extends SystemUI { * @see #handleHide() */ private void hideLocked() { Trace.beginSection("KeyguardViewMediator#hideLocked"); if (DEBUG) Log.d(TAG, "hideLocked"); Message msg = mHandler.obtainMessage(HIDE); mHandler.sendMessage(msg); Trace.endSection(); } public boolean isSecure() { Loading Loading @@ -1359,10 +1384,12 @@ public class KeyguardViewMediator extends SystemUI { }; public void keyguardDone(boolean authenticated) { Trace.beginSection("KeyguardViewMediator#keyguardDone"); if (DEBUG) Log.d(TAG, "keyguardDone(" + authenticated +")"); EventLog.writeEvent(70000, 2); Message msg = mHandler.obtainMessage(KEYGUARD_DONE, authenticated ? 1 : 0); mHandler.sendMessage(msg); Trace.endSection(); } /** Loading @@ -1386,7 +1413,9 @@ public class KeyguardViewMediator extends SystemUI { handleReset(); break; case VERIFY_UNLOCK: Trace.beginSection("KeyguardViewMediator#handleMessage VERIFY_UNLOCK"); handleVerifyUnlock(); Trace.endSection(); break; case NOTIFY_STARTED_GOING_TO_SLEEP: handleNotifyStartedGoingToSleep(); Loading @@ -1395,25 +1424,37 @@ public class KeyguardViewMediator extends SystemUI { handleNotifyFinishedGoingToSleep(); break; case NOTIFY_SCREEN_TURNING_ON: Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_SCREEN_TURNING_ON"); handleNotifyScreenTurningOn((IKeyguardDrawnCallback) msg.obj); Trace.endSection(); break; case NOTIFY_SCREEN_TURNED_ON: Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_SCREEN_TURNED_ON"); handleNotifyScreenTurnedOn(); Trace.endSection(); break; case NOTIFY_SCREEN_TURNED_OFF: handleNotifyScreenTurnedOff(); break; case NOTIFY_STARTED_WAKING_UP: Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_STARTED_WAKING_UP"); handleNotifyStartedWakingUp(); Trace.endSection(); break; case KEYGUARD_DONE: Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE"); handleKeyguardDone(msg.arg1 != 0); Trace.endSection(); break; case KEYGUARD_DONE_DRAWING: Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE_DRAWING"); handleKeyguardDoneDrawing(); Trace.endSection(); break; case SET_OCCLUDED: Trace.beginSection("KeyguardViewMediator#handleMessage SET_OCCLUDED"); handleSetOccluded(msg.arg1 != 0); Trace.endSection(); break; case KEYGUARD_TIMEOUT: synchronized (KeyguardViewMediator.this) { Loading @@ -1424,12 +1465,16 @@ public class KeyguardViewMediator extends SystemUI { handleDismiss(); break; case START_KEYGUARD_EXIT_ANIM: Trace.beginSection("KeyguardViewMediator#handleMessage START_KEYGUARD_EXIT_ANIM"); StartKeyguardExitAnimParams params = (StartKeyguardExitAnimParams) msg.obj; handleStartKeyguardExitAnimation(params.startTime, params.fadeoutDuration); FalsingManager.getInstance(mContext).onSucccessfulUnlock(); Trace.endSection(); break; case KEYGUARD_DONE_PENDING_TIMEOUT: Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE_PENDING_TIMEOUT"); Log.w(TAG, "Timeout while waiting for activity drawn!"); Trace.endSection(); // Fall through. case ON_ACTIVITY_DRAWN: handleOnActivityDrawn(); Loading @@ -1443,6 +1488,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #KEYGUARD_DONE */ private void handleKeyguardDone(boolean authenticated) { Trace.beginSection("KeyguardViewMediator#handleKeyguardDone"); final int currentUser = KeyguardUpdateMonitor.getCurrentUser(); if (mLockPatternUtils.isSecure(currentUser)) { mLockPatternUtils.getDevicePolicyManager().reportKeyguardDismissed(currentUser); Loading Loading @@ -1480,6 +1526,7 @@ public class KeyguardViewMediator extends SystemUI { } handleHide(); Trace.endSection(); } private void sendUserPresentBroadcast() { Loading @@ -1504,6 +1551,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #KEYGUARD_DONE_DRAWING */ private void handleKeyguardDoneDrawing() { Trace.beginSection("KeyguardViewMediator#handleKeyguardDoneDrawing"); synchronized(this) { if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing"); if (mWaitingUntilKeyguardVisible) { Loading @@ -1517,6 +1565,7 @@ public class KeyguardViewMediator extends SystemUI { mHandler.removeMessages(KEYGUARD_DONE_DRAWING); } } Trace.endSection(); } private void playSounds(boolean locked) { Loading Loading @@ -1548,10 +1597,12 @@ public class KeyguardViewMediator extends SystemUI { } private void updateActivityLockScreenState() { Trace.beginSection("KeyguardViewMediator#updateActivityLockScreenState"); try { ActivityManagerNative.getDefault().setLockScreenShown(mShowing, mOccluded); } catch (RemoteException e) { } Trace.endSection(); } /** Loading @@ -1559,6 +1610,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #SHOW */ private void handleShow(Bundle options) { Trace.beginSection("KeyguardViewMediator#handleShow"); final int currentUser = KeyguardUpdateMonitor.getCurrentUser(); if (mLockPatternUtils.isSecure(currentUser)) { mLockPatternUtils.getDevicePolicyManager().reportKeyguardSecured(currentUser); Loading @@ -1584,11 +1636,13 @@ public class KeyguardViewMediator extends SystemUI { mShowKeyguardWakeLock.release(); } mKeyguardDisplayManager.show(); Trace.endSection(); } private final Runnable mKeyguardGoingAwayRunnable = new Runnable() { @Override public void run() { Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable"); try { mStatusBarKeyguardViewManager.keyguardGoingAway(); Loading @@ -1611,6 +1665,7 @@ public class KeyguardViewMediator extends SystemUI { } catch (RemoteException e) { Log.e(TAG, "Error while calling WindowManager", e); } Trace.endSection(); } }; Loading @@ -1619,6 +1674,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #HIDE */ private void handleHide() { Trace.beginSection("KeyguardViewMediator#handleHide"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleHide"); Loading Loading @@ -1646,6 +1702,7 @@ public class KeyguardViewMediator extends SystemUI { mHideAnimation.getDuration()); } } Trace.endSection(); } private void handleOnActivityDrawn() { Loading @@ -1656,6 +1713,7 @@ public class KeyguardViewMediator extends SystemUI { } private void handleStartKeyguardExitAnimation(long startTime, long fadeoutDuration) { Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation"); synchronized (KeyguardViewMediator.this) { if (!mHiding) { Loading Loading @@ -1686,6 +1744,7 @@ public class KeyguardViewMediator extends SystemUI { adjustStatusBarLocked(); sendUserPresentBroadcast(); } Trace.endSection(); } private void adjustStatusBarLocked() { Loading Loading @@ -1737,12 +1796,14 @@ public class KeyguardViewMediator extends SystemUI { * @see #VERIFY_UNLOCK */ private void handleVerifyUnlock() { Trace.beginSection("KeyguardViewMediator#handleVerifyUnlock"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleVerifyUnlock"); setShowingLocked(true); mStatusBarKeyguardViewManager.verifyUnlock(); updateActivityLockScreenState(); } Trace.endSection(); } private void handleNotifyStartedGoingToSleep() { Loading @@ -1764,13 +1825,16 @@ public class KeyguardViewMediator extends SystemUI { } private void handleNotifyStartedWakingUp() { Trace.beginSection("KeyguardViewMediator#handleMotifyStartedWakingUp"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleNotifyWakingUp"); mStatusBarKeyguardViewManager.onStartedWakingUp(); } Trace.endSection(); } private void handleNotifyScreenTurningOn(IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurningOn"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleNotifyScreenTurningOn"); mStatusBarKeyguardViewManager.onScreenTurningOn(); Loading @@ -1782,13 +1846,16 @@ public class KeyguardViewMediator extends SystemUI { } } } Trace.endSection(); } private void handleNotifyScreenTurnedOn() { Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurnedOn"); synchronized (this) { if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOn"); mStatusBarKeyguardViewManager.onScreenTurnedOn(); } Trace.endSection(); } private void handleNotifyScreenTurnedOff() { Loading @@ -1800,11 +1867,13 @@ public class KeyguardViewMediator extends SystemUI { } private void notifyDrawn(final IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardViewMediator#notifyDrawn"); try { callback.onDrawn(); } catch (RemoteException e) { Slog.w(TAG, "Exception calling onDrawn():", e); } Trace.endSection(); } private void resetKeyguardDonePendingLocked() { Loading @@ -1824,8 +1893,10 @@ public class KeyguardViewMediator extends SystemUI { } public void onWakeAndUnlocking() { Trace.beginSection("KeyguardViewMediator#onWakeAndUnlocking"); mWakeAndUnlocking = true; keyguardDone(true /* authenticated */); Trace.endSection(); } public StatusBarKeyguardViewManager registerStatusBar(PhoneStatusBar phoneStatusBar, Loading @@ -1838,9 +1909,11 @@ public class KeyguardViewMediator extends SystemUI { } public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { Trace.beginSection("KeyguardViewMediator#startKeyguardExitAnimation"); Message msg = mHandler.obtainMessage(START_KEYGUARD_EXIT_ANIM, new StartKeyguardExitAnimParams(startTime, fadeoutDuration)); mHandler.sendMessage(msg); Trace.endSection(); } public void onActivityDrawn() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +20 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.os.Handler; import android.os.PowerManager; import android.os.SystemClock; import android.os.Trace; import android.util.Log; import com.android.keyguard.KeyguardConstants; Loading Loading @@ -140,11 +141,14 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { @Override public void onFingerprintAcquired() { Trace.beginSection("FingerprintUnlockController#onFingerprintAcquired"); releaseFingerprintWakeLock(); if (!mUpdateMonitor.isDeviceInteractive()) { mWakeLock = mPowerManager.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, FINGERPRINT_WAKE_LOCK_NAME); Trace.beginSection("acquiring wake-and-unlock"); mWakeLock.acquire(); Trace.endSection(); if (DEBUG_FP_WAKELOCK) { Log.i(TAG, "fingerprint acquired, grabbing fp wakelock"); } Loading @@ -159,12 +163,15 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { mStatusBarWindowManager.setForceDozeBrightness(true); } } Trace.endSection(); } @Override public void onFingerprintAuthenticated(int userId) { Trace.beginSection("FingerprintUnlockController#onFingerprintAuthenticated"); if (mUpdateMonitor.isGoingToSleep()) { mPendingAuthenticatedUserId = userId; Trace.endSection(); return; } boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); Loading @@ -175,25 +182,34 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { } mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:FINGERPRINT"); } Trace.beginSection("release wake-and-unlock"); releaseFingerprintWakeLock(); Trace.endSection(); switch (mMode) { case MODE_DISMISS_BOUNCER: Trace.beginSection("MODE_DISMISS"); mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated( false /* strongAuth */); Trace.endSection(); break; case MODE_UNLOCK: case MODE_SHOW_BOUNCER: Trace.beginSection("MODE_UNLOCK or MODE_SHOW_BOUNCER"); if (!wasDeviceInteractive) { mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested(); } mStatusBarKeyguardViewManager.animateCollapsePanels( FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR); Trace.endSection(); break; case MODE_WAKE_AND_UNLOCK_PULSING: Trace.beginSection("MODE_WAKE_AND_UNLOCK_PULSING"); mPhoneStatusBar.updateMediaMetaData(false /* metaDataChanged */, true /* allowEnterAnimation */); // Fall through. Trace.endSection(); case MODE_WAKE_AND_UNLOCK: Trace.beginSection("MODE_WAKE_AND_UNLOCK"); mStatusBarWindowManager.setStatusBarFocusable(false); mDozeScrimController.abortPulsing(); mKeyguardViewMediator.onWakeAndUnlocking(); Loading @@ -201,6 +217,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { if (mPhoneStatusBar.getNavigationBarView() != null) { mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true); } Trace.endSection(); break; case MODE_ONLY_WAKE: case MODE_NONE: Loading @@ -210,6 +227,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { mStatusBarWindowManager.setForceDozeBrightness(false); } mPhoneStatusBar.notifyFpAuthModeChanged(); Trace.endSection(); } @Override Loading @@ -219,6 +237,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { @Override public void onFinishedGoingToSleep(int why) { Trace.beginSection("FingerprintUnlockController#onFinishedGoingToSleep"); if (mPendingAuthenticatedUserId != -1) { // Post this to make sure it's executed after the device is fully locked. Loading @@ -230,6 +249,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { }); } mPendingAuthenticatedUserId = -1; Trace.endSection(); } public int getMode() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +22 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +17 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import android.os.IRemoteCallback; import android.os.Message; import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; Loading Loading @@ -259,10 +260,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { handleFinishedGoingToSleep(msg.arg1); break; case MSG_STARTED_WAKING_UP: Trace.beginSection("KeyguardUpdateMonitor#handler MSG_STARTED_WAKING_UP"); handleStartedWakingUp(); Trace.endSection(); break; case MSG_FACE_UNLOCK_STATE_CHANGED: Trace.beginSection("KeyguardUpdateMonitor#handler MSG_FACE_UNLOCK_STATE_CHANGED"); handleFaceUnlockStateChanged(msg.arg1 != 0, msg.arg2); Trace.endSection(); break; case MSG_SIM_SUBSCRIPTION_INFO_CHANGED: handleSimSubscriptionInfoChanged(); Loading @@ -277,7 +282,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { handleScreenTurnedOn(); break; case MSG_SCREEN_TURNED_OFF: Trace.beginSection("KeyguardUpdateMonitor#handler MSG_SCREEN_TURNED_ON"); handleScreenTurnedOff(); Trace.endSection(); break; } } Loading Loading @@ -399,6 +406,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void onFingerprintAuthenticated(int userId) { Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated"); mUserFingerprintAuthenticated.put(userId, true); // If fingerprint unlocking is allowed, this event will lead to a Keyguard dismiss or to a Loading @@ -411,6 +419,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onFingerprintAuthenticated(userId); } } Trace.endSection(); } private void handleFingerprintAuthFailed() { Loading @@ -436,6 +445,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private void handleFingerprintAuthenticated() { Trace.beginSection("KeyGuardUpdateMonitor#handlerFingerPrintAuthenticated"); try { final int userId; try { Loading @@ -452,6 +462,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } finally { setFingerprintRunningState(FINGERPRINT_STATE_STOPPED); } Trace.endSection(); } private void handleFingerprintHelp(int msgId, String helpString) { Loading Loading @@ -690,8 +701,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED, intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId()), 0)); } else if (ACTION_FACE_UNLOCK_STARTED.equals(action)) { Trace.beginSection("KeyguardUpdateMonitor.mBroadcastAllReceiver#onReceive ACTION_FACE_UNLOCK_STARTED"); mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 1, getSendingUserId())); Trace.endSection(); } else if (ACTION_FACE_UNLOCK_STOPPED.equals(action)) { mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 0, getSendingUserId())); Loading Loading @@ -731,7 +744,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { @Override public void onAuthenticationSucceeded(AuthenticationResult result) { Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationSucceeded"); handleFingerprintAuthenticated(); Trace.endSection(); } @Override Loading Loading @@ -906,6 +921,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } protected void handleStartedWakingUp() { Trace.beginSection("KeyguardUpdateMonitor#handleStartedWakingUp"); updateFingerprintListeningState(); final int count = mCallbacks.size(); for (int i = 0; i < count; i++) { Loading @@ -914,6 +930,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { cb.onStartedWakingUp(); } } Trace.endSection(); } protected void handleStartedGoingToSleep(int arg1) { Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +17 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.os.Bundle; import android.os.Debug; import android.os.IBinder; import android.os.Process; import android.os.Trace; import android.util.Log; import com.android.internal.policy.IKeyguardDrawnCallback; Loading Loading @@ -73,21 +74,27 @@ public class KeyguardService extends Service { @Override // Binder interface public void verifyUnlock(IKeyguardExitCallback callback) { Trace.beginSection("KeyguardService.mBinder#verifyUnlock"); checkPermission(); mKeyguardViewMediator.verifyUnlock(callback); Trace.endSection(); } @Override // Binder interface public void keyguardDone(boolean authenticated, boolean wakeup) { Trace.beginSection("KeyguardService.mBinder#keyguardDone"); checkPermission(); // TODO: Remove wakeup mKeyguardViewMediator.keyguardDone(authenticated); Trace.endSection(); } @Override // Binder interface public void setOccluded(boolean isOccluded) { Trace.beginSection("KeyguardService.mBinder#setOccluded"); checkPermission(); mKeyguardViewMediator.setOccluded(isOccluded); Trace.endSection(); } @Override // Binder interface Loading Loading @@ -122,20 +129,26 @@ public class KeyguardService extends Service { @Override // Binder interface public void onStartedWakingUp() { Trace.beginSection("KeyguardService.mBinder#onStartedWakingUp"); checkPermission(); mKeyguardViewMediator.onStartedWakingUp(); Trace.endSection(); } @Override // Binder interface public void onScreenTurningOn(IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardService.mBinder#onScreenTurningOn"); checkPermission(); mKeyguardViewMediator.onScreenTurningOn(callback); Trace.endSection(); } @Override // Binder interface public void onScreenTurnedOn() { Trace.beginSection("KeyguardService.mBinder#onScreenTurningOn"); checkPermission(); mKeyguardViewMediator.onScreenTurnedOn(); Trace.endSection(); } @Override // Binder interface Loading @@ -152,8 +165,10 @@ public class KeyguardService extends Service { @Override // Binder interface public void onSystemReady() { Trace.beginSection("KeyguardService.mBinder#onSystemReady"); checkPermission(); mKeyguardViewMediator.onSystemReady(); Trace.endSection(); } @Override // Binder interface Loading @@ -176,8 +191,10 @@ public class KeyguardService extends Service { @Override public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { Trace.beginSection("KeyguardService.mBinder#startKeyguardExitAnimation"); checkPermission(); mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration); Trace.endSection(); } @Override Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +73 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; Loading Loading @@ -520,7 +521,9 @@ public class KeyguardViewMediator extends SystemUI { @Override public void keyguardDoneDrawing() { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDoneDrawing"); mHandler.sendEmptyMessage(KEYGUARD_DONE_DRAWING); Trace.endSection(); } @Override Loading @@ -530,6 +533,7 @@ public class KeyguardViewMediator extends SystemUI { @Override public void keyguardDonePending(boolean strongAuth) { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDonePending"); mKeyguardDonePending = true; mHideAnimationRun = true; mStatusBarKeyguardViewManager.startPreHideAnimation(null /* finishRunnable */); Loading @@ -538,20 +542,25 @@ public class KeyguardViewMediator extends SystemUI { if (strongAuth) { mUpdateMonitor.reportSuccessfulStrongAuthUnlockAttempt(); } Trace.endSection(); } @Override public void keyguardGone() { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardGone"); mKeyguardDisplayManager.hide(); Trace.endSection(); } @Override public void readyForKeyguardDone() { Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#readyForKeyguardDone"); if (mKeyguardDonePending) { // Somebody has called keyguardDonePending before, which means that we are // authenticated KeyguardViewMediator.this.keyguardDone(true /* authenticated */); } Trace.endSection(); } @Override Loading Loading @@ -892,6 +901,7 @@ public class KeyguardViewMediator extends SystemUI { * Let's us know when the device is waking up. */ public void onStartedWakingUp() { Trace.beginSection("KeyguardViewMediator#onStartedWakingUp"); // TODO: Rename all screen off/on references to interactive/sleeping synchronized (this) { Loading @@ -903,15 +913,20 @@ public class KeyguardViewMediator extends SystemUI { } KeyguardUpdateMonitor.getInstance(mContext).dispatchStartedWakingUp(); maybeSendUserPresentBroadcast(); Trace.endSection(); } public void onScreenTurningOn(IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardViewMediator#onScreenTurningOn"); notifyScreenOn(callback); Trace.endSection(); } public void onScreenTurnedOn() { Trace.beginSection("KeyguardViewMediator#onScreenTurnedOn"); notifyScreenTurnedOn(); mUpdateMonitor.dispatchScreenTurnedOn(); Trace.endSection(); } public void onScreenTurnedOff() { Loading Loading @@ -1025,6 +1040,7 @@ public class KeyguardViewMediator extends SystemUI { * @see android.app.KeyguardManager#exitKeyguardSecurely */ public void verifyUnlock(IKeyguardExitCallback callback) { Trace.beginSection("KeyguardViewMediator#verifyUnlock"); synchronized (this) { if (DEBUG) Log.d(TAG, "verifyUnlock"); if (shouldWaitForProvisioning()) { Loading Loading @@ -1075,6 +1091,7 @@ public class KeyguardViewMediator extends SystemUI { } } } Trace.endSection(); } /** Loading @@ -1088,16 +1105,19 @@ public class KeyguardViewMediator extends SystemUI { * Notify us when the keyguard is occluded by another window */ public void setOccluded(boolean isOccluded) { Trace.beginSection("KeyguardViewMediator#setOccluded"); if (DEBUG) Log.d(TAG, "setOccluded " + isOccluded); mHandler.removeMessages(SET_OCCLUDED); Message msg = mHandler.obtainMessage(SET_OCCLUDED, (isOccluded ? 1 : 0), 0); mHandler.sendMessage(msg); Trace.endSection(); } /** * Handles SET_OCCLUDED message sent by setOccluded() */ private void handleSetOccluded(boolean isOccluded) { Trace.beginSection("KeyguardViewMediator#handleSetOccluded"); synchronized (KeyguardViewMediator.this) { if (mHiding && isOccluded) { // We're in the process of going away but WindowManager wants to show a Loading @@ -1112,6 +1132,7 @@ public class KeyguardViewMediator extends SystemUI { adjustStatusBarLocked(); } } Trace.endSection(); } /** Loading Loading @@ -1300,11 +1321,13 @@ public class KeyguardViewMediator extends SystemUI { * @see #handleShow */ private void showLocked(Bundle options) { Trace.beginSection("KeyguardViewMediator#showLocked aqcuiring mShowKeyguardWakeLock"); if (DEBUG) Log.d(TAG, "showLocked"); // ensure we stay awake until we are finished displaying the keyguard mShowKeyguardWakeLock.acquire(); Message msg = mHandler.obtainMessage(SHOW, options); mHandler.sendMessage(msg); Trace.endSection(); } /** Loading @@ -1312,9 +1335,11 @@ public class KeyguardViewMediator extends SystemUI { * @see #handleHide() */ private void hideLocked() { Trace.beginSection("KeyguardViewMediator#hideLocked"); if (DEBUG) Log.d(TAG, "hideLocked"); Message msg = mHandler.obtainMessage(HIDE); mHandler.sendMessage(msg); Trace.endSection(); } public boolean isSecure() { Loading Loading @@ -1359,10 +1384,12 @@ public class KeyguardViewMediator extends SystemUI { }; public void keyguardDone(boolean authenticated) { Trace.beginSection("KeyguardViewMediator#keyguardDone"); if (DEBUG) Log.d(TAG, "keyguardDone(" + authenticated +")"); EventLog.writeEvent(70000, 2); Message msg = mHandler.obtainMessage(KEYGUARD_DONE, authenticated ? 1 : 0); mHandler.sendMessage(msg); Trace.endSection(); } /** Loading @@ -1386,7 +1413,9 @@ public class KeyguardViewMediator extends SystemUI { handleReset(); break; case VERIFY_UNLOCK: Trace.beginSection("KeyguardViewMediator#handleMessage VERIFY_UNLOCK"); handleVerifyUnlock(); Trace.endSection(); break; case NOTIFY_STARTED_GOING_TO_SLEEP: handleNotifyStartedGoingToSleep(); Loading @@ -1395,25 +1424,37 @@ public class KeyguardViewMediator extends SystemUI { handleNotifyFinishedGoingToSleep(); break; case NOTIFY_SCREEN_TURNING_ON: Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_SCREEN_TURNING_ON"); handleNotifyScreenTurningOn((IKeyguardDrawnCallback) msg.obj); Trace.endSection(); break; case NOTIFY_SCREEN_TURNED_ON: Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_SCREEN_TURNED_ON"); handleNotifyScreenTurnedOn(); Trace.endSection(); break; case NOTIFY_SCREEN_TURNED_OFF: handleNotifyScreenTurnedOff(); break; case NOTIFY_STARTED_WAKING_UP: Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_STARTED_WAKING_UP"); handleNotifyStartedWakingUp(); Trace.endSection(); break; case KEYGUARD_DONE: Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE"); handleKeyguardDone(msg.arg1 != 0); Trace.endSection(); break; case KEYGUARD_DONE_DRAWING: Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE_DRAWING"); handleKeyguardDoneDrawing(); Trace.endSection(); break; case SET_OCCLUDED: Trace.beginSection("KeyguardViewMediator#handleMessage SET_OCCLUDED"); handleSetOccluded(msg.arg1 != 0); Trace.endSection(); break; case KEYGUARD_TIMEOUT: synchronized (KeyguardViewMediator.this) { Loading @@ -1424,12 +1465,16 @@ public class KeyguardViewMediator extends SystemUI { handleDismiss(); break; case START_KEYGUARD_EXIT_ANIM: Trace.beginSection("KeyguardViewMediator#handleMessage START_KEYGUARD_EXIT_ANIM"); StartKeyguardExitAnimParams params = (StartKeyguardExitAnimParams) msg.obj; handleStartKeyguardExitAnimation(params.startTime, params.fadeoutDuration); FalsingManager.getInstance(mContext).onSucccessfulUnlock(); Trace.endSection(); break; case KEYGUARD_DONE_PENDING_TIMEOUT: Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE_PENDING_TIMEOUT"); Log.w(TAG, "Timeout while waiting for activity drawn!"); Trace.endSection(); // Fall through. case ON_ACTIVITY_DRAWN: handleOnActivityDrawn(); Loading @@ -1443,6 +1488,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #KEYGUARD_DONE */ private void handleKeyguardDone(boolean authenticated) { Trace.beginSection("KeyguardViewMediator#handleKeyguardDone"); final int currentUser = KeyguardUpdateMonitor.getCurrentUser(); if (mLockPatternUtils.isSecure(currentUser)) { mLockPatternUtils.getDevicePolicyManager().reportKeyguardDismissed(currentUser); Loading Loading @@ -1480,6 +1526,7 @@ public class KeyguardViewMediator extends SystemUI { } handleHide(); Trace.endSection(); } private void sendUserPresentBroadcast() { Loading @@ -1504,6 +1551,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #KEYGUARD_DONE_DRAWING */ private void handleKeyguardDoneDrawing() { Trace.beginSection("KeyguardViewMediator#handleKeyguardDoneDrawing"); synchronized(this) { if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing"); if (mWaitingUntilKeyguardVisible) { Loading @@ -1517,6 +1565,7 @@ public class KeyguardViewMediator extends SystemUI { mHandler.removeMessages(KEYGUARD_DONE_DRAWING); } } Trace.endSection(); } private void playSounds(boolean locked) { Loading Loading @@ -1548,10 +1597,12 @@ public class KeyguardViewMediator extends SystemUI { } private void updateActivityLockScreenState() { Trace.beginSection("KeyguardViewMediator#updateActivityLockScreenState"); try { ActivityManagerNative.getDefault().setLockScreenShown(mShowing, mOccluded); } catch (RemoteException e) { } Trace.endSection(); } /** Loading @@ -1559,6 +1610,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #SHOW */ private void handleShow(Bundle options) { Trace.beginSection("KeyguardViewMediator#handleShow"); final int currentUser = KeyguardUpdateMonitor.getCurrentUser(); if (mLockPatternUtils.isSecure(currentUser)) { mLockPatternUtils.getDevicePolicyManager().reportKeyguardSecured(currentUser); Loading @@ -1584,11 +1636,13 @@ public class KeyguardViewMediator extends SystemUI { mShowKeyguardWakeLock.release(); } mKeyguardDisplayManager.show(); Trace.endSection(); } private final Runnable mKeyguardGoingAwayRunnable = new Runnable() { @Override public void run() { Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable"); try { mStatusBarKeyguardViewManager.keyguardGoingAway(); Loading @@ -1611,6 +1665,7 @@ public class KeyguardViewMediator extends SystemUI { } catch (RemoteException e) { Log.e(TAG, "Error while calling WindowManager", e); } Trace.endSection(); } }; Loading @@ -1619,6 +1674,7 @@ public class KeyguardViewMediator extends SystemUI { * @see #HIDE */ private void handleHide() { Trace.beginSection("KeyguardViewMediator#handleHide"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleHide"); Loading Loading @@ -1646,6 +1702,7 @@ public class KeyguardViewMediator extends SystemUI { mHideAnimation.getDuration()); } } Trace.endSection(); } private void handleOnActivityDrawn() { Loading @@ -1656,6 +1713,7 @@ public class KeyguardViewMediator extends SystemUI { } private void handleStartKeyguardExitAnimation(long startTime, long fadeoutDuration) { Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation"); synchronized (KeyguardViewMediator.this) { if (!mHiding) { Loading Loading @@ -1686,6 +1744,7 @@ public class KeyguardViewMediator extends SystemUI { adjustStatusBarLocked(); sendUserPresentBroadcast(); } Trace.endSection(); } private void adjustStatusBarLocked() { Loading Loading @@ -1737,12 +1796,14 @@ public class KeyguardViewMediator extends SystemUI { * @see #VERIFY_UNLOCK */ private void handleVerifyUnlock() { Trace.beginSection("KeyguardViewMediator#handleVerifyUnlock"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleVerifyUnlock"); setShowingLocked(true); mStatusBarKeyguardViewManager.verifyUnlock(); updateActivityLockScreenState(); } Trace.endSection(); } private void handleNotifyStartedGoingToSleep() { Loading @@ -1764,13 +1825,16 @@ public class KeyguardViewMediator extends SystemUI { } private void handleNotifyStartedWakingUp() { Trace.beginSection("KeyguardViewMediator#handleMotifyStartedWakingUp"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleNotifyWakingUp"); mStatusBarKeyguardViewManager.onStartedWakingUp(); } Trace.endSection(); } private void handleNotifyScreenTurningOn(IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurningOn"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleNotifyScreenTurningOn"); mStatusBarKeyguardViewManager.onScreenTurningOn(); Loading @@ -1782,13 +1846,16 @@ public class KeyguardViewMediator extends SystemUI { } } } Trace.endSection(); } private void handleNotifyScreenTurnedOn() { Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurnedOn"); synchronized (this) { if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOn"); mStatusBarKeyguardViewManager.onScreenTurnedOn(); } Trace.endSection(); } private void handleNotifyScreenTurnedOff() { Loading @@ -1800,11 +1867,13 @@ public class KeyguardViewMediator extends SystemUI { } private void notifyDrawn(final IKeyguardDrawnCallback callback) { Trace.beginSection("KeyguardViewMediator#notifyDrawn"); try { callback.onDrawn(); } catch (RemoteException e) { Slog.w(TAG, "Exception calling onDrawn():", e); } Trace.endSection(); } private void resetKeyguardDonePendingLocked() { Loading @@ -1824,8 +1893,10 @@ public class KeyguardViewMediator extends SystemUI { } public void onWakeAndUnlocking() { Trace.beginSection("KeyguardViewMediator#onWakeAndUnlocking"); mWakeAndUnlocking = true; keyguardDone(true /* authenticated */); Trace.endSection(); } public StatusBarKeyguardViewManager registerStatusBar(PhoneStatusBar phoneStatusBar, Loading @@ -1838,9 +1909,11 @@ public class KeyguardViewMediator extends SystemUI { } public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { Trace.beginSection("KeyguardViewMediator#startKeyguardExitAnimation"); Message msg = mHandler.obtainMessage(START_KEYGUARD_EXIT_ANIM, new StartKeyguardExitAnimParams(startTime, fadeoutDuration)); mHandler.sendMessage(msg); Trace.endSection(); } public void onActivityDrawn() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/FingerprintUnlockController.java +20 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.os.Handler; import android.os.PowerManager; import android.os.SystemClock; import android.os.Trace; import android.util.Log; import com.android.keyguard.KeyguardConstants; Loading Loading @@ -140,11 +141,14 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { @Override public void onFingerprintAcquired() { Trace.beginSection("FingerprintUnlockController#onFingerprintAcquired"); releaseFingerprintWakeLock(); if (!mUpdateMonitor.isDeviceInteractive()) { mWakeLock = mPowerManager.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, FINGERPRINT_WAKE_LOCK_NAME); Trace.beginSection("acquiring wake-and-unlock"); mWakeLock.acquire(); Trace.endSection(); if (DEBUG_FP_WAKELOCK) { Log.i(TAG, "fingerprint acquired, grabbing fp wakelock"); } Loading @@ -159,12 +163,15 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { mStatusBarWindowManager.setForceDozeBrightness(true); } } Trace.endSection(); } @Override public void onFingerprintAuthenticated(int userId) { Trace.beginSection("FingerprintUnlockController#onFingerprintAuthenticated"); if (mUpdateMonitor.isGoingToSleep()) { mPendingAuthenticatedUserId = userId; Trace.endSection(); return; } boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); Loading @@ -175,25 +182,34 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { } mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:FINGERPRINT"); } Trace.beginSection("release wake-and-unlock"); releaseFingerprintWakeLock(); Trace.endSection(); switch (mMode) { case MODE_DISMISS_BOUNCER: Trace.beginSection("MODE_DISMISS"); mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated( false /* strongAuth */); Trace.endSection(); break; case MODE_UNLOCK: case MODE_SHOW_BOUNCER: Trace.beginSection("MODE_UNLOCK or MODE_SHOW_BOUNCER"); if (!wasDeviceInteractive) { mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested(); } mStatusBarKeyguardViewManager.animateCollapsePanels( FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR); Trace.endSection(); break; case MODE_WAKE_AND_UNLOCK_PULSING: Trace.beginSection("MODE_WAKE_AND_UNLOCK_PULSING"); mPhoneStatusBar.updateMediaMetaData(false /* metaDataChanged */, true /* allowEnterAnimation */); // Fall through. Trace.endSection(); case MODE_WAKE_AND_UNLOCK: Trace.beginSection("MODE_WAKE_AND_UNLOCK"); mStatusBarWindowManager.setStatusBarFocusable(false); mDozeScrimController.abortPulsing(); mKeyguardViewMediator.onWakeAndUnlocking(); Loading @@ -201,6 +217,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { if (mPhoneStatusBar.getNavigationBarView() != null) { mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true); } Trace.endSection(); break; case MODE_ONLY_WAKE: case MODE_NONE: Loading @@ -210,6 +227,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { mStatusBarWindowManager.setForceDozeBrightness(false); } mPhoneStatusBar.notifyFpAuthModeChanged(); Trace.endSection(); } @Override Loading @@ -219,6 +237,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { @Override public void onFinishedGoingToSleep(int why) { Trace.beginSection("FingerprintUnlockController#onFinishedGoingToSleep"); if (mPendingAuthenticatedUserId != -1) { // Post this to make sure it's executed after the device is fully locked. Loading @@ -230,6 +249,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback { }); } mPendingAuthenticatedUserId = -1; Trace.endSection(); } public int getMode() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +22 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes