Commit Graph

17947 Commits

Author SHA1 Message Date
Bonian Chen
dae659e358 [Settings] Improve PremiumSMS's auto test
Fix PremiumSMS's test case when config_show_premium_sms is false.

Bug: 240515161
Test: test cases and local testing
Change-Id: I3f1710bcf2c123553af7646c030bfe87f569324a
2022-11-10 13:18:12 +00:00
jasonwshsu
ce487188a0 Fix TalkBack shortcut keeps showing enabled when entering into that page.
Root Cause: TextUtils.isEmpty() will return true both null and empty case, and write config key into it.

Solution: Write config key only if settings key is null. That means no one (developers or users) touch the key ever, so we should respect config key here.

Bug: 255912415
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I092975ea3de8fce78b7ae2a6241a30f6af8125a6
2022-11-10 12:21:04 +00:00
Kuan Wang
6e23499e98 Remove the timestamps of last day for battery level chart if last day has less than 2 hours data. am: 57cb76428e am: 28bdf84b5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20309948

Change-Id: I748c1247a96b3d4ae9160d76c768e2db7af2611a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 11:46:43 +00:00
Bonian Chen
2a6792540b [Settings] enhancing data saver config control
Enhancing the control of R.bool.config_show_data_saver when false, which including:
1. Initial presentation is invisible
2. Leaving UI when triggered
3. Avoid from getting searched
4. Robolectric test case support

Bug: 243877672
Test: test cases and local testing
Merged-In: I909522c0244ebb012a27d6aff34120a4f90128c6
Change-Id: I909522c0244ebb012a27d6aff34120a4f90128c6
2022-11-10 11:23:20 +00:00
Bonian Chen
5a264f69f4 Merge "[Settings] Hide data usage when SIM support is turn OFF" 2022-11-10 11:21:20 +00:00
Bonian Chen
f11cd3d275 Merge "[Settings] enhancing data saver config control" 2022-11-10 11:21:20 +00:00
Kuan Wang
28bdf84b5a Remove the timestamps of last day for battery level chart if last day has less than 2 hours data. am: 57cb76428e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20309948

Change-Id: Ifd9c932a870117e278c59af45c6a57132831de5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 11:14:37 +00:00
YK Hung
2cdc7409b5 Merge "Verify and reset invalid scheduled battery level in the booting stage" 2022-11-10 10:23:04 +00:00
Zaiyue Xue
240ff56875 Merge "Fix b/257404630 Inconsistent strings in battery chart" into tm-qpr-dev am: aee2d55bfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20410009

Change-Id: I89a8e622134524f701e440a9bd3e2cf0c84fae8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 09:33:08 +00:00
Kuan Wang
57cb76428e Remove the timestamps of last day for battery level chart if last day has less than 2 hours data.
Test: make RunSettingsRoboTests
Bug: 256525782
Change-Id: I3f735f8f3ec10b2952b93111f0243e44117ff58a
2022-11-10 08:56:39 +00:00
ykhung
4c0de2685a Verify and reset invalid scheduled battery level in the booting stage
The minimum scheduled battery level is changed from 5% to 10% in T, if
users upgrade the device from S to T with invalid level value in
the Settings.Global, we have to force reset it into the new minimum
battery level value.

Bug: 258243197
Test: make RunSettingsRoboTests
Change-Id: I89003120aaebcff78d4bf3f7ae8b54e97adae3c8
2022-11-10 16:38:18 +08:00
“Ankita
a6ff897cf3 AppClone: Add preference to display new page Cloned Apps
Also adds a faeture flag and controller class for this page.
UX path: Apps > Cloned Apps

Bug: 249916503
Bug: 248235441
Test: manual
Test: make RunSettingsRoboTests -j30 ROBOTEST_FILTER=AppsPreferenceControllerTest
Test: make RunSettingsRoboTests -j30 ROBOTEST_FILTER=ClonedAppsPreferenceControllerTest
Change-Id: I2f68f4365ce08481c7db7bfdda4fdffc369321a9
2022-11-10 06:52:44 +00:00
Florian Mayer
5696dde950 Add MTE Settings.
MTE is a technology to help prevent exploitation of some security bugs.
We want to offer users that want to trade off a slight reduction in
performance for higher security the option to do so from the settings
menu.

Test: make RunSettingsRoboTests
      check UI manually
Bug: 245624194
Change-Id: Ifbb76e124142ae843ce90bd604ae8417d65fcc7b
2022-11-09 18:21:42 -08:00
Shen Lin
e8a0ba688b Fix potential crash in AppAllServicesPreferenceController
This CL contains two fixes:

- Fix potentialcrash when calling getAvailabilityStatus, we should use
  the latest packageName to decide.

- Add test class

