Commit Graph

498 Commits

Author SHA1 Message Date
Fan Zhang
3f6c90eb34 Merge "Delete DynamicindexableContentMonitor & all refs to it" into oc-mr1-dev am: 5b820431d3
am: a8f7f745e1

Change-Id: Ifd5618ddad3fcc9a535fe719470e67946bcd9d2d
2017-08-10 02:30:57 +00:00
Fan Zhang
e3535d9998 Delete DynamicindexableContentMonitor & all refs to it
Convert input device search into a search query loader

And remove old logic from DynamicIndexableContentMonitor

Change-Id: If652b1ea7c8add9185bbd025055e14925d3a8eec
Bug: 64310452
Bug: 63831980
Test: robotests
2017-08-09 17:27:02 -07:00
Tony Mantler
3d84d56336 Remove development settings prefs file
Move DevelopmentSettingsEnabler to SettingsLib

Bug: 64159590
Test: DevelopmentSettingsEnablerTest
Change-Id: Id609266019e05a3e06b4ee3bc10de9c019628a42
2017-07-31 14:01:09 -07:00
Rajeev Kumar
4a5e3dc6c5 Data plan usage summary activity.
Change-Id: Ibb0889563d432591fd00ac00d03633b1894ad124
Note: These changes are required for Data balance UI.
Bug: 62349208
Test: make RunSettingsRoboTests -j40
2017-07-19 12:35:24 -07:00
Fan Zhang
2ea6700336 Show default app icon in default app screen.
- Renamed AdvancedAppSettings to DefaultAppSettings.
- Add logic to DefaultAppPreferenceController to also display icon.
- Modified DefautlAssistPrefController to suppress gear icon, and use
  the controller in default app setting UI to display icon.
- Remove dynamic injected payment setting activity and create the
  setting statically in xml.
