Loading packages/SystemUI/src/com/android/systemui/controls/controller/ControlsBindingControllerImpl.kt +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.controller import android.app.ActivityManager import android.content.ComponentName import android.content.Context import android.os.IBinder Loading Loading @@ -50,7 +51,7 @@ open class ControlsBindingControllerImpl @Inject constructor( private val refreshing = AtomicBoolean(false) private var currentUser = context.user private var currentUser = UserHandle.of(ActivityManager.getCurrentUser()) override val currentUserId: Int get() = currentUser.identifier Loading packages/SystemUI/src/com/android/systemui/controls/controller/ControlsControllerImpl.kt +9 −8 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.controller import android.app.ActivityManager import android.app.PendingIntent import android.content.BroadcastReceiver import android.content.ComponentName Loading Loading @@ -78,16 +79,16 @@ class ControlsControllerImpl @Inject constructor ( private var userChanging: Boolean = true private var currentUser = UserHandle.of(ActivityManager.getCurrentUser()) override val currentUserId get() = currentUser.identifier private val contentResolver: ContentResolver get() = context.contentResolver override var available = Settings.Secure.getInt( contentResolver, CONTROLS_AVAILABLE, DEFAULT_ENABLED) != 0 override var available = Settings.Secure.getIntForUser( contentResolver, CONTROLS_AVAILABLE, DEFAULT_ENABLED, currentUserId) != 0 private set private var currentUser = context.user override val currentUserId get() = currentUser.identifier private val persistenceWrapper = optionalWrapper.orElseGet { ControlsFavoritePersistenceWrapper( Environment.buildPath( Loading @@ -106,7 +107,7 @@ class ControlsControllerImpl @Inject constructor ( userContext.filesDir, ControlsFavoritePersistenceWrapper.FILE_NAME) persistenceWrapper.changeFile(fileName) available = Settings.Secure.getIntForUser(contentResolver, CONTROLS_AVAILABLE, /* default */ DEFAULT_ENABLED, newUser.identifier) != 0 DEFAULT_ENABLED, newUser.identifier) != 0 synchronized(currentFavorites) { currentFavorites.clear() } Loading Loading @@ -142,7 +143,7 @@ class ControlsControllerImpl @Inject constructor ( return } available = Settings.Secure.getIntForUser(contentResolver, CONTROLS_AVAILABLE, /* default */ DEFAULT_ENABLED, currentUserId) != 0 DEFAULT_ENABLED, currentUserId) != 0 synchronized(currentFavorites) { currentFavorites.clear() } Loading packages/SystemUI/src/com/android/systemui/controls/management/ControlsListingControllerImpl.kt +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.management import android.app.ActivityManager import android.content.ComponentName import android.content.Context import android.content.pm.ServiceInfo Loading Loading @@ -72,7 +73,7 @@ class ControlsListingControllerImpl @VisibleForTesting constructor( private var availableServices = emptyList<ServiceInfo>() override var currentUserId = context.userId override var currentUserId = ActivityManager.getCurrentUser() private set private val serviceListingCallback = ServiceListing.Callback { Loading Loading
packages/SystemUI/src/com/android/systemui/controls/controller/ControlsBindingControllerImpl.kt +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.controller import android.app.ActivityManager import android.content.ComponentName import android.content.Context import android.os.IBinder Loading Loading @@ -50,7 +51,7 @@ open class ControlsBindingControllerImpl @Inject constructor( private val refreshing = AtomicBoolean(false) private var currentUser = context.user private var currentUser = UserHandle.of(ActivityManager.getCurrentUser()) override val currentUserId: Int get() = currentUser.identifier Loading
packages/SystemUI/src/com/android/systemui/controls/controller/ControlsControllerImpl.kt +9 −8 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.controller import android.app.ActivityManager import android.app.PendingIntent import android.content.BroadcastReceiver import android.content.ComponentName Loading Loading @@ -78,16 +79,16 @@ class ControlsControllerImpl @Inject constructor ( private var userChanging: Boolean = true private var currentUser = UserHandle.of(ActivityManager.getCurrentUser()) override val currentUserId get() = currentUser.identifier private val contentResolver: ContentResolver get() = context.contentResolver override var available = Settings.Secure.getInt( contentResolver, CONTROLS_AVAILABLE, DEFAULT_ENABLED) != 0 override var available = Settings.Secure.getIntForUser( contentResolver, CONTROLS_AVAILABLE, DEFAULT_ENABLED, currentUserId) != 0 private set private var currentUser = context.user override val currentUserId get() = currentUser.identifier private val persistenceWrapper = optionalWrapper.orElseGet { ControlsFavoritePersistenceWrapper( Environment.buildPath( Loading @@ -106,7 +107,7 @@ class ControlsControllerImpl @Inject constructor ( userContext.filesDir, ControlsFavoritePersistenceWrapper.FILE_NAME) persistenceWrapper.changeFile(fileName) available = Settings.Secure.getIntForUser(contentResolver, CONTROLS_AVAILABLE, /* default */ DEFAULT_ENABLED, newUser.identifier) != 0 DEFAULT_ENABLED, newUser.identifier) != 0 synchronized(currentFavorites) { currentFavorites.clear() } Loading Loading @@ -142,7 +143,7 @@ class ControlsControllerImpl @Inject constructor ( return } available = Settings.Secure.getIntForUser(contentResolver, CONTROLS_AVAILABLE, /* default */ DEFAULT_ENABLED, currentUserId) != 0 DEFAULT_ENABLED, currentUserId) != 0 synchronized(currentFavorites) { currentFavorites.clear() } Loading
packages/SystemUI/src/com/android/systemui/controls/management/ControlsListingControllerImpl.kt +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.management import android.app.ActivityManager import android.content.ComponentName import android.content.Context import android.content.pm.ServiceInfo Loading Loading @@ -72,7 +73,7 @@ class ControlsListingControllerImpl @VisibleForTesting constructor( private var availableServices = emptyList<ServiceInfo>() override var currentUserId = context.userId override var currentUserId = ActivityManager.getCurrentUser() private set private val serviceListingCallback = ServiceListing.Callback { Loading