Merge "implement Dumpable for some keyguard classes"
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index 85472ff..34c920f 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -359,6 +359,7 @@
notifLog,
dozeParameters,
scrimController,
+ null /* keyguardLiftController */,
lockscreenWallpaperLazy,
biometricUnlockControllerLazy,
dozeServiceHost,
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 27410be..8373fb2 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -99,6 +99,8 @@
import com.android.internal.widget.LockPatternUtils;
import com.android.settingslib.WirelessUtils;
import com.android.systemui.DejankUtils;
+import com.android.systemui.DumpController;
+import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.MainLooper;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -126,7 +128,7 @@
* to be updated.
*/
@Singleton
-public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
+public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpable {
private static final String TAG = "KeyguardUpdateMonitor";
private static final boolean DEBUG = KeyguardConstants.DEBUG;
@@ -1499,11 +1501,13 @@
@VisibleForTesting
@Inject
- protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper) {
+ protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper,
+ DumpController dumpController) {
mContext = context;
mSubscriptionManager = SubscriptionManager.from(context);
mDeviceProvisioned = isDeviceProvisionedInSettingsDb();
mStrongAuthTracker = new StrongAuthTracker(context, this::notifyStrongAuthStateChanged);
+ dumpController.registerDumpable(this);
mHandler = new Handler(mainLooper) {
@Override
@@ -2787,6 +2791,7 @@
}
}
+ @Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println("KeyguardUpdateMonitor state:");
pw.println(" SIM States:");
diff --git a/packages/SystemUI/src/com/android/systemui/DumpController.kt b/packages/SystemUI/src/com/android/systemui/DumpController.kt
index 65f1abd..8c7075b 100644
--- a/packages/SystemUI/src/com/android/systemui/DumpController.kt
+++ b/packages/SystemUI/src/com/android/systemui/DumpController.kt
@@ -47,6 +47,16 @@
/**
* Adds a [Dumpable] dumpable to be dumped.
*
+ * @param dumpable the [Dumpable] to be added
+ */
+ fun registerDumpable(dumpable: Dumpable) {
+ Preconditions.checkNotNull(dumpable, "The dumpable to be added cannot be null")
+ registerDumpable(dumpable.javaClass.simpleName, dumpable)
+ }
+
+ /**
+ * Adds a [Dumpable] dumpable to be dumped.
+ *
* @param tag a string tag to associate with this dumpable. Tags must be globally unique; this
* method will throw if the same tag has already been registered. Tags can be used to
* filter output when debugging.
@@ -79,11 +89,11 @@
/**
* Dump all the [Dumpable] registered with the controller
*/
- override fun dump(fd: FileDescriptor?, pw: PrintWriter, args: Array<String>?) {
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<String>) {
pw.println("DumpController state:")
- val filter = if (args != null && args.size >= 3 &&
- args[0] == "dependency" && args[1] == "DumpController") {
+ val filter = if (args.size >= 3 && args[0].toLowerCase() == "dependency" &&
+ args[1] == "DumpController") {
ArraySet(args[2].split(',').map { it.toLowerCase() })
} else {
null
diff --git a/packages/SystemUI/src/com/android/systemui/Dumpable.java b/packages/SystemUI/src/com/android/systemui/Dumpable.java
index 65a6844..10a0643 100644
--- a/packages/SystemUI/src/com/android/systemui/Dumpable.java
+++ b/packages/SystemUI/src/com/android/systemui/Dumpable.java
@@ -14,9 +14,24 @@
package com.android.systemui;
+import androidx.annotation.NonNull;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
+/**
+ * Implemented by classes who want to be in:
+ * {@code adb shell dumpsys activity service com.android.systemui}
+ *
+ * @see DumpController
+ */
public interface Dumpable {
- void dump(FileDescriptor fd, PrintWriter pw, String[] args);
+
+ /**
+ * Called when it's time to dump the internal state
+ * @param fd A file descriptor.
+ * @param pw Where to write your dump to.
+ * @param args Arguments.
+ */
+ void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args);
}
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
index 98d7f8b..776189b 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt
@@ -133,10 +133,10 @@
protected open fun createUBRForUser(userId: Int) =
UserBroadcastDispatcher(context, userId, mainHandler, bgLooper)
- override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) {
- pw?.println("Broadcast dispatcher:")
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println("Broadcast dispatcher:")
for (index in 0 until receiversByUser.size()) {
- pw?.println(" User ${receiversByUser.keyAt(index)}")
+ pw.println(" User ${receiversByUser.keyAt(index)}")
receiversByUser.valueAt(index).dump(fd, pw, args)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
index 54f9950..ddda95a 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
@@ -149,11 +149,11 @@
}
}
- override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) {
- pw?.println(" Registered=${registered.get()}")
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println(" Registered=${registered.get()}")
actionsToReceivers.forEach { (action, list) ->
- pw?.println(" $action:")
- list.forEach { pw?.println(" ${it.receiver}") }
+ pw.println(" $action:")
+ list.forEach { pw.println(" ${it.receiver}") }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
index c3d2a1f..bb83fdc 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
@@ -22,6 +22,8 @@
import android.os.PowerManager;
import android.util.DisplayMetrics;
+import androidx.annotation.Nullable;
+
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.ForegroundServiceController;
@@ -71,6 +73,7 @@
import com.android.systemui.statusbar.phone.DozeServiceHost;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
+import com.android.systemui.statusbar.phone.KeyguardLiftController;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.LockscreenWallpaper;
import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper;
@@ -226,6 +229,7 @@
NotifLog notifLog,
DozeParameters dozeParameters,
ScrimController scrimController,
+ @Nullable KeyguardLiftController keyguardLiftController,
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
DozeServiceHost dozeServiceHost,
@@ -290,6 +294,7 @@
notifLog,
dozeParameters,
scrimController,
+ keyguardLiftController,
lockscreenWallpaperLazy,
biometricUnlockControllerLazy,
dozeServiceHost,
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 5f1455f..9e7f6c6 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -21,6 +21,7 @@
import android.content.pm.PackageManager;
import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.systemui.DumpController;
import com.android.systemui.assist.AssistModule;
import com.android.systemui.model.SysUiState;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -54,12 +55,13 @@
static KeyguardLiftController provideKeyguardLiftController(Context context,
StatusBarStateController statusBarStateController,
AsyncSensorManager asyncSensorManager,
- KeyguardUpdateMonitor keyguardUpdateMonitor) {
+ KeyguardUpdateMonitor keyguardUpdateMonitor,
+ DumpController dumpController) {
if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {
return null;
}
return new KeyguardLiftController(statusBarStateController, asyncSensorManager,
- keyguardUpdateMonitor);
+ keyguardUpdateMonitor, dumpController);
}
@Singleton
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
index 22fb4c0..ca16e84 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -22,7 +22,11 @@
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
-import android.os.*
+import android.os.Handler
+import android.os.Looper
+import android.os.Message
+import android.os.UserHandle
+import android.os.UserManager
import android.provider.DeviceConfig
import com.android.internal.annotations.VisibleForTesting
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags
@@ -248,20 +252,20 @@
}
}
- override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) {
- pw?.println("PrivacyItemController state:")
- pw?.println(" Listening: $listening")
- pw?.println(" Current user ids: $currentUserIds")
- pw?.println(" Privacy Items:")
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println("PrivacyItemController state:")
+ pw.println(" Listening: $listening")
+ pw.println(" Current user ids: $currentUserIds")
+ pw.println(" Privacy Items:")
privacyList.forEach {
- pw?.print(" ")
- pw?.println(it.toString())
+ pw.print(" ")
+ pw.println(it.toString())
}
- pw?.println(" Callbacks:")
+ pw.println(" Callbacks:")
callbacks.forEach {
it.get()?.let {
- pw?.print(" ")
- pw?.println(it.toString())
+ pw.print(" ")
+ pw.println(it.toString())
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 1e8e28f..865d7e7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -35,6 +35,8 @@
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.Dependency;
+import com.android.systemui.DumpController;
+import com.android.systemui.Dumpable;
import com.android.systemui.dagger.qualifiers.MainResources;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.ScreenLifecycle;
@@ -42,6 +44,7 @@
import com.android.systemui.statusbar.NotificationMediaManager;
import com.android.systemui.statusbar.policy.KeyguardStateController;
+import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -53,7 +56,7 @@
* Controller which coordinates all the biometric unlocking actions with the UI.
*/
@Singleton
-public class BiometricUnlockController extends KeyguardUpdateMonitorCallback {
+public class BiometricUnlockController extends KeyguardUpdateMonitorCallback implements Dumpable {
private static final String TAG = "BiometricUnlockCtrl";
private static final boolean DEBUG_BIO_WAKELOCK = KeyguardConstants.DEBUG_BIOMETRIC_WAKELOCK;
@@ -160,7 +163,7 @@
KeyguardUpdateMonitor keyguardUpdateMonitor,
@MainResources Resources resources,
KeyguardBypassController keyguardBypassController, DozeParameters dozeParameters,
- MetricsLogger metricsLogger) {
+ MetricsLogger metricsLogger, DumpController dumpController) {
mContext = context;
mPowerManager = context.getSystemService(PowerManager.class);
mUpdateMonitor = keyguardUpdateMonitor;
@@ -180,6 +183,7 @@
mKeyguardBypassController = keyguardBypassController;
mKeyguardBypassController.setUnlockController(this);
mMetricsLogger = metricsLogger;
+ dumpController.registerDumpable(this);
}
public void setStatusBarKeyguardViewManager(
@@ -543,7 +547,8 @@
return mHasScreenTurnedOnSinceAuthenticating;
}
- public void dump(PrintWriter pw) {
+ @Override
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println(" BiometricUnlockController:");
pw.print(" mMode="); pw.println(mMode);
pw.print(" mWakeLock="); pw.println(mWakeLock);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
index aca7f44..f7d52b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
@@ -20,17 +20,20 @@
import android.content.pm.PackageManager
import android.hardware.biometrics.BiometricSourceType
import android.provider.Settings
+import com.android.systemui.DumpController
+import com.android.systemui.Dumpable
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.tuner.TunerService
+import java.io.FileDescriptor
import java.io.PrintWriter
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
-class KeyguardBypassController {
+class KeyguardBypassController : Dumpable {
private val mKeyguardStateController: KeyguardStateController
private val statusBarStateController: StatusBarStateController
@@ -68,7 +71,8 @@
tunerService: TunerService,
statusBarStateController: StatusBarStateController,
lockscreenUserManager: NotificationLockscreenUserManager,
- keyguardStateController: KeyguardStateController
+ keyguardStateController: KeyguardStateController,
+ dumpController: DumpController
) {
this.mKeyguardStateController = keyguardStateController
this.statusBarStateController = statusBarStateController
@@ -78,6 +82,7 @@
return
}
+ dumpController.registerDumpable("KeyguardBypassController", this)
statusBarStateController.addCallback(object : StatusBarStateController.StateListener {
override fun onStateChanged(newState: Int) {
if (newState != StatusBarState.KEYGUARD) {
@@ -155,16 +160,16 @@
pendingUnlockType = null
}
- fun dump(pw: PrintWriter) {
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
pw.println("KeyguardBypassController:")
- pw.print(" pendingUnlockType: "); pw.println(pendingUnlockType)
- pw.print(" bypassEnabled: "); pw.println(bypassEnabled)
- pw.print(" canBypass: "); pw.println(canBypass())
- pw.print(" bouncerShowing: "); pw.println(bouncerShowing)
- pw.print(" isPulseExpanding: "); pw.println(isPulseExpanding)
- pw.print(" launchingAffordance: "); pw.println(launchingAffordance)
- pw.print(" qSExpanded: "); pw.println(qSExpanded)
- pw.print(" hasFaceFeature: "); pw.println(hasFaceFeature)
+ pw.println(" pendingUnlockType: $pendingUnlockType")
+ pw.println(" bypassEnabled: $bypassEnabled")
+ pw.println(" canBypass: ${canBypass()}")
+ pw.println(" bouncerShowing: $bouncerShowing")
+ pw.println(" isPulseExpanding: $isPulseExpanding")
+ pw.println(" launchingAffordance: $launchingAffordance")
+ pw.println(" qSExpanded: $qSExpanded")
+ pw.println(" hasFaceFeature: $hasFaceFeature")
}
companion object {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
index bf88704..2258c77 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardLiftController.kt
@@ -21,21 +21,27 @@
import android.hardware.TriggerEventListener
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.keyguard.KeyguardUpdateMonitorCallback
+import com.android.systemui.DumpController
+import com.android.systemui.Dumpable
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.util.Assert
import com.android.systemui.util.sensors.AsyncSensorManager
+import java.io.FileDescriptor
+import java.io.PrintWriter
class KeyguardLiftController constructor(
private val statusBarStateController: StatusBarStateController,
private val asyncSensorManager: AsyncSensorManager,
- private val keyguardUpdateMonitor: KeyguardUpdateMonitor
-) : StatusBarStateController.StateListener, KeyguardUpdateMonitorCallback() {
+ private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
+ dumpController: DumpController
+) : StatusBarStateController.StateListener, Dumpable, KeyguardUpdateMonitorCallback() {
private val pickupSensor = asyncSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE)
private var isListening = false
private var bouncerVisible = false
init {
+ dumpController.registerDumpable(this)
statusBarStateController.addCallback(this)
keyguardUpdateMonitor.registerCallback(this)
updateListeningState()
@@ -64,6 +70,13 @@
updateListeningState()
}
+ override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
+ pw.println("KeyguardLiftController:")
+ pw.println(" pickupSensor: $pickupSensor")
+ pw.println(" isListening: $isListening")
+ pw.println(" bouncerVisible: $bouncerVisible")
+ }
+
private fun updateListeningState() {
if (pickupSensor == null) {
return
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 001599f..fb2ae53 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -356,6 +356,8 @@
private final Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
protected LockscreenWallpaper mLockscreenWallpaper;
private final AutoHideController mAutoHideController;
+ @Nullable
+ private final KeyguardLiftController mKeyguardLiftController;
private int mNaturalBarHeight = -1;
@@ -689,6 +691,7 @@
NotifLog notifLog,
DozeParameters dozeParameters,
ScrimController scrimController,
+ @Nullable KeyguardLiftController keyguardLiftController,
Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
DozeServiceHost dozeServiceHost,
@@ -754,6 +757,7 @@
mPowerManager = powerManager;
mDozeParameters = dozeParameters;
mScrimController = scrimController;
+ mKeyguardLiftController = keyguardLiftController;
mLockscreenWallpaperLazy = lockscreenWallpaperLazy;
mDozeScrimController = dozeScrimController;
mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
@@ -2518,10 +2522,6 @@
mDozeLog.dump(pw);
- if (mBiometricUnlockController != null) {
- mBiometricUnlockController.dump(pw);
- }
-
if (mKeyguardIndicationController != null) {
mKeyguardIndicationController.dump(fd, pw, args);
}
@@ -2575,14 +2575,6 @@
mLightBarController.dump(fd, pw, args);
}
- if (mKeyguardBypassController != null) {
- mKeyguardBypassController.dump(pw);
- }
-
- if (mKeyguardUpdateMonitor != null) {
- mKeyguardUpdateMonitor.dump(fd, pw, args);
- }
-
mFalsingManager.dump(pw);
FalsingLog.dump(pw);
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 57b0987..7d28392 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -56,6 +56,7 @@
import com.android.internal.telephony.IccCardConstants;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
+import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
@@ -87,6 +88,8 @@
DATA_ROAMING_DISABLE, null, null, null, null, false, null, "", true, TEST_GROUP_UUID,
TEST_CARRIER_ID, 0);
@Mock
+ private DumpController mDumpController;
+ @Mock
private KeyguardUpdateMonitor.StrongAuthTracker mStrongAuthTracker;
@Mock
private TrustManager mTrustManager;
@@ -515,7 +518,8 @@
AtomicBoolean mSimStateChanged = new AtomicBoolean(false);
protected TestableKeyguardUpdateMonitor(Context context) {
- super(context, TestableLooper.get(KeyguardUpdateMonitorTest.this).getLooper());
+ super(context, TestableLooper.get(KeyguardUpdateMonitorTest.this)
+ .getLooper(), mDumpController);
context.unregisterReceiver(mBroadcastReceiver);
context.unregisterReceiver(mBroadcastAllReceiver);
mStrongAuthTracker = KeyguardUpdateMonitorTest.this.mStrongAuthTracker;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java b/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
index 939df10..c020514 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/DependencyTest.java
@@ -30,6 +30,7 @@
import org.junit.Assert;
import org.junit.Test;
+import java.io.FileDescriptor;
import java.io.PrintWriter;
@SmallTest
@@ -56,10 +57,12 @@
@Test
public void testDump() {
Dumpable d = mock(Dumpable.class);
+ String[] args = new String[0];
+ FileDescriptor fd = mock(FileDescriptor.class);
mDependency.injectTestDependency(DUMPABLE, d);
Dependency.get(DUMPABLE);
- mDependency.dump(null, mock(PrintWriter.class), null);
- verify(d).dump(eq(null), any(), eq(null));
+ mDependency.dump(fd, mock(PrintWriter.class), args);
+ verify(d).dump(eq(fd), any(), eq(args));
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
index 4a0b371..4451fa4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
@@ -38,6 +38,7 @@
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.statusbar.NotificationMediaManager;
@@ -55,6 +56,8 @@
public class BiometricsUnlockControllerTest extends SysuiTestCase {
@Mock
+ private DumpController mDumpController;
+ @Mock
private NotificationMediaManager mMediaManager;
@Mock
private PowerManager mPowerManager;
@@ -101,7 +104,7 @@
mBiometricUnlockController = new BiometricUnlockController(mContext, mDozeScrimController,
mKeyguardViewMediator, mScrimController, mStatusBar, mKeyguardStateController,
mHandler, mUpdateMonitor, res.getResources(), mKeyguardBypassController,
- mDozeParameters, mMetricsLogger);
+ mDozeParameters, mMetricsLogger, mDumpController);
mBiometricUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index 66c01ca..46327a7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -229,6 +229,7 @@
@Mock private DozeServiceHost mDozeServiceHost;
@Mock private LinearLayout mLockIconContainer;
@Mock private ViewMediatorCallback mKeyguardVieMediatorCallback;
+ @Mock private KeyguardLiftController mKeyguardLiftController;
@Before
public void setup() throws Exception {
@@ -360,6 +361,7 @@
mNotifLog,
mDozeParameters,
mScrimController,
+ mKeyguardLiftController,
mLockscreenWallpaperLazy,
mBiometricUnlockControllerLazy,
mDozeServiceHost,