Commit Graph

1661 Commits

Author SHA1 Message Date
xinghailu
1637a3a10a Cleanup plurals format
Change <one> to <1> in string res file
Test: Update, existing tests still pass
bug: 199230342

Change-Id: Ic3a5259570cb52cd1664638f3b1058c87a631c04
2022-12-27 12:12:11 +08:00
Yuri Lin
5db22756e4 Merge "Disable zen rule preferences with invalid activities" into tm-qpr-dev am: dc4100f148 am: de8a27b496
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20725886

Change-Id: I4c0309a1b5773d6d92c0f43ba631571e2b375e49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-16 00:00:17 +00:00
Yuri Lin
de8a27b496 Merge "Disable zen rule preferences with invalid activities" into tm-qpr-dev am: dc4100f148
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20725886

Change-Id: I609c74ba96e7a32171ff20715d4aa8c68f8a68b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-15 16:51:30 +00:00
Yuri Lin
afe52dfae5 Disable zen rule preferences with invalid activities
While resolveActivity is used to determine whether an Intent can be handled by something, this doesn't catch the case of explicit intents whose activity class doesn't exist. Here we check for it through PackageManager.queryIntentActivities instead for existing zen rules (if they were added when the activity exists, but it no longer does).

For new rules, check the validity of the activity for external rules before adding them to the list.

Bug: 238144390
Test: manual via DND app
Change-Id: Ia920ca792f9c17a5d684baf877c882ce7fadffd6
2022-12-14 14:13:36 -05:00
xinghailu
b5293a2d1c Cleanup plurals in Settings, change <one> to <1> in string res file.
"One" and "1" are not same, such as "1st place" vs "a
place". Also in many languages, plurals expression is different with English, for more detail please check: go/android-i18n-plurals.
So in string res file, replace "one" with excat value "1" is a more
proper way.

Test: Existing unit tests still pass.
Bug: 199230342
Change-Id: I832abc38afc5d8816fa803865c25e6017cffa2c6
2022-12-13 18:31:08 +08:00
Betty Chang
6ef041d366 Merge "[LE Audio] Add broadcast icon when device is broadcasting but LE device is disconnected" 2022-12-06 08:03:59 +00:00
changbetty
81ff62f0dd [LE Audio] Add broadcast icon when device is broadcasting but LE device
is disconnected

Bug: 260173555
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaVolumePreferenceControllerTest
Change-Id: I9e8117d5c885953ab7931833de81ceab63273d43
2022-12-05 07:24:29 +00:00
András Kurucz
918a7d1844 Merge "Allow to block/unblock Conversation Notifications from Settings" into tm-qpr-dev am: 80095fa001 am: e06c0d905e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20551986

Change-Id: I9965bff813d7943ed40271c739ea9a2e909759f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 17:25:56 +00:00
András Kurucz
e06c0d905e Merge "Allow to block/unblock Conversation Notifications from Settings" into tm-qpr-dev am: 80095fa001
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20551986

Change-Id: I1437a24ea8da6e36be62a2dab42307a24dc5e167
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 16:57:05 +00:00
András Kurucz
80095fa001 Merge "Allow to block/unblock Conversation Notifications from Settings" into tm-qpr-dev 2022-11-28 16:32:00 +00:00
András Kurucz
0fa99226e1 Allow to block/unblock Conversation Notifications from Settings
The user can end up in a state where the Channel of a Conversation is
blocked (has an importance of 0).
Currently there was no way to unblock it, because we didn't allow it from
the Settings. Therefore now the option to block/unblock is added to the
Conversation Settings page.

Fixes: 255062535
Test: Block/Unblock a Conversation from Settings
Test: Mark a notification blocked and conversation by clicking the “Show
notifications” toggle and the “This is a conversation” button at once.
Now unblock it from the Settings.

