Commit Graph

16917 Commits

Author SHA1 Message Date
Treehugger Robot
c54246e0c8 Merge "Ensure search highlight position when scheduled runnable starts" am: fcd941b4eb
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2263782

Change-Id: I3d0a338bb220705a255a7abc123d490ee19f44af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 08:01:42 +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
Shen Lin
bb2fb2ffd6 Ensure search highlight position when scheduled runnable starts
Search highlight function includes two steps: Scroll list to target position first, then notifyItemChanged to it.

We use a Handler.postDelay to implement this. However, when scheduled runnable starts, the original target position could have changed due to preference list update, calling recyclerview's methods after that will be easy to cause an exception.

This CL ensures highlight position every time before calling recyclerView update, which also contribute to origin fix of RecyclerView IllegalArgumentException to a certain extent.

Test: atest, also test some search results, and see the correct behavior
Fixes: 246411107

Change-Id: Ifa758ce3718b047138079246cdfce99fdf66d5b2
2022-10-21 14:01:47 +08:00
Gil Cukierman
a2ddff3865 Honor DISALLOW_CELLULAR_2G User Restriction in Enable2gPreferenceController
When 2g is disallowed by a device admin the 2g toggle in the preference
screen will implement the following behaviors as a result of being
changed to a RestrictedSwitchPreference:
1. become disabled (greyed out)
2. show a summary message explaining that the preference was disabled by
   an admin
3 show a pop up when a user tries to click on the preference informing
  them that the setting is unusable because it was disabled by an admin.

Additionally, the toggle will show as unchecked (off) when admins
disable 2g.

When 2g is re-enabled by a device admin, the preference screen will go back
to its previous state.

Test: atest Enable2gPreferenceControllerTest
Bug: b/248250240
Change-Id: I7af901f2d9f62ebfe884e01724d8eff845c2968e
2022-10-19 21:01:17 +00:00
Xin Li
302b01f8e2 Merge tm-qpr-dev-plus-aosp-without-vendor@9129937
Bug: 248070379
Merged-In: I9ebe26c6a8058798ea654523ad1405a8447268b8
Change-Id: Ib8c6441f2165784804a1863bcfce6b05d20ecfd3
2022-10-06 12:22:57 -07:00
Xin Li
2af8366306 Merge "Merge TP1A.221005.003" 2022-10-05 22:20:14 +00:00
Alice Kuo
7cc845026c Remove A2dp offload disabled and LE audio offload enabled combination
In order to reduce the complexity, LE audio offload couldn't be
enabled as a2dp offload disabled. Remove the combination from the
developer option
1. As a2dp offload disabled, LE audio offload couldn't be switched.
2. As the user disable a2dp offload, LE audio offload would be disabled
   as well

Bug: 238268927
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioHwOffloadPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothA2dpHwOffloadPreferenceControllerTest
Change-Id: I9ebe26c6a8058798ea654523ad1405a8447268b8
2022-10-04 23:48:11 +08:00
Xin Li
f51d201af3 Merge TP1A.221005.003
Merged-In: Ia825853dde2e966e3d390cecfbe1a99f6439d31e
Change-Id: Ia7b51d3cc694287b930d240c77e5ba0ed9a527f4
2022-10-03 13:17:48 -07:00
Bill Lin
6b763d1999 Merge "Do not override SUW Glif theme when onApplyThemeResource() callback" into tm-qpr-dev am: e5a4e38c8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20080179

Change-Id: I5a16ac472b0a08273d2410b39741675a6f998f51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-01 00:22:29 +00:00
Bill Lin
e5a4e38c8c Merge "Do not override SUW Glif theme when onApplyThemeResource() callback" into tm-qpr-dev 2022-09-30 23:54:31 +00:00
lbill
39175b2f87 Do not override SUW Glif theme when onApplyThemeResource() callback
1. Accodring to settings & setupdesign lib theme architecture
Only force apply sytle SetupWizardPartnerResource for current
activity/contextThemeWrapper is sufficient, override GlifV3Theme
again will cause incorrect resource mapping of private attributes.

2. Set Theme_AlertDialog style for AlertDialog in for Material design
- FingerprintEnrollEnrolling
- FingerprintEnrollFindSensor

3. Add test for AlertDialog theme, and fix broken test cases

