framework: SystemUI: add tracing to Keyguard

am: 1d3967506e

Change-Id: Ie889e05bc24230ea9779ca63003908c90be85d43
This commit is contained in:
Nick Desaulniers
2016-07-27 21:28:12 +00:00
committed by android-build-merger
7 changed files with 161 additions and 2 deletions

View File

@@ -50,6 +50,7 @@ import android.os.IRemoteCallback;
import android.os.Message; import android.os.Message;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.Trace;
import android.os.UserHandle; import android.os.UserHandle;
import android.os.UserManager; import android.os.UserManager;
import android.provider.Settings; import android.provider.Settings;
@@ -259,10 +260,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
handleFinishedGoingToSleep(msg.arg1); handleFinishedGoingToSleep(msg.arg1);
break; break;
case MSG_STARTED_WAKING_UP: case MSG_STARTED_WAKING_UP:
Trace.beginSection("KeyguardUpdateMonitor#handler MSG_STARTED_WAKING_UP");
handleStartedWakingUp(); handleStartedWakingUp();
Trace.endSection();
break; break;
case MSG_FACE_UNLOCK_STATE_CHANGED: case MSG_FACE_UNLOCK_STATE_CHANGED:
Trace.beginSection("KeyguardUpdateMonitor#handler MSG_FACE_UNLOCK_STATE_CHANGED");
handleFaceUnlockStateChanged(msg.arg1 != 0, msg.arg2); handleFaceUnlockStateChanged(msg.arg1 != 0, msg.arg2);
Trace.endSection();
break; break;
case MSG_SIM_SUBSCRIPTION_INFO_CHANGED: case MSG_SIM_SUBSCRIPTION_INFO_CHANGED:
handleSimSubscriptionInfoChanged(); handleSimSubscriptionInfoChanged();
@@ -277,7 +282,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
handleScreenTurnedOn(); handleScreenTurnedOn();
break; break;
case MSG_SCREEN_TURNED_OFF: case MSG_SCREEN_TURNED_OFF:
Trace.beginSection("KeyguardUpdateMonitor#handler MSG_SCREEN_TURNED_ON");
handleScreenTurnedOff(); handleScreenTurnedOff();
Trace.endSection();
break; break;
} }
} }
@@ -399,6 +406,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
} }
private void onFingerprintAuthenticated(int userId) { private void onFingerprintAuthenticated(int userId) {
Trace.beginSection("KeyGuardUpdateMonitor#onFingerPrintAuthenticated");
mUserFingerprintAuthenticated.put(userId, true); mUserFingerprintAuthenticated.put(userId, true);
// If fingerprint unlocking is allowed, this event will lead to a Keyguard dismiss or to a // If fingerprint unlocking is allowed, this event will lead to a Keyguard dismiss or to a
@@ -411,6 +419,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
cb.onFingerprintAuthenticated(userId); cb.onFingerprintAuthenticated(userId);
} }
} }
Trace.endSection();
} }
private void handleFingerprintAuthFailed() { private void handleFingerprintAuthFailed() {
@@ -436,6 +445,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
} }
private void handleFingerprintAuthenticated() { private void handleFingerprintAuthenticated() {
Trace.beginSection("KeyGuardUpdateMonitor#handlerFingerPrintAuthenticated");
try { try {
final int userId; final int userId;
try { try {
@@ -452,6 +462,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
} finally { } finally {
setFingerprintRunningState(FINGERPRINT_STATE_STOPPED); setFingerprintRunningState(FINGERPRINT_STATE_STOPPED);
} }
Trace.endSection();
} }
private void handleFingerprintHelp(int msgId, String helpString) { private void handleFingerprintHelp(int msgId, String helpString) {
@@ -690,8 +701,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED, mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED,
intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId()), 0)); intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId()), 0));
} else if (ACTION_FACE_UNLOCK_STARTED.equals(action)) { } 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, mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 1,
getSendingUserId())); getSendingUserId()));
Trace.endSection();
} else if (ACTION_FACE_UNLOCK_STOPPED.equals(action)) { } else if (ACTION_FACE_UNLOCK_STOPPED.equals(action)) {
mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 0, mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 0,
getSendingUserId())); getSendingUserId()));
@@ -731,7 +744,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
@Override @Override
public void onAuthenticationSucceeded(AuthenticationResult result) { public void onAuthenticationSucceeded(AuthenticationResult result) {
Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationSucceeded");
handleFingerprintAuthenticated(); handleFingerprintAuthenticated();
Trace.endSection();
} }
@Override @Override
@@ -906,6 +921,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
} }
protected void handleStartedWakingUp() { protected void handleStartedWakingUp() {
Trace.beginSection("KeyguardUpdateMonitor#handleStartedWakingUp");
updateFingerprintListeningState(); updateFingerprintListeningState();
final int count = mCallbacks.size(); final int count = mCallbacks.size();
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
@@ -914,6 +930,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
cb.onStartedWakingUp(); cb.onStartedWakingUp();
} }
} }
Trace.endSection();
} }
protected void handleStartedGoingToSleep(int arg1) { protected void handleStartedGoingToSleep(int arg1) {

View File

@@ -23,6 +23,7 @@ import android.os.Bundle;
import android.os.Debug; import android.os.Debug;
import android.os.IBinder; import android.os.IBinder;
import android.os.Process; import android.os.Process;
import android.os.Trace;
import android.util.Log; import android.util.Log;
import com.android.internal.policy.IKeyguardDrawnCallback; import com.android.internal.policy.IKeyguardDrawnCallback;
@@ -73,21 +74,27 @@ public class KeyguardService extends Service {
@Override // Binder interface @Override // Binder interface
public void verifyUnlock(IKeyguardExitCallback callback) { public void verifyUnlock(IKeyguardExitCallback callback) {
Trace.beginSection("KeyguardService.mBinder#verifyUnlock");
checkPermission(); checkPermission();
mKeyguardViewMediator.verifyUnlock(callback); mKeyguardViewMediator.verifyUnlock(callback);
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
public void keyguardDone(boolean authenticated, boolean wakeup) { public void keyguardDone(boolean authenticated, boolean wakeup) {
Trace.beginSection("KeyguardService.mBinder#keyguardDone");
checkPermission(); checkPermission();
// TODO: Remove wakeup // TODO: Remove wakeup
mKeyguardViewMediator.keyguardDone(authenticated); mKeyguardViewMediator.keyguardDone(authenticated);
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
public void setOccluded(boolean isOccluded) { public void setOccluded(boolean isOccluded) {
Trace.beginSection("KeyguardService.mBinder#setOccluded");
checkPermission(); checkPermission();
mKeyguardViewMediator.setOccluded(isOccluded); mKeyguardViewMediator.setOccluded(isOccluded);
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
@@ -122,20 +129,26 @@ public class KeyguardService extends Service {
@Override // Binder interface @Override // Binder interface
public void onStartedWakingUp() { public void onStartedWakingUp() {
Trace.beginSection("KeyguardService.mBinder#onStartedWakingUp");
checkPermission(); checkPermission();
mKeyguardViewMediator.onStartedWakingUp(); mKeyguardViewMediator.onStartedWakingUp();
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
public void onScreenTurningOn(IKeyguardDrawnCallback callback) { public void onScreenTurningOn(IKeyguardDrawnCallback callback) {
Trace.beginSection("KeyguardService.mBinder#onScreenTurningOn");
checkPermission(); checkPermission();
mKeyguardViewMediator.onScreenTurningOn(callback); mKeyguardViewMediator.onScreenTurningOn(callback);
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
public void onScreenTurnedOn() { public void onScreenTurnedOn() {
Trace.beginSection("KeyguardService.mBinder#onScreenTurningOn");
checkPermission(); checkPermission();
mKeyguardViewMediator.onScreenTurnedOn(); mKeyguardViewMediator.onScreenTurnedOn();
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
@@ -152,8 +165,10 @@ public class KeyguardService extends Service {
@Override // Binder interface @Override // Binder interface
public void onSystemReady() { public void onSystemReady() {
Trace.beginSection("KeyguardService.mBinder#onSystemReady");
checkPermission(); checkPermission();
mKeyguardViewMediator.onSystemReady(); mKeyguardViewMediator.onSystemReady();
Trace.endSection();
} }
@Override // Binder interface @Override // Binder interface
@@ -176,8 +191,10 @@ public class KeyguardService extends Service {
@Override @Override
public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) {
Trace.beginSection("KeyguardService.mBinder#startKeyguardExitAnimation");
checkPermission(); checkPermission();
mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration); mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration);
Trace.endSection();
} }
@Override @Override

View File

@@ -42,6 +42,7 @@ import android.os.PowerManager;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.SystemProperties; import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle; import android.os.UserHandle;
import android.os.UserManager; import android.os.UserManager;
import android.os.storage.StorageManager; import android.os.storage.StorageManager;
@@ -520,7 +521,9 @@ public class KeyguardViewMediator extends SystemUI {
@Override @Override
public void keyguardDoneDrawing() { public void keyguardDoneDrawing() {
Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDoneDrawing");
mHandler.sendEmptyMessage(KEYGUARD_DONE_DRAWING); mHandler.sendEmptyMessage(KEYGUARD_DONE_DRAWING);
Trace.endSection();
} }
@Override @Override
@@ -530,6 +533,7 @@ public class KeyguardViewMediator extends SystemUI {
@Override @Override
public void keyguardDonePending(boolean strongAuth) { public void keyguardDonePending(boolean strongAuth) {
Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDonePending");
mKeyguardDonePending = true; mKeyguardDonePending = true;
mHideAnimationRun = true; mHideAnimationRun = true;
mStatusBarKeyguardViewManager.startPreHideAnimation(null /* finishRunnable */); mStatusBarKeyguardViewManager.startPreHideAnimation(null /* finishRunnable */);
@@ -538,20 +542,25 @@ public class KeyguardViewMediator extends SystemUI {
if (strongAuth) { if (strongAuth) {
mUpdateMonitor.reportSuccessfulStrongAuthUnlockAttempt(); mUpdateMonitor.reportSuccessfulStrongAuthUnlockAttempt();
} }
Trace.endSection();
} }
@Override @Override
public void keyguardGone() { public void keyguardGone() {
Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardGone");
mKeyguardDisplayManager.hide(); mKeyguardDisplayManager.hide();
Trace.endSection();
} }
@Override @Override
public void readyForKeyguardDone() { public void readyForKeyguardDone() {
Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#readyForKeyguardDone");
if (mKeyguardDonePending) { if (mKeyguardDonePending) {
// Somebody has called keyguardDonePending before, which means that we are // Somebody has called keyguardDonePending before, which means that we are
// authenticated // authenticated
KeyguardViewMediator.this.keyguardDone(true /* authenticated */); KeyguardViewMediator.this.keyguardDone(true /* authenticated */);
} }
Trace.endSection();
} }
@Override @Override
@@ -892,6 +901,7 @@ public class KeyguardViewMediator extends SystemUI {
* Let's us know when the device is waking up. * Let's us know when the device is waking up.
*/ */
public void onStartedWakingUp() { public void onStartedWakingUp() {
Trace.beginSection("KeyguardViewMediator#onStartedWakingUp");
// TODO: Rename all screen off/on references to interactive/sleeping // TODO: Rename all screen off/on references to interactive/sleeping
synchronized (this) { synchronized (this) {
@@ -903,15 +913,20 @@ public class KeyguardViewMediator extends SystemUI {
} }
KeyguardUpdateMonitor.getInstance(mContext).dispatchStartedWakingUp(); KeyguardUpdateMonitor.getInstance(mContext).dispatchStartedWakingUp();
maybeSendUserPresentBroadcast(); maybeSendUserPresentBroadcast();
Trace.endSection();
} }
public void onScreenTurningOn(IKeyguardDrawnCallback callback) { public void onScreenTurningOn(IKeyguardDrawnCallback callback) {
Trace.beginSection("KeyguardViewMediator#onScreenTurningOn");
notifyScreenOn(callback); notifyScreenOn(callback);
Trace.endSection();
} }
public void onScreenTurnedOn() { public void onScreenTurnedOn() {
Trace.beginSection("KeyguardViewMediator#onScreenTurnedOn");
notifyScreenTurnedOn(); notifyScreenTurnedOn();
mUpdateMonitor.dispatchScreenTurnedOn(); mUpdateMonitor.dispatchScreenTurnedOn();
Trace.endSection();
} }
public void onScreenTurnedOff() { public void onScreenTurnedOff() {
@@ -1025,6 +1040,7 @@ public class KeyguardViewMediator extends SystemUI {
* @see android.app.KeyguardManager#exitKeyguardSecurely * @see android.app.KeyguardManager#exitKeyguardSecurely
*/ */
public void verifyUnlock(IKeyguardExitCallback callback) { public void verifyUnlock(IKeyguardExitCallback callback) {
Trace.beginSection("KeyguardViewMediator#verifyUnlock");
synchronized (this) { synchronized (this) {
if (DEBUG) Log.d(TAG, "verifyUnlock"); if (DEBUG) Log.d(TAG, "verifyUnlock");
if (shouldWaitForProvisioning()) { if (shouldWaitForProvisioning()) {
@@ -1075,6 +1091,7 @@ public class KeyguardViewMediator extends SystemUI {
} }
} }
} }
Trace.endSection();
} }
/** /**
@@ -1088,16 +1105,19 @@ public class KeyguardViewMediator extends SystemUI {
* Notify us when the keyguard is occluded by another window * Notify us when the keyguard is occluded by another window
*/ */
public void setOccluded(boolean isOccluded) { public void setOccluded(boolean isOccluded) {
Trace.beginSection("KeyguardViewMediator#setOccluded");
if (DEBUG) Log.d(TAG, "setOccluded " + isOccluded); if (DEBUG) Log.d(TAG, "setOccluded " + isOccluded);
mHandler.removeMessages(SET_OCCLUDED); mHandler.removeMessages(SET_OCCLUDED);
Message msg = mHandler.obtainMessage(SET_OCCLUDED, (isOccluded ? 1 : 0), 0); Message msg = mHandler.obtainMessage(SET_OCCLUDED, (isOccluded ? 1 : 0), 0);
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
Trace.endSection();
} }
/** /**
* Handles SET_OCCLUDED message sent by setOccluded() * Handles SET_OCCLUDED message sent by setOccluded()
*/ */
private void handleSetOccluded(boolean isOccluded) { private void handleSetOccluded(boolean isOccluded) {
Trace.beginSection("KeyguardViewMediator#handleSetOccluded");
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
if (mHiding && isOccluded) { if (mHiding && isOccluded) {
// We're in the process of going away but WindowManager wants to show a // We're in the process of going away but WindowManager wants to show a
@@ -1112,6 +1132,7 @@ public class KeyguardViewMediator extends SystemUI {
adjustStatusBarLocked(); adjustStatusBarLocked();
} }
} }
Trace.endSection();
} }
/** /**
@@ -1300,11 +1321,13 @@ public class KeyguardViewMediator extends SystemUI {
* @see #handleShow * @see #handleShow
*/ */
private void showLocked(Bundle options) { private void showLocked(Bundle options) {
Trace.beginSection("KeyguardViewMediator#showLocked aqcuiring mShowKeyguardWakeLock");
if (DEBUG) Log.d(TAG, "showLocked"); if (DEBUG) Log.d(TAG, "showLocked");
// ensure we stay awake until we are finished displaying the keyguard // ensure we stay awake until we are finished displaying the keyguard
mShowKeyguardWakeLock.acquire(); mShowKeyguardWakeLock.acquire();
Message msg = mHandler.obtainMessage(SHOW, options); Message msg = mHandler.obtainMessage(SHOW, options);
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
Trace.endSection();
} }
/** /**
@@ -1312,9 +1335,11 @@ public class KeyguardViewMediator extends SystemUI {
* @see #handleHide() * @see #handleHide()
*/ */
private void hideLocked() { private void hideLocked() {
Trace.beginSection("KeyguardViewMediator#hideLocked");
if (DEBUG) Log.d(TAG, "hideLocked"); if (DEBUG) Log.d(TAG, "hideLocked");
Message msg = mHandler.obtainMessage(HIDE); Message msg = mHandler.obtainMessage(HIDE);
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
Trace.endSection();
} }
public boolean isSecure() { public boolean isSecure() {
@@ -1359,10 +1384,12 @@ public class KeyguardViewMediator extends SystemUI {
}; };
public void keyguardDone(boolean authenticated) { public void keyguardDone(boolean authenticated) {
Trace.beginSection("KeyguardViewMediator#keyguardDone");
if (DEBUG) Log.d(TAG, "keyguardDone(" + authenticated +")"); if (DEBUG) Log.d(TAG, "keyguardDone(" + authenticated +")");
EventLog.writeEvent(70000, 2); EventLog.writeEvent(70000, 2);
Message msg = mHandler.obtainMessage(KEYGUARD_DONE, authenticated ? 1 : 0); Message msg = mHandler.obtainMessage(KEYGUARD_DONE, authenticated ? 1 : 0);
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
Trace.endSection();
} }
/** /**
@@ -1386,7 +1413,9 @@ public class KeyguardViewMediator extends SystemUI {
handleReset(); handleReset();
break; break;
case VERIFY_UNLOCK: case VERIFY_UNLOCK:
Trace.beginSection("KeyguardViewMediator#handleMessage VERIFY_UNLOCK");
handleVerifyUnlock(); handleVerifyUnlock();
Trace.endSection();
break; break;
case NOTIFY_STARTED_GOING_TO_SLEEP: case NOTIFY_STARTED_GOING_TO_SLEEP:
handleNotifyStartedGoingToSleep(); handleNotifyStartedGoingToSleep();
@@ -1395,25 +1424,37 @@ public class KeyguardViewMediator extends SystemUI {
handleNotifyFinishedGoingToSleep(); handleNotifyFinishedGoingToSleep();
break; break;
case NOTIFY_SCREEN_TURNING_ON: case NOTIFY_SCREEN_TURNING_ON:
Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_SCREEN_TURNING_ON");
handleNotifyScreenTurningOn((IKeyguardDrawnCallback) msg.obj); handleNotifyScreenTurningOn((IKeyguardDrawnCallback) msg.obj);
Trace.endSection();
break; break;
case NOTIFY_SCREEN_TURNED_ON: case NOTIFY_SCREEN_TURNED_ON:
Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_SCREEN_TURNED_ON");
handleNotifyScreenTurnedOn(); handleNotifyScreenTurnedOn();
Trace.endSection();
break; break;
case NOTIFY_SCREEN_TURNED_OFF: case NOTIFY_SCREEN_TURNED_OFF:
handleNotifyScreenTurnedOff(); handleNotifyScreenTurnedOff();
break; break;
case NOTIFY_STARTED_WAKING_UP: case NOTIFY_STARTED_WAKING_UP:
Trace.beginSection("KeyguardViewMediator#handleMessage NOTIFY_STARTED_WAKING_UP");
handleNotifyStartedWakingUp(); handleNotifyStartedWakingUp();
Trace.endSection();
break; break;
case KEYGUARD_DONE: case KEYGUARD_DONE:
Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE");
handleKeyguardDone(msg.arg1 != 0); handleKeyguardDone(msg.arg1 != 0);
Trace.endSection();
break; break;
case KEYGUARD_DONE_DRAWING: case KEYGUARD_DONE_DRAWING:
Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE_DRAWING");
handleKeyguardDoneDrawing(); handleKeyguardDoneDrawing();
Trace.endSection();
break; break;
case SET_OCCLUDED: case SET_OCCLUDED:
Trace.beginSection("KeyguardViewMediator#handleMessage SET_OCCLUDED");
handleSetOccluded(msg.arg1 != 0); handleSetOccluded(msg.arg1 != 0);
Trace.endSection();
break; break;
case KEYGUARD_TIMEOUT: case KEYGUARD_TIMEOUT:
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
@@ -1424,12 +1465,16 @@ public class KeyguardViewMediator extends SystemUI {
handleDismiss(); handleDismiss();
break; break;
case START_KEYGUARD_EXIT_ANIM: case START_KEYGUARD_EXIT_ANIM:
Trace.beginSection("KeyguardViewMediator#handleMessage START_KEYGUARD_EXIT_ANIM");
StartKeyguardExitAnimParams params = (StartKeyguardExitAnimParams) msg.obj; StartKeyguardExitAnimParams params = (StartKeyguardExitAnimParams) msg.obj;
handleStartKeyguardExitAnimation(params.startTime, params.fadeoutDuration); handleStartKeyguardExitAnimation(params.startTime, params.fadeoutDuration);
FalsingManager.getInstance(mContext).onSucccessfulUnlock(); FalsingManager.getInstance(mContext).onSucccessfulUnlock();
Trace.endSection();
break; break;
case KEYGUARD_DONE_PENDING_TIMEOUT: case KEYGUARD_DONE_PENDING_TIMEOUT:
Trace.beginSection("KeyguardViewMediator#handleMessage KEYGUARD_DONE_PENDING_TIMEOUT");
Log.w(TAG, "Timeout while waiting for activity drawn!"); Log.w(TAG, "Timeout while waiting for activity drawn!");
Trace.endSection();
// Fall through. // Fall through.
case ON_ACTIVITY_DRAWN: case ON_ACTIVITY_DRAWN:
handleOnActivityDrawn(); handleOnActivityDrawn();
@@ -1443,6 +1488,7 @@ public class KeyguardViewMediator extends SystemUI {
* @see #KEYGUARD_DONE * @see #KEYGUARD_DONE
*/ */
private void handleKeyguardDone(boolean authenticated) { private void handleKeyguardDone(boolean authenticated) {
Trace.beginSection("KeyguardViewMediator#handleKeyguardDone");
final int currentUser = KeyguardUpdateMonitor.getCurrentUser(); final int currentUser = KeyguardUpdateMonitor.getCurrentUser();
if (mLockPatternUtils.isSecure(currentUser)) { if (mLockPatternUtils.isSecure(currentUser)) {
mLockPatternUtils.getDevicePolicyManager().reportKeyguardDismissed(currentUser); mLockPatternUtils.getDevicePolicyManager().reportKeyguardDismissed(currentUser);
@@ -1480,6 +1526,7 @@ public class KeyguardViewMediator extends SystemUI {
} }
handleHide(); handleHide();
Trace.endSection();
} }
private void sendUserPresentBroadcast() { private void sendUserPresentBroadcast() {
@@ -1504,6 +1551,7 @@ public class KeyguardViewMediator extends SystemUI {
* @see #KEYGUARD_DONE_DRAWING * @see #KEYGUARD_DONE_DRAWING
*/ */
private void handleKeyguardDoneDrawing() { private void handleKeyguardDoneDrawing() {
Trace.beginSection("KeyguardViewMediator#handleKeyguardDoneDrawing");
synchronized(this) { synchronized(this) {
if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing"); if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing");
if (mWaitingUntilKeyguardVisible) { if (mWaitingUntilKeyguardVisible) {
@@ -1517,6 +1565,7 @@ public class KeyguardViewMediator extends SystemUI {
mHandler.removeMessages(KEYGUARD_DONE_DRAWING); mHandler.removeMessages(KEYGUARD_DONE_DRAWING);
} }
} }
Trace.endSection();
} }
private void playSounds(boolean locked) { private void playSounds(boolean locked) {
@@ -1548,10 +1597,12 @@ public class KeyguardViewMediator extends SystemUI {
} }
private void updateActivityLockScreenState() { private void updateActivityLockScreenState() {
Trace.beginSection("KeyguardViewMediator#updateActivityLockScreenState");
try { try {
ActivityManagerNative.getDefault().setLockScreenShown(mShowing, mOccluded); ActivityManagerNative.getDefault().setLockScreenShown(mShowing, mOccluded);
} catch (RemoteException e) { } catch (RemoteException e) {
} }
Trace.endSection();
} }
/** /**
@@ -1559,6 +1610,7 @@ public class KeyguardViewMediator extends SystemUI {
* @see #SHOW * @see #SHOW
*/ */
private void handleShow(Bundle options) { private void handleShow(Bundle options) {
Trace.beginSection("KeyguardViewMediator#handleShow");
final int currentUser = KeyguardUpdateMonitor.getCurrentUser(); final int currentUser = KeyguardUpdateMonitor.getCurrentUser();
if (mLockPatternUtils.isSecure(currentUser)) { if (mLockPatternUtils.isSecure(currentUser)) {
mLockPatternUtils.getDevicePolicyManager().reportKeyguardSecured(currentUser); mLockPatternUtils.getDevicePolicyManager().reportKeyguardSecured(currentUser);
@@ -1584,11 +1636,13 @@ public class KeyguardViewMediator extends SystemUI {
mShowKeyguardWakeLock.release(); mShowKeyguardWakeLock.release();
} }
mKeyguardDisplayManager.show(); mKeyguardDisplayManager.show();
Trace.endSection();
} }
private final Runnable mKeyguardGoingAwayRunnable = new Runnable() { private final Runnable mKeyguardGoingAwayRunnable = new Runnable() {
@Override @Override
public void run() { public void run() {
Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable");
try { try {
mStatusBarKeyguardViewManager.keyguardGoingAway(); mStatusBarKeyguardViewManager.keyguardGoingAway();
@@ -1611,6 +1665,7 @@ public class KeyguardViewMediator extends SystemUI {
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(TAG, "Error while calling WindowManager", e); Log.e(TAG, "Error while calling WindowManager", e);
} }
Trace.endSection();
} }
}; };
@@ -1619,6 +1674,7 @@ public class KeyguardViewMediator extends SystemUI {
* @see #HIDE * @see #HIDE
*/ */
private void handleHide() { private void handleHide() {
Trace.beginSection("KeyguardViewMediator#handleHide");
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleHide"); if (DEBUG) Log.d(TAG, "handleHide");
@@ -1646,6 +1702,7 @@ public class KeyguardViewMediator extends SystemUI {
mHideAnimation.getDuration()); mHideAnimation.getDuration());
} }
} }
Trace.endSection();
} }
private void handleOnActivityDrawn() { private void handleOnActivityDrawn() {
@@ -1656,6 +1713,7 @@ public class KeyguardViewMediator extends SystemUI {
} }
private void handleStartKeyguardExitAnimation(long startTime, long fadeoutDuration) { private void handleStartKeyguardExitAnimation(long startTime, long fadeoutDuration) {
Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
if (!mHiding) { if (!mHiding) {
@@ -1686,6 +1744,7 @@ public class KeyguardViewMediator extends SystemUI {
adjustStatusBarLocked(); adjustStatusBarLocked();
sendUserPresentBroadcast(); sendUserPresentBroadcast();
} }
Trace.endSection();
} }
private void adjustStatusBarLocked() { private void adjustStatusBarLocked() {
@@ -1737,12 +1796,14 @@ public class KeyguardViewMediator extends SystemUI {
* @see #VERIFY_UNLOCK * @see #VERIFY_UNLOCK
*/ */
private void handleVerifyUnlock() { private void handleVerifyUnlock() {
Trace.beginSection("KeyguardViewMediator#handleVerifyUnlock");
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleVerifyUnlock"); if (DEBUG) Log.d(TAG, "handleVerifyUnlock");
setShowingLocked(true); setShowingLocked(true);
mStatusBarKeyguardViewManager.verifyUnlock(); mStatusBarKeyguardViewManager.verifyUnlock();
updateActivityLockScreenState(); updateActivityLockScreenState();
} }
Trace.endSection();
} }
private void handleNotifyStartedGoingToSleep() { private void handleNotifyStartedGoingToSleep() {
@@ -1764,13 +1825,16 @@ public class KeyguardViewMediator extends SystemUI {
} }
private void handleNotifyStartedWakingUp() { private void handleNotifyStartedWakingUp() {
Trace.beginSection("KeyguardViewMediator#handleMotifyStartedWakingUp");
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleNotifyWakingUp"); if (DEBUG) Log.d(TAG, "handleNotifyWakingUp");
mStatusBarKeyguardViewManager.onStartedWakingUp(); mStatusBarKeyguardViewManager.onStartedWakingUp();
} }
Trace.endSection();
} }
private void handleNotifyScreenTurningOn(IKeyguardDrawnCallback callback) { private void handleNotifyScreenTurningOn(IKeyguardDrawnCallback callback) {
Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurningOn");
synchronized (KeyguardViewMediator.this) { synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleNotifyScreenTurningOn"); if (DEBUG) Log.d(TAG, "handleNotifyScreenTurningOn");
mStatusBarKeyguardViewManager.onScreenTurningOn(); mStatusBarKeyguardViewManager.onScreenTurningOn();
@@ -1782,13 +1846,16 @@ public class KeyguardViewMediator extends SystemUI {
} }
} }
} }
Trace.endSection();
} }
private void handleNotifyScreenTurnedOn() { private void handleNotifyScreenTurnedOn() {
Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurnedOn");
synchronized (this) { synchronized (this) {
if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOn"); if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOn");
mStatusBarKeyguardViewManager.onScreenTurnedOn(); mStatusBarKeyguardViewManager.onScreenTurnedOn();
} }
Trace.endSection();
} }
private void handleNotifyScreenTurnedOff() { private void handleNotifyScreenTurnedOff() {
@@ -1800,11 +1867,13 @@ public class KeyguardViewMediator extends SystemUI {
} }
private void notifyDrawn(final IKeyguardDrawnCallback callback) { private void notifyDrawn(final IKeyguardDrawnCallback callback) {
Trace.beginSection("KeyguardViewMediator#notifyDrawn");
try { try {
callback.onDrawn(); callback.onDrawn();
} catch (RemoteException e) { } catch (RemoteException e) {
Slog.w(TAG, "Exception calling onDrawn():", e); Slog.w(TAG, "Exception calling onDrawn():", e);
} }
Trace.endSection();
} }
private void resetKeyguardDonePendingLocked() { private void resetKeyguardDonePendingLocked() {
@@ -1824,8 +1893,10 @@ public class KeyguardViewMediator extends SystemUI {
} }
public void onWakeAndUnlocking() { public void onWakeAndUnlocking() {
Trace.beginSection("KeyguardViewMediator#onWakeAndUnlocking");
mWakeAndUnlocking = true; mWakeAndUnlocking = true;
keyguardDone(true /* authenticated */); keyguardDone(true /* authenticated */);
Trace.endSection();
} }
public StatusBarKeyguardViewManager registerStatusBar(PhoneStatusBar phoneStatusBar, public StatusBarKeyguardViewManager registerStatusBar(PhoneStatusBar phoneStatusBar,
@@ -1838,9 +1909,11 @@ public class KeyguardViewMediator extends SystemUI {
} }
public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) {
Trace.beginSection("KeyguardViewMediator#startKeyguardExitAnimation");
Message msg = mHandler.obtainMessage(START_KEYGUARD_EXIT_ANIM, Message msg = mHandler.obtainMessage(START_KEYGUARD_EXIT_ANIM,
new StartKeyguardExitAnimParams(startTime, fadeoutDuration)); new StartKeyguardExitAnimParams(startTime, fadeoutDuration));
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
Trace.endSection();
} }
public void onActivityDrawn() { public void onActivityDrawn() {

View File

@@ -20,6 +20,7 @@ import android.content.Context;
import android.os.Handler; import android.os.Handler;
import android.os.PowerManager; import android.os.PowerManager;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.Trace;
import android.util.Log; import android.util.Log;
import com.android.keyguard.KeyguardConstants; import com.android.keyguard.KeyguardConstants;
@@ -140,11 +141,14 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
@Override @Override
public void onFingerprintAcquired() { public void onFingerprintAcquired() {
Trace.beginSection("FingerprintUnlockController#onFingerprintAcquired");
releaseFingerprintWakeLock(); releaseFingerprintWakeLock();
if (!mUpdateMonitor.isDeviceInteractive()) { if (!mUpdateMonitor.isDeviceInteractive()) {
mWakeLock = mPowerManager.newWakeLock( mWakeLock = mPowerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, FINGERPRINT_WAKE_LOCK_NAME); PowerManager.PARTIAL_WAKE_LOCK, FINGERPRINT_WAKE_LOCK_NAME);
Trace.beginSection("acquiring wake-and-unlock");
mWakeLock.acquire(); mWakeLock.acquire();
Trace.endSection();
if (DEBUG_FP_WAKELOCK) { if (DEBUG_FP_WAKELOCK) {
Log.i(TAG, "fingerprint acquired, grabbing fp wakelock"); Log.i(TAG, "fingerprint acquired, grabbing fp wakelock");
} }
@@ -159,12 +163,15 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
mStatusBarWindowManager.setForceDozeBrightness(true); mStatusBarWindowManager.setForceDozeBrightness(true);
} }
} }
Trace.endSection();
} }
@Override @Override
public void onFingerprintAuthenticated(int userId) { public void onFingerprintAuthenticated(int userId) {
Trace.beginSection("FingerprintUnlockController#onFingerprintAuthenticated");
if (mUpdateMonitor.isGoingToSleep()) { if (mUpdateMonitor.isGoingToSleep()) {
mPendingAuthenticatedUserId = userId; mPendingAuthenticatedUserId = userId;
Trace.endSection();
return; return;
} }
boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive();
@@ -175,25 +182,34 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
} }
mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:FINGERPRINT"); mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:FINGERPRINT");
} }
Trace.beginSection("release wake-and-unlock");
releaseFingerprintWakeLock(); releaseFingerprintWakeLock();
Trace.endSection();
switch (mMode) { switch (mMode) {
case MODE_DISMISS_BOUNCER: case MODE_DISMISS_BOUNCER:
Trace.beginSection("MODE_DISMISS");
mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated( mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated(
false /* strongAuth */); false /* strongAuth */);
Trace.endSection();
break; break;
case MODE_UNLOCK: case MODE_UNLOCK:
case MODE_SHOW_BOUNCER: case MODE_SHOW_BOUNCER:
Trace.beginSection("MODE_UNLOCK or MODE_SHOW_BOUNCER");
if (!wasDeviceInteractive) { if (!wasDeviceInteractive) {
mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested(); mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
} }
mStatusBarKeyguardViewManager.animateCollapsePanels( mStatusBarKeyguardViewManager.animateCollapsePanels(
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR); FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
Trace.endSection();
break; break;
case MODE_WAKE_AND_UNLOCK_PULSING: case MODE_WAKE_AND_UNLOCK_PULSING:
Trace.beginSection("MODE_WAKE_AND_UNLOCK_PULSING");
mPhoneStatusBar.updateMediaMetaData(false /* metaDataChanged */, mPhoneStatusBar.updateMediaMetaData(false /* metaDataChanged */,
true /* allowEnterAnimation */); true /* allowEnterAnimation */);
// Fall through. // Fall through.
Trace.endSection();
case MODE_WAKE_AND_UNLOCK: case MODE_WAKE_AND_UNLOCK:
Trace.beginSection("MODE_WAKE_AND_UNLOCK");
mStatusBarWindowManager.setStatusBarFocusable(false); mStatusBarWindowManager.setStatusBarFocusable(false);
mDozeScrimController.abortPulsing(); mDozeScrimController.abortPulsing();
mKeyguardViewMediator.onWakeAndUnlocking(); mKeyguardViewMediator.onWakeAndUnlocking();
@@ -201,6 +217,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
if (mPhoneStatusBar.getNavigationBarView() != null) { if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true); mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
} }
Trace.endSection();
break; break;
case MODE_ONLY_WAKE: case MODE_ONLY_WAKE:
case MODE_NONE: case MODE_NONE:
@@ -210,6 +227,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
mStatusBarWindowManager.setForceDozeBrightness(false); mStatusBarWindowManager.setForceDozeBrightness(false);
} }
mPhoneStatusBar.notifyFpAuthModeChanged(); mPhoneStatusBar.notifyFpAuthModeChanged();
Trace.endSection();
} }
@Override @Override
@@ -219,6 +237,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
@Override @Override
public void onFinishedGoingToSleep(int why) { public void onFinishedGoingToSleep(int why) {
Trace.beginSection("FingerprintUnlockController#onFinishedGoingToSleep");
if (mPendingAuthenticatedUserId != -1) { if (mPendingAuthenticatedUserId != -1) {
// Post this to make sure it's executed after the device is fully locked. // Post this to make sure it's executed after the device is fully locked.
@@ -230,6 +249,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
}); });
} }
mPendingAuthenticatedUserId = -1; mPendingAuthenticatedUserId = -1;
Trace.endSection();
} }
public int getMode() { public int getMode() {

View File

@@ -84,6 +84,7 @@ import android.os.Process;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.ServiceManager; import android.os.ServiceManager;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.Trace;
import android.os.UserHandle; import android.os.UserHandle;
import android.os.UserManager; import android.os.UserManager;
import android.os.Vibrator; import android.os.Vibrator;
@@ -1182,6 +1183,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} }
protected void startKeyguard() { protected void startKeyguard() {
Trace.beginSection("PhoneStatusBar#startKeyguard");
KeyguardViewMediator keyguardViewMediator = getComponent(KeyguardViewMediator.class); KeyguardViewMediator keyguardViewMediator = getComponent(KeyguardViewMediator.class);
mFingerprintUnlockController = new FingerprintUnlockController(mContext, mFingerprintUnlockController = new FingerprintUnlockController(mContext,
mStatusBarWindowManager, mDozeScrimController, keyguardViewMediator, mStatusBarWindowManager, mDozeScrimController, keyguardViewMediator,
@@ -1216,6 +1218,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mKeyguardViewMediatorCallback = keyguardViewMediator.getViewMediatorCallback(); mKeyguardViewMediatorCallback = keyguardViewMediator.getViewMediatorCallback();
mLightStatusBarController.setFingerprintUnlockController(mFingerprintUnlockController); mLightStatusBarController.setFingerprintUnlockController(mFingerprintUnlockController);
Trace.endSection();
} }
@Override @Override
@@ -2088,12 +2091,20 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
* Refresh or remove lockscreen artwork from media metadata or the lockscreen wallpaper. * Refresh or remove lockscreen artwork from media metadata or the lockscreen wallpaper.
*/ */
public void updateMediaMetaData(boolean metaDataChanged, boolean allowEnterAnimation) { public void updateMediaMetaData(boolean metaDataChanged, boolean allowEnterAnimation) {
if (!SHOW_LOCKSCREEN_MEDIA_ARTWORK) return; Trace.beginSection("PhoneStatusBar#updateMediaMetaData");
if (!SHOW_LOCKSCREEN_MEDIA_ARTWORK) {
Trace.endSection();
return;
}
if (mBackdrop == null) return; // called too early if (mBackdrop == null) {
Trace.endSection();
return; // called too early
}
if (mLaunchTransitionFadingAway) { if (mLaunchTransitionFadingAway) {
mBackdrop.setVisibility(View.INVISIBLE); mBackdrop.setVisibility(View.INVISIBLE);
Trace.endSection();
return; return;
} }
@@ -2246,6 +2257,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} }
} }
} }
Trace.endSection();
} }
protected int adjustDisableFlags(int state) { protected int adjustDisableFlags(int state) {
@@ -4085,6 +4097,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
* @return true if we would like to stay in the shade, false if it should go away entirely * @return true if we would like to stay in the shade, false if it should go away entirely
*/ */
public boolean hideKeyguard() { public boolean hideKeyguard() {
Trace.beginSection("PhoneStatusBar#hideKeyguard");
boolean staying = mLeaveOpenOnKeyguardHide; boolean staying = mLeaveOpenOnKeyguardHide;
setBarState(StatusBarState.SHADE); setBarState(StatusBarState.SHADE);
View viewToClick = null; View viewToClick = null;
@@ -4129,6 +4142,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mNotificationPanel.onAffordanceLaunchEnded(); mNotificationPanel.onAffordanceLaunchEnded();
mNotificationPanel.animate().cancel(); mNotificationPanel.animate().cancel();
mNotificationPanel.setAlpha(1f); mNotificationPanel.setAlpha(1f);
Trace.endSection();
return staying; return staying;
} }
@@ -4203,6 +4217,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} }
protected void updateKeyguardState(boolean goingToFullShade, boolean fromShadeLocked) { protected void updateKeyguardState(boolean goingToFullShade, boolean fromShadeLocked) {
Trace.beginSection("PhoneStatusBar#updateKeyguardState");
if (mState == StatusBarState.KEYGUARD) { if (mState == StatusBarState.KEYGUARD) {
mKeyguardIndicationController.setVisible(true); mKeyguardIndicationController.setVisible(true);
mNotificationPanel.resetViews(); mNotificationPanel.resetViews();
@@ -4234,9 +4249,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
updateMediaMetaData(false, mState != StatusBarState.KEYGUARD); updateMediaMetaData(false, mState != StatusBarState.KEYGUARD);
mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(), mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(),
mStatusBarKeyguardViewManager.isSecure()); mStatusBarKeyguardViewManager.isSecure());
Trace.endSection();
} }
private void updateDozingState() { private void updateDozingState() {
Trace.beginSection("PhoneStatusBar#updateDozingState");
boolean animate = !mDozing && mDozeScrimController.isPulsing(); boolean animate = !mDozing && mDozeScrimController.isPulsing();
mNotificationPanel.setDozing(mDozing, animate); mNotificationPanel.setDozing(mDozing, animate);
mStackScroller.setDark(mDozing, animate, mWakeUpTouchLocation); mStackScroller.setDark(mDozing, animate, mWakeUpTouchLocation);
@@ -4247,6 +4264,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mDozeScrimController.setDozing(mDozing && mDozeScrimController.setDozing(mDozing &&
mFingerprintUnlockController.getMode() mFingerprintUnlockController.getMode()
!= FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING, animate); != FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING, animate);
Trace.endSection();
} }
public void updateStackScrollerState(boolean goingToFullShade, boolean fromShadeLocked) { public void updateStackScrollerState(boolean goingToFullShade, boolean fromShadeLocked) {
@@ -4848,11 +4866,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} }
private void updateDozing() { private void updateDozing() {
Trace.beginSection("PhoneStatusBar#updateDozing");
// When in wake-and-unlock while pulsing, keep dozing state until fully unlocked. // When in wake-and-unlock while pulsing, keep dozing state until fully unlocked.
mDozing = mDozingRequested && mState == StatusBarState.KEYGUARD mDozing = mDozingRequested && mState == StatusBarState.KEYGUARD
|| mFingerprintUnlockController.getMode() || mFingerprintUnlockController.getMode()
== FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING; == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING;
updateDozingState(); updateDozingState();
Trace.endSection();
} }
private final class ShadeUpdates { private final class ShadeUpdates {

View File

@@ -185,13 +185,17 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
} }
public void onStartedWakingUp() { public void onStartedWakingUp() {
Trace.beginSection("StatusBarKeyguardViewManager#onStartedWakingUp");
mDeviceInteractive = true; mDeviceInteractive = true;
mDeviceWillWakeUp = false; mDeviceWillWakeUp = false;
mPhoneStatusBar.onStartedWakingUp(); mPhoneStatusBar.onStartedWakingUp();
Trace.endSection();
} }
public void onScreenTurningOn() { public void onScreenTurningOn() {
Trace.beginSection("StatusBarKeyguardViewManager#onScreenTurningOn");
mPhoneStatusBar.onScreenTurningOn(); mPhoneStatusBar.onScreenTurningOn();
Trace.endSection();
} }
public boolean isScreenTurnedOn() { public boolean isScreenTurnedOn() {
@@ -199,6 +203,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
} }
public void onScreenTurnedOn() { public void onScreenTurnedOn() {
Trace.beginSection("StatusBarKeyguardViewManager#onScreenTurnedOn");
mScreenTurnedOn = true; mScreenTurnedOn = true;
if (mDeferScrimFadeOut) { if (mDeferScrimFadeOut) {
mDeferScrimFadeOut = false; mDeferScrimFadeOut = false;
@@ -207,6 +212,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
updateStates(); updateStates();
} }
mPhoneStatusBar.onScreenTurnedOn(); mPhoneStatusBar.onScreenTurnedOn();
Trace.endSection();
} }
@Override @Override

View File

@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone; package com.android.systemui.statusbar.phone;
import android.content.Context; import android.content.Context;
import android.os.Trace;
import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardUpdateMonitor;
@@ -85,6 +86,7 @@ public class UnlockMethodCache {
} }
private void update(boolean updateAlways) { private void update(boolean updateAlways) {
Trace.beginSection("UnlockMethodCache#update");
int user = KeyguardUpdateMonitor.getCurrentUser(); int user = KeyguardUpdateMonitor.getCurrentUser();
boolean secure = mLockPatternUtils.isSecure(user); boolean secure = mLockPatternUtils.isSecure(user);
boolean canSkipBouncer = !secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user); boolean canSkipBouncer = !secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
@@ -102,6 +104,7 @@ public class UnlockMethodCache {
mFaceUnlockRunning = faceUnlockRunning; mFaceUnlockRunning = faceUnlockRunning;
notifyListeners(); notifyListeners();
} }
Trace.endSection();
} }
private void notifyListeners() { private void notifyListeners() {
@@ -133,10 +136,13 @@ public class UnlockMethodCache {
@Override @Override
public void onFingerprintAuthenticated(int userId) { public void onFingerprintAuthenticated(int userId) {
Trace.beginSection("KeyguardUpdateMonitorCallback#onFingerprintAuthenticated");
if (!mKeyguardUpdateMonitor.isUnlockingWithFingerprintAllowed()) { if (!mKeyguardUpdateMonitor.isUnlockingWithFingerprintAllowed()) {
Trace.endSection();
return; return;
} }
update(false /* updateAlways */); update(false /* updateAlways */);
Trace.endSection();
} }
@Override @Override