Change-Id: I06778d259155d87d6af4bdb7013cd3b6c9a2e5ee
2022-11-23 13:24:36 +00:00
Steve Elliott
66284b5528 Merge "Revert^2 "Add configuration for defaulting notification behavior"" into tm-qpr-dev am: fece948623 am: 81fc1b0b4d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20530303

Change-Id: I510fcf15b561e4f89df2b1b69ad74ca0350c1426
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 23:40:10 +00:00
Steve Elliott
81fc1b0b4d Merge "Revert^2 "Add configuration for defaulting notification behavior"" into tm-qpr-dev am: fece948623
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20530303

Change-Id: I9cd33ea6d02cf1243034a399162dfffcd0fd8f65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 23:05:49 +00:00
Steve Elliott
30ccc43ae1 Revert^2 "Add configuration for defaulting notification behavior"
Test: go through SUW on affected device, view notification screen
Bug: 240472040
Change-Id: I34dbe28226d830bc5ba633e72cd529d97021de85
2022-11-21 15:16:40 +00:00
Sam Dubey
c536eb4dc4 Revert "Add configuration for defaulting notification behavior" am: a2d06273c1 am: 48eae58586
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20505171

Change-Id: I0e2693f89594f6c473c5c2e9dbb6a34ea6bf5864
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 14:29:58 +00:00
Sam Dubey
48eae58586 Revert "Add configuration for defaulting notification behavior" am: a2d06273c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20505171

Change-Id: Ic9b89ba7d709e09be8217252485adcfc49575d70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 14:01:32 +00:00
Sam Dubey
a2d06273c1 Revert "Add configuration for defaulting notification behavior"
Likely causing b/259499400

This reverts commit a92688d642.

Change-Id: I781a7ecf9139eca11e1db895f86268b893258543
2022-11-17 07:33:18 +00:00
TreeHugger Robot
7765c7129b Merge "Add configuration for defaulting notification behavior" into tm-qpr-dev am: e2e892d46c am: 54170343cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20454246

Change-Id: Ic5021313463c2fb955d2e5066a5b8f9dec4603fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 23:40:08 +00:00
TreeHugger Robot
54170343cf Merge "Add configuration for defaulting notification behavior" into tm-qpr-dev am: e2e892d46c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20454246

Change-Id: I3f6ad58e5f8292642d7eb958402d172537536d0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 23:00:52 +00:00
TreeHugger Robot
e2e892d46c Merge "Add configuration for defaulting notification behavior" into tm-qpr-dev 2022-11-15 22:42:34 +00:00
Yining Liu
0a2c5d069a Merge "Increase the number of notification items that can be shown in Notification history - Recently dismissed" into tm-qpr-dev am: 3852625699 am: a3bfaed468
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20331041

Change-Id: I657ccff8aee603e79cf3f85e43e2175fefded593
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 18:53:52 +00:00
Yining Liu
a3bfaed468 Merge "Increase the number of notification items that can be shown in Notification history - Recently dismissed" into tm-qpr-dev am: 3852625699
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20331041

Change-Id: I038807ba1cd80bee01db6f66ef13f16ca97ec604
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 18:20:03 +00:00
Yining Liu
3852625699 Merge "Increase the number of notification items that can be shown in Notification history - Recently dismissed" into tm-qpr-dev 2022-11-14 17:58:28 +00:00
Steve Elliott
a92688d642 Add configuration for defaulting notification behavior
Test: RedactionInterstitialTest
Test: go through SUW on a phone
Bug: 240472040
Change-Id: I7bcd9f1a128c757881693e0251d305d2e26e4fd8
2022-11-11 14:08:09 -05:00
Behnam Heydarshahi
bff773b41b Merge "Read flag to show/hide notification slider" into tm-qpr-dev am: 2552ae08ae am: 6b156be280
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20180104

