Commit Graph

13273 Commits

Author SHA1 Message Date
Colin Cross
321f413343 Merge "resolve merge conflicts of d42d9a41f6 to sc-dev" into sc-dev 2021-03-17 21:43:07 +00:00
Dmitri Plotnikov
036dc189b6 Transition BatteryAppListPreferences to BatteryUsageStats API
Bug: 173745486
Test: make RunSettingsRoboTests
Test: male RunSettingsGoogleRoboTests

Change-Id: I7af8cbcd27433b89cb2184750c6854aa74761d0d
2021-03-17 13:23:25 -07:00
Janis Danisevskis
5cef487b4b resolve merge conflicts of d42d9a41f6 to sc-dev
Change-Id: Ifa6a4af09d7cd45773a8c057416ab90fac23061e
2021-03-17 19:09:29 +00:00
Oli Lan
a984be6fdb Add a setting to turn clipboard access notifications on/off.
This adds a new switch setting under Privacy to control whether
toast notifications are shown when an app accesses clipboard
(see b/179667029 for the clipboard access notification feature).

Bug: 179667029
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
"com.android.settings.privacy.ShowClipAccessNotificationPreferenceControllerTest"

Change-Id: Ibac7f31538ab3e4d2ec476cb8c05cbbd0c7e6d41
2021-03-17 17:54:30 +00:00
Dmitri Plotnikov
f941a684e1 Remove smearing of hidden BatterySipper power
Bug: 182598424
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.applications.appinfo.AppBatteryPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryUtilsTest

Change-Id: I78b8d7c4faafa83de198005617e99a7f54bcd174
2021-03-17 17:01:39 +00:00
TreeHugger Robot
60cc9e507b Merge "Encapsulate BatterySipper and BatteryConsumer in BatteryEntry" into sc-dev 2021-03-17 16:57:42 +00:00
Chiachang Wang
d507dc19b1 Replace hidden CM#isNetworkSupported() usage
It's a refactor work for connectivity mainline module. The
hidden methods access is no longer allowed, so the usage for
isNetworkSupported() should be replaced. Settings use it to
check if device support telephony, wifi or ethernet service.
There are alternative methods to check if device supports such
features. Replace as it is.

Bug: 172183305
Test: m ; make RunSettingsRoboTests
Change-Id: I8f1d11558b1be575a0777ed195abe027e838cb74
Merged-In: I8f1d11558b1be575a0777ed195abe027e838cb74
2021-03-17 15:22:40 +00:00
Chiachang Wang
6f41bb5722 Merge "Replace hidden CM#isNetworkSupported() usage" into sc-dev 2021-03-17 15:21:17 +00:00
jasonwshsu
9a5925c471 Remove half circle option in size selector
Half circle accessibility floating menu mode changed to be triggered from gesture.

cherry picked from commit c2057ae257

Bug: 173940869
Test: atest FloatingMenuSizePreferenceControllerTest
Change-Id: I123baaf3684d5cbb0a33fc2383da72aa022876c0
Merged-In: I123baaf3684d5cbb0a33fc2383da72aa022876c0
2021-03-17 23:05:37 +08:00
jasonwshsu
648811b2b4 Add the preference controller to control accessibility button fade preference
* Opacity preference will be disabled when fade is disabled

cherry picked from commit f9fdedaafe

Bug: 173940869
Test: atest AccessibilityButtonFadePreferenceControllerTest AccessibilityButtonOactiyPreferenceControllerTest
Change-Id: I1efd9760aa0287899cddd10ddd9a88a81ccc39ba
Merged-In: I1efd9760aa0287899cddd10ddd9a88a81ccc39ba
2021-03-17 23:01:36 +08:00
jasonwshsu
eb2411db9d Add the preference controller to control accessibility button preview preference
* Create FloatingMenuLayerDrawable class to handle the preview layer drawable

cherry picked from commit 603014760f

Bug: 173940869
Test: atest AccessibilityButtonPreviewPreferenceControllerTest FloatingMenuLayerDrawableTest
Change-Id: Ia3d030547b377e87c505b2310f559f7f3876ecd5
Merged-In: Ia3d030547b377e87c505b2310f559f7f3876ecd5
2021-03-17 23:00:39 +08:00
jasonwshsu
c72fe39597 Add the preference controller to control accessibility button opacity preference
cherry picked from commit c497c7aabe

