Commit Graph

636 Commits

Author SHA1 Message Date
jackqdyulei
a9eb4a0ee2 Dump the default broswer in SettingsDumpService
In SettingsDumpService, add the feature to dump the default
broswer. When there is no default broswer, dump nothing.

Bug: 27043208
Test: make -j40 RunSettingsRoboTests
Change-Id: I5ce8180d419f8a0e921da72da28eccb36a523668
2016-12-28 11:19:47 -08:00
TreeHugger Robot
93995549a7 Merge "Removed emergency info and add user when locked from Users settings." 2016-12-28 02:16:48 +00:00
Doris Ling
34a4c804f8 Removed emergency info and add user when locked from Users settings.
If new IA is enabled,  Emergency Info and Add user when locked has been moved to
Users & accounts page, so Users page should not show them.

Also fix the issue that update for the add user when locked switch does
not persist correctly.

Change-Id: I26d9f59d0f4bf3fd36a7d07d13f95127b40a8a3e
Fix: 33703736
Test: make RunSettingsRoboTests
2016-12-27 16:35:22 -08:00
TreeHugger Robot
8ad489000e Merge "Update bluetooth summary text when state changes." 2016-12-28 00:02:53 +00:00
Fan Zhang
00d617df0b Update bluetooth summary text when state changes.
- Refresh connected state before setting summary text.
- Detect inconsistent state (BT manager says connected but doesn't
  provide a connected device)

(This basically syncs implementation between settings and QS tile)

Change-Id: Id23138f8432b9aecd194f5016bf2576e33e8ca98
Fixes: 33341275
Test: RunSettingsRoboTests
2016-12-27 14:18:58 -08:00
TreeHugger Robot
8b664ed96f Merge "Add the key extraction method in PowerUsageSummary" 2016-12-27 19:54:03 +00:00
jackqdyulei
717838d3b0 Add the key extraction method in PowerUsageSummary
This cl is to fix the preference flicker issue. The main reason is
that we cannot find cached preference because of the inconsistent
search key. The search key is calculated without considering
uidObj, but the key in preference(aka changed preference) maybe
changed later based on the existence of uidObj. So when we search
the changed preference using the wrong key, we won't get it even
though it exists in the cache.

In my cl, I group two parts(search key calc + considering uidObj)
together in a method to extract the key.

Bug: 33663705
Test: make RunSettingsRoboTests
Change-Id: I2ca0c558ffc0d49ed9576321ecbc02542b568d65
2016-12-22 09:43:34 -08:00
Tadashi G. Takaoka
a034fa5407 Refactor DynamicIndexableContentMonitor
Refactor content monitoring code into a few singletons to keep alive
while Settings app is running.

Bug: 32995210
Test: Manually installing/uninstalling AOSP LatinIME.apk while
      Settings app is/isn't running, then search AOSP.
Test: Connecting/Disconnecting Anker bluetooth keyboard while Settings
      app is/isn't running, then search Anker.
Test: Added Robolectric test for DynamicIndexableContentMonitor.
Change-Id: I588e33be169fc9677d41c3daa59ab400f04f6419
2016-12-22 17:53:07 +09:00
TreeHugger Robot
2f97111d8a Merge "Align more prefs for icon space." 2016-12-22 00:29:06 +00:00
Jaewoong Jung
bdd0f0f66c Merge "Implements additional battery info menu behavior." 2016-12-21 22:57:32 +00:00
Fan Zhang
ac81f26e30 Align more prefs for icon space.
Bug: 33775510
Fixes: 33798492
Test: Visual
Test: RunSettingsRoboTests

Change-Id: I9b296e4148be8c1ae537b6418b4f384bbc63a8db
2016-12-21 11:20:24 -08:00
Matthew Fritze
65fb01b520 Add first inline switch result.
Adds gestures as Inline switch results to Settings Search.

Change-Id: Ie9b69ac2a54756d5b756401e348cae0a02c907c9
Fixes: 33669037
Test: make RunSettingsRoboTests
2016-12-21 10:52:59 -08:00
Jaewoong Jung
6a43a06cac Implements additional battery info menu behavior.
Bug: 33352540
Test: Updated existing tests.
Change-Id: I990029d2ea9032301362d614959259965b8ecb10
2016-12-20 19:17:16 -08:00
TreeHugger Robot
da7292ac27 Merge "Refresh support screen more often" 2016-12-21 00:02:29 +00:00
Fan Zhang
43ce3c0a57 Don't convert string to lower case in zen mode pref summary
Change-Id: Ibddf6d70b71cfd88b9de70feb12c2a3f01e31b18
Fixes: 32195605
Test: RunSettingsRoboTests
2016-12-20 14:32:26 -08:00
Matthew Fritze
9955db6360 SearchFeatureProvider's context field is removed
SearchFeatureProvider was holding on to a context and
outlived the SettingsActivity, thus leaking the activity.
The context was passed into most methods, and thus it
makes more sense to pass it in to every method.

