Commit Graph

11312 Commits

Author SHA1 Message Date
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
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
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
4a3ff95367 Merge "Move GeoTZ toggle to Date&Time settings screen." into sc-dev 2021-03-11 14:04:01 +00: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
Salud Lemus
b687a9757c Merge "Remove default admin support message for an Enterprise device" into sc-dev 2021-03-10 00:21:37 +00:00
Abel Tesfaye
e604c56241 Merge "Fix for NPE in ScreenTimeoutSettingsTest" into sc-dev 2021-03-09 17:39:50 +00:00
Salud Lemus
52565ad5e9 Remove default admin support message for an Enterprise device
Bug: 182195172
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: Ie844eee14ff0cc6a1c2f9dd0485c865f4e5e3e72
2021-03-09 16:16:33 +00:00
TreeHugger Robot
be1b2f307d Merge "Fix the broken test on NetworkProviderSettingsTest" into sc-dev 2021-03-09 12:29:48 +00:00
Weng Su
78a5522879 Fix the broken test on NetworkProviderSettingsTest
- Mock the UserManager for restricted component

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

Change-Id: Ica5bfc8ecd0a7a786ec6fec439998696eed04266
2021-03-09 17:38:40 +08:00
TreeHugger Robot
3b477b13e1 Merge "Move injected services for work into a new page" into sc-dev 2021-03-09 04:25:18 +00:00
TreeHugger Robot
6535fe00c7 Merge "Fix battery level of earbuds bt devices is inconsistent" into sc-dev 2021-03-09 03:07:42 +00:00
Yu-Han Yang
b04a984813 Move injected services for work into a new page
Screenshots: http://shortn/_0BiBfpkHfh

Bug: 180533061
Test: on device
Change-Id: Ie488c80856b4c4cc67789b8239005f6001ed9d87
2021-03-08 13:31:34 -08:00
Salud Lemus
50527b1f63 Merge "Update Action Not Allowed Dialog text for a financed device" into sc-dev 2021-03-08 21:08:52 +00:00
Abel Tesfaye
a390dc9a42 Fix for NPE in ScreenTimeoutSettingsTest
Test: make RunSettingsRoboTests -j54 ROBOTEST_FILTER=ScreenTimeoutSettings

Bug: 182149244
Change-Id: I22e15c84fa6b0864d35f79df015f1d5b86dec24b
2021-03-08 21:06:26 +00:00
Salud Lemus
b45d87715a Update Action Not Allowed Dialog text for a financed device
Bug: 173826319
Bug: 158157476
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: Iefeb0b653764952e409dfd862d9cc54c4f5e7fc9
2021-03-08 19:06:13 +00:00
Hugh Chen
bbbae9af8a Fix battery level of earbuds bt devices is inconsistent
Before this CL, bluetooth settings update the battery level of earbuds
when receiving first pair status callback. But sometimes the callback
will not send immediately cause the battery level is inconsistent.

This CL will update the earbuds battery level when onResum() to refresh
battery level immediately.

Bug: 174929347
Bug: 159544311
Test: make -j42 RunSettingsRoboTests
Change-Id: I8505f8fed4ec821b9fa2d88bc437bddd7a30f0e2
2021-03-08 16:38:31 +08:00
Ahaan Ugale
fbddfeba11 Merge "OWNERS for autofill and assist settings." am: 7af352dc73 am: 6d5dc7b451 am: 3879729cd1
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1621607

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5f3f2d73b50b2eb91a94853e62350df72264686e
2021-03-08 07:49:18 +00:00
Ahaan Ugale
3879729cd1 Merge "OWNERS for autofill and assist settings." am: 7af352dc73 am: 6d5dc7b451
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1621607

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieb4accc78e211a45df173186defaca5634aa1b29
2021-03-08 07:06:26 +00:00
Trevor Black
c6a359a2a5 Merge "Add Extra App Info into Settings App UI." into sc-dev 2021-03-08 07:04:42 +00:00
Ahaan Ugale
1014194897 OWNERS for autofill and assist settings.
tests/unit/../autofill is empty here; new files are being added in the
internal repo.

