Commit Graph

6929 Commits

Author SHA1 Message Date
timhypeng
c95056d7b5 Make HearingAid code more generic
-handle UI updating when sub device connection state changes
-add test case

Bug: 112735753
Test: make -j42 RunSettingsRoboTests
Change-Id: Ie2643657c47a0956aac3f8cac4bfdbdea0399ce8
2018-10-25 04:06:40 +00:00
Bill Yi
8b16aba0dd Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: Id291dd4e424711a8cb39927b9733214b92b81d78
2018-10-24 14:47:27 -07:00
TreeHugger Robot
e2ed46e906 Merge "Add Battery slice in Contextual Settings Homepage" 2018-10-24 21:26:50 +00:00
David Sodman
86d0b28220 Revert "Add Support for Virtual High Refresh Rate mode"
This reverts commit 7915fda7ee
as this feature has been cancelled.

Test: None
Change-Id: I5ea9afcc3191576e84742ccf316b030b5c00e5c4
2018-10-24 13:27:00 -07:00
Mill Chen
60f6a25af8 Add Battery slice in Contextual Settings Homepage
- Add Battery card that implements CustomSliceable in Contextual
Settings Homepage.
- Add test case for Battery slice.
- Created a loadBatteryInfo method for BatterySlice.
- Add a map in CustomSliceManager to cache CustomSliceable instances,
let existing battery slice be able to update battery info.
- Use a flag to avoid triggering an infinite loop when calling
notifyChange in the callback function.

Bug: 114796623, 115971399
Test: manual, robotests
Change-Id: I4b785708bf8456c6c4de7cae4b44f8a060bccbae
2018-10-24 20:01:53 +08:00
Fan Zhang
5cec560cf3 Merge "Add place holder rows to wifi slice." 2018-10-24 02:15:18 +00:00
Lei Yu
d7a2569034 Merge "Refactor Cdma preference in ECM" 2018-10-23 23:53:29 +00:00
Fan Zhang
cc88c2fe43 Add place holder rows to wifi slice.
When loading wifi slice, the wifitracker is super slow to scan and
return APs. So we will show up to 3 rows of placeholder in the slice UI.

- When building slice, if there are at least 3 APs, show first 3.
- When there aren't enough APs, show them all and fill the rest of
  placeholder rows.

Bug: 118224581
Test: robotests
Change-Id: Id332f64bfa335543ea406f73b249f93504d63d4f
2018-10-23 15:48:14 -07:00
jackqdyulei
cdfa5bb378 Refactor Cdma preference in ECM
When phone is in ECM mode and Cdma preference is clicked, it should
first pop up ECM exit dialog. If user click yes, then it should launch
normal dialog.

This CL create a Cdma preference to stop launch normal dialog when in
ECM mode.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: Iba887d9fc49770b21cf0421ecc0120d63da43ef9
2018-10-23 14:38:32 -07:00
Raff Tsai
db55661271 Change homepage layout
- merge PersonalSettingsFragment and TopLevelSettings together

Bug: 118224579
Test: manual
Change-Id: Ieee50a22babb25023e2a1767793e220862a38363
2018-10-23 19:37:19 +08:00
TreeHugger Robot
14ce5b21c2 Merge "Add DiffCallback to handle Contextual Cards update." 2018-10-23 00:46:53 +00:00
Emily Chuang
18a99faaf1 Add DiffCallback to handle Contextual Cards update.
Use DiffCallback in ContextualCardsAdapter to only update items that
are changed instead of touching those unchanged ones.

Also fix a bug where ConditionContexualCardCard#onStart is incorrectly
skipped.

Fixes: 112245748
Bug: 118165942
Test: robotests
Change-Id: I7989d621764fe40a3fceb8c9f40baced840818ba
2018-10-22 15:38:30 -07:00
jackqdyulei
3d7e38bc57 Refactor wifi calling and video calling
Also add a Callback for 4gLte to notify update to video calling
preference controller

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I0b5009733251162327f02ccfae8b10ae56b961bc
2018-10-22 13:02:32 -07:00
TreeHugger Robot
0a546d1916 Merge "SliceLiveData should remove observers." 2018-10-22 03:29:42 +00:00
TreeHugger Robot
53df35e616 Merge "Refactor EuiccPreference" 2018-10-22 02:28:14 +00:00
Johnson Lu
deb0000d86 Merge "Add preference for WiFi MAC randomization." 2018-10-22 00:53:54 +00:00
jackqdyulei
ba7b3a8294 Refactor EuiccPreference
Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I7192e40c5ff6eb064f29517c21021a095d505d7f
2018-10-19 14:58:31 -07:00
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
Stanley Tng
81edd9a286 resolve merge conflicts of b0e99e1472 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ife619e714d451b6cb77bfaf50e3f45c969d37cb4
Merged-In: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Merged-In: I169cda4a1658b0a67cc7c7367b38d57a021e6953
2018-10-17 18:14:27 +00: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
Treehugger Robot
b0e99e1472 Merge "Fix Connect State message in Device details for Hearing Aids" 2018-10-17 04:48:36 +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
Stanley Tng
a8af2d3664 resolve merge conflicts of 019a771d2d to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Bug: None

Change-Id: I2fc36f4ee9a600e7e9c5ce00708736a4d4548358
2018-10-15 17:30:02 -07:00
jackqdyulei
820e22d324 Add entitlement check for usb tethering
Before this CL, usb tethering in detail page doesn't have entitlement
check. This CL fix it by using the correct API

Also polish it by updating the UI before entitlement check to align
hotspot page. So in UI it will first check "usb tethering". If
entitlement check fail, it will revoke and go back to previous selection.

Bug: 115707279
Test: RunSettingsRoboTests
Merged-In: I3d2ebad2879479a870bcdfe596bb88b83c424389
Change-Id: I3d2ebad2879479a870bcdfe596bb88b83c424389
2018-10-15 16:58:21 -07:00
Doris Ling
87df629dbb Merge "Get app info with correct user id." 2018-10-15 23:23:23 +00:00
Stanley Tng
a6c927b51a Fix Connect State message in Device details for Hearing Aids
In the Device details of Settings App and when using two Hearing Aids
devices (left and right sides), this will fix the connect state messages
for these two devices. Also added Robo tests for the changes.

Test: Manual tests and also ran RunSettingsLibRoboTests and RunSettingsRoboTests.
Bug: 117074814
Bug: 116725094
Change-Id: I169cda4a1658b0a67cc7c7367b38d57a021e6953
Merged-In: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Merged-In: I169cda4a1658b0a67cc7c7367b38d57a021e6953
2018-10-15 22:51:02 +00:00