Commit Graph

21078 Commits

Author SHA1 Message Date
Doris Ling
c62f8809c7 Fix test failure for EmergencyInfoTestController.
Make sure that the test preference has the correct key.

Change-Id: Icbf18d3f8854bc43ef486ae56f0b5fc8f035bf41
Fix: 32508237
Test: RunSettingsRoboTests
2016-10-28 16:37:01 -07:00
Fan Zhang
5abaef7dd1 Use new app header in more screens.
- This covers all subclasses of AppInfoWithHeader: app launch settings,
  app storage settings, draw over settings, write setting details,
  usage  access settings.

Bug: 32442716
Test: RunSettingsRoboTests
Change-Id: I8e5831a4fcce5f98c3a6cc6b0fd66bc4a53d1330
2016-10-28 14:50:36 -07:00
TreeHugger Robot
0cbb338ecc Merge "Add payload for condition card to reuse the viewholder" 2016-10-28 20:25:35 +00:00
TreeHugger Robot
dbac5f1b14 Merge "Temporary commenting out EmergencyInfoPreferenceControllerTest#handlePreferenceTreeClick_shouldStartActivity as it is failing a local checked build when trying to add Clockwork projects to master." 2016-10-28 20:25:29 +00:00
jackqdyulei
022d4476c7 Add payload for condition card to reuse the viewholder
Bug: 30319913
Test: make RunSettingsRoboTests
Change-Id: Ib08a301203f4075f0553386f7db1a68d69bde436
2016-10-28 11:23:56 -07:00
Ariel Gertzenstein
91e91337e6 Temporary commenting out EmergencyInfoPreferenceControllerTest#handlePreferenceTreeClick_shouldStartActivity
as it is failing a local checked build when trying to add Clockwork projects to master.

Build command:
make -j64 PRODUCT-angler-userdebug dist DIST_DIR=out/dist checkbuild tests

Change-Id: I4f19c9d132a8c47a005ce40af74e7c9ebdba796d
2016-10-28 14:23:11 -04:00
Fan Zhang
21a0712d93 Merge "Modify AppHeaderController to provide UI for notif settings" 2016-10-28 15:59:36 +00:00
TreeHugger Robot
91ca01ec42 Merge "Add Emergency info and Add user when locked to account dashboard." 2016-10-28 00:44:54 +00:00
Fan Zhang
1ff25ba7e6 Modify AppHeaderController to provide UI for notif settings
- The AppHeaderController is no longer a singleton. Each time appheader
  should be updated we will create a new controller. It acts as a
  builder/mutator, user provides customizable inputs, and the controller
  will bind everything to UI when calling done().

Bug: 32442716
Test: RunSettingsRoboTests
Change-Id: Icfc5bcd8bc170a02b57432d864eaddf71db0d5b4
2016-10-27 17:23:33 -07:00
Doris Ling
c7e2ed8e79 Add Emergency info and Add user when locked to account dashboard.
Add two items to User & accounts dashboard, and refractor
UserCapabilities so that it can be accessed in the new controller.

Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ib446ad6c99d4cc6405a17cf82d2d86e044870b73
2016-10-27 15:48:52 -07:00
TreeHugger Robot
6e3b964cf4 Merge "UI Refresh: a new app info header for app/notification." 2016-10-27 22:43:52 +00:00
Fan Zhang
c9536b8e41 UI Refresh: a new app info header for app/notification.
- moved force stop and uninstall button to bottom of page (as footer)
- Forked appheader layout file, and created AppHeaderController to
  contain all binding logic for header.

Bug: 32442716
Test: RunSettingsRoboTests
Change-Id: Id4eb365ca25e035c043c068867f5cbc3a202b201
2016-10-27 13:48:13 -07:00
Lei Yu
8b3159f064 Merge "Remove animateChange in ConditionAdapterUtils" 2016-10-26 23:30:25 +00:00
jackqdyulei
8e5f66ce39 Remove animateChange in ConditionAdapterUtils
Bug: 30319913
Test: make RunSettingsRoboTests

Change-Id: Iea3fa574c4f0f80e70a6360b5b4a5f748a80a899
2016-10-26 13:09:38 -07:00
Fan Zhang
301fe80fa7 Add location to security settings.
Bug: 32437756
Test: RunSettingsRoboTests
Change-Id: I999669963801684eb2399f5e642159970727b3c4
2016-10-26 11:23:20 -07:00
TreeHugger Robot
85edd578e2 Merge "Refactor Build number preference control into a controller." 2016-10-26 16:01:21 +00:00
TreeHugger Robot
a2c7f4277b Merge "Modified settings tests to use custom test runner" 2016-10-26 03:12:08 +00:00
TreeHugger Robot
d847d424b4 Merge "Fix logging spam in DashboardFragment." 2016-10-26 01:46:27 +00:00
Salvador Martinez
f86905ed50 Modified settings tests to use custom test runner
The custom test runner lets us use resources from
multiple projects which resolves many ResourceNotFound
errors that would come up when people who made changes
wrote tests.

