Commit Graph

15831 Commits

Author SHA1 Message Date
Matías Hernández
a434120410 Merge "Remove incorrect call to Window.addFlags with a system flag" into udc-dev am: 4a584df0c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/31172435

Change-Id: Ieb627204dbc2bfb48e665c7c5850bb30b591bac9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-03 03:25:07 -08:00
Matías Hernández
c97cd9e805 Remove incorrect call to Window.addFlags with a system flag
The same flag is being (correctly) added in onCreate, so on top of being wrong this was also completely unnecessary.

Bug: 368579654
Test: atest NotificationAccessConfirmationActivityTest
Flag: EXEMPT bugfix

Change-Id: I539fca77a1d136bdd0e4892993020884430b8a4e
Merged-In: I539fca77a1d136bdd0e4892993020884430b8a4e
(cherry picked from commit e0510a62eb)
2025-01-07 04:49:20 -08:00
Jason Chiu
276ca29b31 Block the content scheme intent in AccountTypePreferenceLoader am: 8fa1dcb034 am: b5bf33ab76
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/30469374

Change-Id: Ib6eb79eee294ac76553b9393c29929e091036153
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-25 04:30:41 +00:00
Jason Chiu
b5bf33ab76 Block the content scheme intent in AccountTypePreferenceLoader am: 8fa1dcb034
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/30469374

Change-Id: Ibc5350fee27a89cdf02d82d24bf4834931de4c49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-25 04:04:39 +00:00
Jason Chiu
8fa1dcb034 Block the content scheme intent in AccountTypePreferenceLoader
Bug: 366401629
Flag: EXEMPT security fix
Test: atest AccountTypePreferenceLoaderTest, manual
Change-Id: Ica87087341cc983df04190919e33dc369fa18619
Merged-In: Ica87087341cc983df04190919e33dc369fa18619
(cherry picked from commit 841fb3846b)
2024-11-19 10:47:06 +00:00
Guojing Yuan
a0924c7c6a [CDM][NLS] Check if the NLS service has an intent-filter am: e4fe2f5b81
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/29711106

Change-Id: I396f1b0749acfad5300f706e62c97a6f136119b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-14 22:00:14 +00:00
Guojing Yuan
e4fe2f5b81 [CDM][NLS] Check if the NLS service has an intent-filter
Bug: 363248394
Test: CTS
Flag: EXEMPT bugfix
Change-Id: Ib79c219cde8d73a218ceb7911f4552d43e384d8e
Merged-In: Ib79c219cde8d73a218ceb7911f4552d43e384d8e
(cherry picked from commit 7ae59a42eb)
2024-10-04 22:50:07 +00:00
Yiling Chuang
4d263156f8 RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: 23b88e0724 am: eae022088f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28550763

Change-Id: I223966ef871fa55ecc5a53643f0479327978fe33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:17:47 +00:00
Yiling Chuang
eae022088f RESTRICT AUTOMERGE FRP bypass defense in App battery usage page am: 23b88e0724
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/28550763

Change-Id: Ic394804c1f515b4e9a3fd4fae3df77c8d27b116a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-02 17:01:14 +00:00
Yiling Chuang
2659f8416c RESTRICT AUTOMERGE FRP bypass defense in App battery usage page
Before the setup flow completion, don't allow the app info page in App battery usage to be launched.

Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix

Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
(cherry picked from commit 419a6a9079)
2024-07-31 07:36:04 +00:00
Yiling Chuang
23b88e0724 RESTRICT AUTOMERGE FRP bypass defense in App battery usage page
Before the setup flow completion, don't allow the app info page in App battery usage to be launched.

Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix

Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
Merged-In: I486820ca2afecc02729a56a3c531fb931c1907d0
(cherry picked from commit 419a6a9079)
2024-07-31 07:18:16 +00:00
Treehugger Robot
ba599569fd [RESTRICT AUTOMERGE] Merge "Replace getCallingActivity() with getLaunchedFromPackage()" into sc-v2-dev am: 324e36b19d am: a339d8ea9a am: ffb480aee4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27712008

Change-Id: I877be6871e43eb5d42c695b5cdb1faecdbc5305f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 20:27:49 +00:00
Treehugger Robot
ffb480aee4 [RESTRICT AUTOMERGE] Merge "Replace getCallingActivity() with getLaunchedFromPackage()" into sc-v2-dev am: 324e36b19d am: a339d8ea9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27712008

