Commit Graph

12975 Commits

Author SHA1 Message Date
Tsung-Mao Fang
010ab29eb1 Night display setting should be toggleable
Based on Android S design, we want to let user can toggle
night light in display settings page directly.

1. Use primary switch preference in xml file.
2. Add a switch toggle controler for its preference.
3. Move logic of night display preference to controler.
4. Remove the night display preference since we migrate the logic to
controller.

Test: Night display works as intented behavior.
Bug: 174964139
Change-Id: Id920033cb22b1a9dd42c77c6fc2563ddae96bfcd
2021-01-05 17:55:37 +08:00
Stephane Lee
b60870cb7d Add adaptive charging to the top level settings menu
Bug: 172009945
Test: Trigger adaptive charging and verify string in menu
Change-Id: Iba2d81e779e2b4aaa3c7b7c38710a03c6792c4a9
2021-01-04 15:37:21 -08:00
TreeHugger Robot
6653b25aaa Merge "Revert "Add Hotspot WPA3 Settings"" 2021-01-01 00:00:47 +00:00
bsears
598ab32345 Revert "Add Hotspot WPA3 Settings"
This reverts commit e0062af10c.

Reason for revert: Bug 176569060 - Droidfood blocking crash in Settings app.

Change-Id: Id50c96e8ce704b19e5ffb9b9a9fcbb0db2d81aee
2020-12-31 21:16:51 +00:00
Jason Hsu
2e01c93c45 Merge "Extract magnification capabilities from MagnificationSettingsFragment into a new class." 2020-12-31 09:04:14 +00:00
Peter Kalauskas
0fa7edbb02 Update icons and text for guest user
Test: As Guest, open Settings > System > Multiple users
Test: As Owner, open Settings > System > Multiple users
Bug: 169783558
Change-Id: I42c0b46fd895267b7556f3f308957b6dd17d92c4
2020-12-30 17:43:14 -08:00
jasonwshsu
f30eded170 Extract magnification capabilities from MagnificationSettingsFragment into a new class.
* To increase single responsibility of MagnificationSettingsFragment

Bug: 168567356
Test: atest MagnificationCapabilitiesTest
Change-Id: Ic5e8a556858ac2b6ab9929b1bbdc373ce320c270
2020-12-30 19:40:43 +08:00
Weng Su
b6a5141953 Merge "Add Hotspot WPA3 Settings" 2020-12-30 03:09:00 +00:00
TreeHugger Robot
65ced1482d Merge "Revert "Add adaptive charging to the top level settings menu"" 2020-12-29 20:08:25 +00:00
Daniel Chapin
2f51836ca1 Revert "Add adaptive charging to the top level settings menu"
Revert submission 12989357-fix_ac_menu

Reason for revert: Bug: 176473169
Reverted Changes:
I6fc50a5ae:Add adaptive charging to the top level settings me...
I8f600287c:Add adaptive charging to the top level settings me...

Change-Id: I2928a96112bb8d2beeb071f231af6595edead4fa
2020-12-29 17:55:13 +00:00
TreeHugger Robot
c0cbcb9f04 Merge "Add test cases for ToggleAutoclickPreferenceController." 2020-12-29 15:20:02 +00:00
Tom Hsu
36ecdd496c Merge "[Provider model] Internet picker Part II" 2020-12-29 14:23:14 +00:00
Peter_Liang
c7c1e7d442 Add test cases for ToggleAutoclickPreferenceController.
Bug: 168567356
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=ToggleAutoclickPreferenceControllerTest

Change-Id: I4ea1089ddc9aad8748b950c38617533dc1d5cb02
2020-12-29 21:41:14 +08:00
Weng Su
8b1989cdcc Merge "[Provider Model] Implement the carrner network selection" 2020-12-29 13:13:16 +00:00
tom hsu
65f8aa2f7b [Provider model] Internet picker Part II
- Add mobile internet preference with default data subscription.
 - Make prefrence to show dynamically when data subscription changed.

Video exhibition
 - http://rcll/gcmsphfhJ1UzfPSvjWOuXK/c1B2CtaFz27rlIQ2LSTJmo

Code difference
 - SubscriptionsPreferenceControllerTest.java between robolectric and junit.
  - https://diff.googleplex.com/#key=1Zm7JGPhoZwY