Bug: 33677967
Test: Run MakeSettingsRoboTests
Change-Id: Ia82f30e7e0b83587b4baeef28e81da6b8e4303fe
2016-12-20 11:39:10 -08:00
Doris Ling
dea703544a Merge "Add new method getExtraIntentAction() in DashboardFeatureProvider." 2016-12-19 23:53:37 +00:00
Salvador Martinez
1cea5d199b Refresh support screen more often
Support screen is now refreshed in the onResume.
This will prevent the situation where you open the
support tab and then you cross a hours of operation
boundary and the button is not updated.

Test: make RunSettingsRoboTests
Bug: 33272736
Change-Id: I9312b3b6f711eda91d5d60b3ff30e5ac12bf89c1
2016-12-19 15:03:08 -08:00
Doris Ling
3d9224fd82 Add new method getExtraIntentAction() in DashboardFeatureProvider.
Add a new method to get the extra intent-filter action to be used
to query the dynamic dashboard tiles.

Bug: 32739952
Test: make RunSettingsRoboTests
Change-Id: I96d9d8bd32ebe34b7c0df00c3fb4d8900b476c94
2016-12-19 14:23:09 -08:00
roger xue
f5c786f6d6 move PreferenceController into settingsLib/core
Test: moved
Change-Id: I6578efc4d51ef5a9202b6a8ad1c7197aeda2d6bb
2016-12-19 12:41:02 -08:00
Paul Duffin
38c844eb11 Use junit instead of junit4-target
Bug: 30188076
Test: make checkbuild
Change-Id: Ic2bc905dd47d771630bb5a7047b0e290fb3dd04f
2016-12-19 14:01:32 +00:00
TreeHugger Robot
5f893153c0 Merge "Enable button only when scrollview reached the bottom" 2016-12-17 00:43:49 +00:00
jackqdyulei
0b3edc728e Enable button only when scrollview reached the bottom
Bug: 28410288
Test: make RunSettingsRoboTests
Change-Id: I04653c377f7d419b6701b5589ff25961e0f5c077
2016-12-16 14:58:43 -08:00
Jaewoong Jung
12010156ab Merge "Adds a menu item for additional battery info to battery settings." 2016-12-16 22:05:21 +00:00
Jaewoong Jung
1e0f8ff5e5 Adds a menu item for additional battery info to battery settings.
Bug: 33352540
Test: No additional test failures.

Change-Id: Ibfc1a9463c93d3c087ed712fe45d3d0717472c6a
2016-12-16 12:25:32 -08:00
TreeHugger Robot
1e4d5b5852 Merge "Refactor Work sounds in SoundSettings." 2016-12-16 01:37:13 +00:00
TreeHugger Robot
d8c209f0af Merge "Added survey triggering mechanisms" 2016-12-15 23:36:45 +00:00
TreeHugger Robot
a8dee23ee5 Merge "Hide next button when max fingerprints enrolled" 2016-12-15 22:57:27 +00:00
Doris Ling
2adb6ea4ec Refactor Work sounds in SoundSettings.
- final round of refactoring SoundSettings to use preference
  controller.
- add work sound controller to control all the work profile sound
  settings.

Change-Id: Ifa9f9c1f717ca292576f077311fe284325e12651
Fixes: 32276590
Test: make RunSettingsRoboTests
2016-12-15 14:53:27 -08:00
TreeHugger Robot
08951ab12f Merge "Update the Settings database to enable Payloads" 2016-12-15 22:51:32 +00:00
Salvador Martinez
db42a6ce0a Added survey triggering mechanisms
Surveys can now be triggered on a subset of Settings screens.
Surveys can also be modified/created for this subset of
screens remotely.

Test: RoboTests && JUnitTests
Bug: 27823357
Change-Id: I1534af5573bef6f6c65c9c99b6f5a2917c3325b9
2016-12-15 13:04:30 -08:00
Matthew Fritze
1dec073528 Update the Settings database to enable Payloads
Add Payload and Payload type columns to the settings
database. This includes extending preference controllers
to map their settings to UI components so that the
payload results can be consumed by a front end.

Change-Id: I889dcc4ff7793306718d12e1e5993386b58f21cc
Fixes: 33451851, 33390556
Test: RunSettingsRoboTests
2016-12-15 21:00:52 +00:00
Fan Zhang
4addb59265 Remove divider lines from all PreferenceFragments.
(this is partially revert of ag/I0ce486f7ac6)

- Only draw divider lines on top of PreferenceCategory and
  FooterPreference