Change-Id: Ia4aaa395b01147ee0597cca6075aae0121de7dd9
Test: n/a
2021-03-07 00:40:15 +00:00
Wesley Wang
783f1b1b56 Merge "Update Battery Settings main page (1/2)" into sc-dev 2021-03-05 11:23:39 +00:00
TreeHugger Robot
2aa8d2b437 Merge "Fix "USB tethering" doesn't work after reconnecting USB" into sc-dev 2021-03-05 09:53:05 +00:00
Wesley.CW Wang
280e3639cd Update Battery Settings main page (1/2)
- Rollback ag/13413813 to meet the design change
 - Regrouping the index
 Screenshots:
   https://screenshot.googleplex.com/85aPq9ArJMWjJV2.png
   https://screenshot.googleplex.com/8uiZ9KLKAHoJyrP.png

Bug: 177407113
Test: make RunSettingsRoboTests -j40
Change-Id: Ic3c16d985b7c5e98e6d1bbe4481c48eadd3e4078
2021-03-05 06:03:42 +00:00
SongFerng Wang
cc1715e2c0 Merge "Replace allowedNetworkTypes with allowedNetworkTypesForReason" am: 6775f40664 am: 29594edb70
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1614990

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8cde83c4699a3859c3a0748688ab0c0dc0fd5a04
2021-03-05 05:17:42 +00:00
SongFerng Wang
6775f40664 Merge "Replace allowedNetworkTypes with allowedNetworkTypesForReason" 2021-03-05 01:59:53 +00:00
TreeHugger Robot
dd6255a653 Merge changes from topic "jr_device" into sc-dev
* changes:
  Update NLS listing page
  Add device list to NLS pages
  Add icons to NLS mgmt page
2021-03-05 01:02:02 +00:00
Treehugger Robot
32d2075fa3 Merge "Keystore 2.0: Update Wifi settings to use mostly public keystore API." 2021-03-05 00:02:28 +00:00
Julia Reynolds
ddf1958bdc Update NLS listing page
- Organized by allowed/not allowed
- Include paired devices if there are any

Test: settings robotests
Fixes: 181125174
Change-Id: Id64ee0ebd9b40a92d54a03d92fec3ff0bb3b926d
2021-03-04 20:54:10 +00:00
Yi Jiang
c08943784c Merge "Adds 'more details' hyper link." into sc-dev 2021-03-04 18:11:11 +00:00
SongFerng Wang
1cb02f5e0d Merge changes Ia99a4cf4,Ib31e23b8 am: 191136002b am: d5ff766ed8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1618689

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I298f46dd7e44e63141b91ccdd67ea7ebbefc9015
2021-03-04 13:45:19 +00:00
SongFerngWang
959454f32a Use SubscriptionManager.getResourcesForSubId to get Resources am: 766f78e8ed am: 18c15a2545
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1618688

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2de84a9f2ee32569f71fd46fc87a448237147d02
2021-03-04 13:45:18 +00:00
SongFerngWang
fc435e3736 Replace allowedNetworkTypes with allowedNetworkTypesForReason
- Replace getAllowedNetworkTypes with
getallowedNetworkTypesForReason(ALLOWED_NETWORK_TYPES_REASON_CARRIER)
- Replace "Settings.Global.PREFERRED_NETWORK_MODE" with
"getAllowedNetworkTypesForReason(USER)"
- Move EnabledNetworkModePreferenceControllerTest from robotests to unit
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT
- Rename PreferredNetworkModeContentObserver to AllowedNetworkTypesListener
Bug: 161434786
Test: build pass.
(PASS)atest CdmaSystemSelectPreferenceControllerTest
(PASS)atest PreferredNetworkModePreferenceControllerTest
(PASS)atest AllowedNetworkTypesListenerTest
(PASS)atest EnabledNetworkModePreferenceControllerTest
(PASS)atest MobileNetworkUtilsTest