Bug: 172229552
Test: atest SubscriptionsPreferenceControllerTest

Change-Id: Ib50c2c51159f60f19631d1a02081eafde3436e94
2020-12-29 19:48:21 +08:00
Weng Su
e0062af10c Add Hotspot WPA3 Settings
- Add WPA3 SAE security types
  - "WPA3-Personal"
  - "WPA2/WPA3-Personal"

- Verify valid WPA3 password

- Enable QR code scanner for Hotspot WPA3

- Screenshot
  https://screenshot.googleplex.com/B6u54wh8w35Xnyf
  https://screenshot.googleplex.com/8hWHHUTb6UaS9vB

Bug: 167968488
Test:
- Manual Test
- atest WifiTetherSecurityPreferenceControllerTest
- atest WifiUtilsTest

Change-Id: I155ed0bfd187d27ba864f9fb1b78d08c437740f3
2020-12-29 08:04:10 +00:00
Edgar Wang
02013aeeb6 Remove org.apache.http.legacy from Settings
It appears that all usages of org.apache.http were removed after aosp/118987.
Keeping this library in the phone settings manifest and build files adds an
unnecessary dependency for both phone settings

Bug: 176242377
Test: rebuild
Change-Id: I58eb077c2518c58b82e931596dfaefb151213c25
2020-12-29 14:45:14 +08:00
Stephane Lee
1f2a8d50d8 Merge "Add adaptive charging to the top level settings menu" 2020-12-28 21:12:02 +00:00
Peter_Liang
5bd435e6c4 Rename and add test cases for video player in accessibility.
Bug: 168567356
Test: make RunSettingsRoboTests ROBOTEST_FILTER=VideoPlayerTest

Change-Id: I2ea415b06d2870f55650290f48dd9b2998ef608d
2020-12-28 22:39:03 +08:00
Weng Su
74b18587fb [Provider Model] Implement the carrner network selection
- Add primaryAction for connecting carrier network

- User toggles carrier network On/Off
  - Calls MergedCarrierEntry#setEnabled(true/false)

- User taps on carrier network
  - Calls MergedCarrierEntry#connect()

Bug: 175761096
Test:
- Manual Test
- atest ProviderModelSliceTest
- atest ProviderModelSliceHelperTest
- make RunSettingsRoboTests ROBOTEST_FILTER=WifiScanWorkerTest

Change-Id: I07cb6c142a2f4e9cbdbab1f77afdc367728b4e3f
2020-12-28 13:23:24 +00:00
Jason Chiu
bd854ccd10 Support contextual suggestion
- add a suggestion layout
- add an interface to get fragment in suggestion feature provider
- remove the first preference category of homepage IA to align its top
  with the bottom of the search box

Bug: 173768418
Test: robotest
Change-Id: I784e3eef29ca474c4c89f07b916c6500fabbf7d4
2020-12-27 01:37:30 +08:00
Yanting Yang
3932b07365 Move Styles & wallpapers to the homepage group
- Add Styles & wallpapers to the homepage group.
- Create a new display settings xml for the silky home.
- Remove Styles & wallpapers from new display settings xml.
- Apply the RestrictedTopLevelPreference to remove the restricted icon.

Bug: 168166015
Bug: 174964139
Test: robotest & visual with turning on/off silky home
Change-Id: Ib495b39bc62413242247f7e767c0e44bacc6e937
2020-12-25 09:04:12 +00:00
TreeHugger Robot
d3c7666770 Merge "Remove the flaky Conditionals test." 2020-12-24 10:52:03 +00:00
TreeHugger Robot
9e42672a7a Merge "Fix broken test" 2020-12-24 10:41:18 +00:00
Tsung-Mao Fang
0e0b1ce05c Fix broken test
Test: Run robo test and pass
Fix: 176275647
Change-Id: Ia6809f9c3cf90b8f549770cfaee34918aa0769f8
2020-12-24 17:27:04 +08:00
Yi-Ling Chuang
54d84c56b5 Remove the flaky Conditionals test.
This test seems to be flaky for quite a while. The method tested runs
the check using a FutureTask which may sometimes hit the timeout issue,
so it seems not that suitable to do the test.

