Commit Graph

140 Commits

Author SHA1 Message Date
TreeHugger Robot
f7921b12be Merge "Load only unique dictionary words" 2017-07-14 18:59:41 +00:00
Fan Zhang
6539c9a1d0 Load only unique dictionary words
- Move UserDictionarySettings to sub package
- Convert cursor to loader

Fix: 22058788
Test: robotests

Change-Id: I1e8828abee58362b815abc210c044b678bf9d578
2017-07-13 16:05:35 -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
Daniel Sheng
11d240c300 Removed camera lift gesture settings UI.
Bug: 37154489
Test: make + manual + unit tests
Change-Id: I79e70dea12a65fefcb06aca3fd1891a95d856626
2017-07-05 18:04:10 -07:00
Malcolm Chen
52584e9b48 Add an activity that starts DataUsageList fragment for mobile.
We are providing an itent and a corresponding activity to show
"Mobile data usage" fragment, so that "Mobile network setting"
who lives in phone apk can use that intent to open it.

Bug: 62201918
Test: Manual
Change-Id: I862f8bc90f9456f91b436d26472cce23c837a777
2017-06-28 15:32:24 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Julia Reynolds
559bd3651e Disable managed services special access screens...
... on low ram devices.

- Remove them from the 'Special app access' screen
- Display an error message if an app intents directly to
them

Bug: 35219985
Test: visual, and runtest --path ManagedAccessSettingsLowRamTest.java,
when the device is in low ram mode and when it's not.
Change-Id: Ied919cb248ae56683a00e3492c4737dfd00449ac
2017-06-23 15:44:43 -04:00
TreeHugger Robot
5bf8d87454 Merge "Add a new Bluetooth device details page" 2017-06-06 01:28:54 +00:00
Antony Sargent
04a3b2199e Add a new Bluetooth device details page
Bug: 35877479
Test: make RunSettingsRoboTests

The existing behavior is to bring up a dialog with Bluetooth device
details with checkboxes for each supported profile. This adds a new page
that serves the same purpose with a switch for each profile and a footer
containing the MAC address.

Whether to use the new page or old dialog is controlled by a flag
accessible via BluetoothFeatureProvider.

Change-Id: I026c363d4cd33932a84017a67cbef51c258bad10
2017-06-05 11:17:06 -07:00
Bartosz Fabianowski
55038c0a95 Hide "Changes made by your organization's admin" when empty
The admin of a manged device can take a number actions that will be
listed in the "Changes made by your organization's admin" section of
Settings. If the admin has not taken any such actions, the section
will be empty and should be hidden. This is accomplished by having a
PreferenceController for the section that observes the state of the
PreferenceControllers inside it.

Bug: 35912953
Test: m RunSettingsRoboTests

Change-Id: Ia95754493ee6c5a19b4aa9731fd56fd558e61849
2017-06-02 11:40:41 +02:00
Fan Zhang
b47373014f Add search index for support dashboard activity.
Change-Id: Ie9cf20316f94454a3d41f76d05b662e398c2c2ea
Fix: 36005923
Test: make RunSettingsRoboTests
2017-05-31 14:15:14 -07:00
Fan Zhang
7a98912c94 Update logPackageName() to use new MetricsLogger API
Bug: 38258793
Test: make RunSettingsRoboTests
Change-Id: Id08e5655bdaaf0cabd952b07278cd0daf7b59a3b
2017-05-25 13:51:49 -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
Fan Zhang
aab631fed3 Log different type of values into different constants
Bug: 38258793
Test: make RunSettingsRoboTests
Change-Id: I3ed170613709be04ffb2c561e132094d64619dd4
2017-05-22 18:00:09 -07:00
Fan Zhang
715d25f727 Remove lifecycle interfaces from settings.
They are already moved to settingslib.

Test: builds

Change-Id: I581bdaff492bdb1e75c66fb69c803eb222f68b8b
2017-05-22 14:48:06 -07:00
Fan Zhang
daf95ed1b3 Merge "Log preference change as count (in addition to action)" into oc-dev am: 13bcf501dd
am: a3202a9a36

Change-Id: Ibf483af95630ca15d886e8ef83b96dbe1aefd55f
2017-05-18 20:44:33 +00:00
Fan Zhang
9938dc8337 Log preference change as count (in addition to action)
Bug: 38258793
Test: rerun robotests, and inspected log
Change-Id: I23fabddc1336709af424bbcb7250535833a8ada6
2017-05-18 00:05:12 +00:00
TreeHugger Robot
cf68422c22 Merge "Add SupportDashboardActivity to secondary user home AI" 2017-05-16 22:38:09 +00:00
Salvador Martinez
8ee06bc775 Add SupportDashboardActivity to secondary user home AI
Secondary users could not see the support preference in the
settings home screen because it was missing from the list of
whitelisted activities. This CL adds the SupportDashboardActivity
to the list so that secondary users can see it.

