Commit Graph

11 Commits

Author SHA1 Message Date
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
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -08:00
Doris Ling
5a66ddbd6f Add screen resource for Colors setting.
- each preference fragment should have its own preference screen layout
in order to show the title correctly. Adding the missing data for
ColorModePreferenceFragment.

Change-Id: I172429dc957f94351456d4bc829897a578d7dbf9
Fixes: 68763217
Test: make RunSettingsRoboTests
2017-11-01 17:49:35 -07: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
ed4685fafb Update activity titles for fragments without preference screen.
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.

2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.

3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.

4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
2017-10-26 12:01:06 -07: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
Felipe Leme
bd88450183 Adds a Util.setSafeIcon() function used to avoid crashes.
There are many places on Settings that loads an icon provided by an application,
and if the icon is too big it crashes Settings.

This CL creates a helper method used to set an icon in a safe way, and
uses it in a few places (but most likely not all of them).

Bug: 65739885
Test: manual verification with an app providing a 2MB png

Change-Id: Iae2becb6d0ec8893328d9ef1de618f9bd12fa4a0
2017-10-10 08:56:56 -07:00
Fan Zhang
a9fd6ed8ed Keep candidates in radio button picker UI ordered
We will use the order from candidate list.

Change-Id: I3f5bfb9d603d6c926fddd4711e2899df10cb72ac
Fix: 37542504
Test: make RunSettingsRoboTests
2017-06-19 13:35:51 -07:00
Fan Zhang
a0c2c11bbf Change "When in VR mode" to full screen radio button picker
Change-Id: I619af85f9c4a2c32daca786f49e898fde9b593f8
Fix: 36557316
Test: make RunSettingsRoboTests
2017-03-23 13:44:23 -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