Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +4 −4 Original line number Diff line number Diff line Loading @@ -308,14 +308,14 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mStatusArea = mView.findViewById(R.id.keyguard_status_area); mBgExecutor.execute(() -> { mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, false, /* notifyForDescendants */ mDoubleLineClockObserver, UserHandle.USER_ALL ); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED, false, /* notifyForDescendants */ mShowWeatherObserver, Loading Loading @@ -372,8 +372,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS setClock(null); mBgExecutor.execute(() -> { mSecureSettings.unregisterContentObserver(mDoubleLineClockObserver); mSecureSettings.unregisterContentObserver(mShowWeatherObserver); mSecureSettings.unregisterContentObserverSync(mDoubleLineClockObserver); mSecureSettings.unregisterContentObserverSync(mShowWeatherObserver); }); mKeyguardUnlockAnimationController.removeKeyguardUnlockAnimationListener( Loading packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest } // Unregister observer before removing view mSecureSettings.unregisterContentObserver(mMagnificationCapabilityObserver); mSecureSettings.unregisterContentObserverSync(mMagnificationCapabilityObserver); mWindowManager.removeView(mSettingView); mIsVisible = false; if (resetPosition) { Loading Loading @@ -380,7 +380,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest mWindowManager.addView(mSettingView, mParams); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( Settings.Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY, mMagnificationCapabilityObserver, UserHandle.USER_CURRENT); Loading packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuInfoRepository.java +5 −5 Original line number Diff line number Diff line Loading @@ -240,26 +240,26 @@ class MenuInfoRepository { } void registerObserversAndCallbacks() { mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS), /* notifyForDescendants */ false, mMenuTargetFeaturesContentObserver, UserHandle.USER_CURRENT); if (!com.android.systemui.Flags.floatingMenuNarrowTargetContentObserver()) { mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(ENABLED_ACCESSIBILITY_SERVICES), /* notifyForDescendants */ false, mMenuTargetFeaturesContentObserver, UserHandle.USER_CURRENT); } mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE), /* notifyForDescendants */ false, mMenuSizeContentObserver, UserHandle.USER_CURRENT); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED), /* notifyForDescendants */ false, mMenuFadeOutContentObserver, UserHandle.USER_CURRENT); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(ACCESSIBILITY_FLOATING_MENU_OPACITY), /* notifyForDescendants */ false, mMenuFadeOutContentObserver, UserHandle.USER_CURRENT); Loading packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialogDelegate.kt +9 −7 Original line number Diff line number Diff line Loading @@ -29,12 +29,12 @@ import android.widget.SeekBar import android.widget.TextView import androidx.annotation.MainThread import androidx.annotation.WorkerThread import com.android.systemui.res.R import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView.OnSeekBarWithIconButtonsChangeListener import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView.OnSeekBarWithIconButtonsChangeListener.ControlUnitType import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.res.R import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.phone.SystemUIDialog import com.android.systemui.util.concurrency.DelayableExecutor Loading @@ -46,7 +46,9 @@ import javax.inject.Inject import kotlin.math.roundToInt /** The Dialog that contains a seekbar for changing the font size. */ class FontScalingDialogDelegate @Inject constructor( class FontScalingDialogDelegate @Inject constructor( private val context: Context, private val systemUIDialogFactory: SystemUIDialog.Factory, private val layoutInflater: LayoutInflater, Loading Loading @@ -142,7 +144,7 @@ class FontScalingDialogDelegate @Inject constructor( } ) doneButton.setOnClickListener { dialog.dismiss() } systemSettings.registerContentObserver(Settings.System.FONT_SCALE, fontSizeObserver) systemSettings.registerContentObserverSync(Settings.System.FONT_SCALE, fontSizeObserver) } /** Loading @@ -165,7 +167,7 @@ class FontScalingDialogDelegate @Inject constructor( override fun onStop(dialog: SystemUIDialog) { cancelUpdateFontScaleRunnable?.run() cancelUpdateFontScaleRunnable = null systemSettings.unregisterContentObserver(fontSizeObserver) systemSettings.unregisterContentObserverSync(fontSizeObserver) } @MainThread Loading packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FaceUserSettingsRepository.kt +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ private fun SecureSettings.watch( ) { fun fetch(): Boolean = getIntForUser(key, if (defaultValue) 1 else 0, userId) > 0 registerContentObserverForUser( registerContentObserverForUserSync( key, false /* notifyForDescendants */, object : ContentObserver(handler) { Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +4 −4 Original line number Diff line number Diff line Loading @@ -308,14 +308,14 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mStatusArea = mView.findViewById(R.id.keyguard_status_area); mBgExecutor.execute(() -> { mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, false, /* notifyForDescendants */ mDoubleLineClockObserver, UserHandle.USER_ALL ); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED, false, /* notifyForDescendants */ mShowWeatherObserver, Loading Loading @@ -372,8 +372,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS setClock(null); mBgExecutor.execute(() -> { mSecureSettings.unregisterContentObserver(mDoubleLineClockObserver); mSecureSettings.unregisterContentObserver(mShowWeatherObserver); mSecureSettings.unregisterContentObserverSync(mDoubleLineClockObserver); mSecureSettings.unregisterContentObserverSync(mShowWeatherObserver); }); mKeyguardUnlockAnimationController.removeKeyguardUnlockAnimationListener( Loading
packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest } // Unregister observer before removing view mSecureSettings.unregisterContentObserver(mMagnificationCapabilityObserver); mSecureSettings.unregisterContentObserverSync(mMagnificationCapabilityObserver); mWindowManager.removeView(mSettingView); mIsVisible = false; if (resetPosition) { Loading Loading @@ -380,7 +380,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest mWindowManager.addView(mSettingView, mParams); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( Settings.Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY, mMagnificationCapabilityObserver, UserHandle.USER_CURRENT); Loading
packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuInfoRepository.java +5 −5 Original line number Diff line number Diff line Loading @@ -240,26 +240,26 @@ class MenuInfoRepository { } void registerObserversAndCallbacks() { mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS), /* notifyForDescendants */ false, mMenuTargetFeaturesContentObserver, UserHandle.USER_CURRENT); if (!com.android.systemui.Flags.floatingMenuNarrowTargetContentObserver()) { mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(ENABLED_ACCESSIBILITY_SERVICES), /* notifyForDescendants */ false, mMenuTargetFeaturesContentObserver, UserHandle.USER_CURRENT); } mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE), /* notifyForDescendants */ false, mMenuSizeContentObserver, UserHandle.USER_CURRENT); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED), /* notifyForDescendants */ false, mMenuFadeOutContentObserver, UserHandle.USER_CURRENT); mSecureSettings.registerContentObserverForUser( mSecureSettings.registerContentObserverForUserSync( mSecureSettings.getUriFor(ACCESSIBILITY_FLOATING_MENU_OPACITY), /* notifyForDescendants */ false, mMenuFadeOutContentObserver, UserHandle.USER_CURRENT); Loading
packages/SystemUI/src/com/android/systemui/accessibility/fontscaling/FontScalingDialogDelegate.kt +9 −7 Original line number Diff line number Diff line Loading @@ -29,12 +29,12 @@ import android.widget.SeekBar import android.widget.TextView import androidx.annotation.MainThread import androidx.annotation.WorkerThread import com.android.systemui.res.R import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView.OnSeekBarWithIconButtonsChangeListener import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView.OnSeekBarWithIconButtonsChangeListener.ControlUnitType import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.res.R import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.phone.SystemUIDialog import com.android.systemui.util.concurrency.DelayableExecutor Loading @@ -46,7 +46,9 @@ import javax.inject.Inject import kotlin.math.roundToInt /** The Dialog that contains a seekbar for changing the font size. */ class FontScalingDialogDelegate @Inject constructor( class FontScalingDialogDelegate @Inject constructor( private val context: Context, private val systemUIDialogFactory: SystemUIDialog.Factory, private val layoutInflater: LayoutInflater, Loading Loading @@ -142,7 +144,7 @@ class FontScalingDialogDelegate @Inject constructor( } ) doneButton.setOnClickListener { dialog.dismiss() } systemSettings.registerContentObserver(Settings.System.FONT_SCALE, fontSizeObserver) systemSettings.registerContentObserverSync(Settings.System.FONT_SCALE, fontSizeObserver) } /** Loading @@ -165,7 +167,7 @@ class FontScalingDialogDelegate @Inject constructor( override fun onStop(dialog: SystemUIDialog) { cancelUpdateFontScaleRunnable?.run() cancelUpdateFontScaleRunnable = null systemSettings.unregisterContentObserver(fontSizeObserver) systemSettings.unregisterContentObserverSync(fontSizeObserver) } @MainThread Loading
packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FaceUserSettingsRepository.kt +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ private fun SecureSettings.watch( ) { fun fetch(): Boolean = getIntForUser(key, if (defaultValue) 1 else 0, userId) > 0 registerContentObserverForUser( registerContentObserverForUserSync( key, false /* notifyForDescendants */, object : ContentObserver(handler) { Loading