Fixes: 245684949
Bug: 249789759
Bug: 248994476
Test: manual in SUW `adb shell cmd uimode night yes` and check visual
Test: manual in SUW enrolling check timeout dialog apply theme
Test: manual in SUW enroll UDFPS tips lottie view showing expectedly
Test: manual in SUW enroll UDFPS landscape showing correct layout
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      SetupFingerprintEnrollFindSensorTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollEnrollingTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollFindSensorTest
Change-Id: I17cbf26e38318e6681ba124d23bf86317a0f1e1d
2022-09-30 04:58:28 +00:00
Tom Hsu
f0635482c7 Merge "Revert "[Languages] Add new information to system language page."" into tm-qpr-dev am: 43ceaa85ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20064133

Change-Id: Ie4a6ec648a8a524d25f44dca22cbc145884c664b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-29 16:27:06 +00:00
Tom Hsu
43ceaa85ee Merge "Revert "[Languages] Add new information to system language page."" into tm-qpr-dev 2022-09-29 15:52:32 +00:00
Tom Hsu
a4c78e3820 Revert "[Languages] Add new information to system language page."
This reverts commit 3cbb6f8680.

Reason for revert: b/248456615

Change-Id: I3bc5088784ed97f69ffadb0ea69078bfcf7dc39d
Merged-In: I3bc5088784ed97f69ffadb0ea69078bfcf7dc39d
2022-09-29 04:38:30 +00:00
SongFerng Wang
d57eb2054b Merge "Add the way for hiding the "contact sharing" on the pairing dialog" into tm-qpr-dev am: f970d63b3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20033811

Change-Id: Ic22f2dd71f84556397bf44344812aa5fe156c024
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-28 20:09:16 +00:00
SongFerng Wang
f970d63b3b Merge "Add the way for hiding the "contact sharing" on the pairing dialog" into tm-qpr-dev 2022-09-28 19:45:33 +00:00
TreeHugger Robot
e7e1f37321 Merge "Restrict Wi-Fi configuration if settings UI is restricted" into tm-qpr-dev am: ee21072a5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20063305

Change-Id: I3e4661df4a20415b44390eb6484811e3073e9f58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-28 17:32:08 +00:00
TreeHugger Robot
ee21072a5e Merge "Restrict Wi-Fi configuration if settings UI is restricted" into tm-qpr-dev 2022-09-28 16:48:10 +00:00
Ats Jenk
6d69676059 Merge "Add support to hide developer tile based on a flag" into tm-qpr-dev am: f1807d897b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20031235

Change-Id: I9715ad0b620212e08d4d2f744d17c12da26b26e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-27 16:19:51 +00:00
Weng Su
6629b12a08 Restrict Wi-Fi configuration if settings UI is restricted
- Don't launch W-Fi configuration settings if the settings UI is restricted (including guest users).

Bug: 246301667
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Merged-In: Id82498f41765f955e01bb311bb221d26f9574f31
Change-Id: Id82498f41765f955e01bb311bb221d26f9574f31
(cherry picked from commit aaa65fc6f0)
2022-09-27 14:31:09 +00:00
SongFerngWang
51cabc5553 Add the way for hiding the "contact sharing" on the pairing dialog
There is the way to hide the "contact sharing" at the "device details"
page, but it did not be implemented on the pairing dialog. Add this way
on pairing dialog.

Bug: 246668278
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothPairingControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothPairingDialogTest

Change-Id: I472acb80e70fe5d2a59cb9eed95fcbccfa417fa5
2022-09-27 16:06:49 +08:00
Ats Jenk
618876c6c9 Add support to hide developer tile based on a flag
Define new meta-data option for development tiles that can be used to
specify a sysprop flag.
If this meta-data is present, the value will be used as the flag name
that has to be enabled for the preference to show up.

Bug: 248363970
Test: atest SettingsRoboTests:DevelopmentTilePreferenceControllerTest
Change-Id: I66d56777a6290d7fee739492bd2871f637791d75
2022-09-22 19:31:47 -07:00
Gil Cukierman
02ef8722be Merge "Use AAPT2 For SettingsUnitTests" am: 594002e21a am: 24ac97a0bf am: 1f750fcba6 am: ccfd44162f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2224737

Change-Id: I22634f05290d7c86c79e804b15a0db29d807911b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 17:50:11 +00:00
Gil Cukierman
ccfd44162f Merge "Use AAPT2 For SettingsUnitTests" am: 594002e21a am: 24ac97a0bf am: 1f750fcba6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2224737