Bug: 258270151
Test: atest
Change-Id: I3e6aa7e0773a73d2e3dfa996e42087f3ec80627b
2022-11-10 10:18:14 +08:00
Kweku Adams
d7194ad75d Set package name.
The system expects an actual package name in the ApplicationInfo object
so make sure to set it in the test object.

Bug: 258472566
Test: atest AppButtonsTest
Change-Id: I3bee07a6a395c9962af57f934cf3ca86eb60354a
2022-11-09 20:57:23 +00:00
Tetiana Meronyk
19fcb87e39 Hide "Add user" button for secondary user
Bug: 258447375
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest" && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.MultiUserSwitchBarControllerTest"

Change-Id: I5f0fd25fb9f710f7311275b2a840663f2bf3eeab
2022-11-09 19:35:32 +00:00
Bonian Chen
d3b35f24f0 [Settings] Hide data usage when SIM support is turn OFF
Enable the UI control through configuration.

Bug: 240515161
Test: local, auto test
Merged-In: I5e49a2b0f2b563b426354f4d2e6e650dcc02c98b
Merged-In: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
Change-Id: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
2022-11-09 10:52:35 +00:00
Zaiyue Xue
866203a3b8 Fix b/257404630 Inconsistent strings in battery chart
Change all the "from last full charge" to "since last full charge".

Bug: 257404630
Fix: 257404630
Test: presubmit
Change-Id: Ib316e9fecac60f388e2b1810de9a65c540c52358
Merged-In: Ib316e9fecac60f388e2b1810de9a65c540c52358
2022-11-09 02:39:22 +00:00
Kuan Wang
d81a6ceefd Remove unnecessary check canScheduleExactAlarms() as Settings always
has the permission.

Test: make RunSettingsRoboTests
Bug: 256123455
Change-Id: I5089494164581465da9533671fc414c7bee1196f
2022-11-09 01:25:10 +00:00
Hao Dong
1fc440a8b5 Merge "Fix the flicker of FingerprintSettings before FingerprintEnrollIntro." 2022-11-08 20:40:10 +00:00
Bonian Chen
0952e39d7a [Settings] Hide data usage when SIM support is turn OFF
Enable the UI control through configuration.

Bug: 240515161
Test: local, auto test
Change-Id: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
2022-11-08 08:54:36 +00:00
changbetty
c706aa6108 Make bluetooth switch not discoverable via SliceDeepLinkTrampoline
Bug: 244423101
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDashboardFragmentTest
Test: manual test by test apk

Change-Id: I13562d227e06627fac33239a9d21fd405a18d012
2022-11-08 08:50:29 +00:00
Zaiyue Xue
1cf801e793 Fix b/257404630 Inconsistent strings in battery chart
Change all the "from last full charge" to "since last full charge".

Bug: 257404630
Fix: 257404630
Test: presubmit
Change-Id: Ib316e9fecac60f388e2b1810de9a65c540c52358
2022-11-08 10:43:35 +08:00
Bonian Chen
af614b823a [Settings] enhancing data saver config control
Enhancing the control of R.bool.config_show_data_saver when false, which including:
1. Initial presentation is invisible
2. Leaving UI when triggered
3. Avoid from getting searched
4. Robolectric test case support

Bug: 243877672
Test: test cases and local testing
Change-Id: I909522c0244ebb012a27d6aff34120a4f90128c6
2022-11-07 10:11:17 +00:00
Tetiana Meronyk
61d661feb9 Merge "Disable toggle on managed device with "Disallow add user" or "Disallow switch user"" 2022-11-07 09:27:30 +00:00
TreeHugger Robot
e09381cf36 Merge "Remove Fix connectivity menu for guest" 2022-11-07 08:41:30 +00:00
Wesley Wang
5664ebc351 Merge "Add BatteryHistoricalLogUtil class" 2022-11-07 03:08:17 +00:00
Bonian Chen
af96b1ea7a Merge "[Settings][Back port] configuration for hidding SIM lock UI" into tm-qpr-dev 2022-11-07 02:05:50 +00:00
Bonian Chen
15f0cd6428 Merge "[Settings][Back port] configuration for hidding SIM remove UI" into tm-qpr-dev 2022-11-07 02:05:50 +00:00
Bonian Chen
ab2e7bf6a5 Merge "[Settings][Back port] configuration for hidding SIM provider UI" into tm-qpr-dev 2022-11-07 02:05:50 +00:00
Bonian Chen
0eab03a862 Merge "[Settings][Back port] configuration for hidding SIM settings UI" into tm-qpr-dev 2022-11-07 02:05:50 +00:00
Bonian Chen
0b80576a34 Merge "[Settings][Back port] configuration for hidding SIM related UI" into tm-qpr-dev 2022-11-07 02:05:50 +00:00
Bonian Chen
3423f0cb9b Merge "[Settings] configuration for hidding SIM notification UI" into tm-qpr-dev 2022-11-07 02:05:50 +00:00
Arc Wang
c8fd92dc66 Remove Intent selector from 2-pane deep link Intent am: dd7d2d766a am: 923ba5fcb2 am: 5292e9e085 am: 76f12ccdca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20349285