Fixes: 176274700
Test: robotest
Change-Id: I1bf979f4a792d76da01bfa82355ccf8f659dc6f8
2020-12-24 17:11:22 +08:00
Chloris Kuo
e30363463f Merge "Feedback UI DeviceConfig" 2020-12-24 07:45:12 +00:00
timhypeng
a7a73c4c92 Rename MediaOutputSliceConstants to MediaOutputConstants
-Slice is not used and it is better to remove the slice string

Bug: 165772904
Test: build pass
Change-Id: I38b26187f03509d0d9f5cdb8ef30f3f3ef8779d8
2020-12-24 01:07:24 +00:00
Hugh Chen
5af18b2733 Fix robotests failure in connectivity settings
Bug: 174212358
Test: make -j42 RunSettingsRoboTests
Change-Id: I50baeb18b00f16808dc958d77251a01ba991adf6
(cherry picked from commit e61a5e3bc7)
2020-12-23 10:57:10 -08:00
SongFerng Wang
a12003a9ac Merge changes from topic "Slice of Provider Model"
* changes:
  Slice of Provider Model: add slice structure
  The helper for slice of carrier and non-Carrier, used by ProviderModelSlice.
2020-12-23 18:47:15 +00:00
SongFerngWang
8cad0197bd Slice of Provider Model: add slice structure
Implement a slice which can show/update carrier networks.
Before and after: go/b173971144screenshot

Bug: 173971144
Test: atest NetworkProviderWorkerTest  (PASS)
atest ProviderModelSliceTest  (PASS)

Change-Id: I3f0dab364c88723ef3185a2ff040b1fbd1b099f4
2020-12-23 17:47:45 +08:00
Chloris Kuo
43007847cf Feedback UI DeviceConfig
Use ENABLE_NAS_FEEDBACK flag to decide if showing feedback UI setting

Bug: 175363481
Test: make RunSettingsRoboTests7
Change-Id: I969f9ca0b5d681345c022816e104926953f855dc
2020-12-22 22:09:28 -08:00
Hai Zhang
a8bd0d263f Expose role API for Settings on RoleManager.
Settings is a platform app so the role APIs for it wasn't system APIs,
but just @hide. Now that we are moving role into module, we need to
create system APIs for them.

RoleControllerManager is an implementation detail and may change in
soon when we move role logic into system server and leave only UI in
PermissionController, so we shouldn't expose it. Instead, we can
expose the new system APIs on RoleManager, and delegate to
RoleControllerManager internally.

Bug: 158736025
Test: presubmit
Test: atest DefaultSmsShortcutPreferenceControllerTest
Change-Id: Iafe1d24601a32799e04d9aa385ec2fbce833a02e
2020-12-22 21:17:33 -08:00
timhypeng
d41cb031c9 Remove intent filter of Output panel
-remove com.android.settings.panel.action.MEDIA_OUTPUT
-remove com.android.settings.panel.action.MEDIA_OUTPUT_GROUP

Bug: 170558292
Test: build pass
Change-Id: Ifb4f0a492e9ed7a5848035577cbc044d010bf5dc
2020-12-23 02:24:41 +00:00
Stephane Lee
8fee0917f8 Add adaptive charging to the top level settings menu
Bug: 172009945
Test: Trigger adaptive charging and verify string in menu
Change-Id: I8f600287c38e3992bb884faeb4df3d91570851a0
2020-12-22 11:19:57 -08:00
SongFerngWang
a97b4faa67 The helper for slice of carrier and non-Carrier, used by ProviderModelSlice.
create a helper file.
create a res/drawable/ic_signal_strength_zero_bar_no_internet.xml
create string at res/values/strings.xml

