Commit Graph

6832 Commits

Author SHA1 Message Date
Fan Zhang
f535055e2e Use safe icon when building unavailable slices.
And move ic_a11y_generic from mipmap to drawable. IconCompat doesn't
support mipmap.

Bug: 118691898
Test: robotests
Change-Id: I6799f3d31d2c5654319e5a97bf8ca14992e785a7
2018-10-30 14:48:47 -07:00
Eugene Susla
7edf50fdd2 Add developer option for sms access kill switch
Cleanup tracking bug: b/118694572

Test: ensure switch toggles global setting
Change-Id: I1faa873a91a933a7693a4b799495cf3877d37888
2018-10-30 20:59:00 +00:00
Fan Zhang
13b60bb15a Stop showing account based cards in homepage.
Removed data usage/device info/emergency/storage cards

Bug: 118691898
Test: robotests
Change-Id: I9f1ef3f022be9ca37e3359a6820a716d4ebade0f
2018-10-30 13:37:02 -07:00
Fan Zhang
0023558ec3 Fix Display settings summary when there is no wallpaper.
Change-Id: I715cef9dc42de1231491b5a7184f0f151d94af11
Fixes: 69905032
Test: robotests
2018-10-30 10:10:30 -07:00
Stanley Wang
f838aa1059 Fix Developer options page memory leak
Change-Id: I12d53c41adee56850cd294ae89e7a56328639558
Fixes: 117583710
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.development
2018-10-30 17:49:59 +08:00
TreeHugger Robot
0c95a2980c Merge "Refine the logic to show/hide cdma preference" 2018-10-29 22:55:57 +00:00
jackqdyulei
008c7781e8 Refine the logic to show/hide cdma preference
1. Add special check for "system select"
2. For cdma, need to check whether to hide carrier settings

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: I0a20816912500725894208a60bba7a5c74912561
2018-10-29 14:16:14 -07:00
TreeHugger Robot
5422d7ea0a Merge "Add Connected Device slice to Contextual Settings Homepage" 2018-10-29 20:27:24 +00:00
jackqdyulei
400e13cc11 Update the mobile activity
1. Add listener to ACTION_RADIO_TECHNOLOGY_CHANGED
2. Update fragment switch by using replace
3. Remove todo for sort because list is already sorted by sim slot
4. Make actiivty accept SUB_ID from intent
5. Add icon for multi-sim support

Bug: 114749736
Test: RunSettingsRoboTests && Screenshot

Change-Id: I11c472b1479ec9243266cb2a7ef4292370ac6894
2018-10-29 13:05:50 -07:00
Yanting Yang
f61bc19f6b Add Connected Device slice to Contextual Settings Homepage
- Support Bluetooth device information.
- Not yet integrate slice background worker.

Bug: 114807655
Test: robotests, visual
Change-Id: I23f902137b0468349ee627bed6a394d42ea4a00d
2018-10-29 16:10:58 +08:00
Fan Zhang
0c7c59f1b9 Make android.settings.SETTINGS intent go into homepage.
Change-Id: Ib7453a79a473410c44bdcf06019446cedd34f837
Fixes: 117281845
Test: robotests
2018-10-28 15:59:24 -07:00
TreeHugger Robot
19e640701e Merge changes Idbb63960,Id7889566
* changes:
  Delete some unused resources
  Move all contextual card related classes.
2018-10-26 19:18:19 +00:00
TreeHugger Robot
63df02cbde Merge "Fix crash on Wi-Fi Slice when it's continuously pinned and unpinned" 2018-10-26 19:10:29 +00:00
Fan Zhang
5e6e6a14f2 Move all contextual card related classes.
... from homepage to contextualcards.

Test: rebuild
Change-Id: Id7889566ce1e7257eb699d963ae996906fdb58ff
2018-10-26 10:02:04 -07:00
Jason Chiu
89b15785c7 Fix crash on Wi-Fi Slice when it's continuously pinned and unpinned
It's because WifiTracker's initialization and onStop is on different
thread. Fine tune the thread logic in SliceBackgroundWorker.

Fixes: 118165942
Test: manual
Change-Id: Icc86b5df7ec3c6fd0e4a79a62ea0c84465e9528d
2018-10-26 18:47:51 +08:00
Hugh Chen
152de8abde Merge "Make HearingAid code more generic" 2018-10-26 01:57:24 +00:00
Lei Yu
6b4e5a2343 Merge changes Iafe111bf,Ie9d8e935
* changes:
  update CdmaApnPreferenceController
  Add network selection preferences
2018-10-26 00:28:30 +00:00
Lei Yu
f3baeb1e0d Merge changes Iad3bc131,Id43cb480
* changes:
  Update NetworkSelectSettings page
  Recopy NetworkSelectSetting from phone to settings
2018-10-25 22:32:32 +00:00
jackqdyulei
4c0b300e21 update CdmaApnPreferenceController
Rename it to ApnPreferenceController since it support both Gsm and
Cdma. Also add check for Gsm sim card.

Bug: 118402844
Test: RunSettingsRoboTests
Change-Id: Iafe111bfdc8f8e7d91d104df652ae9b27c9b166f
2018-10-25 13:13:13 -07:00
jackqdyulei
762f75f150 Add network selection preferences
1. Toggle to decide whether to auto select
2. Preference to go to network selection page

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: Ie9d8e9353bf2a99b8cba1fb14d5a440a43fde66e
2018-10-25 12:47:54 -07:00
Fan Zhang
130c477044 Remove DashboardSummary and all related classes.
- Condition is already supported in PersonalSettingsFragment
- Suggestion is already supported in PersonalSettingsFragment
- Static/dynamic tiles are supported in TopLevelSettings

Change-Id: I51882e3bd0919ad95109baefac683d98667c11e3
Fixes: 110405144
Test: robotests
2018-10-25 11:27:47 -07:00
jackqdyulei
227526a8ac Update NetworkSelectSettings page
Clean it up and make it compatiable with all devices. Before this CL
it only used in Pixel 3 with new moderm.

Bug: 114749736
Test: RunSettingsRoboTests
Change-Id: Iad3bc131e294d34cff90b9130715780182adccd7
2018-10-25 10:51:23 -07:00
TreeHugger Robot
34537c1c38 Merge "Revert "Add Support for Virtual High Refresh Rate mode"" 2018-10-25 05:59:24 +00:00
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
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