Change-Id: If6e7bd4facd8a3bea6528b25767aed45e7175f7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 18:33:40 +00:00
Behnam Heydarshahi
6b156be280 Merge "Read flag to show/hide notification slider" into tm-qpr-dev am: 2552ae08ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20180104

Change-Id: I7321b1bfe1e7d89924b38cd6adf2853d336740d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 16:15:00 +00:00
Behnam Heydarshahi
2ac6fc5709 Read flag to show/hide notification slider
Replace the build-time boolean resource with a run time device config flag that
signals whether the ring notification slider should be displayed or not

Bug: b/38477228
Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest RunSettingsRoboTests -j40
      make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=RingVolumePreferenceControllerTest RunSettingsRoboTests -j40
Change-Id: I8b9a2cbd5af7fa1bba56ff9ba62771d677d4a932
2022-11-01 20:31:38 +00:00
Yining Liu
52ea5d8b7c Increase the number of notification items that can be shown in Notification history - Recently dismissed
Increase the max number of items shown in 'Notification history - Recently dismissed' from 6 to 50.

Bug: 255784319
Test: Manual: Dismiss 6 or more notifications, open Settings-Notifications-Notification History, the max item count under `Recently dismissed` should be 50.
Change-Id: Ia13158ae1ebca448d43bf4c6f6037758b3f40615
2022-11-01 20:20:41 +00:00
Treehugger Robot
9040efdccc Merge "Fix errorprone warnings that should be errors" am: 5744d7c560 am: 7094507528 am: 778ef161bb
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2255054

Change-Id: I1f3cbce7d5de6e63477bc2da2ad115ec53b06472
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-01 00:02:10 +00:00
Treehugger Robot
778ef161bb Merge "Fix errorprone warnings that should be errors" am: 5744d7c560 am: 7094507528
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2255054

Change-Id: I369fd8dc4e2cec46ffd4e61a32e7e55cb11b41a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-31 23:24:11 +00:00
Treehugger Robot
7094507528 Merge "Fix errorprone warnings that should be errors" am: 5744d7c560
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2255054

Change-Id: I65ce6c4fdedd32ff6feb4b5e210b508aafc4e589
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-31 22:57:02 +00:00
TreeHugger Robot
e0cc98d631 Merge "Remove "Always show icon when in vibrate mode"" into tm-qpr-dev am: a82d5e7be2 am: 24dd061bba
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20297389

Change-Id: I929baecabdf7e3394289f4fb1046bb53bef7efb1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 04:19:32 +00:00
TreeHugger Robot
24dd061bba Merge "Remove "Always show icon when in vibrate mode"" into tm-qpr-dev am: a82d5e7be2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20297389

Change-Id: If301290625468d587bc940eafddeed2b2458c267
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 03:44:02 +00:00
TreeHugger Robot
a82d5e7be2 Merge "Remove "Always show icon when in vibrate mode"" into tm-qpr-dev 2022-10-28 03:15:21 +00:00
Yining Liu
923cdcae41 Fix text in notification settings for apps that do not send notifications am: e899b4c96c am: 7f6b3cc7ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20283152

Change-Id: I3b63362fab7d5c532d231b7db82553fc9a7bde4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-28 00:23:19 +00:00
Yining Liu
7f6b3cc7ca Fix text in notification settings for apps that do not send notifications am: e899b4c96c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20283152

Change-Id: Ic748f560f9a4767b6c75349506ae569cde1473af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-27 23:29:27 +00:00
Yining Liu
e899b4c96c Fix text in notification settings for apps that do not send notifications
Added a new string to show for apps apps that target T, but do not declare the POST_NOTIFICATIONS permission in notification settings.

Bug: 229108007
Test: `croot` `make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.notification.app.NotificationsOffPreferenceControllerTest"` and manual: open Settings-Notifications-App Settings, check the text for apps that does not post notifications with toggle disabled. Text should be: "This app does not send notifications" when system language is English.
Change-Id: I9822b6f983e00c5982522099e339d86fae45aefe
2022-10-27 20:19:44 +00:00
Tsung-Mao Fang
9065049733 Remove "Always show icon when in vibrate mode"
If device doesn't support vibrator, then disable this feature.

