Commit Graph

6843 Commits

Author SHA1 Message Date
Lei Yu
71a091901f Merge changes I773aeabd,I6a9d7044
* changes:
  Refactor DataServicePreference
  Refactor 4gForLTE preference
2018-10-19 20:42:12 +00:00
Jason Chiu
0accca2cb6 Merge "Slice background worker with Wi-Fi Slice" 2018-10-19 20:23:05 +00:00
jackqdyulei
fd44f76bf7 Refactor DataServicePreference
Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I773aeabdc1964436cc1e67bbbe9ad7fa6494e504
2018-10-19 09:58:51 -07:00
jackqdyulei
502f3c6c91 Refactor 4gForLTE preference
Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I6a9d7044e16de2e70fadd97379b2a6de6d18525f
2018-10-19 09:57:54 -07:00
Fan Zhang
b91eb94c8a Merge "Use public API to launch search UI." 2018-10-19 06:05:37 +00:00
Johnson Lu
7a5719ff5b Add preference for WiFi MAC randomization.
Preference visibility contolled by feature flag -
settings_wifi_mac_randomization.

Bug: 1227787
Test: RunSettingsRoboTests

Change-Id: Ibad8d3ea2bfa3879acc1ec883b8c03f1979bde45
2018-10-19 11:54:25 +08:00
Lei Yu
c294ce437e Merge "Refactor another network mode preference" 2018-10-19 02:00:03 +00:00
Fan Zhang
6b88c9c1b7 Use public API to launch search UI.
Test: manual
Change-Id: I5527dd6de5990aed365b6e78a9492ced00b99565
2018-10-18 16:26:59 -07:00
jackqdyulei
9132ab5533 Refactor another network mode preference
This preference show up if phone is not in world mode and offer some
simplified choices.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I9204466be630f122fb02773d18a947706999ab79
2018-10-18 13:58:03 -07:00
Fan Zhang
f5e280e424 Merge "Added the EmergencyInfoSlice for ContextualHomepage" 2018-10-18 16:26:11 +00:00
Emily Chuang
8b680a988d SliceLiveData should remove observers.
As positions of items will be changed, new sliceViews will be created.
SliceLiveData has been set to observe a certain old sliceView. When the
page is re-launched, we cannot garantee we always get the same
sliceView, which means the sliceLiveData may be still observing a sliveView that
is no longer applicable. This will lead to broken slices.
Hence, we need to remove observers first then make it observes a new sliceView.

Bug: 117922624
Test: robotests, visual
Change-Id: I59368a6ce5fa84487c9a4788b970fdc074a0c2a9
2018-10-18 23:24:26 +08:00
Jason Chiu
f17233ba7d Slice background worker with Wi-Fi Slice
Test: manual

Change-Id: Ic4fdc5713f511ff80f03728c99c68fda3d0cab02
2018-10-18 18:00:11 +08:00
Lei Yu
4ae062b7c8 Merge "Refactor PreferredNetworkModePreference" 2018-10-18 06:34:22 +00:00
Sunny Shao
0057c4127c Added the EmergencyInfoSlice for ContextualHomepage
- Generated a simple EmergencyInfo slice with fixed string in title and summary.
- Moved hardcode string into strings.xml
- Modified the contentProviderCall_returnCorrectSize test case for general version

Bug: 114793520
Test: compile and manual test
Change-Id: Ia3444c61b0f7e4c04794fe3590dc0731885cf062
2018-10-18 14:10:13 +08:00
jackqdyulei
e8a56c183a Refactor PreferredNetworkModePreference
Create preference controller for it.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I456b0b954f47a6fb4c03926049b0579fd6488969
2018-10-17 21:26:30 -07:00
TreeHugger Robot
89d44bff44 Merge "Updated misc in Contextual Settings Homepage" 2018-10-18 03:52:28 +00:00
Mill Chen
77b2a30e9d Updated misc in Contextual Settings Homepage
- Set static cards with full width and removed packageName from setName
method.
- Removed Storage card from createStaticCards method because it does not
belong to default category.
- Changed the parameter type of setSliceUri from String to Uri in ContextualCard.
- Added StorageSlice and DeviceInfoSlice to the contextual card
provider.
- Fixed test cases related to these changes.

