Loading packages/SystemUI/src/com/android/systemui/communal/CommunalSourceMonitor.java +5 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class CommunalSourceMonitor { mSecureSettings.registerContentObserverForUser( Settings.Secure.COMMUNAL_MODE_ENABLED, /* notifyForDescendants= */false, settingsObserver, UserHandle.USER_ALL); settingsObserver, UserHandle.USER_SYSTEM); reloadSettings(); } Loading Loading @@ -141,8 +141,10 @@ public class CommunalSourceMonitor { } private void reloadSettings() { boolean newCommunalEnabled = mSecureSettings.getInt(Settings.Secure.COMMUNAL_MODE_ENABLED, 1) == 1; boolean newCommunalEnabled = mSecureSettings.getIntForUser( Settings.Secure.COMMUNAL_MODE_ENABLED, 1, UserHandle.USER_SYSTEM) == 1; if (DEBUG) { Log.d(TAG, "communal mode settings reloaded with value:" + newCommunalEnabled); Loading packages/SystemUI/tests/src/com/android/systemui/communal/CommunalSourceMonitorTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import android.os.Handler; import android.os.UserHandle; import android.provider.Settings; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; Loading Loading @@ -137,7 +138,10 @@ public class CommunalSourceMonitorTest extends SysuiTestCase { } private void setCommunalEnabled(boolean enabled) { mSecureSettings.putInt(Settings.Secure.COMMUNAL_MODE_ENABLED, enabled ? 1 : 0); mSecureSettings.putIntForUser( Settings.Secure.COMMUNAL_MODE_ENABLED, enabled ? 1 : 0, UserHandle.USER_SYSTEM); TestableLooper.get(this).processAllMessages(); } Loading Loading
packages/SystemUI/src/com/android/systemui/communal/CommunalSourceMonitor.java +5 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public class CommunalSourceMonitor { mSecureSettings.registerContentObserverForUser( Settings.Secure.COMMUNAL_MODE_ENABLED, /* notifyForDescendants= */false, settingsObserver, UserHandle.USER_ALL); settingsObserver, UserHandle.USER_SYSTEM); reloadSettings(); } Loading Loading @@ -141,8 +141,10 @@ public class CommunalSourceMonitor { } private void reloadSettings() { boolean newCommunalEnabled = mSecureSettings.getInt(Settings.Secure.COMMUNAL_MODE_ENABLED, 1) == 1; boolean newCommunalEnabled = mSecureSettings.getIntForUser( Settings.Secure.COMMUNAL_MODE_ENABLED, 1, UserHandle.USER_SYSTEM) == 1; if (DEBUG) { Log.d(TAG, "communal mode settings reloaded with value:" + newCommunalEnabled); Loading
packages/SystemUI/tests/src/com/android/systemui/communal/CommunalSourceMonitorTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import android.os.Handler; import android.os.UserHandle; import android.provider.Settings; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; Loading Loading @@ -137,7 +138,10 @@ public class CommunalSourceMonitorTest extends SysuiTestCase { } private void setCommunalEnabled(boolean enabled) { mSecureSettings.putInt(Settings.Secure.COMMUNAL_MODE_ENABLED, enabled ? 1 : 0); mSecureSettings.putIntForUser( Settings.Secure.COMMUNAL_MODE_ENABLED, enabled ? 1 : 0, UserHandle.USER_SYSTEM); TestableLooper.get(this).processAllMessages(); } Loading