Commit Graph

18366 Commits

Author SHA1 Message Date
Treehugger Robot
71a123db03 Merge "Only one channel is reserved for WifiP2pSettings" am: 4444a35bcf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2309227

Change-Id: Ib9f5b095b2a69139ace91d319e9e649ac8948ed0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 00:09:36 +00:00
Treehugger Robot
4444a35bcf Merge "Only one channel is reserved for WifiP2pSettings" 2022-11-29 23:44:22 +00:00
Alejandro Nijamkin
8eef47d0cc Brings back "Control from locked device" setting.
In ag/20427460, we made ControlsTrivialPrivacyPreferenceController, which controls this setting, be UNSUPPORTED_ON_DEVICE if customizable lock screen quick affordances are enabled.

This wrongly removes this setting from the Settings app and there is no new UI where the user can control that anymore. What this means is that, once users upgrade to an Android build with our feature, they will forever be stuck with whatever they last chose for "Control from locked device".

This CL brings that back but changes the behaviour a bit such that, if
the quick affordances feature is enabled, this setting is never
disabled.

Fix: 260722836
Test: Unit tests added. Manually verified that the setting is visible
and enabled if the feature is enabled, even if the current selection
does not include the Home quick affordance and that if the feature is
off, the setting is visible but disabled if the main setting is off (old
behaviour unchanged).

Change-Id: I2e53123b3b7a2896699aeaa13b0c7d5a1c8a9c92
2022-11-29 12:17:13 -08:00
ykhung
e77b5bbecb Replace the getBatteryLevel() method from SettingsLib API
Bug: 260524172
Test: presubmit
Change-Id: Icb56abd3dc258dde142a956124dc12bbfd9ae889
2022-11-30 00:22:19 +08:00
Zhenwei Chen
07d208dfb1 Clean up useless defender dialog code
Test: Unit test passed
Bug: 260687359
Merged-In: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Change-Id: If3cbe4072c891f1af6b5aa4fb624e4e486c78ad6
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit a725bac68c)
2022-11-29 10:31:45 +00:00
Zhenwei Chen
1d72ff642c Add dock defender battery tips
1. Remove the dock defender v1 code
2. Add dock defender battery tips and update
   corresponding list item string

Bug: 260687359
Test: Unit test passed and manual test on device
Merged-In: Ib6c09df056744142f42f5e2a13252b58e54c7534
Change-Id: Ib6c09df056744142f42f5e2a13252b58e54c7534
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 8d11d9ceea)
2022-11-29 10:31:37 +00:00
Zhenwei Chen
72a892754d Fix LoaderCallback.onLoadFinished uncalled issue
When two loaders started almost at the same time,
it is possible onLoadFinished is never called.

Bug: 260687359
Test: Unit tests passed and manual test on device
Merged-In: I41a041d5878f9930db44775408380d0d4588faba
Change-Id: I41a041d5878f9930db44775408380d0d4588faba
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
(cherry picked from commit 41ce87729e)
2022-11-29 10:29:59 +00:00
Kuan Wang
20f6b1faaa Merge "Populate new fields foreground_service_usage_time_in_ms, foreground_usage_consume_power, foreground_service_usage_consume_power, background_usage_consume_power and cached_usage_consume_power into database and pass them to UI." 2022-11-29 06:52:08 +00:00
Chaohui Wang
1b9e346fa9 Merge "Reduce flaky of AppStoragePreferenceTest" 2022-11-29 04:10:00 +00:00
Kuan Wang
53a761f55b Populate new fields foreground_service_usage_time_in_ms,
foreground_usage_consume_power, foreground_service_usage_consume_power,
background_usage_consume_power and cached_usage_consume_power into
database and pass them to UI.

Test: make RunSettingsRoboTests + manual
Bug: 256123455
Bug: 258124768
Change-Id: Ic46032f67eff5898f9d4182c517bbebe478eca01
2022-11-29 11:42:26 +08:00
Zhenwei Chen
2ca0fb13a3 Merge "Add dock defender battery tips" 2022-11-29 02:53:27 +00:00
Arc Wang
3479ab56a3 Merge "Settings 2-pane deep link vulnerabilities" 2022-11-29 02:11:14 +00:00
Chaohui Wang
18f8143cae Merge "Add tests for PackageInfoPresenter" 2022-11-29 02:06:36 +00:00
Jing Ji
1439ba4200 Merge "Add a developer option to disable app child process restrictions" 2022-11-28 19:03:41 +00:00
DingFei Song
42ee738f1b Only one channel is reserved for WifiP2pSettings
Every time we enter WifiP2pSettings, a channel will be created,
but we should keep only one channel if p2p connected.

Bug: 259364357

Change-Id: Ie3c1b1281d74332cd5df720fb13476097f3f5df9
Merged-In: I999b108bc3e3c22519398a55b503078c1069cef1
Signed-off-by: DingFei Song <v-dingfeisong@xiaomi.corp-partner.google.com>
2022-11-28 18:29:00 +00:00
Quang Luong
687854f908 Merge "Make P2P Settings channel static" 2022-11-28 18:27:28 +00:00
Arc Wang
c3141fa911 Settings 2-pane deep link vulnerabilities
Settings app must not start an deep link Activity if
1. The deep link Activity is not exported.
or
2. Calling package does not have the permission to
   start the deep link Activity.