bug: 117874766
Test: robotest
Change-Id: Ic2dca353f85d0b6191ab19882dd8c5cb9c6cc658
2018-10-18 10:43:23 +08:00
Lei Yu
5b0c051dcd Merge "Refactor roaming preference" 2018-10-18 00:44:47 +00:00
jackqdyulei
d622e14d85 Refactor roaming preference
Use preferenceController instead

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: Idb0276ea0ed1738d93223e072338ba3c32498a9d
2018-10-17 13:03:26 -07:00
TreeHugger Robot
f02115f6e1 Merge "Fix InstantiationException on fragment" 2018-10-17 17:28:22 +00:00
TreeHugger Robot
1e6455be09 Merge "Consider Private DNS user restriction" 2018-10-17 08:36:55 +00:00
jackqdyulei
5680477b8b Refactor DataUsagePreference
Move the logic to PreferenceController

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I7a0845c0cbc3f33e23257831d0d4ed97e7a5cc04
2018-10-16 15:40:17 -07:00
jackqdyulei
1d133e3f04 Refactor carrier settings
Only show it when:
1. It is in CDMA or GSM mode
2. CarrierConfig tell settings to show it

Bug: 114749736
Test: RunSettingsRoboTests

Change-Id: I45ecbc86c793ebec602142be208058e2043a2ba7
2018-10-16 15:33:20 -07:00
jackqdyulei
2de3d28138 Refactor CdmaApnPreference
Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I3d0203b7b5fb732e2814fb741761af4371924e9a
2018-10-16 15:33:20 -07:00
jackqdyulei
37f2e60b8c Refactor CdmaSubscriptionListPreference
Extract CdmaBasePreferenceController that can be shared by all CDMA
PreferenceController. Also create new subscription controller to use
it.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I7cfc27ffd0704d09dc02e49fbf5641ff8b90642d
2018-10-16 15:33:20 -07:00
tmfang
d5405cf49d Fix InstantiationException on fragment
Since we overrided the empty constructor,
it can't find a empty constructor when
Fragment tries to instantiate a fragment
in framework.

So, we can't override this constructor,
and then just use newInstance() to initialize
and setup a new Fragment.

Test: robotest
Change-Id: Ifcd1c1771bc69d947caeee5c5bc055c4f94365c2
Fixes: 115676209
2018-10-17 04:20:09 +08:00
TreeHugger Robot
56aca80681 Merge "Fix ActionDisabledByAdminDialogHelperTest" 2018-10-16 00:54:51 +00:00
Doris Ling
87df629dbb Merge "Get app info with correct user id." 2018-10-15 23:23:23 +00:00
Philip P. Moltmann
098d3a79fd Fix ActionDisabledByAdminDialogHelperTest
- Revert user handling in setAdminSupportDetails to before my changes.
- Implement getUserProfiles in Settings-shadows as the the
  Settings-shadows do not forwarded to profiles the robolectric-default
  shadows

Test: make RunSettingsRoboTests
Change-Id: Idfd4722fe55a17c57d336db943904eb1aeb6e7ce
2018-10-15 14:30:34 -07:00
Eran Messeri
717194c87c Consider Private DNS user restriction
As a new user restriction, to disallow changing Private DNS settings, was
added, make the Private DNS mode dialog preference consider whether to
let the user modify it or not based on the presence of this restriction.

Bug: 112982691
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy
Test: m -j RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
Test: Manual, using TestDPC

Change-Id: If815860ace3aadf6f79fd23173f0a2c80a29f0e1
2018-10-15 21:34:47 +01:00
TreeHugger Robot
0d0eec6d4e Merge "Refactor CdmaSystemSelectListPreference" 2018-10-15 20:08:31 +00:00
Philip P. Moltmann
b9a83d584d Merge "Use SYSTEM_... window manager flags" 2018-10-15 16:28:39 +00:00
jackqdyulei
b820483fad Refactor CdmaSystemSelectListPreference
Most logic is copied from previous ListPreference however
1. Create PreferenceController for it
2. Extract API to check whether to display CMDA options
3. In controller, provide API to force display dialog

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: Ic40d2ac1dc1854df9c90d912ea9fc822531b413d
2018-10-12 10:11:58 -07:00
Mill Chen
2559f02d68 Clean up unnecessary spy context statements
Remove spy context syntax because we do not need to
mock context anymore in the test cases.

