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;
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();
handleScreenTurnedOn();
break;
case MSG_SCREEN_TURNED_OFF:
+ Trace.beginSection("KeyguardUpdateMonitor#handler MSG_SCREEN_TURNED_ON");
handleScreenTurnedOff();
+ Trace.endSection();
break;
}
}
}
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
cb.onFingerprintAuthenticated(userId);
}
}
+ Trace.endSection();
}
private void handleFingerprintAuthFailed() {
}
private void handleFingerprintAuthenticated() {
+ Trace.beginSection("KeyGuardUpdateMonitor#handlerFingerPrintAuthenticated");
try {
final int userId;
try {
} finally {
setFingerprintRunningState(FINGERPRINT_STATE_STOPPED);
}
+ Trace.endSection();
}
private void handleFingerprintHelp(int msgId, String helpString) {
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()));
@Override
public void onAuthenticationSucceeded(AuthenticationResult result) {
+ Trace.beginSection("KeyguardUpdateMonitor#onAuthenticationSucceeded");
handleFingerprintAuthenticated();
+ Trace.endSection();
}
@Override
}
protected void handleStartedWakingUp() {
+ Trace.beginSection("KeyguardUpdateMonitor#handleStartedWakingUp");
updateFingerprintListeningState();
final int count = mCallbacks.size();
for (int i = 0; i < count; i++) {
cb.onStartedWakingUp();
}
}
+ Trace.endSection();
}
protected void handleStartedGoingToSleep(int arg1) {
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;
@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
@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
@Override // Binder interface
public void onSystemReady() {
+ Trace.beginSection("KeyguardService.mBinder#onSystemReady");
checkPermission();
mKeyguardViewMediator.onSystemReady();
+ Trace.endSection();
}
@Override // Binder interface
@Override
public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) {
+ Trace.beginSection("KeyguardService.mBinder#startKeyguardExitAnimation");
checkPermission();
mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration);
+ Trace.endSection();
}
@Override
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;
@Override
public void keyguardDoneDrawing() {
+ Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDoneDrawing");
mHandler.sendEmptyMessage(KEYGUARD_DONE_DRAWING);
+ Trace.endSection();
}
@Override
@Override
public void keyguardDonePending(boolean strongAuth) {
+ Trace.beginSection("KeyguardViewMediator.mViewMediatorCallback#keyguardDonePending");
mKeyguardDonePending = true;
mHideAnimationRun = true;
mStatusBarKeyguardViewManager.startPreHideAnimation(null /* finishRunnable */);
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
* 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) {
}
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() {
* @see android.app.KeyguardManager#exitKeyguardSecurely
*/
public void verifyUnlock(IKeyguardExitCallback callback) {
+ Trace.beginSection("KeyguardViewMediator#verifyUnlock");
synchronized (this) {
if (DEBUG) Log.d(TAG, "verifyUnlock");
if (shouldWaitForProvisioning()) {
}
}
}
+ Trace.endSection();
}
/**
* 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
adjustStatusBarLocked();
}
}
+ Trace.endSection();
}
/**
* @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();
}
/**
* @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() {
};
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();
}
/**
handleReset();
break;
case VERIFY_UNLOCK:
+ Trace.beginSection("KeyguardViewMediator#handleMessage VERIFY_UNLOCK");
handleVerifyUnlock();
+ Trace.endSection();
break;
case NOTIFY_STARTED_GOING_TO_SLEEP:
handleNotifyStartedGoingToSleep();
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) {
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();
* @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);
}
handleHide();
+ Trace.endSection();
}
private void sendUserPresentBroadcast() {
* @see #KEYGUARD_DONE_DRAWING
*/
private void handleKeyguardDoneDrawing() {
+ Trace.beginSection("KeyguardViewMediator#handleKeyguardDoneDrawing");
synchronized(this) {
if (DEBUG) Log.d(TAG, "handleKeyguardDoneDrawing");
if (mWaitingUntilKeyguardVisible) {
mHandler.removeMessages(KEYGUARD_DONE_DRAWING);
}
}
+ Trace.endSection();
}
private void playSounds(boolean locked) {
}
private void updateActivityLockScreenState() {
+ Trace.beginSection("KeyguardViewMediator#updateActivityLockScreenState");
try {
ActivityManagerNative.getDefault().setLockScreenShown(mShowing, mOccluded);
} catch (RemoteException e) {
}
+ Trace.endSection();
}
/**
* @see #SHOW
*/
private void handleShow(Bundle options) {
+ Trace.beginSection("KeyguardViewMediator#handleShow");
final int currentUser = KeyguardUpdateMonitor.getCurrentUser();
if (mLockPatternUtils.isSecure(currentUser)) {
mLockPatternUtils.getDevicePolicyManager().reportKeyguardSecured(currentUser);
mShowKeyguardWakeLock.release();
}
mKeyguardDisplayManager.show();
+ Trace.endSection();
}
private final Runnable mKeyguardGoingAwayRunnable = new Runnable() {
@Override
public void run() {
+ Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable");
try {
mStatusBarKeyguardViewManager.keyguardGoingAway();
} catch (RemoteException e) {
Log.e(TAG, "Error while calling WindowManager", e);
}
+ Trace.endSection();
}
};
* @see #HIDE
*/
private void handleHide() {
+ Trace.beginSection("KeyguardViewMediator#handleHide");
synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleHide");
mHideAnimation.getDuration());
}
}
+ Trace.endSection();
}
private void handleOnActivityDrawn() {
}
private void handleStartKeyguardExitAnimation(long startTime, long fadeoutDuration) {
+ Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");
synchronized (KeyguardViewMediator.this) {
if (!mHiding) {
adjustStatusBarLocked();
sendUserPresentBroadcast();
}
+ Trace.endSection();
}
private void adjustStatusBarLocked() {
* @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() {
}
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();
}
}
}
+ Trace.endSection();
}
private void handleNotifyScreenTurnedOn() {
+ Trace.beginSection("KeyguardViewMediator#handleNotifyScreenTurnedOn");
synchronized (this) {
if (DEBUG) Log.d(TAG, "handleNotifyScreenTurnedOn");
mStatusBarKeyguardViewManager.onScreenTurnedOn();
}
+ Trace.endSection();
}
private void handleNotifyScreenTurnedOff() {
}
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() {
}
public void onWakeAndUnlocking() {
+ Trace.beginSection("KeyguardViewMediator#onWakeAndUnlocking");
mWakeAndUnlocking = true;
keyguardDone(true /* authenticated */);
+ Trace.endSection();
}
public StatusBarKeyguardViewManager registerStatusBar(PhoneStatusBar phoneStatusBar,
}
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() {
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;
@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");
}
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();
}
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();
if (mPhoneStatusBar.getNavigationBarView() != null) {
mPhoneStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
+ Trace.endSection();
break;
case MODE_ONLY_WAKE:
case MODE_NONE:
mStatusBarWindowManager.setForceDozeBrightness(false);
}
mPhoneStatusBar.notifyFpAuthModeChanged();
+ Trace.endSection();
}
@Override
@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.
});
}
mPendingAuthenticatedUserId = -1;
+ Trace.endSection();
}
public int getMode() {
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
+import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.Vibrator;
}
protected void startKeyguard() {
+ Trace.beginSection("PhoneStatusBar#startKeyguard");
KeyguardViewMediator keyguardViewMediator = getComponent(KeyguardViewMediator.class);
mFingerprintUnlockController = new FingerprintUnlockController(mContext,
mStatusBarWindowManager, mDozeScrimController, keyguardViewMediator,
mKeyguardViewMediatorCallback = keyguardViewMediator.getViewMediatorCallback();
mLightStatusBarController.setFingerprintUnlockController(mFingerprintUnlockController);
+ Trace.endSection();
}
@Override
* Refresh or remove lockscreen artwork from media metadata or the lockscreen wallpaper.
*/
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) {
mBackdrop.setVisibility(View.INVISIBLE);
+ Trace.endSection();
return;
}
}
}
}
+ Trace.endSection();
}
protected int adjustDisableFlags(int state) {
* @return true if we would like to stay in the shade, false if it should go away entirely
*/
public boolean hideKeyguard() {
+ Trace.beginSection("PhoneStatusBar#hideKeyguard");
boolean staying = mLeaveOpenOnKeyguardHide;
setBarState(StatusBarState.SHADE);
View viewToClick = null;
mNotificationPanel.onAffordanceLaunchEnded();
mNotificationPanel.animate().cancel();
mNotificationPanel.setAlpha(1f);
+ Trace.endSection();
return staying;
}
}
protected void updateKeyguardState(boolean goingToFullShade, boolean fromShadeLocked) {
+ Trace.beginSection("PhoneStatusBar#updateKeyguardState");
if (mState == StatusBarState.KEYGUARD) {
mKeyguardIndicationController.setVisible(true);
mNotificationPanel.resetViews();
updateMediaMetaData(false, mState != StatusBarState.KEYGUARD);
mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(),
mStatusBarKeyguardViewManager.isSecure());
+ Trace.endSection();
}
private void updateDozingState() {
+ Trace.beginSection("PhoneStatusBar#updateDozingState");
boolean animate = !mDozing && mDozeScrimController.isPulsing();
mNotificationPanel.setDozing(mDozing, animate);
mStackScroller.setDark(mDozing, animate, mWakeUpTouchLocation);
mDozeScrimController.setDozing(mDozing &&
mFingerprintUnlockController.getMode()
!= FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING, animate);
+ Trace.endSection();
}
public void updateStackScrollerState(boolean goingToFullShade, boolean fromShadeLocked) {
}
private void updateDozing() {
+ Trace.beginSection("PhoneStatusBar#updateDozing");
// When in wake-and-unlock while pulsing, keep dozing state until fully unlocked.
mDozing = mDozingRequested && mState == StatusBarState.KEYGUARD
|| mFingerprintUnlockController.getMode()
== FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING;
updateDozingState();
+ Trace.endSection();
}
private final class ShadeUpdates {
}
public void onStartedWakingUp() {
+ Trace.beginSection("StatusBarKeyguardViewManager#onStartedWakingUp");
mDeviceInteractive = true;
mDeviceWillWakeUp = false;
mPhoneStatusBar.onStartedWakingUp();
+ Trace.endSection();
}
public void onScreenTurningOn() {
+ Trace.beginSection("StatusBarKeyguardViewManager#onScreenTurningOn");
mPhoneStatusBar.onScreenTurningOn();
+ Trace.endSection();
}
public boolean isScreenTurnedOn() {
}
public void onScreenTurnedOn() {
+ Trace.beginSection("StatusBarKeyguardViewManager#onScreenTurnedOn");
mScreenTurnedOn = true;
if (mDeferScrimFadeOut) {
mDeferScrimFadeOut = false;
updateStates();
}
mPhoneStatusBar.onScreenTurnedOn();
+ Trace.endSection();
}
@Override
package com.android.systemui.statusbar.phone;
import android.content.Context;
+import android.os.Trace;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
}
private void update(boolean updateAlways) {
+ Trace.beginSection("UnlockMethodCache#update");
int user = KeyguardUpdateMonitor.getCurrentUser();
boolean secure = mLockPatternUtils.isSecure(user);
boolean canSkipBouncer = !secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
mFaceUnlockRunning = faceUnlockRunning;
notifyListeners();
}
+ Trace.endSection();
}
private void notifyListeners() {
@Override
public void onFingerprintAuthenticated(int userId) {
+ Trace.beginSection("KeyguardUpdateMonitorCallback#onFingerprintAuthenticated");
if (!mKeyguardUpdateMonitor.isUnlockingWithFingerprintAllowed()) {
+ Trace.endSection();
return;
}
update(false /* updateAlways */);
+ Trace.endSection();
}
@Override