Bug: 173940869
Test: atest FloatingMenuOpacityPreferenceControllerTest
Change-Id: I1fbe3157c93fef4611c3b9b13569c9b339e2898a
Merged-In: I1fbe3157c93fef4611c3b9b13569c9b339e2898a
2021-03-17 22:59:03 +08:00
jasonwshsu
0377025554 Add the preference controller to control accessibility button size preference
cherry picked from commit 04955b96ae

Bug: 173940869
Test: atest FloatingMenuSizePreferenceControllerTest
Change-Id: Ic206a940abde90641442df37a634c8cb3a345597
Merged-In: Ic206a940abde90641442df37a634c8cb3a345597
2021-03-17 22:57:50 +08:00
jasonwshsu
2dc32f63f8 Add the preference controller to control accessibility button location preference
cherry picked from commit 123464429d

Bug: 173940869
Test: atest AccessibilityButtonLocationPreferenceControllerTest
Change-Id: I49a23b2eb4e07e79afcefc5a148c23b06396ec1c
Merged-In: I49a23b2eb4e07e79afcefc5a148c23b06396ec1c
2021-03-17 22:57:05 +08:00
jasonwshsu
03dbb40d2b Setup basic layout and resources for the accessibility button settings page
cherry picked from commit 93ef33655c

Bug: 173940869
Test: atest AccessibilityButtonFragmentTest
Change-Id: I3f1d8b161d1baadeead36f49f18f00a91fd40b4c
Merged-In: I3f1d8b161d1baadeead36f49f18f00a91fd40b4c
2021-03-17 22:55:47 +08:00
SongFerngWang
0c86903ec6 Moving the error messages from slice to panel's subtitle
Bug: 180888831
Test: atest ProviderModelSliceTest
atest ProviderModelSliceHelperTest
atest NetworkProviderWorkerTest
atest InternetConnectivityPanelTest
make RunSettingsRoboTests -j

Change-Id: I4572c8ad15effab0c95feaeac6a99f5aaabf6f90
2021-03-17 22:49:31 +08:00
SongFerngWang
2166de23f3 Change the behavior of notifyAllowedNetworkTypesChanged.
Bug: 180903931
Test: atest AllowedNetworkTypesListenerTest.java
Change-Id: Ic94816415920bf25896ef2b198e228f369039c94
Merged-In: Ic94816415920bf25896ef2b198e228f369039c94
2021-03-17 21:20:21 +08:00
Yanting Yang
e4b3b969db Fix NPE of AppVersionPreferenceController
Add null check for the package info before getting the version name.

Fixes: 168333280
Test: robotests & manual
Change-Id: If2e3d220c520d30e932478836ee2ea89f936d55c
2021-03-17 20:34:14 +08:00
TreeHugger Robot
c7d3c5f1be Merge "[Settings] Use TelephonyManasger.registerTelephonyCallback instead of TelephonyManager.listen" into sc-dev 2021-03-17 10:30:48 +00:00
Chiachang Wang
ffbe4e9b1e Replace hidden CM#isNetworkSupported() usage
It's a refactor work for connectivity mainline module. The
hidden methods access is no longer allowed, so the usage for
isNetworkSupported() should be replaced. Settings use it to
check if device support telephony, wifi or ethernet service.
There are alternative methods to check if device supports such
features. Replace as it is.

Bug: 172183305
Test: m ; make RunSettingsRoboTests
Change-Id: I8f1d11558b1be575a0777ed195abe027e838cb74
2021-03-17 15:21:43 +08:00
Ivan Chiang
d01c81e483 Add Media Management Apps activity in Special App Access
Add a settings page to control the permission MANAGE_MEDIA in Special
App Access. Apps can launch it by ACTION_REQUEST_MANAGE_MEDIA.

Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=MediaManagementAppsDetailsTest
Test: m -j RunSettingsRoboTests
Test: manual
Bug: 181112025
Change-Id: Id7587cf179b8c5adbfd6477ca9c2d4a20a9852bb
2021-03-17 14:36:20 +08:00
Edgar Wang
0c914077aa Merge "Change packagename of TwoTargetPreference" into sc-dev 2021-03-17 05:08:21 +00:00
Peter Wang
2404806afb Fix coding styles for erase euicc only options
Bug: 159650638
Test: Build
Change-Id: I08bb8d9f73dbe6b9f18f36c45ae7652b36d422b2
2021-03-16 18:09:49 -07:00
Rajeev Kumar
815558188f Merge "Undo making Image icon's visibility to GONE in Action Not Allowed Dialog for a financed device" into sc-dev 2021-03-16 16:50:02 +00:00
Bonian Chen
d42d9a41f6 Merge "[Settings] Code refactor - remove unused import lines" am: d248042a02 am: c27980c1a9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1639941

