Commit Graph

21078 Commits

Author SHA1 Message Date
Matthew Fritze
7fda314980 Update DatabaseLoader querying.
Change the way the queries are built and sorted for the
database loader. It now constructs 3 queries that match
different columns. Each query returns their results
and gets sorted, then merged into the master list of
results.

Change-Id: Id643422ddfe26bfec89e04ee9f5832b99148e22a
Test: make RunSettingsRoboTests
Bug: 32904057, 32903623
2017-01-10 14:27:31 -08:00
TreeHugger Robot
99d56b7f1a Merge "Fix NPE in accountPrefController" 2017-01-10 22:17:41 +00:00
Fan Zhang
9ec4536d8a Show setting tiles for secondary users
Change-Id: I912b3324753731a6633cf6fabfc26ae2e61963a0
Fix: 34176802
Test: runtest --path tests/unit/src/com/android/settings/core/SettingsGatewayTest.java
2017-01-10 13:13:04 -08:00
Fan Zhang
424443bdb2 Fix NPE in accountPrefController
Change-Id: I83dba35604c501780fa9a99d122b9d9bc8068661
Fix: 34193417
Test: RunSettingsRoboTests
2017-01-10 11:50:42 -08:00
Fan Zhang
a3af5a5c28 Merge "Set parent activity for search." 2017-01-10 17:11:41 +00:00
Tadashi G. Takaoka
fd7b98c5ca Watch for changing enabled IMEs
This CL watches a change to Settings.Secure.ENABLED_INPUT_METHODS and
updates search index of IMEs.

Bug: 32643633
Test: After installing AOSP LatinIME.apk, enabling/disabling the IME
      and searching "AOSP", then verify the search landing page is
      correct depending on the IME's enabling state.
Test: Update robolectric test.

Change-Id: I85fa845238b89375e56b207a014af6432f9db647
2017-01-10 18:37:04 +09:00
Tadashi G. Takaoka
e776821a8d Move IME related seach landing pages to its fragments
This CL moves the code building index of IMEs from
InputMethodAndLanguageSettings to VirtualKeyboardFragment and
AvailableVirtualKeyboardFragment, so that a search landing page of IME
becomes one of the fragment correctly depending on the IME state.

Bug: 32643633
Test: Manually installing/uninstalling AOSP LatinIME.apk while
      Settings app is/isn't running, then search AOSP and verify the
      landing page is correctly determined by the IME's enable state.
Test: Update robolectric DynamicIndexableContentMonitorTest
Change-Id: Ie44f358c2d3919fc864f4f88e6229293113823dd
2017-01-10 17:07:50 +09:00
Tadashi G. Takaoka
7bbc632bfb Move physical keyboard search landing page to its Fragment
This CL moves the code building index of physical keyboards from
InputMethodAndLanguageSettings to PhysicalKeyboardFragment, so that a
search landing page becomes PhysicalKeyboardFragment as expected.

Bug: 32643633
Test: Connecting/Disconnecting Anker bluetooth keyboard while Settings
      app is/isn't running, the search Anker and verify landing page
      is PhysicalKeyboardFragment.
Test: Update robolectric DynamicIndexableContentMonitorTest.

Change-Id: I51f308ada74966a96c258f8ef50a9b4fc7bc6635
2017-01-10 15:56:45 +09:00
TreeHugger Robot
f349b07f96 Merge "Add metric event for skipping support disclaimer in future" 2017-01-10 02:03:08 +00:00
Fan Zhang
408c6a3e87 Set parent activity for search.
This enables the nav up button from actionbar.

Fix: 34176247
Test:  runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/search/SearchActivityTest.java

Change-Id: I28ef9f1270f5a178346ff9bd9148f7f2035858b2
2017-01-09 16:39:25 -08:00
Salvador Martinez
553ba00a27 Add metric event for skipping support disclaimer in future
We were not recording when users selected to skip the
support disclaimer in future requests for support. This
event has been added and logged when it occurs.

Test: SettingsRoboTests
Bug: 33414180
Change-Id: I689580ea2256d5554afcd17e77f90ae498d4ad1b
2017-01-09 15:59:41 -08:00
TreeHugger Robot
e5a7da2b16 Merge "Fix the animation issue in DashboardSummary" 2017-01-09 22:00:35 +00:00
jackqdyulei
0bb598c4d0 Fix the animation issue in DashboardSummary
1. When condition is inserted, only scroll to top when previous
position is at the top.

