Commit Graph

338 Commits

Author SHA1 Message Date
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
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
Fan Zhang
a875924100 Wrap old search index update logic behind FeatureProvider.
Change-Id: I31024d2e7900a90b4f7dc8cc81951bf6a0e533fa
Fix: 34123028
Test: RunSettingsRoboTests
2017-01-06 09:18:59 -08: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
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
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
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
a3e8f5c024 Upload query text whenever it changes.
Bug: 33266688
Test: make RunSettingsRoboTests
Change-Id: Ie26f9d4ad7460d49305457a7a3066d121e374eab
2016-12-01 10:15:54 -08:00
TreeHugger Robot
3b64ad983f Merge "Fork Search code to independantly develop and test search." 2016-11-18 00:11:51 +00:00
Matthew Fritze
0ed37c3513 Fork Search code to independantly develop and test search.
This is the start of the new search in Settings. It is a nearly complete
replacement of the old search code in a more modular and flexible
architecture. It is expanding the datasources that it queries, including
the same Settings database, which will now include more first party apps
and be extended to support inline results where the user can change
settings directly from the search view. Search will also fan out to
query new sources (local or remote), and is built in a way
such that adding additional sources is roughly the same amount of work
had they been added in the initial writing of this code.

Query interpretation will now be source-dependant, allowing for future
upgrades to fuzzy search where it is applicable.

Change-Id: Ib0bac1fe92bf8a662d33abf9a99bb6ee2090ec8f
Fixes: 32115225, 32378927
Test: make RunSettingsRoboTests
2016-11-17 14:34:29 -08:00
Fan Zhang
10dd465969 Fix bug: BackupResetDashboardAlias is mapped incorrectly.
It should map to BackupSettingsActivity and should not contain fragments
in metadata.

Bug: 32874082
Test: RunSettingsLibRoboTests
Change-Id: I1c9aab7e34cfd07e9b582772cebb39cf8488b093
2016-11-16 14:59:59 -08:00
Bartosz Fabianowski
05061fced3 Add Enterprise Privacy page to Settings
This adds a new page to Settings which tells the user about his/her
privacy in light of enterprise management. The new page is only shown
on devices that have a Device Owner app set.

This CL adds a mostly blank page. Follow-up CLs will populate the page
with information about specific admin actions/policies.

The page's title ("Privacy"), icon and location in the Settings app are
tentative. The page will move to its final location once the new IA
redesign is finished.

Test: make RunSettingsRoboTests
BUG: 32692748

Change-Id: I5b5c08c0025207516b0779f54cf68234a4ba3fe4
2016-11-14 12:04:49 +01:00