Test: Robotests still pass for SettingsGateway
Change-Id: Ia48dbd5b8d396c1bdf050c102fee0a5cd5300ed2
2017-05-16 18:05:54 +00:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Juan Lang
e1fc16892e Add a factory method to create a Lifecycle.
Some unit tests in other packages want to override the mLifecycle member
with their own value. When the Lifecycle class moves into SettingsLib,
the classpath of ObservableDialogFragment and Lifecycle have to remain
consistent. This change allows dependent classes to remain agnostic to
Lifecycle's classpath.

Test: make RunSettingsGoogleRoboTests && make RunSettingsLibRoboTests &&
      make RunSettingsRoboTests

Change-Id: I594e447741aeeb3ba95afb4044d496b1540bd92c
2017-05-12 09:24:20 -07:00
Chris Wren
0e06c31bae Merge "allow secondary users to use notification settings" into oc-dev am: 72cc7b7915
am: 715f096678

Change-Id: I164b72d8bcff91e563b70ad6d7051b4617bc46b2
2017-05-12 08:57:05 +00:00
Chris Wren
9749835904 allow secondary users to use notification settings
Bug: 38197667
Test: manual
Change-Id: Ib3b5f865eccc4e47ea00b190e402c3668559f427
2017-05-11 17:51:43 +00:00
Doris Ling
a39f7c2906 Merge "Fix crash when primary user select app installed by secondary user." into oc-dev am: f9d9524574
am: 7c5ef68505

Change-Id: Ia7956ad53ecb8aed962f2d0f3950243ab4c6b06e
2017-05-06 00:11:39 +00:00
Doris Ling
cc28cb372d Fix crash when primary user select app installed by secondary user.
- PackageManager.getPackageInfo() can return null. When trying to check
the app permission info, check for null package info and only process
the permission info when package info is available.
- Update usage of PackageManager.MATCH_UNINSTALLED_PACKAGES to
PackageManager.MATCH_ANY_USER, as the implementation for querying
packages for other users have been changed.
- Add PackageManager APIs used by AppStateAppOpsBridge to
IPackageManagerWrapper for test purpose.
- Change UserManager.get() to Context.getSystemService() to fix test
failure.

Change-Id: I52de924618aa252ffaae02b8f06ebe5b1d0def61
Fix: 37409266
Test: make RunSettingsRoboTests
2017-05-05 14:53:32 -07:00
Andrew Sapperstein
22f0df3968 Merge "Add ability to switch between support versions" 2017-05-01 22:37:32 +00:00
TreeHugger Robot
82c039bcfe Merge "Cleanup to screensaver settings for O" 2017-05-01 22:15:06 +00:00
Evan Laird
227affaf29 Cleanup to screensaver settings for O
Reworked the way screensaver settings are laid out for O. Instead of
using the options menu and dialogs to navigate screensaver options,
there are now two rows: one row for the screensaver choice and
optionally its own settings, and one row for the "when to show" setting.
And now there's a nice obvious button you can press to preview your
choices.

Test: 'export ROBOTEST_FILTER="RadioButtonListFragmentTest";\
mmm -j20 packages/apps/Settings/tests/robotests'

Bug: 35031991
Change-Id: Ie7d2055fb45f6dfe72e34cb9598d9a25f7bee75a
2017-05-01 20:08:16 +00:00
Daniel Sheng
b74914eff3 Fixed crash when opening Camera Lift suggestion
Bug: 37742959
Test: manual + make RunSettingsRoboTests +
      adb shell am instrument -w com.android.settings.tests.unit
          /android.support.test.runner.AndroidJUnitRunner

Added missing SettingsGateway entry for Camera Lift Trigger settings
fragment.

Change-Id: Iddce7a672b0bb8430e3c7b3c346788fb23970636
2017-05-01 11:07:34 -07:00
Salvador Martinez
9f629d6980 Add ability to switch between support versions
Creates a trampoline activity and adds functionality
to the SupportFeatureProvider interface so that we can
conditionally launch support V1 or V2.

Test: Test in ag/2144016
Bug: 37306241
Change-Id: I6d24e65cad91692e457ea216713e90239845b4f5
2017-04-27 15:13:33 -07:00
Lei Yu
bde7097fb9 Merge "Remove PowerUsageDetail.java" into oc-dev 2017-04-07 01:34:37 +00:00
Christine Franks
c50403c606 Prevent apps from displaying over Settings
Specifically, the DrawOverlayDetails fragment only.