2. Clean condition status after it is removed. So the next time
you insert a condition view, it will always be collapsed.

Bug: 33839780
Bug: 34115341
Test: make -j40 RunSettingsRoboTests
Change-Id: I7f48524917c3119ec24b2f67ba506f381573a391
2017-01-09 12:30:57 -08:00
Fan Zhang
ffd328b071 Misc fixes for IA and pattern.
Disable NFC fragments when feature is not avaiable
Link to spell checker screen with the pref is clicked
Tint "add"/"delete" button in UserDictionary actionbar to proper color.

Change-Id: I8a8e219ce3dbbafc6c4d5a0f34f835ffd0abad4f
Fix: 34155679
Fix: 34161006
Fix: 34154795
Test: RunSettingsRoboTests
2017-01-09 10:58:44 -08:00
TreeHugger Robot
3d8a97fc14 Merge "Progressive disclosure on selected UIs: app, display" 2017-01-07 20:39:33 +00:00
Fan Zhang
d916dae218 Progressive disclosure on selected UIs: app, display
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I1651433ba30a2b5f880095e07b5e2ed9c4e308b9
2017-01-07 11:21:06 -08:00
TreeHugger Robot
a6c3e3ace5 Merge "Add header and remove button to account detail page." 2017-01-06 23:02:12 +00:00
Doris Ling
fd06d2fcf4 Add header and remove button to account detail page.
- Add account header which contains the account icon and name to the top
  of the account detail page.
- Also add the remove account button to the bottom of the page.

Change-Id: I24f1a17a7f9c4dd8c840a2b0329c0965e4e612e9
Fix: 33543525
Test: make RunSettingsRoboTests
2017-01-06 13:20:08 -08:00
TreeHugger Robot
3d07ce6d46 Merge "Fix test from security feature provider." 2017-01-06 03:13:50 +00:00
Fan Zhang
a8205bb528 Fix test from security feature provider.
Change-Id: Idbe1fdab8f8840c593408ce63fdb003bddbabbf9
Fix: 34113785
Test: RunSettingsRoboTests
2017-01-05 17:42:21 -08:00
Fan Zhang
e8a77c551e Do not load old category when IA is enabled.
Bug: 34026031
Test: RunSettingsRoboTests
Change-Id: Ie4ede018c8e3e906093cba4b9d4bf9d75c0bd972
2017-01-05 17:20:59 -08:00
TreeHugger Robot
c4a4c9445a Merge "Apply LightActionBar theme to Settings app." 2017-01-06 00:10:29 +00:00
Daniel Nishi
b2531ebda4 Merge "Add first pass at a new Storage screen." 2017-01-05 22:35:39 +00:00
Daniel Nishi
ec89a3f57f Add first pass at a new Storage screen.
This patch begins setting up the structure for the screen.
The functionality for populating the data in the preferences
is coming in a later patch.

Bug: 33199077
Test: Settings Robo Tests
Change-Id: I9ebad9d3896501e31ac715704ca986eceb36877d
2017-01-05 11:54:56 -08:00
Sunny Goyal
9445d36eea Merge "Adding a customizable development mode tile" 2017-01-05 19:41:15 +00:00
Sunny Goyal
bf9f2d2698 Adding a customizable development mode tile
User can configure the active state for development mode
which would allow enabling multiple options at once

Test: make -j40 RunSettingsRoboTests
Change-Id: I545b790f8c7097945f39ca003e5985b23cb53636
2017-01-05 10:16:18 -08:00
TreeHugger Robot
1b02e9b946 Merge "Check for text type before setting text span." 2017-01-04 23:31:36 +00:00
Shahriyar Amini
6b0a2abab0 Merge "Dynamically update injected security preferences." 2017-01-04 22:51:04 +00:00
Doris Ling
d3a32ed21b Check for text type before setting text span.
The text from the empty text view can be any CharSequence. Need to check
the actual type before trying to cast it to Spannable and setting the
text span.