Bug: 250589026
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
2022-11-29 00:10:36 +08:00
Arc Wang
23412ad94a Settings 2-pane deep link vulnerabilities
Settings app must not start an deep link Activity if
1. The deep link Activity is not exported.
or
2. Calling package does not have the permission to
   start the deep link Activity.

Bug: 250589026
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsHomepageActivityTest
Change-Id: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
Merged-In: I9a3bddfa5d9d1d2e924dd6f3e5e07dca6c11664f
2022-11-29 00:05:09 +08:00
Ankita Vyas
3bdedc2add Merge "AppClone: Changes to display app list on Cloned Apps page." 2022-11-28 15:41:37 +00:00
Angela Wang
2dae64205a Merge "Unifies constants accross hearing aid related profiles (2/2)" 2022-11-28 14:26:43 +00:00
Chaohui Wang
a43b2b5df4 Reduce flaky of AppStoragePreferenceTest
Summary is async so wait for it.

Bug: 236346018
Test: Unit test
Change-Id: I80a3409008c2c42eda10e9e9711d9da15d533ba9
2022-11-28 21:12:18 +08:00
Ben Murdoch
f526772dcd Merge "Revert "[Settings] configuration for hidding SIM settings UI"" am: 39d6e92554 am: 48dc0133ce
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2319949

Change-Id: I4edb11e2c2c71cc7ec4ff7b82ad18a3d6d5471d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 12:50:29 +00:00
Chaohui Wang
6d19ecdb5a Add tests for PackageInfoPresenter
Bug: 236346018
Test: Unit test
Change-Id: Id5e52b6be551044b4b026fb171292decb9ef946f
2022-11-28 20:31:27 +08:00
Ben Murdoch
48dc0133ce Merge "Revert "[Settings] configuration for hidding SIM settings UI"" am: 39d6e92554
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2319949

Change-Id: I7647c859fe8196e0af0e5c2871918f0940a9fe0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 12:25:02 +00:00
“Ankita
d3019d3ee0 AppClone: Changes to display app list on Cloned Apps page.
- Filers app list
- Displays preference summary
- Display two-target view
- Display header text
- Metric for cloned app page
- Adds bridge class
- Disable "Show system" option

Bug: 259021576
Bug: 249916469
Test: make RunSettingsRoboTests -j64
Change-Id: Idcf213325ead9e298eb3e958b286adcd4c06c8d5
2022-11-28 11:58:19 +00:00
Chaohui Wang
d85cb3e009 Merge "Fix flicker of AppButtons" 2022-11-28 11:54:12 +00:00
SongFerng Wang
6e5b8e4748 Merge "Move the auto data switch preference into DDS sim" 2022-11-28 11:21:40 +00:00
Bonian Chen
590abcbbf2 Revert "[Settings] configuration for hidding SIM settings UI"
This reverts commit 6477275296.

Reason for revert: Build breakage

Log: https://android-build.googleplex.com/builds/branches/aosp-main-16k-throttled/grid?head=9340544&tail=9338589

Bug: 240515161
Merged-In: If1df99a79e51125d03f534cdfc9408b01c61024f
Change-Id: Ife727bc8b8bddafb58eed0d13d5d19fd1bf0a43e
2022-11-28 11:08:25 +00:00
Zhenwei Chen
8d11d9ceea Add dock defender battery tips
1. Remove the dock defender v1 code
2. Add dock defender battery tips and update
   corresponding list item string

Bug:256523472
Test: Unit test passed and manual test on device
Change-Id: Ib6c09df056744142f42f5e2a13252b58e54c7534
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
2022-11-28 17:45:51 +08:00
Angela Wang
416b5bd63f Unifies constants accross hearing aid related profiles (2/2)
Hearing aid constants defined differently across different hearing aid
related profiles. For hearing aid device mode, HearingAidProfile and
HapClientProfile have different values for mode definition and there is also
a new BANDED hearing aid type in HapClientProfile spec. For hearing aid
device side, HearingAidProfile has only 2 kinds of side which is left
and right whereas BLE hearing aid can retrieve 27 different kinds of
audio location.

We therefore introduce a new class HearingAidInfo for mapping these
different constants across these profiles into a single unified set of
constants.

Bug: 253192350
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Change-Id: Id14928dbc051fcf76fe0d66b43aefefb1b5f7baf
2022-11-28 09:03:37 +00:00
Bonian Chen
011cdf6ef0 Merge "[Settings] configuration for hidding SIM settings UI" am: 697f570fad am: f7090ebbee
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2319109

Change-Id: I739f417c3d19b22bc102c9a1e0253692008bd370
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 08:50:08 +00:00
Chaohui Wang
d70dbe408a Fix flicker of AppButtons
Also remove check for isSystemModule(), since it's also covered by
AppUtils.isMainlineModule().