Test: make RunSettingsRoboTests
Bug: 32180625
Change-Id: I71f30eecc1164b117351a74b3ea0533625feae5b
2016-10-25 17:20:20 -07:00
Salvador Martinez
f492c28cc1 Robotests for BluetoothPairingDialog
Created some tests to protect some basic bluetooth
pairing dialogs features from regressing. Most of the
tests in this CL ensure that the view is properly
created and that it is properly updating the
associated controller when a relevant action occurs.

Test: make RunSettingsRoboTests
Bug: 32180625
Change-Id: I2f4103a39ffced52353712f952e8ff3d26590169
2016-10-25 17:18:53 -07:00
Fan Zhang
242da31179 Fix logging spam in DashboardFragment.
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
2016-10-25 17:14:47 -07:00
jackqdyulei
e091cef862 Show "uninstall for all users" when >1 users installed it.
Bug: 32167081
Test: make SettingsTests

Change-Id: I407549838d40c160a84a36f2d9ebaa8dc73d6008
2016-10-25 15:57:31 -07:00
Fan Zhang
3aa68c8b80 Refactor Build number preference control into a controller.
- Use PreferenceController structure to make things more modular and
  testable
- Add tests
- Confirm password before enabling dev settings.

Bug: 24107771
Test: RunSettingsRoboTests
Change-Id: I791d9452fd461f570e70e7428f00a7258663de4b
2016-10-25 14:45:50 -07:00
Lei Yu
7ac8a8f5bd Merge "Store Tile in view tag, not position" 2016-10-25 00:28:57 +00:00
Fan Zhang
5b6478a349 Add swipe to see notification to "Notification preferences"
Bug: 31799948
Test: RunSettingsRoboTests
Change-Id: Ib892ca4d5596c1c89e1efaf636a3eefd7cee371a
2016-10-24 15:33:12 -07:00
jackqdyulei
a44fdda438 Store Tile in view tag, not position
The position(used to find the tile) is not up-to-date when recyclerview
changes, so store tile instead.

Bug: 32370624
Test: make -j40 SettingsTests
Change-Id: I10d29b3137ecb1c37b6a8468c6f2709b8497caa6
2016-10-24 14:44:37 -07:00
Fan Zhang
f83ce92aaf Update Notification preferences UI in new IA.
- Refactored ConfigureNotificationSettings to be more modular
- And tests

Bug: 31799948
Test: RunSettingsRoboTests
Change-Id: I2ecd8930a6aa501c1e625cab6ed25a46f3437e85
2016-10-24 13:33:14 -07:00
Fan Zhang
4136d902bf Add app default UI to App & Notifications.
Bug: 31799948
Test: RunSettingsRoboTests
Change-Id: Icca4954f82af38316cc232b8879c0f7e7869ecb3
2016-10-21 19:59:24 -07:00
TreeHugger Robot
e5f6fdba05 Merge "Fix App name and icon in Settings Battery details." 2016-10-22 02:14:17 +00:00
TreeHugger Robot
7fa8b4373b Merge "Add user and account dashboard category for new IA." 2016-10-22 02:00:26 +00:00
Maurice Lam
e9b7ec8f57 Merge "[Fingerprint] Make enroll progress bar scalable" 2016-10-22 00:18:00 +00:00
Sundeep Ghuman
39f552eb91 Fix App name and icon in Settings Battery details.
Set correct defaultPackageName and Label for Apps in BatteryEntry.java
so PowerUsageDetails will show the correct information.

Bug: 24187923
Fixes: 24187923
Test: Open Settings, click on Apps, select any app. Note the name and
icon on the Header. Click the Battery item. The app name and icon should
match that of the previous name, as opposed to showing the package name
and default Android icon.
Change-Id: I7b6c3b404fcd298c6670cceecd29915abd325d1f
2016-10-21 16:29:29 -07:00
Doris Ling
d7aae18f8b Add user and account dashboard category for new IA.
Add the initial version for the User & accounts category and set the
tile's intent if it contains metadata but fragment is null.

Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ic63bf8aeaf47f68a184af73c9a8a72b89b597a17
2016-10-21 16:07:39 -07:00
Lei Yu
751e0b0f20 Merge "Elicit ItemsData class and add DiffUtil.Callback" 2016-10-21 20:52:18 +00:00
jackqdyulei
0b818b79db Elicit ItemsData class and add DiffUtil.Callback
In the previous version, when there is a minor change in data, we
will refresh the whole screen(and data) by invoking "recountItems"
and "notifyDataSetChanged", which did lots of unnecessary works.

In this new cl, I elicit ItemsData class, which encapsulates the list
data used in adapter. When data changed, I build another ItemsData and
use the DiffUtil.Callback to calculate diffs between ItemsDatas. In
this way we can only refresh the items that changed in adapter.

