Commit Graph

28 Commits

Author SHA1 Message Date
Becca Hughes
797694855f Update button strings for new design
Updates the positive button strings see
mocks here:

https://screenshot.googleplex.com/6hLciwYTPMsYytt
https://screenshot.googleplex.com/ASAotxvEHnrDodq

Implementation:

https://hsv.googleplex.com/4658122816749568
https://hsv.googleplex.com/5590705238966272

Bug: 322074376
Change-Id: I8488d4b9414448bfbfc9462fe5450681bfbbfbdb
Test: flash device
2024-02-14 18:00:32 +00:00
Yuri Lin
e9f13fbd5e Rename RadioButtonPreference -> SelectorWithWidgetPreference.
This change is to reduce ambiguity as we're adding the option to style the preference like a checkbox as well.

Bug: 190180868
Test: SelectorWithWidgetPreferenceTest, RunSettingsLibRoboTests
Change-Id: Ie414347bf67ed394ef495604890c5851fc42dbc7
2021-07-20 17:01:21 -04:00
Raff Tsai
71a37d138b Import RadioButtonPreference from SettingsLib
Bug: 138620011
Test: manual, robolectric
Change-Id: I3b8a2be021a1b4a07aae61483f2329b7a5bd4655
2019-08-01 07:16:55 +00: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
Fan Zhang
a6c7db1888 Update logging: switch a bunch of action() logging calls.
Use generic action(int, int, int, String, int) instead of
action(Context, int, string, Pair...) when possible.

Bug: 117860032
Test: robotests
Change-Id: I5213b52b2b10d80a3c488c37718df81b3b0a428f
2018-11-13 21:50:34 -08: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
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
jackqdyulei
f1213365fc Unrestrict SMS/PHONE app if it been set active
If an app been set default SMS/PHONE app, we need to unrestrict this
app. This CL extract a common function and invoke it when necessary.

Change-Id: Id29c5138438aa6f6f22cdd9c4ecf336de8481782
Fixes: 80305978
Test: robotests
2018-07-18 12:32:34 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -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
John Li
2df5a0b322 Move these radio buttons to the left
Assign new single layout to RadioButtonPreference for w/ or w/o icon
and call setIconSpaceReserved(false) in RadioButtonPreference's
constructor. In case of having icon, calling setIcon() can make
icon_frame visible.

Bug: 70850017
Test: m -j56 SettingsRoboTests RunSettingsRoboTests
Change-Id: I8b35f75b6d8114a5e4c69ec1a3287c55e764ffe0
2018-04-09 12:10:59 +08: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
Fan Zhang
1c3a4de93d Switch to use small icon for most app related pages
- Renamed AppProgressPreference to AppPreference to handle most app
  related prefs
- Add ed AppSwitchPreference - the same layout as AppPreference except
  it's a SwitchPreference
- Use above 2 prefs in most app related pages.
  - Everything under special access pages
  - Recent app list in App & notifications
  - App data usage detail page
  - Default app picker pages

Bug: 65182905
Test: robotests
Change-Id: I96c980ba1db49e36dabe25b5eade1197215aad11
2017-10-30 12:20:49 -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
012028e3a3 Misc logging changes
- log search result count, rank when clicking search result.
- log app package when default app is changed

Change-Id: Idd11bd67caba2beaa59c65839c40db8c71787388
Fix: 62072727
Test: make RunSettingsRoboTests
2017-05-26 12:28:13 -07:00
Felipe Leme
e78e851fff Refactored ConfirmationDialogFragment to use default construcutor.
Test: manual verification
Test: make RunSettingsRoboTests -j90

Fixes: 38397850

Change-Id: Ie724e7e92a6a34d4db16e4406bf821f00d98d180
2017-05-23 09:36:34 -07:00
Felipe Leme
aa7a23b40d Improvements on ACTION_REQUEST_SET_AUTOFILL_SERVICE:
- Moved to proper package.
- Returns right away when:
  - AutofillService for package is already selected
  - Autofill is not available

Bug: 37576671
Bug: 37673809

Test: manual verification
Test: make RunSettingsRoboTests -j90

Merged-in: Icda260cea1b4ce6cdefd8eff9625b2b768a5ed86
Change-Id: Icda260cea1b4ce6cdefd8eff9625b2b768a5ed86
2017-04-26 20:50:15 -07:00
Svet Ganov
4fafa4e403 Update the strings for the autofill enable dialog
Test: manual

bug:37244333

Change-Id: I6dfac8826d5a817567116ef2f57d646d92b54b4e
2017-04-12 15:17:53 -07:00
Phil Weaver
296b7263ad A11y shortcut settings enhancement
Adding shortcut on/off switch, improving the service picker,
and adding a switch to enable the shortcut on the lock screen.

Also adjusted setting search code to avoid indexing the
accessibility shortcut aside from the main accessibility settings
page.

Bug: 35872328
Bug: 35219988
Test: Ran in a variety of conditions, ran existing settings test.
Also added basic robo test, verified existing robo tests pass.
Change-Id: I4da9bad74caf96d9c8f3640e7db5417b4ee5d602
2017-03-24 13:15:13 -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
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
Fan Zhang
dfce62c507 Deprecate AppListPreference and AppListPrefWithSettings
- Convert ManageAssist into DashboardFragment
- Convert default assist pref to DefaultAppPickerFragment
- Add PreferenceController for each pref
- Add tests

Bug: 35203386
Test: make RunSettingsRoboTests

Change-Id: I0350a06cae7457809fb261e2d8ec99eda80cc50a
2017-02-21 13:01:00 -08:00
Fan Zhang
f8f55e574d Convert auto-fill default selector to full screen pattern.
Bug: 34280137
Test: RunSettingsRoboTests
Change-Id: Icde3bcaf11615010d481f39d8b32d28dfc120018
2017-02-09 12:45:53 -08:00
Gustav Sennton
9ae1b8b046 Merge "Have WebView Implementation Dev Setting use DefaultAppPickerFragment." 2017-02-09 17:36:33 +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
Fan Zhang
4be105e9f4 Checke radio on default app screen if there's 1 option only
Change-Id: Ib091eb033ce541dc6a6d97ef45a15a5eb957e405
Fix: 34746591
Test: make RunSettingsRoboTests -j40
2017-02-08 15:37:38 -08:00
Fan Zhang
35692cf439 Full screen default app fragment
Fix: 34280137
Test: make RunSettingsRoboTests
Change-Id: Ib44e39589781d68c7952a2c16a44682791a422f1
2017-01-23 16:08:42 -08:00