Bug: 36070413
Test: make RunSettingsRoboTests -j100
Change-Id: I0069f0cacf8c963c8c6878dc89a32b205983a568
2017-04-05 17:55:24 -07:00
jackqdyulei
ae01ef5906 Remove PowerUsageDetail.java
Now we use AdvancedPowerUsageDetail instead.

This cl also:
1. Remove PowerUsageDetail in SearchIndexableResources since we
don't want to index PowerUsageDetail
2. Add AdvancedPowerUsageDetail in SettingsGateway

Bug: 36992358
Test: Build
Change-Id: I598bb159aa2b5a4889071ae9a17d29554e6afe11
2017-04-05 14:20:06 -07:00
Julia Reynolds
e17590271f Move automatic rules to main DND settings page.
Change-Id: I32b103714d4864ab32e2c85d86106dc118f9c338
Fixes: 31050255
Test: manual
2017-03-27 15:57:39 -04:00
Fan Zhang
51059c5c91 Move reset options to one place
Change-Id: I419c16cbfc69861e01f28c14abdde137bd78f0bb
Fix: 36458355
Test: make RunSettingsRoboTests
2017-03-24 17:26:33 -07:00
Doris Ling
93582995da Add page Settings->Security & lock screen->Lock screen preferences.
- add the new preference screen that contains configuration for lock
screen notification, add user when locked, and owner info.
- refactor SecuritySettings to use the new owner info controller.

Fix: 36163515
Test: make RunSettingsRoboTests

Change-Id: I3bada8f652f89ed0af7aebc03f0bf2f637296b4d
2017-03-23 11:35:20 -07:00
Winson Chung
217d0e9d23 Update picture-in-picture settings to match mocks.
- Removing switches in top-level picture-in-picture settings, adding
  details screen for each app which contains the switch and some
  additional information.

Bug: 35957404
Test: make -j40 RunSettingsRoboTests
Change-Id: Ib22df8a52ab857e071ec43dd3e5d1f5282db35cb
2017-03-20 17:19:30 +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
2907f86971 Fallback to default wallpaper picker if first choice fails
- Add fallback logic in WallpaperSuggestionActivity
- Move some classes around
- Delete some unused class

Change-Id: Ifc8864428647a94f3ecae50d193c2156b2592ff3
Fix: 36140287
Test: make RunSettingsRoboTests
2017-03-17 16:49:58 -07:00
TreeHugger Robot
c9be7e6ba7 Merge "Remove Index.java from old Search and its dependents" 2017-03-17 23:23:50 +00:00
Matthew Fritze
5c83cfa278 Remove Index.java from old Search and its dependents
Test: make RunSettingsRoboTests
Bug: 35763944, 36192909
Change-Id:  If216e1eeb4c29e7372720c6228fa4e99ea2a9904
2017-03-17 14:26:05 -07:00
Daniel Nishi
17529b7dc1 Add lifecycle methods for managing the options menu.
Test: Settings robotests
Change-Id: I087cd0ec097041a4c4e0dd561dd2ec62f45f5390
2017-03-16 16:13:20 -07:00
Bartosz Fabianowski
436873f156 Add DynamicAvailabilityPreferenceController
This is a PreferenceController that correctly handles the case of
isAvailable() changing dynamically, while the Settings page containing
the preference in question is open.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I95e22bbc7bdc17bacd2bf6b82fa5b535494d5bce
2017-03-10 23:25:36 +01:00
TreeHugger Robot
a2a09c9ce2 Merge "Adding app specific screen for "External Sources"" 2017-03-09 01:22:01 +00:00
Suprabh Shukla
f59d2115ed Adding app specific screen for "External Sources"
Adding app specific screen so that third party apps and package
installer can directly intent there to direct users to change the
setting. Also added automater tests.

Test: adb shell am instrument -w -e class \
'com.android.settings.applications.ExternalSourcesSettingsTest' \
'com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner'

Bug: 33792674
Bug: 35487166

Change-Id: I5a481ee7032979df94a9e267ea74aa90da6a0906
2017-03-07 23:44:51 -08:00
TreeHugger Robot
01b721ee11 Merge "Remove some dashboard alias" 2017-03-07 06:19:55 +00: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
Fan Zhang
c6f4c9c9b5 Update preference logger to log pref change as ACTION
Change-Id: I600cf6ec79cbc876347c3fdb20ea70fffbc04524
Fix: 34775467
Test: make RunSettingsRoboTests
2017-03-06 15:39:22 -08:00
Fan Zhang
f5f71a9be2 Fix ServiceConnectionLeak in network fragment
Change-Id: I43efe9ae31fc2f58361abdb034b0205a3f3e2b71
Fix: 35957226
Test: make RunSettingsRoboTests
2017-03-03 18:01:19 -08:00