Change-Id: I695908089058699e6cea14385c4261a69e821159
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-06 06:23:27 +00:00
Arc Wang
76f12ccdca Remove Intent selector from 2-pane deep link Intent am: dd7d2d766a am: 923ba5fcb2 am: 5292e9e085
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20349285

Change-Id: Icb4fc96a1fe5903b7d09157d552c6782b6db2036
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-06 05:56:25 +00:00
Arc Wang
5292e9e085 Remove Intent selector from 2-pane deep link Intent am: dd7d2d766a am: 923ba5fcb2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20349285

Change-Id: I66b28ac40ee6c50c10e51cff6844c17f91ac5e00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-06 05:26:26 +00:00
Arc Wang
923ba5fcb2 Remove Intent selector from 2-pane deep link Intent am: dd7d2d766a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20349285

Change-Id: I766b9fa3ccd6c7d690275292b84efbddb19c651e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-06 04:23:18 +00:00
Weng Su
79c1439361 Remove Fix connectivity menu for guest
- Don't add the Fix connectivity menu if the user is a guest.

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

Change-Id: I42fbd4b931dfaaf42b9319d1085848405db9e1be
2022-11-04 22:54:13 +08:00
Wesley Wang
d90026d184 Add BatteryHistoricalLogUtil class
- Impl optimize mode log mechanism to record optimize setup flow
 - Log optimize action with MANUAL, APPLY, RESET and RESTORE
 - Use proto file to serialize logs
 sample result: https://screenshot.googleplex.com/5KPrHVGb4pMvS7V.png

Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I879663de4cf45d0cfb9cd7eee957eeb65addfbe1
2022-11-04 18:09:11 +08:00
TreeHugger Robot
cbdc66b767 Merge "Remove BatteryFixSlice as it's not used" 2022-11-04 09:06:05 +00:00
TreeHugger Robot
6fc971363b Merge "Add unaudited exported flag to exposed runtime receivers" 2022-11-04 08:13:28 +00:00
Bonian Chen
bf55048799 [Settings][Back port] configuration for hidding SIM related UI
Add overriable configuration for hidding SIM related UI.

Bug: 240515161
Test: test cases and local testing
Merged-In: I8d7ddd18861a696830da39f040dfb14b9ed46726
Merged-In: I45b7898da440c36045aec64a0a86fb804116cd9d
Change-Id: I709a8007362b09dbb1ec1bd5d32c68d23ed0cfa9
(cherry picked from commit 2b048b22f0)
2022-11-04 07:06:23 +00:00
Wesley Wang
8deb159e35 Fix app battery usage list launch incorrect works app
- App usage page only use package name to launch the page, it can not
   identify the different userId between normal app and work profile
   app, add extra userId info into launch args
 - Remove no battery usage state/string if usage time is empty

Bug: 251471047
Test: make SettingsRoboTests
Change-Id: Id06ebb0f0fcd863e423acd7839f89bc0ae2444c1
Merged-In: Id06ebb0f0fcd863e423acd7839f89bc0ae2444c1
2022-11-04 06:05:55 +00:00
William Escande
07a8681f85 Merge "Fetch currently loaded bluetooth name" into tm-qpr-dev am: a364c8bacb am: dabdd6faa9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20378665

Change-Id: Ib66d0ba56cf9e4d12745673536208eb7cfef931a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 05:26:50 +00:00
William Escande
dabdd6faa9 Merge "Fetch currently loaded bluetooth name" into tm-qpr-dev am: a364c8bacb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20378665

Change-Id: Id9ddd49d48825e90f8414360363ad85a0a5068cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 04:55:28 +00:00
Yi-Ling Chuang
e3fcf1f082 Remove BatteryFixSlice as it's not used
The BatteryFixSlice hasn't been used for a while, and it's introducing
memory leaks due to a design change at the framework's end. Hence,
remove it.

Bug: 245385410
Test: robotests
Change-Id: I517cab71a32613d5cb5fcd3beb991a24926a2902
2022-11-04 12:22:56 +08:00
William Escande
723df89aaa Fetch currently loaded bluetooth name
Test: m
ROBOTEST_FILTER="BluetoothMaxConnectedAudioDevicesPreferenceControllerTest"
RunSettingsRoboTests -j40

Test: m ROBOTEST_FILTER="com.android.settings.bluetooth" RunSettingsRoboTests
Test: Open developer settings
Bug: 257158801
Change-Id: Ib40a6264d8d6908103d76b6401ddcfd3ffa7dd88
2022-11-04 03:05:41 +00: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
2552ae08ae Merge "Read flag to show/hide notification slider" into tm-qpr-dev 2022-11-03 15:57:37 +00:00