Commit Graph

21 Commits

Author SHA1 Message Date
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
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
Salvador Martinez
408dc41228 Update copy for battery estimate related features
Many features are using the enhanced estimates but the copy for them
has gotten out of sync. This CL moves shared strings between Settings
and SysUI to SettingsLib and also updates features that use the
strings to have consistent behavior/text.

Test: Robotests
Bug: 65656091
Bug: 66909350
Bug: 67469159
Change-Id: Ie5ef1ed65429ca9805cff374f1439e5d61eb6591
2018-02-07 10:55:15 -08:00
Doris Ling
ce55d7c6a1 Remove app info page v1 related codes.
- change to use AppInfoDashboardFragment completely
- remove InstalledAppDetails and the corresponding tests

Change-Id: I8cbdf71cadc8b5743929abbafe91185e5e39b6b2
Fixes: 69384089
Test: make RunSettingsRoboTests
2018-01-29 17:14:32 -08:00
Antony Sargent
e04101be07 Prevent crash in recent app list
In some situations if you have recently used an app and then uninstalled
it, the display of recent apps in Settings->Apps & notifications would
crash. This is due to a bug in recent CL that fixed b/71591298.

Test: make -j64 RunSettingsRoboTests
Change-Id: Id04b073b2617eeff0e188b10d3743496a9f70d5e
Fixes: 72340364
2018-01-24 16:14:16 -08:00
Antony Sargent
a6203c3f6a Include instant apps in Recently opened apps list
We were accidentally excluding instant apps from the recently opened
apps list in Settings->Apps and notifications.

Test: make RunSettingsRoboTests
Change-Id: I9cac956ceacbfba74a79b38cb01afa2de74ee6fe
Fixes: 71591298
2018-01-19 11:04:22 -08:00
Doris Ling
a0006d93bd Move AppInfoDashboardFragment into appinfo package.
- update all references to AppInfoDashboardFragment
- removed PackageUtil inner class and change the corresponding function
to be a simple method.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: Ief067e25a303ef16db20b2ca1d8840cb06eff5f9
2017-12-12 16:58:17 -08:00
Doris Ling
529e207986 Create version 2 of InstalledAppDetails
- this is the first step for converting InstalledAppDetails into
DashboardFragment
- add a feature flag to determine whether to show the new installed app
detail page.
- decouple the fragment from AppInfoBase: extends from
SettingsPreferenceFragment directly and copy all codes from
AppInfoBase.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: If1ab5b216620eaba1d6bde20e65e7a602931fd94
2017-11-17 15:37:34 -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
Fan Zhang
974d2fe080 Update UI to use a smaller icon for ManageApplication page.
- Rewrite preference_app.xml to have a small icon
- Update ApplicationViewHolder to hide/show summary row dynamically
  - but only do this for notification settings - this UI has empty
    summary for most row. For other UI, just keep the empty summary row
    until summary comes in. If we also hide/show summary row there will
    be a height change animation which is janky.

Bug : 65182905
Fixes: 63582851
Test: robotests

Change-Id: Ice67324f08c67e014a018dfc51e00fe4449036dd
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
Roozbeh Pournader
4de9df2943 Define Utils.formatRelativeTime() and use it
Previously, relative times were formatted using formatElapsedTime()
(appending translations of "ago" to them), sometimes resulting in
grammatically hard-to-understand or unnatural localizations. Now we
use ICU's RelativeDateTimeFormatter, which uses grammatically correct
and natural localizations from CLDR data.

Bug: 64507689
Bug: 64605781
Bug: 64556849
Bug: 64550172
Test: make -j RunSettingsRoboTests
Change-Id: Ia2d098b190ab99e7748ef6f03b919f5c6174ba7d
2017-09-12 20:48:00 +00: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
Doris Ling
296bdda5df Merge "Update summary for Recent Apps." into oc-dr1-dev am: d7fc071f48
am: dc361053a0

Change-Id: Ibd4dbb2d883a16d3d0811b15dbda9825178d5833
2017-06-22 21:34:40 +00:00
Fan Zhang
6cd558e595 Add divider line below "see all apps" preference
Change-Id: I94cbf47fd987a6ff4c4fabcc3124fae1f0438876
Fix: 62040104
Test: make RunSettingsRoboTests
2017-06-15 12:40:57 -07:00
Doris Ling
ec4064cdbd Update summary for Recent Apps.
Change the formatting of the time since last used to match the
formatting in battery info.

Change-Id: Ibd59493719d9f90391713713b75afd11790deaa0
Fix: 62273254
Test: make RunSettingsRoboTests
2017-06-07 11:22:10 -07:00
Fan Zhang
83365ec6ea Update recently opened app string and "see all" summary
Change-Id: I84a01f01ac1c685db87970c3137f30ba58c800b3
Fix: 62040104
Test: make RunSettingsRoboTests
2017-05-26 15:30:57 -07:00
Fan Zhang
daad10b428 Change the logic for showing "App info" vs "show more"
Fix: 33265548
Test: robotests

The old logic shows "show more" when there is any recent app, new logic
first checks if there is any displayable recent app. Otherwise go back
to display "app info".

Change-Id: I485725eaa025b9e2cfffc5e9e1923aa771bb0e12
2017-05-05 09:39:24 -07:00
fanzhang172
ae2f2b5268 Add recent apps in app & notification
- Introduce a RecentAppsPreferenceControler, which queries
  UsageStatsManager and displays a list of recently used apps.

- Add a control flag for this feature, intially set to false.

- Make ManageApplications a static pref item instead of dynamic one.
  This makes the RecentAppController easier to control "See all"
  preference, which is backed by ManageApplications.

- Also adjust app_items.xml layout to make app item UI consistent with
  preference item.

Change-Id: I0b9e1784faed32b3055ebf96ef98b6a5e422de50
Fix: 33265548
Test: robotests
2017-05-03 14:09:43 -07:00