Change-Id: Ic0f5293649e322c4da6bbfcbce8486270436442e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-12 20:13:16 +00:00
Treehugger Robot
a339d8ea9a [RESTRICT AUTOMERGE] Merge "Replace getCallingActivity() with getLaunchedFromPackage()" into sc-v2-dev am: 324e36b19d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27546875

Bug: 333364513
Fix: 345375093
Change-Id: Ifdebf7a60f3695f83d8fa04e05f4dbd6e177f62b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 02:49:14 +00:00
Jason Chiu
8bdbb580da Replace getCallingActivity() with getLaunchedFromPackage()
getLaunchedFromPackage() reports who launched this Activity or built
PendingIntent used to launch it, whereas getCallingActivity() reports
who will get result of Activity.

Bug: 316891059
Test: robotest, manual
Change-Id: If97018c2741caef622f0596bbfeaa42ef1788b78
Merged-In: If97018c2741caef622f0596bbfeaa42ef1788b78
(cherry picked from commit ddc11bc03a)
2024-05-28 02:40:04 +00:00
Jason Chiu
ddc11bc03a Replace getCallingActivity() with getLaunchedFromPackage()
getLaunchedFromPackage() reports who launched this Activity or built
PendingIntent used to launch it, whereas getCallingActivity() reports
who will get result of Activity.

Bug: 316891059
Test: robotest, manual
Change-Id: If97018c2741caef622f0596bbfeaa42ef1788b78
Merged-In: If97018c2741caef622f0596bbfeaa42ef1788b78
(cherry picked from commit 901880a1d2)
2024-02-22 03:43:50 +00:00
Weng Su
2a9ea31fb5 [conflict] [RESTRICT AUTOMERGE] Restrict WifiDialogActivity am: aabb15de74 am: a71eb50f99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26058111

Change-Id: I24369d8ac4ea5ab7bcd699444fdbd086997685b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 23:55:44 +00:00
Weng Su
a71eb50f99 [RESTRICT AUTOMERGE] Restrict WifiDialogActivity am: aabb15de74
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26058111

Change-Id: I29aa05d1b2b3aa43c53d83578fa03be3938bb083
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 22:59:57 +00:00
Weng Su
a0409e582c [RESTRICT AUTOMERGE] Restrict WifiDialogActivity
- Don't show WifiDialogActivity if user has DISALLOW_ADD_WIFI_CONFIG

Bug: 299931761
Flag: None
Test: manual test with TestDPC
atest -c SettingsRoboTests:WifiDialogActivityTest

Merged-In: Icbb8f45922ded163208976be9c2816060dcf09f1
Change-Id: Icbb8f45922ded163208976be9c2816060dcf09f1
(cherry picked from commit 51fa3d798a)
2024-01-30 21:23:08 +00:00
Weng Su
aabb15de74 [RESTRICT AUTOMERGE] Restrict WifiDialogActivity
- Don't show WifiDialogActivity if user has DISALLOW_ADD_WIFI_CONFIG

Bug: 299931761
Flag: None
Test: manual test with TestDPC
atest -c SettingsRoboTests:WifiDialogActivityTest

Merged-In: Icbb8f45922ded163208976be9c2816060dcf09f1
Change-Id: Icbb8f45922ded163208976be9c2816060dcf09f1
(cherry picked from commit 51fa3d798a)
2024-01-31 05:03:19 +08:00
Weng Su
bd5e3c0c05 [RESTRICT AUTOMERGE] Restrict ApnEditor settings
- Finish ApnEditor settings if user is not an admin

- Finish ApnEditor settings if user has DISALLOW_CONFIG_MOBILE_NETWORKS restriction

Bug: 279902472
Test: manual test
atest -c ApnEditorTest

Change-Id: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
Merged-In: I5cf984000244b4ad901c6a4977a1368279323e0a
2023-07-12 07:05:37 +00:00
Weng Su
ef2fd5b7cd [RESTRICT AUTOMERGE] Restrict ApnEditor settings
- Finish ApnEditor settings if user is not an admin

- Finish ApnEditor settings if user has DISALLOW_CONFIG_MOBILE_NETWORKS restriction

Bug: 279902472
Test: manual test
atest -c ApnEditorTest

