Merge "Update unseen filter setting access to account for tri-state" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
de53d39982
@@ -9534,7 +9534,7 @@ public final class Settings {
|
|||||||
/**
|
/**
|
||||||
* Indicates whether "seen" notifications should be suppressed from the lockscreen.
|
* Indicates whether "seen" notifications should be suppressed from the lockscreen.
|
||||||
* <p>
|
* <p>
|
||||||
* Type: int (0 for false, 1 for true)
|
* Type: int (0 for unset, 1 for true, 2 for false)
|
||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -114,10 +114,10 @@ constructor(
|
|||||||
.onStart { emit(Unit) }
|
.onStart { emit(Unit) }
|
||||||
// for each change, lookup the new value
|
// for each change, lookup the new value
|
||||||
.map {
|
.map {
|
||||||
secureSettings.getBoolForUser(
|
secureSettings.getIntForUser(
|
||||||
Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
|
Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
|
||||||
UserHandle.USER_CURRENT,
|
UserHandle.USER_CURRENT,
|
||||||
)
|
) == 1
|
||||||
}
|
}
|
||||||
// perform lookups on the bg thread pool
|
// perform lookups on the bg thread pool
|
||||||
.flowOn(bgDispatcher)
|
.flowOn(bgDispatcher)
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
|
|||||||
val testDispatcher = UnconfinedTestDispatcher()
|
val testDispatcher = UnconfinedTestDispatcher()
|
||||||
val testScope = TestScope(testDispatcher)
|
val testScope = TestScope(testDispatcher)
|
||||||
val fakeSettings = FakeSettings().apply {
|
val fakeSettings = FakeSettings().apply {
|
||||||
putBool(Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS, true)
|
putInt(Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS, 1)
|
||||||
}
|
}
|
||||||
val seenNotificationsProvider = SeenNotificationsProviderImpl()
|
val seenNotificationsProvider = SeenNotificationsProviderImpl()
|
||||||
val keyguardCoordinator =
|
val keyguardCoordinator =
|
||||||
@@ -372,14 +372,14 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
|
|||||||
|
|
||||||
var showOnlyUnseenNotifsOnKeyguardSetting: Boolean
|
var showOnlyUnseenNotifsOnKeyguardSetting: Boolean
|
||||||
get() =
|
get() =
|
||||||
fakeSettings.getBoolForUser(
|
fakeSettings.getIntForUser(
|
||||||
Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
|
Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
|
||||||
UserHandle.USER_CURRENT,
|
UserHandle.USER_CURRENT,
|
||||||
)
|
) == 1
|
||||||
set(value) {
|
set(value) {
|
||||||
fakeSettings.putBoolForUser(
|
fakeSettings.putIntForUser(
|
||||||
Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
|
Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
|
||||||
value,
|
if (value) 1 else 2,
|
||||||
UserHandle.USER_CURRENT,
|
UserHandle.USER_CURRENT,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user