Change-Id: Ib3ead0a0fe0b797e026c0c259591025fc9c94709
Fix: 34075068
Test: make RunSettingsRoboTests
2017-01-04 13:51:38 -08:00
Fan Zhang
e96b5b9faa Apply LightActionBar theme to Settings app.
Bug: 33558692
Test: visual
Test: RunSettingsRoboTests
Change-Id: I9f0fb71eb0cd0c58ac3b0f69544adec963faf2dd
2017-01-04 12:28:03 -08:00
Lei Yu
0f23bfcd7e Merge "Add suppressor text in SummaryProvider of Sound when it exists." 2017-01-03 21:11:15 +00:00
Lei Yu
d51b81d8c9 Merge "Refine animation to remove strange reshuffling animation" 2017-01-03 21:05:47 +00:00
Maurice Lam
1168a7d794 Merge "Use regular preference theme for setup wizard" 2017-01-03 18:18:22 +00:00
jackqdyulei
d2c0eef222 Add suppressor text in SummaryProvider of Sound when it exists.
When suppressor exists for the sound effect, the sound summary
should show "muted by ...", not the "Ring volume at ..."

Bug: 31461022
Test: make -j40 RunSettingsRoboTests
Change-Id: I5d6895a7a330c993aac40bdca3bb1c79f8b7fbfe
2017-01-03 09:32:18 -08:00
Maurice Lam
ce4a5ade9b Use regular preference theme for setup wizard
Use the regular preference theme rather than the settings specific
one, because setup wizard doesn't want the space reserved for icon
done in the settings theme.

Also minor changes to Espresso FirstIdViewMatcher for a more
descriptive message.

Test: runtest --path tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java
Bug: 33922083
Change-Id: Ic878ccf7b01cfa090ca4587b160e1f9dedfb8d3a
2016-12-29 15:59:29 -08:00
jackqdyulei
0fd7190fdd Refine animation to remove strange reshuffling animation
The issue happens mainly because two animations(move + change) running
on the same view interrupt with each other. When ItemAnimator runs the
move animation, it will change the translationX&Y in a time period.
When the change animation occurs in this period, it gets this translation
value and calculates a non-zero deta, then it would run an unnecessary
move animation, which causes the strange reshuffling.

In this cl, I skip the translation value only for the tile view when
there is pending animation.

I also add scroll operation for conditions view to make it scroll to
top after condition change.

Bug: 33839777
Bug: 33839780
Test: make -j40 RunSettingsRoboTests

Change-Id: I2152f93f756ae20cf754d6fca3525119cb4ceb1f
2016-12-29 14:18:16 -08:00
Shahriyar Amini
4774b58b4c Dynamically update injected security preferences.
Bug: 31002801
Test: make RunSettingsRoboTests

onResume will dynamically update injected security preferences with data
from the associated tiles.

Change-Id: Ibf46abdfcff27bd1b00729fe815c3cf3ace64e26
2016-12-29 12:04:47 -08:00
Lei Yu
3a21de9349 Merge "Add NPE check for method assignDefaultPhoto in Utils.java" 2016-12-28 22:28:10 +00:00
TreeHugger Robot
56340d4306 Merge "Remove System Updates in Phone status." 2016-12-28 21:26:28 +00:00
TreeHugger Robot
61fef6051c Merge "Dump the default broswer in SettingsDumpService" 2016-12-28 21:02:14 +00:00
Doris Ling
e3751a1a73 Remove System Updates in Phone status.
If new IA is enabled, System updates is shown under System, so
Phone status page should not show it.

Change-Id: Ied857a28d27eae2782920d4cee38777fae40e7b6
Fix: 33839778
Test: make RunSettingsRoboTests
2016-12-28 11:51:16 -08:00
jackqdyulei
8164c64edc Add NPE check for method assignDefaultPhoto in Utils.java
When user press back button while adding user, app may crash because
of null context. In this cl, I add NPE check for context in method
assignDefaultPhoto and change this method to return boolean value.
If the return value is false, then stop the following steps(e.g.
creating a dialog after pressing button may also cause crash.)

Bug: 33829308
Test: make -j40 RunSettingsRoboTests
Change-Id: I811b92c268fb20f8c43ab3b0a9ceebe76f5d83be
2016-12-28 11:30:54 -08:00
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