Change-Id: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
Merged-In: I5cf984000244b4ad901c6a4977a1368279323e0a
2023-07-12 06:46:21 +00:00
Weng Su
6afcad7626 [RESTRICT AUTOMERGE] Restrict ApnEditor settings
- Finish ApnEditor settings if user is not an admin

- Finish ApnEditor settings if user has DISALLOW_CONFIG_MOBILE_NETWORKS restriction

Bug: 279902472
Test: manual test
atest -c ApnEditorTest

Change-Id: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
2023-07-11 08:34:53 +00:00
Weng Su
5a17d39db7 Restrict ApnEditor settings
- Finish ApnEditor settings if user is not an admin

- Finish ApnEditor settings if user has DISALLOW_CONFIG_MOBILE_NETWORKS restriction

Bug: 279902472
Test: manual test
atest -c ApnEditorTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4e18e7414c674a1c5bc69961c03499849b4aefd2)
Merged-In: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
Change-Id: Iecdbbff7e21dfb11e3ba385858747a220cfd3e04
2023-07-07 12:11:33 +00:00
Michael Mikhail
83c13d6563 Merge changes I4bd65bdb,Ibe80b4b1 into udc-dev
* changes:
  Trigger talkback for notification volume change
  Add content description to volume title in settings.
2023-07-05 15:11:09 +00:00
Michael Mikhail
499f965c1c Add content description to volume title in settings.
Adds content description that is announced by talkback when a11y focus
is on volume preference. This improves talkback announcement when view changes.

Fixes: 285529113
Bug: 285455826
Fixes: 285487766
Test: atest VolumeSeekBarPreferenceControllerTest
Test: atest VolumeSeekBarPreferenceTest
Change-Id: Ibe80b4b1d489dc058df1cc79c96b034d5ddc6e56
2023-06-26 23:35:39 +00:00
Matías Hernández
027f0a46ae Settings: don't try to allow NLSes with too-long component names
* NotificationAccessConfirmationActivity (triggered through CompanionDeviceManager) -> Don't show the dialog, bail out early similarly to other invalid inputs.
* NotificationAccessSettings (from Special App Access) -> No changes, but use the canonical constant now.
* ApprovalPreferenceController (used in NotificationAccessDetails) -> Disable the toggle, unless the NLS was previously approved (in which case it can still be removed).

Fixes: 260570119
Fixes: 286043036
Test: atest + manually
Change-Id: Ifc048311746c027e3683cdcf65f1079d04cf7c56
2023-06-21 17:02:32 +02:00
Treehugger Robot
08366227b5 Merge "[Settings] Fix roboletric test fail and add new test case." into udc-dev 2023-06-15 11:18:51 +00:00
Matías Hernández
46cdbed02e Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 0166bcc776
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I91e72e84a4f239501953dbcf048f6043ea588ff0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:55:36 +00:00
Matías Hernández
dcbe38baa9 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99 am: 2b1faa0aea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I69d2ef43afb54ce3b9d141d4f676b688dd1c5c59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:52:58 +00:00
Matías Hernández
0166bcc776 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I33040a000b1bc4e90b9e76c8e751bca2e09959d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:10:59 +00:00
Matías Hernández
2b1faa0aea Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff am: 0aa241be99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I715da9406bd9d3fe88ff7b5353db1780109880e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 15:09:53 +00:00
Matías Hernández
0aa241be99 Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c am: a49e14f8ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I8cd7cc9605b3728f9f96c3479d17aa1b362d9cda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 14:22:10 +00:00
Matías Hernández
a49e14f8ff Don't hide approved NLSes in Settings am: ff255c6eda am: 50df60c93c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I840d7836ae899bcd40eafc772b96c9460c3f8a02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 13:42:07 +00:00
Matías Hernández
50df60c93c Don't hide approved NLSes in Settings am: ff255c6eda
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23563580

Change-Id: I42099e38ef7b479b9339b545fe8d12d3bbe95112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 12:57:15 +00:00
tom hsu
bcd6bf1f8f [Settings] Fix roboletric test fail and add new test case.
Bug: 287177689
Test: atest passed
Change-Id: If927f4e4bf7ee9702e865e77f350164a93729940
2023-06-14 10:13:55 +00:00
Han Xu
b452bc9f9d Add manufactured year into hardware info page
Bug: 285471557
Test: manual visually
Change-Id: Iaab254ac6ee77217e29d89524d782577f44119cb
2023-06-12 17:43:55 +08:00
Matías Hernández
ff255c6eda Don't hide approved NLSes in Settings
Note that an NLS that shouldn't be approvable (because its name is too long) but was already approved (either before the max length check was introduced, or through other means) will disappear from the list if the user revokes its access. This might be somewhat confusing, but since this is a very-edge case already it's fine.