Change-Id: I43a581174938d47bb6b5aea5eb552057a5ce9b54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 16:12:54 +00:00
Gil Cukierman
1f750fcba6 Merge "Use AAPT2 For SettingsUnitTests" am: 594002e21a am: 24ac97a0bf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2224737

Change-Id: I50305e27b205160d85825143f614cd52b1bab2b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 15:23:54 +00:00
Jason Hsu
b161bade37 Merge "Fix not on the top when entering device detail page" into tm-qpr-dev am: 9ac1712145
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20008465

Change-Id: I2a8dd8e4bb9f11ab239ec7a4e420b38c52623a66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 08:27:44 +00:00
Jason Hsu
9ac1712145 Merge "Fix not on the top when entering device detail page" into tm-qpr-dev 2022-09-22 07:37:28 +00:00
Bill Lin
8a8fe4fabd Merge "Apply dark light theme for enrollment activities" into tm-qpr-dev am: a46b426bcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19989471

Change-Id: I4b46bef348873f663b4c7368a2e659359e6f8486
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 02:46:29 +00:00
Bill Lin
a46b426bcf Merge "Apply dark light theme for enrollment activities" into tm-qpr-dev 2022-09-22 01:55:59 +00:00
Daniel Sandler
ba81fe61cf Merge "Launch the platform easter egg in a new task." into tm-qpr-dev am: e43bf3cd9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20003711

Change-Id: I794c118911d6d2fa47ff9190a6108fc1e3d0f11c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 23:22:53 +00:00
TreeHugger Robot
9a4844c2a9 Merge "Show app list in Battery Usage page when there is no battery level data." into tm-qpr-dev am: 53f1e23d63
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19949396

Change-Id: Id8871a6434f46e39f9814490c6cb85eb9529d50e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 22:22:16 +00:00
Gil Cukierman
4429054bb1 Use AAPT2 For SettingsUnitTests
Forces tradefed to use aapt2 for SettingsUnitTests to get around
the issue of Settings.apk not being parseable by aapt.

Bug: 247779071
Test: atest SettingsUnitTests
Change-Id: I8af260f8d2c438512d3e61f0028accf7b40c8a00
2022-09-21 17:48:20 +00:00
jasonwshsu
35e20d5ace Fix not on the top when entering device detail page
Root Cause: Added SpacePreference in xml let the page renders order
incorrectly.

Solution: That SpacePreference should only be visible when the device is
hearing aid.

Bug: 245681095
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Merged-In: Ic0be940c8466b5e1e301255868c29d06bd4428bd
Merged-In: I442445a861898258a73f37ad8f85bcee387fbf58
Change-Id: Icca48d9c2643507638b2b581d052530521cce5df
2022-09-21 23:54:15 +08:00
Daniel Sandler
e43bf3cd9d Merge "Launch the platform easter egg in a new task." into tm-qpr-dev 2022-09-21 14:11:57 +00:00
Dan Sandler
5eeb6c3792 Launch the platform easter egg in a new task.
This ensures that when PlatLogoActivity is launched on a
large-screen device, it properly takes over the full screen
(and doesn't hide the status bar for Settings!).

Bug: 243407943
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FirmwareVersionDetailPreferenceControllerTest
Change-Id: Icf10aa43e5b4a27a2fa98ea41b5a9e9cf659e895
2022-09-20 20:10:17 -04:00
Kuan Wang
bd9042c47f Show app list in Battery Usage page when there is no battery level data.
https://drive.google.com/file/d/1iQxKmEp_weNYdT4JnsiZgYy9mCdn7SRv/view?usp=sharing

Bug: 246233366
Test: make RunSettingsRoboTests + manually
Change-Id: If536c93652506c8009f5cabf3d0ae373b6825bfc
Merged-In: If536c93652506c8009f5cabf3d0ae373b6825bfc
2022-09-20 12:11:25 +08:00
lbill
fd269d08ec Apply dark light theme for enrollment activities
Override onApplyThemeResource() and apply SetupWizardPartnerResource
to make the dark light theme activate.

Theme change scope:
1) FingerprintEnrollEnrolling
2) FingerprintEnrollFindSensor
3) SetupFingerprintEnrollEnrolling
4) SetupFingerprintEnrollFindSensor