Change-Id: I2b981569ad11cf70a558c1952cc2e077464328d8
Merged-In: I2b981569ad11cf70a558c1952cc2e077464328d8
2021-03-04 19:20:04 +08:00
SongFerngWang
1ffba4af4e [Testcase] To migration DisabledSubscriptionControllerTest
1. Use AndroidJunit4 instead of RobolectricTestRunner
2. Use ApplicationProvider instead of RuntimeEnvironment
   to get context
3. Change Copy Right
4. remove the mock of PreferenceScreen

Bug: 173003522
Test: atest DisabledSubscriptionControllerTest.java
Change-Id: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67
Merged-In: Ia99a4cf4618fcb32162485e7da5e48e3b313ce67
2021-03-04 09:41:56 +00:00
SongFerngWang
766f78e8ed Use SubscriptionManager.getResourcesForSubId to get Resources
To support multi-SIM card case. The code uses the
SubscriptionManager.getResourcesForSubId to get Resources.

Bug: 171843666
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
EnabledNetworkModePreferenceControllerTest

Change-Id: Ib31e23b81bdbd3b5336b45fc73994f40d021718b
Merged-In: Ib31e23b81bdbd3b5336b45fc73994f40d021718b
2021-03-04 09:41:31 +00:00
Yi Jiang
bc6ec17120 Adds 'more details' hyper link.
Adds a 'more details' hyper link in the footer when options are disabled
by admin.

Test: make ROBOTEST_FILTER=ScreenTimeoutSettingsTest RunSettingsRoboTests
Bug: 180314728
Change-Id: I880ccd73f4b2ef0b695619ef42ec87559dc2b65b
2021-03-04 01:19:50 -08:00
SongFerng Wang
a0a079ed11 Merge changes I89162011,I110727b6,I1778832b am: cbc2c4f102 am: fa58b7e292
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1614988

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I68dd01db1ee41b4baf09338872edc8599d892f96
2021-03-04 07:41:45 +00:00
Hugh Chen
50fc7d15ef Fix "USB tethering" doesn't work after reconnecting USB
Before this CL, if users selects usb tethering option and
reconnects usb it would not start entitlement check.
Because we only start entitlement checks when users select it.

This CL will start entitlement checks when usb tethering option
is selected and reconnects usb.

Bug: 176037347
Test: make -j42 RunSettingsRoboTests
Change-Id: I3a2ad392a1cae9cf97355ef3cd4fb8c23de18673
2021-03-04 15:31:11 +08:00
Janis Danisevskis
e92bcb3287 Keystore 2.0: Update Wifi settings to use mostly public keystore API.
Test: N/A
Bug: 171305607
Bug: 171305388
Merged-In: Ib794c5f2d904c2b187d7d5fd00b81afc852d0052
Change-Id: Ib794c5f2d904c2b187d7d5fd00b81afc852d0052
2021-03-03 22:30:35 -08:00
SongFerng Wang
cbc2c4f102 Merge changes I89162011,I110727b6,I1778832b
* changes:
  Settings JUnit test for PreferredNetworkModeContentObserverTest
  [Testing] Use AndroidJUnit4 instead in telephony/cdma/ test files
  [Testing] Use AndroidJUnit4 instead in MobileNetworkUtilsTest
2021-03-04 06:17:31 +00:00
Yu-Han Yang
d0267d5f8d Merge "Add showSystem to RecentLocationAccess (Settings)" into sc-dev 2021-03-03 20:45:29 +00:00
Trevor David Black
d0d796c90b Add Extra App Info into Settings App UI.
Bug: b/174956516
Test: Settings -> Apps -> APP -> Extra App Info
Change-Id: Id978fb3569579f54b8399156d52c2ddeceb9bb91
2021-03-03 19:52:15 +00:00
Jeremy Goldman
3611c3e22f Settings JUnit test for PreferredNetworkModeContentObserverTest
Biggest difference here: the use of a MockContentProvider

Bug: 175389659
Test: atest -c PreferredNetworkModeContentObserverTest
Change-Id: I891620118f7e84aa1c7f9e0ccdaeb21a225dc31a
Merged-In: I891620118f7e84aa1c7f9e0ccdaeb21a225dc31a
2021-03-03 23:39:07 +08:00