Change-Id: I8efdc871c29a6c56aacf7a1b553a20c9cafc765d
2021-03-16 14:45:42 +00:00
Weng Su
68b0057f66 Smart Router settings UI changes
- Remove "AP band" preference

- Add "Maximize Compatibility" switch preference
  - Use bridged mode API for new devices (after P21)

- Screenshot:
  https://screenshot.googleplex.com/84X9Av8gVj3idjB

Bug: 168052744
Test: manual test
atest WifiTetherMaximizeCompatibilityPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: Ib74156c0fa6eccdd13239854047b1fb4e49a293c
2021-03-16 21:50:55 +08:00
Bonian Chen
203f0fe89d [Settings] Code refactor - remove unused import lines
Remove some unused import lines within source code based on
https://source.android.com/setup/contribute/code-style

Bug: 182867979
Test: build pass
Change-Id: I76dbcfa9e5b435b2838401dfee15b12f472d07d0
2021-03-16 10:24:24 +00:00
Zhen Zhang
48bd52e091 Update settings for app hibernation
Created an preference in Apps & Notifcations page as the entry point for
apps that are hibernated. Also added a switch preference in AppInfo page
for users to exempt an app from hibernation.

Bug: 181172051
Test: HibernatedAppsPreferenceControllerTest;
HibernationSwitchPreferenceControllerTest;
AppInfoDashboardFragmentTest

Change-Id: I72a90ab391cd521150fc155a6d9c67c846b7360d
2021-03-15 21:34:46 -07:00
Salud Lemus
0e0247e5e4 Undo making Image icon's visibility to GONE in Action Not Allowed Dialog for a financed device
Bug: 182839352
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: I42bb9ce9a624fa20cd755af2d323b4c4f94048f7
2021-03-16 01:42:07 +00:00
Abel Tesfaye
e12ad9777e Merge "Fix auto-rotate summary not updating on devices without smart-auto-rotate" into sc-dev 2021-03-15 16:27:16 +00:00
tim peng
28d9db3c86 Merge "Show advanced Bluetooth information in device detail page" into sc-dev 2021-03-15 05:26:45 +00:00
Tim Peng
90df1c9de1 Show advanced Bluetooth information in device detail page
-Apply new metadata on aosp/1596412

Bug: 182338346
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsHeaderControllerTest
make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest

Change-Id: Ic48ed9213111d0c6ec19b317d4c22e1400261706
2021-03-15 10:16:14 +08:00
TreeHugger Robot
70e508edd4 Merge "Fix bluetooth settings will broadcast to anywhere when some cases" into sc-dev 2021-03-15 01:53:00 +00:00
Dmitri Plotnikov
656c67c01d Encapsulate BatterySipper and BatteryConsumer in BatteryEntry
Bug: 173745486
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryEntryTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.AdvancedPowerUsageDetailTest

Change-Id: I67ab825c25b85012b5713736db62e0beb4d98a16
2021-03-13 12:51:47 -08:00
Abel Tesfaye
e57c87528d Fix auto-rotate summary not updating on devices without smart-auto-rotate
Test: locally with crosshatch

Bug: 181585193
Change-Id: I571b10556ff2f4f4d6ff960fcfdf7866405d5ee5
2021-03-13 02:14:57 +00:00
TreeHugger Robot
38e0dae439 Merge "Transition BatteryInfo and BatteryUtils to BatteryUsageStats API" into sc-dev 2021-03-12 23:52:00 +00:00
Dmitri Plotnikov
820bee81d6 Transition BatteryInfo and BatteryUtils to BatteryUsageStats API
Bug: 173745486
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryHistoryPreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoLoaderTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.batterytip.detectors