Bug: 236346018
Test: Unit test
Test: Manually with Settings
Change-Id: Icf8245145a2b2af98847db6040b9e5e930788d4f
2022-11-28 16:30:37 +08:00
Chaohui Wang
d2378be135 Merge "Add restriction to AppInfoSettingsMoreOptions" 2022-11-28 08:27:22 +00:00
Bonian Chen
f7090ebbee Merge "[Settings] configuration for hidding SIM settings UI" am: 697f570fad
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2319109

Change-Id: Iecaa9d4101864eaaeab0d5fc14277d39a9647682
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-28 08:24:30 +00:00
SongFerngWang
28ce6b9057 Move the auto data switch preference into DDS sim
Bug: 253698164
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AutoDataSwitchPreferenceControllerTest
Change-Id: I0aee5454e3a57a373b9eea2108c39335e4277f7b
2022-11-28 15:36:18 +08:00
Angela Wang
a6a7e029d7 Merge "Shows LE audio hearing aid device in a11y settings page (3/3)" 2022-11-28 07:16:25 +00:00
Kuan Wang
6e242c29a8 Merge "Use the field isFullChargeCycleStart in database to get the last full charge cycle start and remove the unused SharedPreference." 2022-11-28 06:44:42 +00:00
Chaohui Wang
2cc51c1685 Add ResetAppPreferences to AllAppListPage
Fix: 259520506
Test: Unit test
Test: Manually with Settings
Change-Id: I3cbd1171df7e6bfcac6b9ebf4901e36fc2d7b14f
2022-11-28 13:39:09 +08:00
Chaohui Wang
3b05ba6da8 Add restriction to AppInfoSettingsMoreOptions
The DISALLOW_APPS_CONTROL restriction.

Bug: 259492166
Test: Unit test
Test: Manually with Settings
Change-Id: Id92e36194201412a0d5cad71410c08508a3b8aaa
2022-11-28 13:30:57 +08:00
Ankita Vyas
932874130e Merge "Show apps from user and all of its profiles in recents category." 2022-11-28 05:09:35 +00:00
Kuan Wang
2b93d40683 Use the field isFullChargeCycleStart in database to get the last full
charge cycle start and remove the unused SharedPreference.

Test: make RunSettingsRoboTests + manual
Bug: 253553141
Change-Id: I74ef71775fa5d4871077f6d5573467aa5843bc6b
2022-11-28 11:27:24 +08:00
Chaohui Wang
bf26483af5 Merge "Reduce flaky of App Info tests" 2022-11-28 02:39:14 +00:00
Chaohui Wang
e62377a1e7 Reduce flaky of App Info tests
Bug: 236346018
Test: Unit test
Change-Id: If810ef57675b8fb3bab533360bb62cc41a8cc9d8
2022-11-26 21:04:45 +08:00
Vincent Wang
2687db5de2 Merge "Add test for FingerprintEnrollment" 2022-11-26 08:13:56 +00:00
Bonian Chen
6477275296 [Settings] configuration for hidding SIM settings UI
Hide SIM settings UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Merged-In: If1df99a79e51125d03f534cdfc9408b01c61024f
Change-Id: I13ae0909d0120039cdfe8298a6892195de2fb122
2022-11-25 22:57:50 +00:00
Jackson Michael
e55a53b067 Changing the process to create a new user
Creating a method to run in background the process to create a new user, and making the user check and change the UI in the main thread.

Also deleted the message of created user from the handler.

Bug:246906179
Test: Manual test and unit test fixed
Change-Id: Ifb3687937987f04165fd2e099d4334c7571bb034
2022-11-25 20:19:30 +00:00
Nikhil Kumar
b61949c841 Hide remove user option for main user in multi user settings
Added isMain() user check in UserDetailsSettings.initialize and
UserDetailsSettings.canDeleteUser to hide and restrict
delete user option for main user in multi user settings.

Added unit tests for the same.

Bug: 260200162

Test: Manual test on headless to check remove user option
is not visible for the main user.

Test: Run robo tests with this command:
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.users.UserDetailsSettingsTest"

Change-Id: Ia455611a3d0b1e0945f61f00658425b7bf6c2dae
2022-11-25 17:46:20 +00:00
Bonian Chen
b644c54256 [Settings][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: Ie00bdce2fad429f2ed343e1d7aea4967bcaddf5a
Merged-In: Ie61557590cdc15e2d03b1e71bbc78def2c60046a
Change-Id: I67166b0db08635ee2bc01a8208f96126b64fd0a7
2022-11-25 13:54:35 +00:00
Zhenwei Chen
41ce87729e Fix LoaderCallback.onLoadFinished uncalled issue
When two loaders started almost at the same time,
it is possible onLoadFinished is never called.

Bug: 256523472
Test: Unit tests passed and manual test on device
Change-Id: I41a041d5878f9930db44775408380d0d4588faba
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
2022-11-25 16:01:04 +08:00
Vincent Wang
bdebd9f346 Add test for FingerprintEnrollment
Bug: 259504907
Test: atest SettingsUITests:FingerprintEnrollmentTest
Change-Id: If7a8a7124b685f4517880517afc7f17b07c0ad29
2022-11-25 15:01:48 +08:00