Bug: 33601143
Test: make RunSettingsRoboTests
Change-Id: I26146dcae1603dc807e54ea431910685107be94c
2016-12-14 16:41:49 -08:00
Fan Zhang
d5b48454a3 Build a new FooterPreference UI.
- Create a new layout for footer prefs.
- Create a new FooterPreference type to use the layout
- Create a Mixin to create and add the pref to screen
- Create a new lifecycle observer type to invoke mixin at right time
- Switch SettingsPreferenceFragment to use footer mixin.
- Switch FingerprintSettings to use the new footer pref.

Bug: 33579394
Test: RunSettingsRoboTests
Change-Id: I548ac39a0d120196a7ffed09b4f98bd9a80bae90
2016-12-14 16:41:49 -08:00
Maurice Lam
1b89a9a4e1 Merge "Remove WifiSetupActivity" 2016-12-15 00:36:32 +00:00
Maurice Lam
f8a325c7c6 Remove WifiSetupActivity
That activity was copied into setup wizard and is no longer used.

Also removed setup_illustration_lock_screen because that is also
not used in the current GLIF theme.

Test: Existing Robolectric tests pass
Bug: 33590605
Change-Id: Ib2ea02a5e4bce17a7ea829b854f73caf7d5c5f97
2016-12-14 22:41:58 +00:00
Esteban Talavera
e539c886fd Merge "Check new user restriction for profile removal" 2016-12-14 19:16:28 +00:00
Fan Zhang
af71eb20c8 Merge "Always reserve space for preference icons." 2016-12-13 17:06:59 +00:00
Fan Zhang
1c118b5f2a Always reserve space for preference icons.
This aligns text on preferences on the same screen when some of them
don't have icons.

- Use a custom layout for
  preference
  EditPreference
  switch preference
  VolumeSeekPreference
  DialogPreferencei
  Restricted*Preference
  DropdownPreference

- Moved related style defs into a new file styles_preference.xml,
  because current styles file is too large to read.
- Switch <PreferenceScreen ...> to <Preference ...> for a bunch of
  regular preferences.
- Also removed some dead style.

Bug: 33430928
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java

Change-Id: Ic9b75d3f133f2a83cd999297b8596253d4b10161
2016-12-12 16:02:45 -08:00
Lei Yu
4eba3954e2 Merge "Fix account picker crash when there is no account before." 2016-12-12 21:06:12 +00:00
jackqdyulei
9134548ea4 Fix account picker crash when there is no account before.
Bug: 33497222
Test: make RunSettingsRoboTests
Change-Id: I06adb4e0a4afcb359a4f7e8b15f13f67c28d5b46
2016-12-11 12:37:26 -08:00
TreeHugger Robot
1a71c05c7c Merge "Handle tap on intent based search results." 2016-12-09 23:04:03 +00:00
TreeHugger Robot
0a56f479f9 Merge "First step in refactoring Index.java" 2016-12-09 22:13:26 +00:00
TreeHugger Robot
aff89527e6 Merge "Remove divider lines from new IA fragments." 2016-12-09 21:43:11 +00:00
Fan Zhang
12daf6830d Handle tap on intent based search results.
Also fix how icon is loaded. IconResId is specific to the package of the
indexed result. If result comes from external app, icon needs to be
decoded against the external app's package context.

Bug: 33432310
Test: RunSettingsRoboTests
Change-Id: Ia0c53e63be757405dfaeceb2d865e7d8de87c5ee
2016-12-09 13:27:00 -08:00
TreeHugger Robot
62b397d38c Merge "Add check for DISALLOW_DEBUGGING_FEATURES restriction" 2016-12-09 21:26:36 +00:00
Matthew Fritze
18fcb08308 First step in refactoring Index.java
Handles the following refators:
 - Indexing code into: DatabaseIndexingManager
 - Indexing utility methods into: DatabaseIndexingUtil
 - XML Parsiing utility methods into XMLParserUtil

Bug: 33451851
Test: make RunSettingsRoboTests
Change-Id: I4264ad3806d1bd3a66d879c16ad6c8315ecb832b
2016-12-09 20:51:32 +00:00
Fan Zhang
cdc1135e51 Remove divider lines from new IA fragments.
Change-Id: I0ce486f7ac6148e1747a948c9c2b187157734ed1
Fixes: 33486181
Test: RunSettingsRoboTests
2016-12-09 11:43:42 -08:00
Doris Ling
cc20600102 Add check for DISALLOW_DEBUGGING_FEATURES restriction
- if the user has restriction for the action
  DISALLOW_DEBUGGING_FEATURES, remove the preference for taking bug
  report and the switch preference to enable bug report shortcut in the
  power key.
- refactor DevelopmentSettings to use preference controller for Take bug
  report and enable bug report in power key.

Fixes: 27145643
Test: make RunSettingsRoboTests

Change-Id: I18784d218d37956130c33f527d514ab703727397
2016-12-09 11:38:22 -08:00
Fan Zhang
d4b43228b0 Merge "Improve UI pref when sync/cancel account syncs." 2016-12-09 17:39:16 +00:00