Change-Id: I469ff8b88aa3307422c02f51943df4ef1759db56
2021-03-12 14:08:42 -08:00
SongFerng Wang
516042b160 Merge "Change the behavior of notifyAllowedNetworkTypesChanged." into sc-dev 2021-03-12 18:49:49 +00:00
Zoey Chen
b8a639f8fd [Settings] Use TelephonyManasger.registerTelephonyCallback instead of TelephonyManager.listen
Bug: 175270951
Test: make and atest
Change-Id: I15e1a199e6a34914db97055bfea9392c5bbdc9c6
2021-03-12 19:27:05 +08:00
TreeHugger Robot
cba72ddc2e Merge "[Provider Model] Adjust slice title and subtitle" into sc-dev 2021-03-12 10:19:26 +00:00
Weng Su
d0e98010c4 Merge "[Provider Model] Update Airplane mode message" into sc-dev 2021-03-12 07:04:52 +00:00
Hugh Chen
9d00364da4 Fix bluetooth settings will broadcast to anywhere when some cases
BluetoothPermissionActivity and DevicePickerFragment will send
broadcast to return the result to calling apps. As this broadcast
intent is from Settings with uid 1000, it will be sent to any
protected BroadcastReceivers in the device. It can make an attacker
send broadcast to protected BroadcastReceivers like factory reset intent
(android/com.android.server.MasterClearReceiver) via
BluetoothPermissionActivity or DevicePickerFragment.

This CL will compare to calling package name with launch package name.
If they are not equal, the broadcast will not send to launch package name.

Bug: 179386960
Bug: 179386068
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify factory reset not started and no system UI notification.

Change-Id: Ib8a5acde663e875912d300dd4912c4e9416f02f1
2021-03-12 14:56:57 +08:00
Weng Su
8ce423cdd2 [Provider Model] Update Airplane mode message
- Show Airplane mode message when Airplane mode is enabled

- Show the same message whether Wi-Fi is enabled or disabled

- Screenshot:
  https://screenshot.googleplex.com/9FgqG7WWskRLZxo
  https://screenshot.googleplex.com/4g4kvnAT6aYN57s

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

Change-Id: I3cb5a8bc7cb4d1e8678eb6d75116effd00ac9432
2021-03-12 11:49:46 +08:00
TreeHugger Robot
9086ed36a8 Merge "Fallback to AOSP eSOS settings page if OEM impl fails" into sc-dev 2021-03-11 22:37:50 +00:00
Fan Zhang
9fdceaea78 Fallback to AOSP eSOS settings page if OEM impl fails
When OEM eSOS implementation fails for any reason (app disabled,
misconfigured, etc), Emergency SOS settings should fallack to the
default settings page (rather than hiding the setting entirely)

Bug: 180959553
Test: robotests
Change-Id: I31c08449eff3f01d4c33bf827023f17beade93c2
2021-03-11 20:30:55 +00:00
Almaz Mingaleev
a29a6ceab4 Fix imports in LocationTimeZoneDetectionPreferenceController.
Capabilities are extracted to separate class to reuse them
in time API.

Bug: 172891783
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Change-Id: If7351c4f022c69262ddffd26efacd449dc7238c5
2021-03-11 17:58:26 +00:00
Almaz Mingaleev
4a3ff95367 Merge "Move GeoTZ toggle to Date&Time settings screen." into sc-dev 2021-03-11 14:04:01 +00:00
Ahaan Ugale
e9355553ee Merge "AF: Unit tests for PasswordsPreferenceController." into sc-dev 2021-03-10 20:08:08 +00:00
Weng Su
6a0ef56917 [Provider Model] Adjust slice title and subtitle
- Show "Airplane mode" title when airplane mode is enabled

- Remove "Airplane mode is on" subtitle

- Show "Wi-Fi is turned on" subtitle when both airplane mode and Wi-Fi
is enabled

- Remove the function related to isApmNetworksAvailable()

- Screenshot:
  https://screenshot.googleplex.com/6X9nzmXRCUfw4Lp
  https://screenshot.googleplex.com/6jQryMjU2yDDpmM

Bug: 181858434
Test: manual test
atest -c InternetConnectivityPanelTest \
         InternetPreferenceControllerTest \
         InternetUpdaterTest

Change-Id: I84e5d4c60ed91d58443b27c35286a84bf72ac173
2021-03-10 22:34:35 +08:00
Almaz Mingaleev
ab05918e08 Move GeoTZ toggle to Date&Time settings screen.
Previous sub-menu is deleted.

Toggle is always enabled and shows current configuration
setting. If MLS or auto time zone detection is off,
the toggle has not effect.

Bug: 152746236
Test: toggled and checked dumpsys time_zone_detector
Test: checked summary info on different MLS/set time zone automatically
states combinations
Test: m -j30 RunSettingsRoboTests
ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"

Change-Id: I75ee41cfcaaf34b1b63e18809be4cd614446017d
Merged-In: I75ee41cfcaaf34b1b63e18809be4cd614446017d
2021-03-10 11:07:36 +00:00