Bug: 282932362
Test: manual
Change-Id: I4c9faea68e6d16b1a4ec7f472b5433cac1704c06
2023-06-06 19:07:58 +02:00
Alejandro Nijamkin
6f9f3a4594 Fixes nav stack issue.
By marking the Intent that's being sent to WPP as "launched from
settings", the code in CustomizationPickerActivity can correctly
conclude that the multi-pane wrapper does not need to be applied to the
intent, preventing the odd "disordering" of the back stack in the bug.

Fix: 284809020
Test: manually verified, on a large screen device with a multi-pane
settings configuration, that going to Display > Lock screen > Shortcuts
and then swiping back off the left edge of the display correctly exits
settings instead of revealing an incorrect screen like it did in the
bug.
Test: also manually verified that the long-press on the home screena and
on the lock screen paths both open the right tab in WPP in settings
correctly.

Change-Id: Iac2b4e9fa5bab91b6a5251f1c51b4d21a0824f00
2023-06-05 16:02:17 -07:00
Treehugger Robot
47d3cfe635 Merge "Skip Wi-Fi hotspot in Settings Widgets" into udc-dev 2023-06-02 04:19:22 +00:00
YK Hung
bfc4637d09 Merge "Update incompatible charger checking rule" into udc-dev 2023-06-02 00:50:17 +00:00
Weng Su
ef81179538 Skip Wi-Fi hotspot in Settings Widgets
- Do not show Wi-Fi hotspots in Settings Widgets if the config is not set to show

Bug: 275268676
Test: Manual test
atest -c CreateShortcutPreferenceControllerTest

Change-Id: I5d86a78c9d48c9b63faff50d46f1254dbefd94cf
2023-06-02 04:54:59 +08:00
Pavel Grafov
8e13abebc0 Merge "Avoid double quiet mode requests" into udc-dev 2023-06-01 15:31:13 +00:00
ykhung
e2f19b7de9 Update incompatible charger checking rule
Bug: 278316711
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I8f720bcdf7c0efabc8278913ccf1c0427c857fac
2023-06-01 12:50:47 +08:00
Pavel Grafov
8112fb3828 Avoid double quiet mode requests
Currently when "Work apps" the toggle is tapped in Settings it leads to
UM.requestQuietMode() being called twice via different routes.

Bug: 284915370
Test: atest WorkModePreferenceControllerTest
Change-Id: I5eeb7ecdb10245a32d947ae2430a865bd7a5a60a
2023-05-31 13:56:42 +01:00
Weng Su
086d062cb2 Fix TetherSettings crash issue
- When the user is a guest user, the UI will remove all preferences to restrict setting changes. If the ViewModel updates the UI in this situation, it will cause Settings to crash.
  - Avoid to setup ViewModel when UI is restricted

Bug: 284435378
Test: Manual test
atest -c TetherSettingsTest

Change-Id: I52d4ea717c34eacc9cc2321e3950dc89408049f8
2023-05-31 20:38:36 +08:00
TreeHugger Robot
52d2daf3b3 Merge "Fixed unable to enable hotspot with Security None" into udc-dev 2023-05-26 05:43:02 +00:00
Weng Su
f7d8f0481d Fixed unable to enable hotspot with Security None
- Due to the design adjustment, the default value of SoftApConfiguration is not Security None, so the update of Security None cannot be omitted.

Bug: 283762826
Test: Manual test
atest -c WifiTetherSettingsTest

Change-Id: I07d18b8f73ab8190152332c01814a4bd72cf28d6
2023-05-26 12:26:31 +08:00
Yuxin Hu
67c72c01cb Merge "Fix "Enable ANGLE" switch behavior when Developer Option Switch is off" into udc-dev 2023-05-25 18:08:10 +00:00
SongFerngWang
1872151b4f The BluetoothDevicePreference register the MetadataChanged
The bluetooth device preference needs to refresh UI after MetadataChanged
Fix: 282877247
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicePreferenceTest

Change-Id: I02cb07a6b255242e4877089ce2f3b7559ce02362
2023-05-24 04:49:41 +00:00