Bug: 173971144
Test: atest ProviderModelSliceHelperTest
Change-Id: I7f63a6b04784325989e776cb140017314ebde4ce
2020-12-22 21:50:40 +08:00
Allen Su
fc41649147 Merge "Change carrier config" am: ba38382627 am: 3d9ede1815 am: 034b2236dd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1512649

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88fcda205e510641bc718d25b7f580e1c2d18648
2020-12-22 07:16:06 +00:00
Allen Su
034b2236dd Merge "Change carrier config" am: ba38382627 am: 3d9ede1815
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1512649

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I521b6e79f50ac9b7a6b5ecb72a6e4d8ad0a580dc
2020-12-22 01:35:07 +00:00
Jeremy Goldman
6625f03eca DeviceNamePreferenceControllerTest converted to JUnit
Rather than mocking the PreferenceScreen's getPreference function,
a PreferenceManager has been created, which instantiates the Screen.
The desired Preference is added to the Screen with the testing key.
Rather than using a shadow XML, contexts' resources are mocked.
A mock WifiManager is used instead of a shadow
Duplicate test case removed, and test which succeeds locally but
not on cuttlefish marked as ignored for now.


Bug: 175389659
Test: atest -c DeviceNamePreferenceControllerTest
Change-Id: I643b22993a1d102614fed1883af7f4925947be20
2020-12-22 00:38:33 +00:00
Allen Su
ba38382627 Merge "Change carrier config" 2020-12-22 00:26:52 +00:00
Jeremy Goldman
04eeb1e5e3 Merge "ModuleLicenseProviderTest converted to JUnit" 2020-12-21 07:38:51 +00:00
Jeremy Goldman
7d5483f6d7 Merge "Enhanced4gLteSliceHelper specifies immutable intent" 2020-12-21 07:25:30 +00:00
Jeremy Goldman
8320f7459b Merge "DataUsageSummaryPreferenceTest converted to JUnit" 2020-12-21 06:21:22 +00:00
tim peng
10ee127203 Merge changes Iecf987cc,Ibbbb9e78
* changes:
  Remove unused variable
  Remove MediaOutputPanel and MediaOutputSlice
2020-12-21 06:12:08 +00:00
Jeremy Goldman
50dd14d111 Enhanced4gLteSliceHelper specifies immutable intent
Bug: 172812686
Fixes: 172207848
Test: atest -c Enhanced4gLteSliceHelperTest
Change-Id: I1bfac82e3ce5c66639465befb0517839fb55415e
2020-12-21 05:41:01 +00:00
Jeremy Goldman
e068542f53 SimStatusDialogControllerTest converted to JUnit
Bug: 175389659
Test: atest -c SimStatusDialogControllerTest
Change-Id: Id2cfb01714f1756f9251b2319d83a1609488b0f6
2020-12-21 04:45:13 +00:00
Jeremy Goldman
ae03dd39da DataUsageSummaryPreferenceTest converted to JUnit
There are couple of newly explored concepts in this CL, which will
hopefully be useful for migrating other tests in the future as well. In
broad strokes, the changes to this file cover:

Android build file species the preferences library, in order to access
PreferenceViewHolder.createInstanceForTests.
Resource ids in JUnit tests differ from the Settings apk. This is true
not only of strings but also views and layouts. Helper functions added
to main class to access the layouts needed by the test.
Shadow activities are not needed to view layouts, the context can be
used.
Context startActivity can be mocked and verified in order to capture and
examine the intent created by the library under test.

Bug: 175389659
Test: atest -c DataUsageSummaryPreferenceTest
Change-Id: Ib8cb87f0299c47a32c3f5d3af7edb20592b727ec
2020-12-21 12:39:02 +08:00
timhypeng
7c86980bf3 Remove unused variable
-remove VIEW_TYPE_SLIDER_LARGE_ICON
-remove MEDIA_OUTPUT_GROUP_SLICE_URI
-remove MEDIA_OUTPUT_SLICE_URI

Bug: 175850711
Test: build pass
Change-Id: Iecf987cc91934a7598762523814f5f575302dde2
2020-12-21 03:23:32 +00:00
Jeremy Goldman
471659f30d ModuleLicenseProviderTest converted to JUnit
The superclass ContentProvider's "getContext" method is final and
cannot be mocked, so a helper method visible for testing was added
to allow for context injection.

Bug: 175389659
Test: atest -c ModuleLicenseProviderTest
Change-Id: I9e20171340ae0a48d74fae44c7b356ea67dba43b
2020-12-18 12:06:16 +00:00
Jason Chang
3abd4c2ff8 Merge "Fix swipe for notification default should be on instead of off" 2020-12-18 09:29:06 +00:00