- Add DefaultPaymentSettingsPreference to display default payment app
  title (no icon because we can't get it)

Change-Id: I6b8c768da0bafe5ec9a85ba9c79c7993b449be25
Fix: 36458534
Test: robotests
2017-07-13 13:49:28 -07:00
Fan Zhang
aeb94f0e5c Fix race condition and optimize categoryUpdater refresh
- In SettingsActivity, do not call updateCategories() if nothing
  changed.
- In SummaryLoader, create a mapping between tile key and summary. This
  is necessary to handle a race condition where category is refreshed
  after summary load.
- In DashboardSummary, refresh Tile's summary to latest cache value
  everytime category is refreshed.

Change-Id: I61389b8ba614ba7e34939325bada6e1bd6fa6709
Fix: 63149109
Test: robotests
2017-07-06 10:13:58 -07:00
Andrew Sapperstein
c217464dca Dashboard search bar polish
Various tweaks to match redlines:
- background is now grey all the time
- the search icon is aligned with the other icons
- the title text is primary colored instead of accent colored
- the background of search bar doesn't scroll anymore

Deletes a bunch of logic to add an initial view that would be
colored based on the first view. It never quite worked right.
Now it's consistent and never moves.

Bug: 37477506
Change-Id: I82c584e8f8ecc6fc298c5cdbce08516c6a069a39
Fixes: 62267378
Fixes: 62379978
Fixes: 62361213
Test: robotests
2017-06-26 10:08:44 -07:00
Andrew Sapperstein
a2dd9978d4 Remove logic for adding a search icon to action bar.
No longer used given that we don't show the search icon on any page.
The main settings page now has the search bar.

Change-Id: I9535028298739467e7fa9c75d1a2fb2b2fa3251b
Fixes: 62230804
Bug: 37477506
Test: robotests
2017-06-25 13:51:08 -07:00
TreeHugger Robot
fca1b78d94 Merge "Initial search bar implementation." 2017-06-01 06:43:22 +00:00
Christine Franks
c101dda9f7 Merge "Allow FR in carrier demo mode" into oc-dev am: 9ef166a578
am: d974ccb625

Change-Id: I8d693fd2d41f73b53416ee83d7b289496765c660
2017-05-31 22:54:31 +00:00
Andrew Sapperstein
048f6fb8b3 Initial search bar implementation.
Replaces the default Toolbar in SettingsActivity with one that looks
like a search bar. It uses a Toolbar inside a CardView with some custom
styling.

Since the search bar is a floating element, the new toolbar lives in the
content frame of the dashboard. A FrameLayout is used to provide the
layering that is desired.

Since the search bar is on top, an additional spacer view is added to
the list of items in the dashboard. Its color changes based on what
the first view is so that it always matches.

Adds android-support-v7-cardview as a dependency (and reorders the
other deps to be in alphabetical order).

Remaining work (in future CLs):
- remove search menu option?
- clean up initial window
- remove the line between the header and the first condition
       when there's a condition

Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: Id7477b90fbaf30eb5cac1ee244c847bddb95b3fd
2017-05-31 15:24:25 -07:00
Christine Franks
2d0293951a Allow FR in carrier demo mode
Bug: 62133292
Test: make RunSettingsRoboTests -j100, and manually verified FR is
available in carrier demo mode.

Change-Id: Ia793bf234b229da0490accfea6d44b72395a04bc
2017-05-31 12:04:01 -07:00
Matthew Fritze
2078bc2358 Remove search2 package and put everything into search
Change-Id: Ie8651c79ef023f154cd7120a88a20f3481abce2b
Fixes: 38502743
Test: make RunSettingsRoboTests
2017-05-23 13:57:28 -07:00
Matthew Fritze
ab0b3f6790 Prevent race conditions after dropping database
Block all loaders from accessing the database
before indexing is complete.

Bug: 37501479
Test: make RunSettingsRoboTests
Change-Id: I2af98dcf6bceacbeffa70bd40879c97bb0cbc828
Merged-In: I02f8423c0ffc27abbb8ceb61a8c47d2f0796d0bb
2017-05-08 18:48:04 +00:00
Matthew Fritze
be0989cc61 Prevent race conditions after dropping database
Manual merge from: ag/2155898

Bug: 37501479
Test: make RunSettingsRoboTests
Change-Id: I02f8423c0ffc27abbb8ceb61a8c47d2f0796d0bb
2017-05-05 15:30:39 -07:00
TreeHugger Robot
190b560c9a Merge "Search Icon persists through screen rotation" into oc-dev 2017-04-14 05:25:57 +00:00
TreeHugger Robot
5569816021 Merge "Keep EnterprisePrivacySettingsActivity always enabled" into oc-dev 2017-04-01 05:17:10 +00:00
Matthew Fritze
7d48ae808a Search Icon persists through screen rotation
Change-Id: If88d345f4ce61f6aec1599d0db85cbfa3b8e91c3
Fixes: 36457675
Test: make RunSettingsRoboTests
2017-03-30 18:18:17 +00:00
Bartosz Fabianowski
578b02f33c Keep EnterprisePrivacySettingsActivity always enabled
The existing code checks during Settings startup whether the device is
managed. If it is not, EnterprisePrivacySettingsActivity is disabled.
If the device then becomes managed, Settings will not notice until
the next restart, causing any attempt to launch this Activity via an
Intent to crash.

This CL changes things so that the Activity is always enabled but
simply does nothing when launched on a non-managed device.

Bug: 34122104
Test: Integration test coming in a separate CL
Change-Id: I0a1dfcb41b405d981309696d97678df6787b4f72
(cherry picked from commit 92d25fb5f3)
2017-03-30 08:28:02 +00:00
Matthew Fritze
8a42b074a7 Reserve full indexing for SearchFragment
Full Index should only be accessible from Search Fragment,
and when only full index should declare a locale to be
indexed.

Test: make RunSettingsRoboTests
Fixes: 36656637
Change-Id: Ie673067118ac6b184570e116ea24a169be027053
2017-03-29 23:55:48 +00:00
Fan Zhang
11d2d68e23 Move developer options related class to development package
Bug: 34203528
Test: none, purely moving classes around
Change-Id: I3cd1d257f948729fda5c04632e7ce9114c40bd0c
2017-03-17 16:51:21 -07:00
Fan Zhang
7c8f8a0a41 Attemp to fix a concurrent modify exception
Change-Id: I039091d43ba8c378066c26dcca416534d0f52d21
Fix: 36347434
Test: existing tests pass
2017-03-17 12:54:24 -07:00
Matthew Fritze
0b431fc003 Purify SettingsActivity from old search code.
Bug:35763944, 32590887
Test: make RunSettingsRoboTests
Change-Id: Id8140b68a676e595bff095546fa119cd3ced2c4a
2017-03-16 14:14:44 -07:00
Fan Zhang
cabc509e4f Allow page to suppress all of its content from search.
To suppress things from search, we usually use preferencecontroller to
control individual items. But a page can sometimes to disabled
entirely. Now it can set isPageSearchEnabled to false to achieve that.

Change-Id: I39424b7fdc6460e27fd7c83cf09b5ace12d1cc37
Fix: 36201167
Test: make RunSettingsRoboTests
2017-03-14 13:59:33 -07:00
Fan Zhang
4fcd5ed29f Disable wifi display activity if device can't support it.
Change-Id: I19ab9d0d480b66e56b87cef7c49d4391a3608111
Fix: 36069170
Test: make RunSettingsRoboTests
2017-03-10 13:03:47 -08:00
Fan Zhang
a6986e7ed2 Misc fix for secondary user
- Theme fix: action bar and status bar color now have enough contrast
  for SUW theme.
- Fix a ConcurrentModificationError when switching between users
  quickly.

Change-Id: If31f88e36f1d4c5d7f90bc9d128041f0e0a81ff9
Fix: 35948464
Test: make RunSettingsRoboTests
2017-03-08 13:09:17 -08:00
Doris Ling
1694d4bfde Remove some dashboard alias
- remove UsersDashboardAlias, PaymentSettingsDashboardAlias,
  ManageApplicationsDashboardAlias, and AppNotificationDashboardAlias,
  and merge the metadata into the target activity
- remove StorageActivity
- remove the old top level settings categories

Bug: 35764802
Test:  RunSettingsRoboTests
Change-Id: I0faf006c92a1822228bea20ad884cd9a21696fd3
2017-03-06 20:41:01 -08:00
Doris Ling
26208220cf Remove WirelessSettings and related code not used in new IA.
- remove WirelessSettingsActivity and update other references to it.
- move the intent filter android.settings.WIRELESS_SETTINGS and
  android.settings.AIRPLANE_MODE_SETTINGS into Network dashboard
- move intent filter android.settings.NFC_SETTINGS into Connected
  devices dashboard.

Change-Id: I84f75ac45d0712eac9c40aa6c8f052bc060ed03a
Fix: 32342061
Test: make RunSettingsRoboTests
2017-03-03 13:20:12 -08:00
jackqdyulei
6c355f5d4b Show settings app icon and name in recents
If user opens a settings activity by intent, it will show icon and
label get from activity. However, we should show settings app icon
and name constantly.

Bug: 34645742
Test: RunSettingsRoboTest
Change-Id: Ic2f0fef32529ba3f425a0130d25ead47fa0bb97d
2017-03-02 11:29:41 -08:00
TreeHugger Robot
90cbcce9e5 Merge "Fix crash when switching to fragment with null name." 2017-03-01 23:44:58 +00:00
Doris Ling
cb69baf8f6 Fix crash when switching to fragment with null name.
Check for null fragment name before trying to launch the fragment.

Change-Id: Ibee6f7a1f27f7bc7d556a600c7e43fd30c2f1d6c
Fix: 35203478
Test: make RunSettingsRoboTests
2017-03-01 13:53:46 -08:00
TreeHugger Robot
6c146f2ab5 Merge "Remove old code relating to SystemSettings not used in new IA." 2017-03-01 20:44:48 +00:00
Doris Ling
d299b03f28 Remove old code relating to SystemSettings not used in new IA.
- remove activity alias: DevelopmentSettingsDashboardAlias,
DateTimeDashboardAlias, AboutDeviceDashboardAlias,
BackupResetDashboardAlias, EnterprisePrivacyDashboardAlias, and
AccessibilityDashboardAlias and updated the corresponding target
activities with the alias metadata.

- remove InputMethodAndLanguageSettingsActivity and
GestureSettingsActivity and the associated xml.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: I7d4922f8dfaac40e8ad077a68008185cd9fe3304
2017-02-28 17:46:24 -08:00
Fan Zhang
78ab9f98de Remove drawer from settings
Change-Id: Ib11376206cf8366c86c427104c47740c3ca8b0d0
Fix: 35809663
Test: make RunSettingsRoboTests
2017-02-27 17:45:05 -08:00
Doris Ling
15ae329f99 Add logging when launch fragment name is null.
Change-Id: I118c22a46eb794b21f9808978a68afd86b596e4e
Fix: 35203478
Test: Manual
2017-02-27 13:09:49 -08:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -08:00
Fan Zhang
efba6b4e14 Skip redundant SuggestionLoader run during app start.
also skip DiffUtil when drawing first frame.


Fix: 34103984
Test: make RunSettingsRoboTests
Change-Id: I4891d1bca1f17c437444761eaf3002624934014d
2017-02-15 02:06:08 +00:00
Fan Zhang
42aaa53e75 Add logging for settings
- Log when navigating from Settings to injected tiles.
- Log when user creates a new widget shortcut

Fix: 33209678
Fix: 30137094
Test: RunSettingsRoboTests
Change-Id: I1e0f4e00709c392cde2550fafe53890836387c99
2017-02-13 16:57:28 -08:00
Sunny Goyal
c960751e0a Removing one all-purpose developer tile and replacing it with 4 separate tiles,
for individual actions. Also adding a section in Developer Options for enabling
these individual tiles.

Bug: 34813634
Bug: 34909670
Test: Manually tested on device
Change-Id: I3adf5498f8b72959cb68cd508c44d87f953e450a
2017-02-08 10:13:25 -08:00
Christine Franks
1478222cd2 Allow factory reset in carrier demo mode
Bug: 34341567
Test: manual - in carrier demo mode, go to Settings > Backup and
Reset > Factory data reset > Reset phone > Erase everything and
this entire path is viewable.

Change-Id: Ia5491765241adad97ecdb0a5bfd86a8371b8e4fe
2017-02-06 11:42:54 -08:00
Anton Philippov
adfec5563e Add a screen to show OEM backup settings.
Moves the backup settings logic to BackupSettingsHelper and
BackupSettingsActivity:
- If the manufacturer provides the intent and the label for their backup
settings in the config.xml, a new intermediate fragment is shown for
Backup settings to let the user pick either standard backup settings or
OEM provided backup settings.
- If config.xml doesn't contain the intent, BackupSettingsActivity is
used as a trampoline activity to launch backup settings provided by the
backup transport of the default backup settings activity, i.e.
PrivacySettingsActivity.

Bug: 34700410
Bug: 33655074
Bug: 33654991
Test: make RunSettingsRoboTests
Change-Id: I78e340fbf926b2a9dc2c4e3942f9337c3c7a933c
2017-01-30 16:17:28 +00:00
Doris Ling
f8f5f46ff0 Merge "Revert "Get intent for backup settings from backup transport."" 2017-01-26 01:50:23 +00:00
Fan Zhang
ff3db157c2 Revert "Get intent for backup settings from backup transport."
Bug: 34700410

This reverts commit 970a66c972.

Change-Id: I254d704eb4f456c07c6d6d270de830aef95d1f4a
2017-01-26 01:12:57 +00:00
Anton Philippov
6cf09db10e Merge "Get intent for backup settings from backup transport." 2017-01-24 16:11:30 +00:00
Anton Philippov
970a66c972 Get intent for backup settings from backup transport.
This changes BackupSettingsActivity to launch backup settings
from intent provided by BackupTransport#dataManagementIntent() API
instead of the config.xml.

Test: make RunSettingsRoboTests -j40
Change-Id: I0847999459a914e585a626761f3051f1d7a0b591
2017-01-24 00:30:48 +00:00
Fan Zhang
92f1e942da Misc fix on settings themes.
- Use dark status bar for confirmDeviceCreditials theme to match dark
  window background
- Remove SubSettingsDialogWhenLarge theme in favor of full screen
  settings for O.
- Update font/dize preview text color to match light background

Bug: 33558692
Test: visual

Change-Id: Id8704c96e2ce35247e80e50eefd531786479b193
2017-01-21 11:10:06 -08:00
Matthew Fritze
34c27609d6 Move indexing into the Search Fragment
Cold start latency for Settings increased drastically
from the indexing of the Search Database. Moving it into
the Search Fragment moves that latency to cases where
users are actually searching.

Change-Id: I11368af610ac9e80f9901654f980c2c1e26342a5
Fixes: 34142852
Test: make RunSettingsRoboTests
2017-01-19 10:27:37 -08: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
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
Fan Zhang
224caada2d Only update categories after all setTileEnabled() are done.
Bug: 34103984
Test: RunSettingsRoboTests (dashboard refresh related tests no regression)
Change-Id: I8b487c1a3074c6e4756215da1fcfee12daafbfe2
2017-01-06 11:47:05 -08:00