Loading packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/LockscreenAndDreamTargetFilterTest.kt→packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/LockscreenTargetFilterTest.kt +54 −48 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.settings.UserTracker import com.android.systemui.smartspace.filters.LockscreenAndDreamTargetFilter import com.android.systemui.smartspace.filters.LockscreenTargetFilter import com.android.systemui.util.concurrency.Execution import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq Loading @@ -52,55 +52,52 @@ import org.mockito.MockitoAnnotations @SmallTest @TestableLooper.RunWithLooper @RunWith(AndroidJUnit4::class) class LockscreenAndDreamTargetFilterTest : SysuiTestCase() { @Mock private lateinit var secureSettings: SecureSettings class LockscreenTargetFilterTest : SysuiTestCase() { @Mock private lateinit var secureSettings: SecureSettings @Mock private lateinit var userTracker: UserTracker @Mock private lateinit var userTracker: UserTracker @Mock private lateinit var execution: Execution @Mock private lateinit var execution: Execution @Mock private lateinit var handler: Handler @Mock private lateinit var handler: Handler @Mock private lateinit var contentResolver: ContentResolver @Mock private lateinit var contentResolver: ContentResolver @Mock private lateinit var uiExecution: Executor @Mock private lateinit var uiExecution: Executor @Mock private lateinit var userHandle: UserHandle @Mock private lateinit var userHandle: UserHandle @Mock private lateinit var listener: SmartspaceTargetFilter.Listener @Mock private lateinit var listener: SmartspaceTargetFilter.Listener @Mock private lateinit var lockScreenAllowPrivateNotificationsUri: Uri @Mock private lateinit var lockScreenAllowPrivateNotificationsUri: Uri @Before fun setup() { MockitoAnnotations.initMocks(this) `when`(userTracker.userHandle).thenReturn(userHandle) `when`(secureSettings .getUriFor(eq(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS))) `when`( secureSettings.getUriFor( eq(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS) ) ) .thenReturn(lockScreenAllowPrivateNotificationsUri) } /** * Ensures {@link Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS} is * tracked. */ /** Ensures {@link Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS} is tracked. */ @Test fun testLockscreenAllowPrivateNotifications() { var setting = Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS `when`(secureSettings .getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) `when`(secureSettings.getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) .thenReturn(0) var filter = LockscreenAndDreamTargetFilter(secureSettings, userTracker, execution, handler, contentResolver, uiExecution) var filter = LockscreenTargetFilter( secureSettings, userTracker, execution, handler, contentResolver, uiExecution ) filter.addListener(listener) var smartspaceTarget = mock(SmartspaceTarget::class.java) Loading @@ -110,11 +107,15 @@ class LockscreenAndDreamTargetFilterTest : SysuiTestCase() { var settingCaptor = ArgumentCaptor.forClass(ContentObserver::class.java) verify(contentResolver).registerContentObserver(eq(lockScreenAllowPrivateNotificationsUri), anyBoolean(), settingCaptor.capture(), anyInt()) verify(contentResolver) .registerContentObserver( eq(lockScreenAllowPrivateNotificationsUri), anyBoolean(), settingCaptor.capture(), anyInt() ) `when`(secureSettings .getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) `when`(secureSettings.getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) .thenReturn(1) clearInvocations(listener) Loading @@ -123,21 +124,26 @@ class LockscreenAndDreamTargetFilterTest : SysuiTestCase() { assertThat(filter.filterSmartspaceTarget(smartspaceTarget)).isTrue() } /** * Ensures user switches are tracked. */ /** Ensures user switches are tracked. */ @Test fun testUserSwitchCallback() { var setting = Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS `when`(secureSettings .getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) `when`(secureSettings.getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) .thenReturn(0) var filter = LockscreenAndDreamTargetFilter(secureSettings, userTracker, execution, handler, contentResolver, uiExecution) var filter = LockscreenTargetFilter( secureSettings, userTracker, execution, handler, contentResolver, uiExecution ) filter.addListener(listener) var userTrackerCallback = withArgCaptor<UserTracker.Callback> { var userTrackerCallback = withArgCaptor<UserTracker.Callback> { verify(userTracker).addCallback(capture(), any()) } Loading packages/SystemUI/src/com/android/systemui/communal/smartspace/CommunalSmartspaceController.kt +4 −4 Original line number Diff line number Diff line Loading @@ -30,9 +30,9 @@ import com.android.systemui.plugins.BcSmartspaceDataPlugin.SmartspaceView import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_GLANCEABLE_HUB import com.android.systemui.smartspace.SmartspacePrecondition import com.android.systemui.smartspace.SmartspaceTargetFilter import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_TARGET_FILTER import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.GLANCEABLE_HUB_SMARTSPACE_DATA_PLUGIN import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_TARGET_FILTER import com.android.systemui.util.concurrency.Execution import java.util.Optional import java.util.concurrent.Executor Loading @@ -48,8 +48,8 @@ constructor( private val smartspaceManager: SmartspaceManager?, private val execution: Execution, @Main private val uiExecutor: Executor, @Named(DREAM_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(DREAM_SMARTSPACE_TARGET_FILTER) @Named(LOCKSCREEN_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(LOCKSCREEN_SMARTSPACE_TARGET_FILTER) private val optionalTargetFilter: Optional<SmartspaceTargetFilter>, @Named(GLANCEABLE_HUB_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>, ) { Loading packages/SystemUI/src/com/android/systemui/dreams/smartspace/DreamSmartspaceController.kt +4 −4 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_DREAM import com.android.systemui.smartspace.SmartspacePrecondition import com.android.systemui.smartspace.SmartspaceTargetFilter import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_DATA_PLUGIN import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_TARGET_FILTER import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_TARGET_FILTER import com.android.systemui.smartspace.dagger.SmartspaceViewComponent import com.android.systemui.util.concurrency.Execution import java.util.Optional Loading @@ -54,8 +54,8 @@ class DreamSmartspaceController @Inject constructor( private val execution: Execution, @Main private val uiExecutor: Executor, private val smartspaceViewComponentFactory: SmartspaceViewComponent.Factory, @Named(DREAM_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(DREAM_SMARTSPACE_TARGET_FILTER) @Named(LOCKSCREEN_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(LOCKSCREEN_SMARTSPACE_TARGET_FILTER) private val optionalTargetFilter: Optional<SmartspaceTargetFilter>, @Named(DREAM_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>, @Named(DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN) Loading packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt +6 −6 Original line number Diff line number Diff line Loading @@ -41,14 +41,14 @@ abstract class SmartspaceModule { const val DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN = "dream_weather_smartspace_data_plugin" /** * The dream smartspace target filter. * The target filter for smartspace over lockscreen. */ const val DREAM_SMARTSPACE_TARGET_FILTER = "dream_smartspace_target_filter" const val LOCKSCREEN_SMARTSPACE_TARGET_FILTER = "lockscreen_smartspace_target_filter" /** * The precondition for dream smartspace * The precondition for smartspace over lockscreen */ const val DREAM_SMARTSPACE_PRECONDITION = "dream_smartspace_precondition" const val LOCKSCREEN_SMARTSPACE_PRECONDITION = "lockscreen_smartspace_precondition" /** * The BcSmartspaceDataPlugin for the standalone date (+alarm+dnd). Loading @@ -67,7 +67,7 @@ abstract class SmartspaceModule { } @BindsOptionalOf @Named(DREAM_SMARTSPACE_TARGET_FILTER) @Named(LOCKSCREEN_SMARTSPACE_TARGET_FILTER) abstract fun optionalDreamSmartspaceTargetFilter(): SmartspaceTargetFilter? @BindsOptionalOf Loading @@ -79,7 +79,7 @@ abstract class SmartspaceModule { abstract fun optionalDreamWeatherSmartspaceDataPlugin(): BcSmartspaceDataPlugin? @Binds @Named(DREAM_SMARTSPACE_PRECONDITION) @Named(LOCKSCREEN_SMARTSPACE_PRECONDITION) abstract fun bindSmartspacePrecondition( lockscreenPrecondition: LockscreenPrecondition? ): SmartspacePrecondition? Loading packages/SystemUI/src/com/android/systemui/smartspace/filters/LockscreenAndDreamTargetFilter.kt→packages/SystemUI/src/com/android/systemui/smartspace/filters/LockscreenTargetFilter.kt +23 −21 Original line number Diff line number Diff line Loading @@ -31,10 +31,10 @@ import com.android.systemui.util.settings.SecureSettings import java.util.concurrent.Executor import javax.inject.Inject /** * {@link SmartspaceTargetFilter} for smartspace targets that show above the lockscreen and dreams. */ class LockscreenAndDreamTargetFilter @Inject constructor( /** {@link SmartspaceTargetFilter} for smartspace targets that show above the lockscreen. */ class LockscreenTargetFilter @Inject constructor( private val secureSettings: SecureSettings, private val userTracker: UserTracker, private val execution: Execution, Loading @@ -60,7 +60,8 @@ class LockscreenAndDreamTargetFilter @Inject constructor( } } private val settingsObserver = object : ContentObserver(handler) { private val settingsObserver = object : ContentObserver(handler) { override fun onChange(selfChange: Boolean, uri: Uri?) { execution.assertIsMainThread() updateUserContentSettings() Loading Loading @@ -118,7 +119,8 @@ class LockscreenAndDreamTargetFilter @Inject constructor( } } private val userTrackerCallback = object : UserTracker.Callback { private val userTrackerCallback = object : UserTracker.Callback { override fun onUserChanged(newUser: Int, userContext: Context) { execution.assertIsMainThread() updateUserContentSettings() Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/LockscreenAndDreamTargetFilterTest.kt→packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/LockscreenTargetFilterTest.kt +54 −48 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.settings.UserTracker import com.android.systemui.smartspace.filters.LockscreenAndDreamTargetFilter import com.android.systemui.smartspace.filters.LockscreenTargetFilter import com.android.systemui.util.concurrency.Execution import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq Loading @@ -52,55 +52,52 @@ import org.mockito.MockitoAnnotations @SmallTest @TestableLooper.RunWithLooper @RunWith(AndroidJUnit4::class) class LockscreenAndDreamTargetFilterTest : SysuiTestCase() { @Mock private lateinit var secureSettings: SecureSettings class LockscreenTargetFilterTest : SysuiTestCase() { @Mock private lateinit var secureSettings: SecureSettings @Mock private lateinit var userTracker: UserTracker @Mock private lateinit var userTracker: UserTracker @Mock private lateinit var execution: Execution @Mock private lateinit var execution: Execution @Mock private lateinit var handler: Handler @Mock private lateinit var handler: Handler @Mock private lateinit var contentResolver: ContentResolver @Mock private lateinit var contentResolver: ContentResolver @Mock private lateinit var uiExecution: Executor @Mock private lateinit var uiExecution: Executor @Mock private lateinit var userHandle: UserHandle @Mock private lateinit var userHandle: UserHandle @Mock private lateinit var listener: SmartspaceTargetFilter.Listener @Mock private lateinit var listener: SmartspaceTargetFilter.Listener @Mock private lateinit var lockScreenAllowPrivateNotificationsUri: Uri @Mock private lateinit var lockScreenAllowPrivateNotificationsUri: Uri @Before fun setup() { MockitoAnnotations.initMocks(this) `when`(userTracker.userHandle).thenReturn(userHandle) `when`(secureSettings .getUriFor(eq(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS))) `when`( secureSettings.getUriFor( eq(Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS) ) ) .thenReturn(lockScreenAllowPrivateNotificationsUri) } /** * Ensures {@link Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS} is * tracked. */ /** Ensures {@link Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS} is tracked. */ @Test fun testLockscreenAllowPrivateNotifications() { var setting = Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS `when`(secureSettings .getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) `when`(secureSettings.getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) .thenReturn(0) var filter = LockscreenAndDreamTargetFilter(secureSettings, userTracker, execution, handler, contentResolver, uiExecution) var filter = LockscreenTargetFilter( secureSettings, userTracker, execution, handler, contentResolver, uiExecution ) filter.addListener(listener) var smartspaceTarget = mock(SmartspaceTarget::class.java) Loading @@ -110,11 +107,15 @@ class LockscreenAndDreamTargetFilterTest : SysuiTestCase() { var settingCaptor = ArgumentCaptor.forClass(ContentObserver::class.java) verify(contentResolver).registerContentObserver(eq(lockScreenAllowPrivateNotificationsUri), anyBoolean(), settingCaptor.capture(), anyInt()) verify(contentResolver) .registerContentObserver( eq(lockScreenAllowPrivateNotificationsUri), anyBoolean(), settingCaptor.capture(), anyInt() ) `when`(secureSettings .getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) `when`(secureSettings.getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) .thenReturn(1) clearInvocations(listener) Loading @@ -123,21 +124,26 @@ class LockscreenAndDreamTargetFilterTest : SysuiTestCase() { assertThat(filter.filterSmartspaceTarget(smartspaceTarget)).isTrue() } /** * Ensures user switches are tracked. */ /** Ensures user switches are tracked. */ @Test fun testUserSwitchCallback() { var setting = Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS `when`(secureSettings .getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) `when`(secureSettings.getIntForUser(eq(setting) ?: setting, anyInt(), anyInt())) .thenReturn(0) var filter = LockscreenAndDreamTargetFilter(secureSettings, userTracker, execution, handler, contentResolver, uiExecution) var filter = LockscreenTargetFilter( secureSettings, userTracker, execution, handler, contentResolver, uiExecution ) filter.addListener(listener) var userTrackerCallback = withArgCaptor<UserTracker.Callback> { var userTrackerCallback = withArgCaptor<UserTracker.Callback> { verify(userTracker).addCallback(capture(), any()) } Loading
packages/SystemUI/src/com/android/systemui/communal/smartspace/CommunalSmartspaceController.kt +4 −4 Original line number Diff line number Diff line Loading @@ -30,9 +30,9 @@ import com.android.systemui.plugins.BcSmartspaceDataPlugin.SmartspaceView import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_GLANCEABLE_HUB import com.android.systemui.smartspace.SmartspacePrecondition import com.android.systemui.smartspace.SmartspaceTargetFilter import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_TARGET_FILTER import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.GLANCEABLE_HUB_SMARTSPACE_DATA_PLUGIN import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_TARGET_FILTER import com.android.systemui.util.concurrency.Execution import java.util.Optional import java.util.concurrent.Executor Loading @@ -48,8 +48,8 @@ constructor( private val smartspaceManager: SmartspaceManager?, private val execution: Execution, @Main private val uiExecutor: Executor, @Named(DREAM_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(DREAM_SMARTSPACE_TARGET_FILTER) @Named(LOCKSCREEN_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(LOCKSCREEN_SMARTSPACE_TARGET_FILTER) private val optionalTargetFilter: Optional<SmartspaceTargetFilter>, @Named(GLANCEABLE_HUB_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>, ) { Loading
packages/SystemUI/src/com/android/systemui/dreams/smartspace/DreamSmartspaceController.kt +4 −4 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_DREAM import com.android.systemui.smartspace.SmartspacePrecondition import com.android.systemui.smartspace.SmartspaceTargetFilter import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_DATA_PLUGIN import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_TARGET_FILTER import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_PRECONDITION import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.LOCKSCREEN_SMARTSPACE_TARGET_FILTER import com.android.systemui.smartspace.dagger.SmartspaceViewComponent import com.android.systemui.util.concurrency.Execution import java.util.Optional Loading @@ -54,8 +54,8 @@ class DreamSmartspaceController @Inject constructor( private val execution: Execution, @Main private val uiExecutor: Executor, private val smartspaceViewComponentFactory: SmartspaceViewComponent.Factory, @Named(DREAM_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(DREAM_SMARTSPACE_TARGET_FILTER) @Named(LOCKSCREEN_SMARTSPACE_PRECONDITION) private val precondition: SmartspacePrecondition, @Named(LOCKSCREEN_SMARTSPACE_TARGET_FILTER) private val optionalTargetFilter: Optional<SmartspaceTargetFilter>, @Named(DREAM_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>, @Named(DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN) Loading
packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt +6 −6 Original line number Diff line number Diff line Loading @@ -41,14 +41,14 @@ abstract class SmartspaceModule { const val DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN = "dream_weather_smartspace_data_plugin" /** * The dream smartspace target filter. * The target filter for smartspace over lockscreen. */ const val DREAM_SMARTSPACE_TARGET_FILTER = "dream_smartspace_target_filter" const val LOCKSCREEN_SMARTSPACE_TARGET_FILTER = "lockscreen_smartspace_target_filter" /** * The precondition for dream smartspace * The precondition for smartspace over lockscreen */ const val DREAM_SMARTSPACE_PRECONDITION = "dream_smartspace_precondition" const val LOCKSCREEN_SMARTSPACE_PRECONDITION = "lockscreen_smartspace_precondition" /** * The BcSmartspaceDataPlugin for the standalone date (+alarm+dnd). Loading @@ -67,7 +67,7 @@ abstract class SmartspaceModule { } @BindsOptionalOf @Named(DREAM_SMARTSPACE_TARGET_FILTER) @Named(LOCKSCREEN_SMARTSPACE_TARGET_FILTER) abstract fun optionalDreamSmartspaceTargetFilter(): SmartspaceTargetFilter? @BindsOptionalOf Loading @@ -79,7 +79,7 @@ abstract class SmartspaceModule { abstract fun optionalDreamWeatherSmartspaceDataPlugin(): BcSmartspaceDataPlugin? @Binds @Named(DREAM_SMARTSPACE_PRECONDITION) @Named(LOCKSCREEN_SMARTSPACE_PRECONDITION) abstract fun bindSmartspacePrecondition( lockscreenPrecondition: LockscreenPrecondition? ): SmartspacePrecondition? Loading
packages/SystemUI/src/com/android/systemui/smartspace/filters/LockscreenAndDreamTargetFilter.kt→packages/SystemUI/src/com/android/systemui/smartspace/filters/LockscreenTargetFilter.kt +23 −21 Original line number Diff line number Diff line Loading @@ -31,10 +31,10 @@ import com.android.systemui.util.settings.SecureSettings import java.util.concurrent.Executor import javax.inject.Inject /** * {@link SmartspaceTargetFilter} for smartspace targets that show above the lockscreen and dreams. */ class LockscreenAndDreamTargetFilter @Inject constructor( /** {@link SmartspaceTargetFilter} for smartspace targets that show above the lockscreen. */ class LockscreenTargetFilter @Inject constructor( private val secureSettings: SecureSettings, private val userTracker: UserTracker, private val execution: Execution, Loading @@ -60,7 +60,8 @@ class LockscreenAndDreamTargetFilter @Inject constructor( } } private val settingsObserver = object : ContentObserver(handler) { private val settingsObserver = object : ContentObserver(handler) { override fun onChange(selfChange: Boolean, uri: Uri?) { execution.assertIsMainThread() updateUserContentSettings() Loading Loading @@ -118,7 +119,8 @@ class LockscreenAndDreamTargetFilter @Inject constructor( } } private val userTrackerCallback = object : UserTracker.Callback { private val userTrackerCallback = object : UserTracker.Callback { override fun onUserChanged(newUser: Int, userContext: Context) { execution.assertIsMainThread() updateUserContentSettings() Loading