Commit Graph

19409 Commits

Author SHA1 Message Date
Fan Wu
39836d6c2c Checks cross user permission before handling intent
Bug: 326057017

Test: atest

Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d3b3edd45167515579ab156533754e56ac813f35)
Merged-In: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
Change-Id: I3444e55b22b7487f96b0e3e9deb3f844c4c4723a
2024-08-29 17:36:39 +00:00
Yiling Chuang
6ccef63fce 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:38:39 +00:00
Weng Su
1f2fc04f17 [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity am: 0ea027a71c am: 146d51f2cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26804708

Change-Id: If2fb5dea84a4e7f26186a062bd9b946709642da3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 20:19:04 +00:00
Weng Su
146d51f2cc [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity am: 0ea027a71c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26804708

Change-Id: I2f57a28bbc46a1f648d6ecf0a72eab3a884e69e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 20:06:34 +00:00
Weng Su
0ea027a71c [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity
- Don't show WifiDppConfiguratorActivity if user has DISALLOW_ADD_WIFI_CONFIG

- Don't show AddNetworkFragment if user has DISALLOW_ADD_WIFI_CONFIG

Fix: 299931076
Flag: None
Test: manual test with TestDPC
atest -c SettingsUnitTests:AddNetworkFragmentTest \
         SettingsUnitTests:WifiDppConfiguratorActivityTest

Change-Id: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
Merged-In: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
2024-04-03 03:52:07 +00:00
Jason Chiu
19ae28f1eb Replace getCallingActivity() with getLaunchedFromPackage() am: ddc11bc03a am: 930a9f3180
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26315861

Change-Id: I0ef0c89fe3f3c0f9d8addef766b74f9b637eea92
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 05:33:46 +00:00
Jason Chiu
930a9f3180 Replace getCallingActivity() with getLaunchedFromPackage() am: ddc11bc03a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26315861

Change-Id: I01598c3f2fa5432dc27357701ddcbb29b4c97776
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 04:47:38 +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
83a895fe12 [RESTRICT AUTOMERGE] Restrict WifiDialogActivity am: a0409e582c am: b33f9b8f8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26069282

Change-Id: Ie7548054d0a3a63086427b9398e8dd16d84fafd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-05 00:03:58 +00:00
Weng Su
b33f9b8f8a [RESTRICT AUTOMERGE] Restrict WifiDialogActivity am: a0409e582c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/26069282

Change-Id: I95a273524cc758ed7abe08b76ae4b2631a850ff8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-04 23:20:04 +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
SongFerng Wang
e51d8515c0 Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete
Sometime modem can't return the GET_SIM_STATUS immediately, so that the settings send the sim switching too early after simSlotMapping.

Bug: 291733084
Change-Id: If547c8b02020bc86c83915334e29945176a4ee9f
Test: tester will test it manually.
(cherry picked from commit ba2a86ad9f)
2024-01-05 03:38:30 +00:00
Treehugger Robot
deddbe2720 Merge "Validate ringtone URIs before setting" into udc-dev am: 410fe2f16e am: 8f3d594305
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24969251

Change-Id: I6f6b9daa2a8794cfc7eb64217b87184f75a0e383
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 19:20:14 +00:00
Treehugger Robot
8f3d594305 Merge "Validate ringtone URIs before setting" into udc-dev am: 410fe2f16e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24969251

Change-Id: Idefa9ae0fd0a1bbd2353d518307bf32369c1f21b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 18:46:03 +00:00
tom hsu
61e7550e7e When device has a call, avoid user inactive/active SIM.
Bug: 296314216
Test: atest passed
Change-Id: I1a717d24a87316ccf065a2c02c49dc7e29825905
(cherry picked from commit e7d98dea9d)
Merged-In: I1a717d24a87316ccf065a2c02c49dc7e29825905
2023-10-31 03:08:41 +00:00
Graciela Putri
6e9666ab53 Merge "Add aspect ratio settings to advanced category children" into udc-qpr-dev 2023-10-12 09:30:41 +00:00
Graciela Wissen Putri
e6c4beca80 Remove 4:3 aspect ratio option for foldables
Bug: 304260896
Test: atest UserAspectRatioManagerTest
Change-Id: I8a745c90e45e8776eef082e01dc2155fe6b353b6
2023-10-10 17:18:48 +00:00
Graciela Wissen Putri
fcba73e30e Add aspect ratio settings to advanced category children
Fix: 303823822
Test: Manual && atest AppDashboardFragmentTest
Change-Id: I5778efa6a1a790d76d9d35d1597d82fdc3707b3b
2023-10-09 17:35:07 +00:00
Valentin Iftime
1876c44991 Validate ringtone URIs before setting
Add checks URIs for content from other users.
 Fail for users that are not profiles of the current user.

Test: atest DefaultRingtonePreferenceTest
Bug: 299614635
Change-Id: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
Merged-In: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
2023-10-09 12:59:16 +00:00
Graciela Putri
242bde10c8 Merge "Update aspect ratio summary strings" into udc-qpr-dev 2023-10-04 13:04:36 +00:00
Eghosa Ewansiha-Vlachavas
136bd906da Fix testGetUserMinAspectRatioEntry for both tablets and foldables
Tabelts and foldables now have different aspect ratio values in their
config, so we need to test the devices separately as we shouldnt test for
values that are not in the config of the device the test is run on.

Fixes: 302155585
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Change-Id: I78fa3020501a4be992bb90fea16a6fec4f37594b
2023-09-28 13:23:11 +00:00
Eghosa Ewansiha-Vlachavas
a3108d5b14 Merge "[1/n] Aspect ratio settings app list refinement" into udc-qpr-dev 2023-09-28 10:39:35 +00:00
Eghosa Ewansiha-Vlachavas
6bd9bff2e2 [1/n] Aspect ratio settings app list refinement
All apps list for work profile currently only shows work apps that are
also installed on the normal user. Update filter for list to show all
launcher apps for both users in their respective lists.

Fixes: 301373413
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Test: atest SettingsSpaUnitTests:UserAspectRatioAppPreferenceTest
Change-Id: Ia0bf15340d1b37dcd926d81598d3e94f448a46fc
2023-09-27 17:30:23 +00:00
Peiyong Lin
e456cb72f9 Merge "Add debug property to safe guard ANGLE developer option UI." into udc-qpr-dev 2023-09-26 19:19:37 +00:00
Eghosa Ewansiha-Vlachavas
159b8aed3d Update aspect ratio summary strings
Replace usage of `aspect_ratio_summary` and `aspect_ratio_main_summary`
with `aspect_ratio_summary_text` and `aspect_ratio_main_summary_text`

Fixes: 302142203
Test: Manual
Change-Id: Id7570269806e2dd15f45bdc0aad1ed0534e259b6
2023-09-26 17:04:59 +00:00
Peiyong Lin
774378530f Add debug property to safe guard ANGLE developer option UI.
Add a debug property to guard ANGLE developer option UI, only when the
debug property is enabled will ANGLE developer option UI be enabled.

Add further clarification in the text to indicate that this is an
experimental feature.

Bug: b/287909344
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerTest
Change-Id: Ife31f4b0426f3ce107f86cfbaf3f1aeca567e250
2023-09-25 18:33:00 +00:00
Viesturs Zarins
40765c7763 Add searchable metadata attribute for injected tiles.
Allowing the injector to directly control search behavior for their tiles.

Bug: b/299430183
Test: robotest, manual
Change-Id: I21915978d6722998a45741410cca72448aacf2e0
2023-09-25 08:24:01 +00:00
Weng Su
ab895fdb9b Update Battery preference for Instant Hotspot
- Use the static battery full icon

- Show charging status in Battery preference summary

Bug: 300559036
Test: manual test
atest -c WifiNetworkDetailsFragmentTest

Merged-In: I89e811ba0d1b715d4fff23c96bc094cd4270fef7
Change-Id: I89e811ba0d1b715d4fff23c96bc094cd4270fef7
2023-09-22 20:36:38 +08:00
Graciela Putri
7dff7a0d56 Merge "Fix null object ref in UserAspectRatioAppPreferenceTest" into udc-qpr-dev 2023-09-21 18:25:29 +00:00
Graciela Wissen Putri
88f8ebe3e3 Fix null object ref in UserAspectRatioAppPreferenceTest
Fix: 300651879
Test: atest UserAspectRatioAppPreferenceTest
Change-Id: I7afb90ecd7038e742b2b5ee5b4af5d6ecb4c7a4e
2023-09-21 13:33:06 +00:00
Graciela Wissen Putri
bbb58cac69 Change title to aspect ratio (experimental)
Settings > Apps > Aspect ratio (experimental)
Settings > Apps > App info > Aspect ratio (experimental)

Fix: 300219974
Test: Manual && atest SettingsSpaUnitTests
Merged-In: I359c744025232c6a6ebd9628dbf91acac85b53e9
Change-Id: I359c744025232c6a6ebd9628dbf91acac85b53e9
2023-09-20 21:57:57 +00:00
Treehugger Robot
a72b00a968 Merge "Call detect anomaly in period job only when there is new battery usage data." into udc-qpr-dev 2023-09-20 11:01:27 +00:00
Zaiyue Xue
8371d08595 Call detect anomaly in period job only when there is new battery usage data.
- Reduce the memory usage of call anomaly detection
 - Remove redundant condition for low battery banner

Bug: 300446490
Bug: 284893240
Fix: 300446490
Test: presubmit
Change-Id: I11c1b41a45e129bcec57b9d18c4affe0de7f1d38
Merged-In: I11c1b41a45e129bcec57b9d18c4affe0de7f1d38
2023-09-20 17:04:01 +08:00
SongFerng Wang
26a1866b8d Merge "Remove the cached display name" into udc-qpr-dev 2023-09-19 11:41:38 +00:00
Treehugger Robot
2d7a469264 Merge "Use system properties for the le audio toggle ui config instead" into udc-qpr-dev 2023-09-19 06:31:29 +00:00
SongFerngWang
d21f14a002 Remove the cached display name
If the display name is changed, then the Settings should remove the
cached display name.

Bug: 296157273
Test: [pass] atest SubscriptionUtilTest  [pass]Build and manual test
Change-Id: I3b1297ddddf9f9051dd16523b97fc27255cf3923
2023-09-19 06:25:33 +00:00
Xinyi Mao
821ed07099 Merge "App anomaly tips on PowerUsage App list" into udc-qpr-dev 2023-09-19 03:10:17 +00:00
mxyyiyi
e9378d27f7 App anomaly tips on PowerUsage App list
Screenshots:
[in bg - banner] https://screenshot.googleplex.com/MzLC6LfX93TkkYf
[in bg - hints] https://screenshot.googleplex.com/9JLXNsRiVG8arAU
[in fg - banner] https://screenshot.googleplex.com/9oYbwUkeeLbQX2t
[in fg - hints] https://screenshot.googleplex.com/53DTTUCUnf8rsoE
[apps anomaly highlight hint + settings anomaly banner]
https://screenshot.googleplex.com/8NdS2VMrSzwv2DM

Bug: 291689643
Bug: 291689623
Bug: 284893240
Test: manual
Change-Id: Ic02db49cb3794ef134759d9dcec5f5ef32454a95
Merged-In: Ic02db49cb3794ef134759d9dcec5f5ef32454a95
Merged-In: I7015cdf5a96d518febb160934d780ae84fe14427
2023-09-18 18:28:20 +08:00
Alice Kuo
aa734eb52a Use system properties for the le audio toggle ui config instead
Config LE audio UI per devices. Change to use system properties instead

Bug: 300807171
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Change-Id: Id0d624f516b9fdbe2380e5f10da5c69b08eea6a4
2023-09-18 03:05:59 +00:00
Guojing Yuan
d43d6f259a Merge "[CDM] Add Permissions Sync toggle" into udc-qpr-dev 2023-09-15 21:15:00 +00:00
Guojing Yuan
5f86e8ff03 [CDM] Add Permissions Sync toggle
Bug: 290063372

Test: manually tested the toggle
Change-Id: I75d4370eed98275e2f99d65620229bdb57193fb8
Merged-In: I75d4370eed98275e2f99d65620229bdb57193fb8
2023-09-15 18:05:37 +00:00
Behnam Heydarshahi
c46e8546b5 Merge "PanelSlicesAdapter: load slice label safely" into udc-qpr-dev 2023-09-15 16:52:10 +00:00
Behnam Heydarshahi
374b417b68 PanelSlicesAdapter: load slice label safely
Load the slice action label string safely when action label is set, and
no longer at adapter instantiation time.

Bug: b/298571448

Test: atest PanelSlicesAdapterTest
Change-Id: I0d5b6e0b2db2fa78d3f58ae2cb96f14437923ffd
2023-09-15 14:44:33 +00:00
Weng Su
fafdf08535 Refresh title in the Network details header
- Since the title information may be updated later, it needs to be refreshed continuously to display the latest results.

Bug: 299514568
Test: manual test
atest -c WifiDetailPreferenceController2Test

Merged-In: I4634c152b550c59bd9854cde1b91da44442aa879
Change-Id: I4634c152b550c59bd9854cde1b91da44442aa879
2023-09-15 02:52:38 +00:00
Wentao Wang
38f12abb75 Merge "Separate the demo user factory reset option with admin user factory reset option." into udc-qpr-dev 2023-09-13 11:51:21 +00:00
Wentao Wang
a44e75d6ed Separate the demo user factory reset option with admin user factory reset option.
A security vulnerability was discovered by Android security. b/292548775 Within a short period of time after the device reboot, the user could enter the settings page and factory reset the device. Android Enterprise suggests to add DISALLOW_FACTORY_RESET user restriction to the device.

However, DISALLOW_FACTORY_RESET will be enabled on all Android users, including both the admin user and the demo user. The existing behavior in Android settings is that once the user restriction is set, factory reset button will be greyed out, which makes the factory reset functionality in demo user go away.

In demo user, the factory reset command will be forwarded to the current active device owner. So in this change, we separate the button for admin user and the button for demo user.

In demo user, the button is still visible when the restriction is set.

And in admin user, the button will be greyed out as expected.

Once this change is in, then Pixel Retail Demo could set the user restriction properly and rely on its internal logic to do factory reset. If other applications are trying to do the factory reset, it will be denied by OS.

BUG: 292548775
Change-Id: I9d2d47bb29bc2c1e05058b246908768cd2f95990
2023-09-13 11:47:11 +00:00
Graciela Putri
dd34fa54e4 Merge "Change aspect ratio summary and footer text" into udc-qpr-dev 2023-09-13 07:14:13 +00:00
mxyyiyi
6750634259 Impl highlight effect on BatteryChartView slots.
Screenshot: https://screenshot.googleplex.com/F5VrGjj5kdNHMV6

Bug: 284893240
Bug: 291689623
Test: manual
Change-Id: I846d95d31e8bb839481b86a94d5191ff205f8328
2023-09-13 13:29:32 +08:00
Zaiyue Xue
ea0f5b3d45 Refactor battery usage page contollers interaction logic
(1) Move controllers interaction logic from BatteryChartPreferenceController to main page PowerUsageAdvanced.
(2) Move query power anomaly logic to DataProcessManager async job.

Bug: 284893240
Test: manual
Change-Id: Ib23b338fe3946e68ff73a372342ec5d86494c566
Merged-In: Ib23b338fe3946e68ff73a372342ec5d86494c566
2023-09-13 03:56:28 +00:00
Graciela Wissen Putri
c37c8b8789 Change aspect ratio summary and footer text
Add more education for device user that setting aspect ratio has not
been tested by the app developer. Move Aspect ratio under Apps >
Advanced instead of General.

Fix: 296160724
Test: atest UserAspectRatioAppsPageProviderTest
Change-Id: I2078f285d7bfb8de3a61c69f9d0ff3872d683ed4
2023-09-12 16:56:10 +00:00