Bug: 245684949
Test: manual in SUW `adb shell cmd uimode night yes` and check visual
Test: manual in SUW enrolling check timeout dialog apply theme
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      SetupFingerprintEnrollFindSensorTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollEnrollingTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollFindSensorTest
Change-Id: I16f1070612e3e27546e6aa004fc4cdd3d7947191
2022-09-20 01:30:28 +00:00
TreeHugger Robot
dd238fd0ad Merge "Show greyed out icon when Wi-Fi network is restricted to configurate" into tm-qpr-dev am: 74a748ece8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19967514

Change-Id: I5646b7ff9e291b70295cbbb180f3e0513f51866f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-19 04:23:30 +00:00
TreeHugger Robot
74a748ece8 Merge "Show greyed out icon when Wi-Fi network is restricted to configurate" into tm-qpr-dev 2022-09-19 03:52:34 +00:00
Weng Su
3499db23ff Show greyed out icon when Wi-Fi network is restricted to configurate
- Use Drawable#setTintList() instead of Drawable#setTint() to show greyed out icon when the preference is disabled.

Bug: 233175849
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest

Change-Id: I451106530bc19bc733fd58a57e8ac336b023e65e
2022-09-19 02:22:47 +08:00
TreeHugger Robot
6c0140b340 Merge "Add Spatial audio settings for LE Audio devices" into tm-qpr-dev am: f4d0d420bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19967512

Change-Id: I5dcdb9766382a9b4c9d36601ef71da4181e1dea2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 21:00:54 +00:00
Hugh Chen
bdfd8531a9 Add Spatial audio settings for LE Audio devices
- Adds TYPE_BLE_HEADSE, TYPE_BLE_SPEAKER and TYPE_BLE_BROADCAST for
  display Le audio devices.
- Adds TYPE_HEARING_AID for display hearing aid devices.

Bug: 244528781
Test: make -j64 RunSettingsRoboTests
Change-Id: I1278a5e0c93fdc5a4873df68032128ffedfe72d6
Merged-In: I1278a5e0c93fdc5a4873df68032128ffedfe72d6
(cherry picked from commit f8704add51)
2022-09-16 15:51:15 +00:00
TreeHugger Robot
2f40a918e1 Merge "Update App battery usage page and add tests." into tm-qpr-dev am: 50c7cb834e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19951824

Change-Id: I680de6c08f5a1533779f4c73ff1bd3f7cd8ad0d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 08:37:40 +00:00
Tiffany Nguyen
99d3b54a70 Update App battery usage page and add tests.
- Add tests
- Remove duplicated "Set battery usage for apps" text
- Clean up some code

Screenshot: https://screenshot.googleplex.com/8LHhyxFA6X4ZFkT.png

Test: make RunSettingsRoboTests -j40
Bug: 244995036
Change-Id: Iaac9b0af10f541100e91b10affacf3307bd5edca
2022-09-15 13:40:12 +00:00
Zaiyue Xue
83ef9001e7 Merge changes from topic "accessibility1" into tm-qpr-dev am: 9b24df2c38
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19771692

Change-Id: I80680875b02983c58a9e3c324dc13e055ad75fb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 06:09:40 +00:00
Zaiyue Xue
9479b18cf9 Support accessibility for battery chart (1) am: 9c962b03e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19764112

Change-Id: If91f5422518ff8cc76dcc5c216a83a70dd7a337d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 06:09:35 +00:00
Zaiyue Xue
9b24df2c38 Merge changes from topic "accessibility1" into tm-qpr-dev
* changes:
  Support accessibility for battery chart (4)
  Support accessibility for battery chart (3)
  Support accessibility for battery chart (2)
  Support accessibility for battery chart (1)
2022-09-14 05:46:17 +00:00
Kuan Wang
93c0d0227b Add logging for count of shown / hidden apps in Battery Usage page. am: 676bcedb85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19893207

Change-Id: I52977900a9f669fa7b31c2c72cbd5ec10646a28a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-14 02:36:50 +00:00
Kuan Wang
676bcedb85 Add logging for count of shown / hidden apps in Battery Usage page.
Bug: 245455490
Test: manually
Change-Id: I7342e822f00f9a0aedcef592cae9809251518812
2022-09-14 02:09:16 +00:00
TreeHugger Robot
9386416103 Merge "Fix incorrect choose screen lock during unicorn" into tm-qpr-dev am: 094d7badba
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19880532

Change-Id: I7ef1ebee9bc4ba6e165f2dfab8fbef70fdc0d2c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 06:45:45 +00:00