Commit Graph

17 Commits

Author SHA1 Message Date
Edgar Wang
08f2a58459 Settings search - Navigate user to exact page
- remove duplicate index preference
- default set searchable = false when the preference has fragment
- make some fragments indexable

Bug: 143057584
Test: robotest & manual

Change-Id: I4d64f6106d2f92f0a45e8c7e26388677f593f412
2019-12-24 21:04:11 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Doris Ling
b9ff5892ca Get app info with correct user id.
- when querying app info from package manager, we should use the methods
that takes the user id so that it will work properly with managed
profile.

Change-Id: Ifc84d3a29aaf7b2c1acfa096596a53f1715cc908
Fixes: 117222623
Test: make RunSettingsRoboTests
2018-10-11 16:47:03 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
HJ ChangLiao
5693be2863 Replace PackageManagerWrapper with PackageManager
Replace all SettingsLib/PackageManagerWrapper in Settings,
by PackageManager,
Remove ShadowPackageManagerWrapper.

Bug: 62067063
Test: make RunSettingsRoboTests
Change-Id: I6d1af55c13d80c1907b98b21e0207cc903cd9b1f
2018-04-24 15:12:31 +08:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Fan Zhang
5f9a348f7e Get rid of UserPackageWrapper util.
Robolectric can support framework private classes now, so there is no
need to use wrappers.

Bug: 76167422
Test: robotests
Change-Id: I034a9f0a9856348bff491f2e9b2b1f7d682ab942
2018-03-22 15:28:46 -07:00
Dake Gu
fef14cac00 Settings: Move DefaultAppInfo CandidateInfo to SettingsLib
Bug: 3600711
Test: Moved DefaultAppInfoTest to SettingsLib
      m RunSettingsRoboTests
Change-Id: If9e2288009277f1940b9769790b78bb0a58b626a
2018-02-23 13:23:16 -08:00
Doris Ling
03a3b518de Update preference screen title.
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
2017-10-25 11:02:07 -07:00
Fan Zhang
efa763624a Use IconDrawableFactory to load icons for default apps.
Bug: 64336923
Test: robotests
Change-Id: I2a4ca05a866784f97e247bad1c1679a6ec0f5efa
2017-10-17 15:56:16 -07:00
Doris Ling
dee1a22c45 Consolidate all wrappers used for testing.
- Add the wrapper package and move all wrappers to the wrapper package.
- Get rid of some wrapper interface/impl implementation and have a
wrapper class directly.

Bug: 65634579
Test: make RunSettingsRoboTests
Change-Id: Ic757d8f7bacfa7a034c7e692205bc1dc4b0e1de1
2017-09-14 18:24:49 -07:00
Fan Zhang
a278962dbc Refactor DefaultAppPicker to a general radio button picker
Bug: 36557316
Test: make RunSettingsRoboTests
Change-Id: I52985e527e55697cf29f8d97d775d4bbed025beb
2017-03-23 12:41:31 -07:00
Gustav Sennton
75f0b1b2e4 WebView implementation Dev setting: Show the version number after name
Show the package version of each WebView implementation after their
package name in the WebView Implementation Dev Setting. Showing a
package version is useful for debugging purposes.

Bug: 35621558
Test: run make RunSettingsRoboTests
Test: Ensure package version is shown in titles of items in WebView
Implementation Dev Setting.
Change-Id: If195dd87aebeac1783600b7c9f376ff8e791c3be
2017-03-10 14:40:37 +00:00
Gustav Sennton
3c89d8e2cf Fix disabled WebView packages being shown as enabled in Dev Setting.
WebView packages that cannot be chosen as WebView implementation should
be shown as disabled in the 'WebView Implementation' Dev Setting.
Simplify the logic in DefaultAppInfo a little bit to avoid
special-casing for the WebView Dev setting.
Also add tests to ensure we are correctly disabling WebView packages in
the Dev setting and showing their disabled-reasons.

Bug: 35707106
Test: 'make RunSettingsRoboTests'
Test: Ensure disabled WebView packages show up as being disabled in the
'WebView Implementation' Dev Setting.
Change-Id: Ic2f5265c3451b6396e55b7bc29689c3d889ddb5e
2017-03-07 19:30:10 +00:00
Gustav Sennton
5b596285a0 Have WebView Implementation Dev Setting use DefaultAppPickerFragment.
Make the WebView Implementation Dev Setting look like the fullscreen
settings deriving from DefaultAppPickerFragment.
Point the Activity opened through Settings.ACTION_WEBVIEW_SETTINGS to
the class WebViewAppPicker which is our new implementation of the
WebView Implementation setting.

Ensure the new setting closes if it is reached from a user that isn't an
admin of the device.

Bug: 34806477
Bug: 34966439
Test: Ensure WebView implementation Dev Setting looks ok (disabled
packages should have a text showing why they cannot be chosen).
Test: Start Intent with action Settings.ACTION_WEBVIEW_SETTINGS and
ensure the started Activity looks similar to the WebView Implementation
Dev Setting.
Test: Ensure picking a package that is no longer active, updates the
setting (so that package isn't visible anymore).
Change-Id: I08007c515193739ad61dfd735bb5130fc07bd6e6
2017-02-09 10:17:17 +00:00
Gustav Sennton
4d3334c50b Update WebView implementation Dev Setting - new looks + descriptions.
Now that we are changing the WebView package mechanism so that a package
can only be used as WebView implementation if that package is enabled
for all users of the device we need to tell the user why a package can't
be chosen as WebView implementation.
With this CL we do so in the 'Set WebView Implementation' Developer
Setting.

We code for the WebView implementation Developer Setting is now based on
the same code as that of the Debug App Developer Setting.

Bug: 32894154
Test: Ensure WebView Implementation setting shows correct packages.
Test: Ensure WebView Implementation setting shows correct descriptions
for why a package is not usable - including the case where packages are
disabled/uninstalled for a second user.
Test: Ensure the summary for the WebView Implmentation setting is
updated after changing WebView package.
Test: Ensure the WebView package Activity
(Settings.ACTION_WEBVIEW_SETTINGS) is similar to the Dev Setting.
Test: ensure non-admin user cannot start WV-picker activity through
'adb shell am start -n com.android.settings/.WebViewImplementation'

Change-Id: Ia6e6e9e12ce8f8f45ec539807cd0c6479acb8ecb
2017-01-23 18:34:11 +00:00