Commit Graph

11 Commits

Author SHA1 Message Date
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