Since I cannot find usage of see_all.xml anymore, I delete the relevant
code as well as the resource files.

Bug: 30319913
Test: make RunSettingsRoboTests
Change-Id: I4f753a26f624affea6c6c35d49cfb9c43fb74fe6
2016-10-21 11:02:29 -07:00
Maurice Lam
67df126291 [Fingerprint] Make enroll progress bar scalable
Make the fingerprint enroll progress bar scalable by moving it to a
single FingerprintProgressBar view and make it fill the remaining
space.

- The background fingerprint icon was changed to include the padding
internally so it can be added as the background directly onto the
progress bar view.
- The icon in landscape mode is also fixed to use the fingerprint
icon rather than the lock icon.

Test: cd tests/robotests && mm
Bug: 32123370
Change-Id: Ia5cf37d92f0af7c1cf39287f5070c44f51d44878
2016-10-20 17:20:56 -07:00
Lei Yu
2aeb28c020 Merge "Set stay awake while wireless charging." 2016-10-20 23:33:11 +00:00
TreeHugger Robot
1ec79681de Merge "Make dashboard tile refresh more effcient." 2016-10-20 19:03:28 +00:00
Fan Zhang
a1a84e6530 Make dashboard tile refresh more effcient.
Instead of removing and re-adding all dashboard tiles, figure out a diff
and rebind/add/remove as necessary.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I9d87ba30ab746257d0ea71282951348ebc4e8965
2016-10-20 09:52:01 -07:00
Jaewoong Jung
35d94ff9cc Merge "Fixes how we read the current WiFi network IP address." 2016-10-19 21:21:59 +00:00
Fan Zhang
8b5bca5937 Move add/remove/findPref to ProgressiveDisclosureMixin.
This makes ProgressiveDisclosureMixin the authority for adding/removing
preferences so caller doesn't need to figure out if a preference is on
screen or collapsed.

Bug: 32255863
Test: make RunSettingsRoboTests -j40
Change-Id: I9bd69661b78efd4bb4913665f6ea09f6bdc231f5
2016-10-19 12:19:46 -07:00
Jaewoong Jung
c260e6dc87 Fixes how we read the current WiFi network IP address.
The old logic could read the current IP address only when the network has the
Internet access.

Bug: 31934577
Test: Manual inspection
Test: make RunSettingsRoboTests -j40

Change-Id: I46fe6f6fb4322e8245d3ac66ac6530228c226d16
2016-10-19 12:08:54 -07:00
Fan Zhang
db1112a221 Add progressive disclsoure
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
  preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
  instead of PreferenceScreen, because with progressive disclosure the
  preference can either be in screen or the mixin. DashboardFragment is
  responsible finding the preference before passing it to controller.

Bug: 32255863
Test: RunSettingsRoboTests

Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
2016-10-18 16:57:11 -07:00
Fan Zhang
be2ac27b67 Draw preference divider based on preference group.
Bug: 32179750
Test: RunSettingsRoboTests
Change-Id: I3ea1cd662c5baec825fae615883b94b26e648409
2016-10-17 10:16:04 -07:00
jackqdyulei
b182ef3c77 Set stay awake while wireless charging.
Now if you select "stay awake" in Developer options, the screen
will keep on when wireless charging.

Bug:31696030
Test: make SettingsTests
Change-Id: If88bf559519c19654822c70d7684be583d907e00
2016-10-14 15:50:42 -07:00
TreeHugger Robot
542fe0c0c3 Merge "Add summary provider for system tile." 2016-10-14 19:56:35 +00:00
Fan Zhang
e0c253fccb Add summary provider for system tile.
Refactored getLocaleNames() into a FeatureProvider interface so it's
reusable and testable.

Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I2d31a66a4b32cfa7a364a4cfef1f6eea87084577
2016-10-14 11:08:51 -07:00
Fan Zhang
f1acdd3a51 Add more preference controllers to network page.
- To support Mobile plan preference controller, extended
  LifecycleObserver pattern to also observe onCreate and onSaveInstance.

Bug: 31799836
Test: RunSettingsRoboTests
Change-Id: Ie98db7efa91f0a8b4c8a06a784d3351237e59fe0
2016-10-13 15:01:18 -07:00
Doris Ling
b2c8c9cc9c Add connected devices dashboard category for new IA.
Add the initial version for the connected devices category.

Test: RunSettingsRoboTests
Bug: 31800290

Change-Id: Ibacef7d5ceaae5e71ff5e5b1c35dafa7738e4f75
2016-10-12 15:27:19 -07:00
Fan Zhang
bb93dc0242 Add a new empty dashboard for Network & Internet.
Bug: 31799836
Test: RunSettingsRoboTests
Change-Id: Ide0c07839332e615f6ba86fb87a1eb04cce2fae7
2016-10-12 10:24:42 -07:00