Bug: 117644158
Test: robotests
Change-Id: I222eec4fbc1994d7bb79adead40b76ac0a000bdc
2018-10-12 21:54:02 +08:00
TreeHugger Robot
ddd70cdbf6 Merge "Disable sliceView scrolling in the homepage." 2018-10-12 05:05:03 +00:00
Emily Chuang
e7a6d1ca1e Disable sliceView scrolling in the homepage.
Set isScrollable() to false so as to have the "see more" option.

Fixes: 117626982
Test: robotest
Change-Id: Ie0b8a207fb0c1eff41a98cc897e5f8cf29ccce0a
2018-10-12 10:16:51 +08:00
Doris Ling
b9ff5892ca Get app info with correct user id.
- when querying app info from package manager, we should use the methods
that takes the user id so that it will work properly with managed
profile.

Change-Id: Ifc84d3a29aaf7b2c1acfa096596a53f1715cc908
Fixes: 117222623
Test: make RunSettingsRoboTests
2018-10-11 16:47:03 -07:00
jackqdyulei
8eec6ff917 Change packagename to telephony
Also move it under package network, so all of them belong to
com.android.settings.network.telephony.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I35dbdcd5cc9dab939b0a3efccc8897b9a92338d1
2018-10-11 11:46:38 -07:00
Lei Yu
695638ce35 Merge "Copy wifiCalling method from telephony to settings" 2018-10-11 04:11:07 +00:00
TreeHugger Robot
45d8fbe54f Merge "Change search fab to search bar." 2018-10-11 02:42:24 +00:00
Lei Yu
62dc9bb747 Merge "Add network listener in MobileSettingsActivity" 2018-10-11 01:14:09 +00:00
Lei Yu
9b373eb7a0 Merge "Refactor MobileDataPreference" 2018-10-11 00:24:56 +00:00
Fan Zhang
3181e1aceb Change search fab to search bar.
- Remove search fab from layout xml
- Change RelativeLayout to CoordinatorLayout so we can use prebuilt
  scrolling behavior
- Minor update to theme so search bar background works in dark mode for
  the homepage activity.

Change-Id: If7408c12684be65137e04ae3bb4137204c2d77e0
Fixes: 117508596
Test: robotests, visual
2018-10-10 16:29:22 -07:00
TreeHugger Robot
04434eb662 Merge "Remove ShadowKeyValueListParser" 2018-10-10 23:23:41 +00:00
jackqdyulei
496094ccde Copy wifiCalling method from telephony to settings
Bug: 114749736
Test: Build
Change-Id: Iec45273e6a74afe940c280e50a473edc31473994
2018-10-10 16:07:49 -07:00
jackqdyulei
1a4781881e Add network listener in MobileSettingsActivity
Listen to subscription change. If it is changed, refresh UI and build
new fragment for it.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I436b4d62b06230e767892bda6cf8582d4946097b
2018-10-10 16:05:58 -07:00
jackqdyulei
36063b9222 Refactor MobileDataPreference
1. Remove it and change it to SwitchPrference
2. Build MobileDataDialogFragment to show dialog when needed
3. Create controller for it to decide when to launch the dialog

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I02b9662c5829e765f2c71d10ed951d792cf7aaa1
2018-10-10 16:05:08 -07:00
TreeHugger Robot
5da72a145f Merge "Use default network template in billing cycle settings." 2018-10-10 20:53:55 +00:00
jackqdyulei
3f365a91e9 Remove ShadowKeyValueListParser
It is not used anymore.

Change-Id: I52991f42bc0872fd98809d6d6596f4b85d041d60
Fixes: 38346649
Test: RunSettingsRoboTests
2018-10-10 13:49:00 -07:00
Fan Zhang
6a1f77ef89 Merge "Use proto in contextualCard object" 2018-10-10 20:19:38 +00:00