Loading packages/SystemUI/src/com/android/keyguard/KeyguardBiometricLockoutLogger.kt +2 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.keyguard import android.app.StatusBarManager.SESSION_KEYGUARD import android.content.Context import android.hardware.biometrics.BiometricSourceType import com.android.internal.annotations.VisibleForTesting import com.android.internal.logging.UiEvent Loading @@ -41,11 +40,10 @@ import javax.inject.Inject */ @SysUISingleton class KeyguardBiometricLockoutLogger @Inject constructor( context: Context?, private val uiEventLogger: UiEventLogger, private val keyguardUpdateMonitor: KeyguardUpdateMonitor, private val sessionTracker: SessionTracker ) : CoreStartable(context) { ) : CoreStartable { private var fingerprintLockedOut = false private var faceLockedOut = false private var encryptedOrLockdown = false Loading packages/SystemUI/src/com/android/systemui/ChooserSelector.kt +2 −2 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ import kotlinx.coroutines.withContext @SysUISingleton class ChooserSelector @Inject constructor( context: Context, private val context: Context, private val featureFlags: FeatureFlags, @Application private val coroutineScope: CoroutineScope, @Background private val bgDispatcher: CoroutineDispatcher ) : CoreStartable(context) { ) : CoreStartable { private val packageManager = context.packageManager private val chooserComponent = ComponentName.unflattenFromString( Loading packages/SystemUI/src/com/android/systemui/CoreStartable.java +18 −16 Original line number Diff line number Diff line Loading @@ -16,39 +16,41 @@ package com.android.systemui; import android.content.Context; import android.content.res.Configuration; import androidx.annotation.NonNull; import com.android.internal.annotations.VisibleForTesting; import java.io.PrintWriter; /** * A top-level module of system UI code (sometimes called "system UI services" elsewhere in code). * Which CoreStartable modules are loaded can be controlled via a config resource. * Code that needs to be run when SystemUI is started. * * Which CoreStartable modules are loaded is controlled via the dagger graph. Bind them into the * CoreStartable map with code such as: * * <pre> * @Binds * @IntoMap * @ClassKey(FoobarStartable::class) * abstract fun bind(impl: FoobarStartable): CoreStartable * </pre> * * @see SystemUIApplication#startServicesIfNeeded() */ public abstract class CoreStartable implements Dumpable { protected final Context mContext; public CoreStartable(Context context) { mContext = context; } public interface CoreStartable extends Dumpable { /** Main entry point for implementations. Called shortly after app startup. */ public abstract void start(); void start(); protected void onConfigurationChanged(Configuration newConfig) { /** */ default void onConfigurationChanged(Configuration newConfig) { } @Override public void dump(@NonNull PrintWriter pw, @NonNull String[] args) { default void dump(@NonNull PrintWriter pw, @NonNull String[] args) { } @VisibleForTesting protected void onBootCompleted() { /** Called when the device reports BOOT_COMPLETED. */ default void onBootCompleted() { } } packages/SystemUI/src/com/android/systemui/LatencyTester.java +1 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import javax.inject.Inject; * system that are used for testing the latency. */ @SysUISingleton public class LatencyTester extends CoreStartable { public class LatencyTester implements CoreStartable { private static final boolean DEFAULT_ENABLED = Build.IS_ENG; private static final String ACTION_FINGERPRINT_WAKE = Loading @@ -62,13 +62,11 @@ public class LatencyTester extends CoreStartable { @Inject public LatencyTester( Context context, BiometricUnlockController biometricUnlockController, BroadcastDispatcher broadcastDispatcher, DeviceConfigProxy deviceConfigProxy, @Main DelayableExecutor mainExecutor ) { super(context); mBiometricUnlockController = biometricUnlockController; mBroadcastDispatcher = broadcastDispatcher; mDeviceConfigProxy = deviceConfigProxy; Loading packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +4 −3 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ import kotlin.Pair; * for antialiasing and emulation purposes. */ @SysUISingleton public class ScreenDecorations extends CoreStartable implements Tunable , Dumpable { public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { private static final boolean DEBUG = false; private static final String TAG = "ScreenDecorations"; Loading @@ -130,6 +130,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab @VisibleForTesting protected boolean mIsRegistered; private final BroadcastDispatcher mBroadcastDispatcher; private final Context mContext; private final Executor mMainExecutor; private final TunerService mTunerService; private final SecureSettings mSecureSettings; Loading Loading @@ -308,7 +309,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab ThreadFactory threadFactory, PrivacyDotDecorProviderFactory dotFactory, FaceScanningProviderFactory faceScanningFactory) { super(context); mContext = context; mMainExecutor = mainExecutor; mSecureSettings = secureSettings; mBroadcastDispatcher = broadcastDispatcher; Loading Loading @@ -973,7 +974,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab } @Override protected void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(Configuration newConfig) { if (DEBUG_DISABLE_SCREEN_DECORATIONS) { Log.i(TAG, "ScreenDecorations is disabled"); return; Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardBiometricLockoutLogger.kt +2 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.keyguard import android.app.StatusBarManager.SESSION_KEYGUARD import android.content.Context import android.hardware.biometrics.BiometricSourceType import com.android.internal.annotations.VisibleForTesting import com.android.internal.logging.UiEvent Loading @@ -41,11 +40,10 @@ import javax.inject.Inject */ @SysUISingleton class KeyguardBiometricLockoutLogger @Inject constructor( context: Context?, private val uiEventLogger: UiEventLogger, private val keyguardUpdateMonitor: KeyguardUpdateMonitor, private val sessionTracker: SessionTracker ) : CoreStartable(context) { ) : CoreStartable { private var fingerprintLockedOut = false private var faceLockedOut = false private var encryptedOrLockdown = false Loading
packages/SystemUI/src/com/android/systemui/ChooserSelector.kt +2 −2 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ import kotlinx.coroutines.withContext @SysUISingleton class ChooserSelector @Inject constructor( context: Context, private val context: Context, private val featureFlags: FeatureFlags, @Application private val coroutineScope: CoroutineScope, @Background private val bgDispatcher: CoroutineDispatcher ) : CoreStartable(context) { ) : CoreStartable { private val packageManager = context.packageManager private val chooserComponent = ComponentName.unflattenFromString( Loading
packages/SystemUI/src/com/android/systemui/CoreStartable.java +18 −16 Original line number Diff line number Diff line Loading @@ -16,39 +16,41 @@ package com.android.systemui; import android.content.Context; import android.content.res.Configuration; import androidx.annotation.NonNull; import com.android.internal.annotations.VisibleForTesting; import java.io.PrintWriter; /** * A top-level module of system UI code (sometimes called "system UI services" elsewhere in code). * Which CoreStartable modules are loaded can be controlled via a config resource. * Code that needs to be run when SystemUI is started. * * Which CoreStartable modules are loaded is controlled via the dagger graph. Bind them into the * CoreStartable map with code such as: * * <pre> * @Binds * @IntoMap * @ClassKey(FoobarStartable::class) * abstract fun bind(impl: FoobarStartable): CoreStartable * </pre> * * @see SystemUIApplication#startServicesIfNeeded() */ public abstract class CoreStartable implements Dumpable { protected final Context mContext; public CoreStartable(Context context) { mContext = context; } public interface CoreStartable extends Dumpable { /** Main entry point for implementations. Called shortly after app startup. */ public abstract void start(); void start(); protected void onConfigurationChanged(Configuration newConfig) { /** */ default void onConfigurationChanged(Configuration newConfig) { } @Override public void dump(@NonNull PrintWriter pw, @NonNull String[] args) { default void dump(@NonNull PrintWriter pw, @NonNull String[] args) { } @VisibleForTesting protected void onBootCompleted() { /** Called when the device reports BOOT_COMPLETED. */ default void onBootCompleted() { } }
packages/SystemUI/src/com/android/systemui/LatencyTester.java +1 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import javax.inject.Inject; * system that are used for testing the latency. */ @SysUISingleton public class LatencyTester extends CoreStartable { public class LatencyTester implements CoreStartable { private static final boolean DEFAULT_ENABLED = Build.IS_ENG; private static final String ACTION_FINGERPRINT_WAKE = Loading @@ -62,13 +62,11 @@ public class LatencyTester extends CoreStartable { @Inject public LatencyTester( Context context, BiometricUnlockController biometricUnlockController, BroadcastDispatcher broadcastDispatcher, DeviceConfigProxy deviceConfigProxy, @Main DelayableExecutor mainExecutor ) { super(context); mBiometricUnlockController = biometricUnlockController; mBroadcastDispatcher = broadcastDispatcher; mDeviceConfigProxy = deviceConfigProxy; Loading
packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +4 −3 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ import kotlin.Pair; * for antialiasing and emulation purposes. */ @SysUISingleton public class ScreenDecorations extends CoreStartable implements Tunable , Dumpable { public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { private static final boolean DEBUG = false; private static final String TAG = "ScreenDecorations"; Loading @@ -130,6 +130,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab @VisibleForTesting protected boolean mIsRegistered; private final BroadcastDispatcher mBroadcastDispatcher; private final Context mContext; private final Executor mMainExecutor; private final TunerService mTunerService; private final SecureSettings mSecureSettings; Loading Loading @@ -308,7 +309,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab ThreadFactory threadFactory, PrivacyDotDecorProviderFactory dotFactory, FaceScanningProviderFactory faceScanningFactory) { super(context); mContext = context; mMainExecutor = mainExecutor; mSecureSettings = secureSettings; mBroadcastDispatcher = broadcastDispatcher; Loading Loading @@ -973,7 +974,7 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab } @Override protected void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(Configuration newConfig) { if (DEBUG_DISABLE_SCREEN_DECORATIONS) { Log.i(TAG, "ScreenDecorations is disabled"); return; Loading