Merge "Remove unimplemented callback of KUMCallback" into tm-qpr-dev am: 186367968e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19289532 Change-Id: I72c59f8f4723d82ac5a19e4b2e1751848a3dac3d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -165,7 +165,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
private static final int MSG_USER_SWITCHING = 310;
|
private static final int MSG_USER_SWITCHING = 310;
|
||||||
private static final int MSG_KEYGUARD_RESET = 312;
|
private static final int MSG_KEYGUARD_RESET = 312;
|
||||||
private static final int MSG_USER_SWITCH_COMPLETE = 314;
|
private static final int MSG_USER_SWITCH_COMPLETE = 314;
|
||||||
private static final int MSG_USER_INFO_CHANGED = 317;
|
|
||||||
private static final int MSG_REPORT_EMERGENCY_CALL_ACTION = 318;
|
private static final int MSG_REPORT_EMERGENCY_CALL_ACTION = 318;
|
||||||
private static final int MSG_STARTED_WAKING_UP = 319;
|
private static final int MSG_STARTED_WAKING_UP = 319;
|
||||||
private static final int MSG_FINISHED_GOING_TO_SLEEP = 320;
|
private static final int MSG_FINISHED_GOING_TO_SLEEP = 320;
|
||||||
@@ -1453,9 +1452,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
final String action = intent.getAction();
|
final String action = intent.getAction();
|
||||||
if (AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED.equals(action)) {
|
if (AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED.equals(action)) {
|
||||||
mHandler.sendEmptyMessage(MSG_TIME_UPDATE);
|
mHandler.sendEmptyMessage(MSG_TIME_UPDATE);
|
||||||
} else if (Intent.ACTION_USER_INFO_CHANGED.equals(action)) {
|
|
||||||
mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED,
|
|
||||||
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(
|
Trace.beginSection(
|
||||||
"KeyguardUpdateMonitor.mBroadcastAllReceiver#onReceive "
|
"KeyguardUpdateMonitor.mBroadcastAllReceiver#onReceive "
|
||||||
@@ -1811,16 +1807,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleUserInfoChanged(int userId) {
|
|
||||||
Assert.isMainThread();
|
|
||||||
for (int i = 0; i < mCallbacks.size(); i++) {
|
|
||||||
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
|
|
||||||
if (cb != null) {
|
|
||||||
cb.onUserInfoChanged(userId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void handleUserUnlocked(int userId) {
|
private void handleUserUnlocked(int userId) {
|
||||||
Assert.isMainThread();
|
Assert.isMainThread();
|
||||||
mUserIsUnlocked.put(userId, true);
|
mUserIsUnlocked.put(userId, true);
|
||||||
@@ -1938,9 +1924,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
case MSG_KEYGUARD_BOUNCER_CHANGED:
|
case MSG_KEYGUARD_BOUNCER_CHANGED:
|
||||||
handleKeyguardBouncerChanged(msg.arg1, msg.arg2);
|
handleKeyguardBouncerChanged(msg.arg1, msg.arg2);
|
||||||
break;
|
break;
|
||||||
case MSG_USER_INFO_CHANGED:
|
|
||||||
handleUserInfoChanged(msg.arg1);
|
|
||||||
break;
|
|
||||||
case MSG_REPORT_EMERGENCY_CALL_ACTION:
|
case MSG_REPORT_EMERGENCY_CALL_ACTION:
|
||||||
handleReportEmergencyCallAction();
|
handleReportEmergencyCallAction();
|
||||||
break;
|
break;
|
||||||
@@ -2051,7 +2034,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
});
|
});
|
||||||
|
|
||||||
final IntentFilter allUserFilter = new IntentFilter();
|
final IntentFilter allUserFilter = new IntentFilter();
|
||||||
allUserFilter.addAction(Intent.ACTION_USER_INFO_CHANGED);
|
|
||||||
allUserFilter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED);
|
allUserFilter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED);
|
||||||
allUserFilter.addAction(ACTION_FACE_UNLOCK_STARTED);
|
allUserFilter.addAction(ACTION_FACE_UNLOCK_STARTED);
|
||||||
allUserFilter.addAction(ACTION_FACE_UNLOCK_STOPPED);
|
allUserFilter.addAction(ACTION_FACE_UNLOCK_STOPPED);
|
||||||
@@ -3149,20 +3131,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE);
|
updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Notifies that the occluded state changed. */
|
|
||||||
public void onKeyguardOccludedChanged(boolean occluded) {
|
|
||||||
Assert.isMainThread();
|
|
||||||
if (DEBUG) {
|
|
||||||
Log.d(TAG, "onKeyguardOccludedChanged(" + occluded + ")");
|
|
||||||
}
|
|
||||||
for (int i = 0; i < mCallbacks.size(); i++) {
|
|
||||||
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
|
|
||||||
if (cb != null) {
|
|
||||||
cb.onKeyguardOccludedChanged(occluded);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle {@link #MSG_KEYGUARD_RESET}
|
* Handle {@link #MSG_KEYGUARD_RESET}
|
||||||
*/
|
*/
|
||||||
@@ -3380,7 +3348,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
callback.onPhoneStateChanged(mPhoneState);
|
callback.onPhoneStateChanged(mPhoneState);
|
||||||
callback.onRefreshCarrierInfo();
|
callback.onRefreshCarrierInfo();
|
||||||
callback.onClockVisibilityChanged();
|
callback.onClockVisibilityChanged();
|
||||||
callback.onKeyguardOccludedChanged(mKeyguardOccluded);
|
|
||||||
callback.onKeyguardVisibilityChangedRaw(mKeyguardIsVisible);
|
callback.onKeyguardVisibilityChangedRaw(mKeyguardIsVisible);
|
||||||
callback.onTelephonyCapable(mTelephonyCapable);
|
callback.onTelephonyCapable(mTelephonyCapable);
|
||||||
|
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ public class KeyguardUpdateMonitorCallback {
|
|||||||
*/
|
*/
|
||||||
public void onKeyguardVisibilityChanged(boolean showing) { }
|
public void onKeyguardVisibilityChanged(boolean showing) { }
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when the keyguard occluded state changes.
|
|
||||||
* @param occluded Indicates if the keyguard is now occluded.
|
|
||||||
*/
|
|
||||||
public void onKeyguardOccludedChanged(boolean occluded) { }
|
|
||||||
|
|
||||||
public void onKeyguardVisibilityChangedRaw(boolean showing) {
|
public void onKeyguardVisibilityChangedRaw(boolean showing) {
|
||||||
final long now = SystemClock.elapsedRealtime();
|
final long now = SystemClock.elapsedRealtime();
|
||||||
if (showing == mShowing
|
if (showing == mShowing
|
||||||
@@ -150,11 +144,6 @@ public class KeyguardUpdateMonitorCallback {
|
|||||||
*/
|
*/
|
||||||
public void onSimStateChanged(int subId, int slotId, int simState) { }
|
public void onSimStateChanged(int subId, int slotId, int simState) { }
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when the user's info changed.
|
|
||||||
*/
|
|
||||||
public void onUserInfoChanged(int userId) { }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a user got unlocked.
|
* Called when a user got unlocked.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -555,10 +555,6 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onUserInfoChanged(int userId) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClockVisibilityChanged() {
|
public void onClockVisibilityChanged() {
|
||||||
adjustStatusBarLocked();
|
adjustStatusBarLocked();
|
||||||
|
|||||||
@@ -1041,7 +1041,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (occluded != mLastOccluded || mFirstUpdate) {
|
if (occluded != mLastOccluded || mFirstUpdate) {
|
||||||
mKeyguardUpdateManager.onKeyguardOccludedChanged(occluded);
|
|
||||||
mKeyguardStateController.notifyKeyguardState(showing, occluded);
|
mKeyguardStateController.notifyKeyguardState(showing, occluded);
|
||||||
}
|
}
|
||||||
if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) {
|
if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) {
|
||||||
@@ -1070,11 +1069,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
mCentralSurfaces.onKeyguardViewManagerStatesUpdated();
|
mCentralSurfaces.onKeyguardViewManagerStatesUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
private View getCurrentNavBarView() {
|
|
||||||
final NavigationBarView navBarView = mCentralSurfaces.getNavigationBarView();
|
|
||||||
return navBarView != null ? navBarView.getCurrentView() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the visibility of the nav bar window (which will cause insets changes).
|
* Updates the visibility of the nav bar window (which will cause insets changes).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -275,21 +275,18 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
|
|||||||
|
|
||||||
// Should be false to start, so no invocations
|
// Should be false to start, so no invocations
|
||||||
mStatusBarKeyguardViewManager.setOccluded(false /* occluded */, false /* animated */);
|
mStatusBarKeyguardViewManager.setOccluded(false /* occluded */, false /* animated */);
|
||||||
verify(mKeyguardUpdateMonitor, never()).onKeyguardOccludedChanged(anyBoolean());
|
|
||||||
verify(mKeyguardStateController, never()).notifyKeyguardState(anyBoolean(), anyBoolean());
|
verify(mKeyguardStateController, never()).notifyKeyguardState(anyBoolean(), anyBoolean());
|
||||||
|
|
||||||
clearInvocations(mKeyguardUpdateMonitor);
|
clearInvocations(mKeyguardUpdateMonitor);
|
||||||
clearInvocations(mKeyguardStateController);
|
clearInvocations(mKeyguardStateController);
|
||||||
|
|
||||||
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
||||||
verify(mKeyguardUpdateMonitor).onKeyguardOccludedChanged(true);
|
|
||||||
verify(mKeyguardStateController).notifyKeyguardState(true, true);
|
verify(mKeyguardStateController).notifyKeyguardState(true, true);
|
||||||
|
|
||||||
clearInvocations(mKeyguardUpdateMonitor);
|
clearInvocations(mKeyguardUpdateMonitor);
|
||||||
clearInvocations(mKeyguardStateController);
|
clearInvocations(mKeyguardStateController);
|
||||||
|
|
||||||
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
||||||
verify(mKeyguardUpdateMonitor, never()).onKeyguardOccludedChanged(anyBoolean());
|
|
||||||
verify(mKeyguardStateController, never()).notifyKeyguardState(anyBoolean(), anyBoolean());
|
verify(mKeyguardStateController, never()).notifyKeyguardState(anyBoolean(), anyBoolean());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +296,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
|
|||||||
mStatusBarKeyguardViewManager.show(null);
|
mStatusBarKeyguardViewManager.show(null);
|
||||||
|
|
||||||
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
||||||
verify(mKeyguardUpdateMonitor).onKeyguardOccludedChanged(true);
|
|
||||||
verify(mKeyguardStateController).notifyKeyguardState(true, true);
|
verify(mKeyguardStateController).notifyKeyguardState(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +305,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
|
|||||||
mStatusBarKeyguardViewManager.show(null);
|
mStatusBarKeyguardViewManager.show(null);
|
||||||
|
|
||||||
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */);
|
||||||
verify(mKeyguardUpdateMonitor).onKeyguardOccludedChanged(true);
|
|
||||||
verify(mKeyguardStateController).notifyKeyguardState(true, true);
|
verify(mKeyguardStateController).notifyKeyguardState(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user