Test: No this setting
Fix: 253165108
Change-Id: I58e2bf7b36a3af61d458fc2cb8c92c18219d6684
2022-10-27 10:05:50 +00:00
Betty Chang
50b3bdf7ea Merge "[LE Audio] Remove the broadcast icon when the device does not support broadcast feature" into tm-qpr-dev am: a7b9107027 am: 6d2a0cdf0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20271146

Change-Id: Ia8a43105afc093c28f3aa06877b72f7ef9d17ff6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 10:00:54 +00:00
Betty Chang
6d2a0cdf0d Merge "[LE Audio] Remove the broadcast icon when the device does not support broadcast feature" into tm-qpr-dev am: a7b9107027
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20271146

Change-Id: I742b41599ca0d33c7f6c33bb607a8bf89406cb6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 09:23:57 +00:00
changbetty
4f42ca1eac [LE Audio] Remove the broadcast icon when the device does not support
broadcast feature

Bug: 254743785
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaOutputIndicatorWorkerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaVolumePreferenceControllerTest
Change-Id: I02e429b3a306e2f9b0e2342118649208617c4944
2022-10-24 12:03:23 +00:00
Cole Faust
43ff89802c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I29f691a22617b1fc834680ff1cf4ab4244203f06
2022-10-23 12:41:39 -07:00
Julia Tuttle
6f25e6afca Merge "Default to hiding silent notifications on lockscreen in Settings" into tm-qpr-dev am: 5d780a42eb am: 8416222c25
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20193426

Change-Id: If8d5df779d82d0064a5cdec5d59c119fb8b404a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 16:13:04 +00:00
Julia Tuttle
8416222c25 Merge "Default to hiding silent notifications on lockscreen in Settings" into tm-qpr-dev am: 5d780a42eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20193426

Change-Id: I6b4ac70d7ca1d7c4fd76b42c6d26f7361ff3420d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-17 16:07:43 +00:00
Chaohui Wang
507e5f8c90 Fix some errors for Settings project
Attrs could not have same name, so create a common parent for the
messageText. And BiometricEnrollCheckbox is not in use.

Replace some com.android.settingslib.R with com.android.settings.R,
because these are files in settings instead of settingslib.

Bug: 253772249
Test: TAP
Change-Id: Ifa796e923bf26facf4935be4968637affdb4b48b
2022-10-16 14:14:02 +08:00
Julia Tuttle
e9108aecd8 Default to hiding silent notifications on lockscreen in Settings
Also, fix an errorprone issue.

Bug: 252815574
Test: atest ShowOnLockscreenNotificationPreferenceControllerTest
Change-Id: I46e6d0f15c69abe60ef8505d300e5205b3c71e53
2022-10-15 01:24:19 -04:00
Julia Tuttle
431d967b6d Fix some out-of-order imports am: 9f0efa68a1 am: 16b7c91e5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20193425

Change-Id: I7ac72e785fff82674f3bf47546044ab92a0acf74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-14 19:50:17 +00:00
Julia Tuttle
16b7c91e5e Fix some out-of-order imports am: 9f0efa68a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20193425

Change-Id: I85de5768359802bd1800bc88b7ab490631c280e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-14 19:03:13 +00:00
Julia Tuttle
9f0efa68a1 Fix some out-of-order imports
Bug: 20188695
Test: build
Change-Id: I47d463f82bee4e1b22300eb4260dd38dbeb13c88
2022-10-13 21:55:46 -04:00
Chloris Kuo
6e64305274 Disable Enhanced notifications setting when default NAS is not available am: 236eaed326
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20188999

Change-Id: I68d337b4d5b947a7e0af817cb0c76039df18dbf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 20:42:21 +00:00