Commit Graph

168 Commits

Author SHA1 Message Date
Sudheer Shanka
5590e2eb44 Update the text shown when admin disabled fingerprint as unlock option.
When the admin has disabled fingerprint as unlock option, we let the
user know that the admin has disabled that option with a more details
link which will trigger the admin support dialog. And made some small
fixes apart from this.

Change-Id: I01021b952dc6fb29a65d37401a6411a6088d5cef
2016-01-25 15:12:07 +00:00
Sudheer Shanka
95a71e06eb Add disabled by policy message as empty views in preferencefragment.
Change-Id: I296dc02c8e5cbea74f8415f4c8c5723f85e20b5b
2016-01-25 14:05:46 +00:00
Anna Galusza
b1795f5549 Make A11y SUW launchable from SUW and small UX changes based on last round of
UX studies.

Change-Id: I9c20cd3abf910a37731da2af604f3af2cd30e942
2016-01-20 15:42:58 -08:00
Jason Monk
b37e2887d3 Update data usage UX
Update the UX and dig the data usage screen out of a huge whole of
technical debt.  Switch every to use Preferences rather than standard
layouts and ListViews.

Split data usage into several fragments, all separated.

DataUsageSummary:
 - Shows a summary of the 'default' usage at the top, this will be
   the default sim on phones, or wifi if it has it, or ethernet
   as last attempt to show something.
 - Also has individual categories for each network type that has
   data, cell, wifi, and ethernet. Maybe should look into bt though?

DataUsageList:
- Takes a NetworkTemplate as an input, and can only be reached from
  the network specific categories in DataUsageSummary
- Shows a graph of current usage for that network and links to
  app detail page for any app.
- Has gear link to quick get to billing cycle screen if available

BillingCycleSettings:
 - Just a screen with the cycle day and warning/limits separated
   out from the data usage.

AppDataUsage:
 - App specific data usage details
 - May need some UX iteration given lack of clarity in the spec

Bug: 22459566
Change-Id: I0222d8d7ea7b75a9775207a6026ebbdcce8f5e46
2016-01-19 13:55:26 -05:00
Jason Monk
65bb097732 Fix search highlighting items
Bug: 24576551
Change-Id: I0a6c251cc93eef9f49070f2b7e57780d4542dd03
2015-12-17 10:39:44 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Jorim Jaggi
c03459cd05 am 90ca1b67: am 0cae8ad7: am e9639b1d: am 5dd0e27f: Merge "Wait with finishing until fingerprints are removed" into mnc-dr-dev
* commit '90ca1b67cfa1507126c6b74b2de059d3bf579734':
  Wait with finishing until fingerprints are removed
2015-08-13 03:18:43 +00:00
Jorim Jaggi
f92fbc1c49 Wait with finishing until fingerprints are removed
Bug: 22863210
Change-Id: I490157cc2f9b52ac87cc52e13c7eb57cb4a4a377
2015-08-12 18:12:58 -07:00
Daichi Hirono
5e76cdc9dd Turn the eject menu into a button.
BUG=21897892

Change-Id: Icd0db7907b990447c99c4ae65816e85777df0f8e
2015-07-17 15:26:15 +09:00
Jason Monk
15dcebe1e7 Help fallbacks and intent work
- Handle a backup URI, so that if the specified URI is not available,
   another can be used.
 - Add some data to help intents when they are intent URIs
 - Fill in the context with a classname when it isn't present

Bug: 15475009
Change-Id: I7050fa61121901929e650b20bd7a0ae21e8ba207
2015-05-28 09:50:45 -04:00
Fyodor Kupolov
5654815695 Fixed an issue with back key behavior
Create mHeaderView and set it as a pinned header, each time onActivityCreated
is called.

Bug: 20652673
Change-Id: Ia0e174f0686ac0abb601c591f3774c9152b785fa
2015-04-30 12:02:47 -07:00
Maurice Lam
28c3f6bb71 [WifiSettings] Add progress bar when scanning
Add a progress bar when the Wi-Fi screen is in a transient state,
like enabling, disabling Wi-Fi and scanning for network. This change
sets the progress bar as a pinned header at the top of the activity.

The pinned header container needs to be match parent so that the
progress bar can occupy the full width of the screen. If the header
view doesn't want to fill the width, then the header view *inside*
the container should be wrap_content.

Added an overloaded setPinnedHeader method that takes a layout
resource ID, and returns the view to the caller. This way the
inflater can set the parent property so that layout params will not
be ignored.

Bug: 17389577
Change-Id: I18d0eb7c72ad31d1c4b35a54789016c32c81fb93
2015-04-29 22:38:22 -07:00
John Spurlock
b8e02b8bd0 Settings: Fabulous "Add rule" button.
Bug: 20064962
Change-Id: If7ff9d6cdfc61e5dd9e0d3bc4e2228c5fdaf9fa9
2015-04-16 05:50:46 -04:00
Jason Monk
c1235be6f0 Merge "Allow help to be defined to intent uri" 2015-04-14 19:54:19 +00:00
Jason Monk
23acc2bb8a Allow help to be defined to intent uri
Allow help uris to be either an intent uri or as uri (as they were
before). Also add a default help uri, and specific helps for several
screens.

Bug: 15475009
Change-Id: Iff982892973f01d32ff61ea88d4844e9a7153500
2015-04-14 15:43:20 -04:00
Jason Monk
b5aa73f46f Fix loading screens for manage and running apps
Also add loading screen to manage permissions as this can take a
long time to load in some circumstances. Build loading screens into
Utils and SettingsPreferenceFragment so that it can be easily used
other places in the future.

Change-Id: I7febd06695487e02ced793a9fd418051b5f0eab8
2015-04-13 14:23:37 -04:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Alan Viverette
2fed4d4256 Use correct list index for search highlighting
BUG: 14974443
Change-Id: Iad3d3efb2449fc61636c221bde92169293bf5356
2014-09-08 12:40:59 -07:00
Fabrice Di Meglio
eced780ff5 Increase the delay for the Search result Ripple effect to happen
- will actually make the Ripple look better and a bit longer
(it was showing and disappearing a bit too fast)

See bug: #14974443

Change-Id: I7a0354c679cfa8d9596bcb957c922b8dcf88f0e3
2014-09-04 13:04:56 -07:00
Fabrice Di Meglio
d83b3c2a39 Fix bug #16957601 Stability: ISE in Settings: Observer com.android.settings.
SettingsPreferenceFragment$1@273c8fdb was not registered

- add override for onUnbindPreferences() that will unregister the observer
if needed
- keep track of the root adapter so that we can unregister / register with
the correct one (by having a new PreferenceScreen the root adapter would not
be the same and thus unregistering the Observer on the new one would not work
and create the current bug)

Change-Id: I2cef0398c2ae0ab4f5ffd67ca20e8874be997bf6
2014-08-14 18:01:42 +00:00
Fabrice Di Meglio
7c435f6b44 Fix bug #16660405 Stability: ISE in Settings: Observer ...
com.android.settings.SettingsPreferenceFragment$1@3c1d9ecb was not registered

- use a monitor to control registering / unregistering

Change-Id: Id66dd698abf92643c97938e2091c3be38e6b78bd
2014-07-29 16:02:22 -07:00
Fabrice Di Meglio
b7bd72f297 Fix bug #16533532 Settings app crashes on device orientation change
...when "change language" warning dialog is on screen

- try harder at getting the parent fragment. First try by calling
getParentFragment() and if this is getting a null reference, try
again by using the fragment Id saved during onSaveInstanceState()

Change-Id: I3dbc6a229224c8770ff2c7e432e76b8796c4b099
2014-07-25 13:03:09 -07:00
Fabrice Di Meglio
86159283c9 Add the capability to set a pinned header to SettingsPreferenceFragment
- add a FrameLayout into the preference list fragment
- add public void setPinnedHeaderView(View pinnedHeader) and
clearPinnedHeaderView() APIs for adding and clearing the pinned header

Change-Id: I50ba5dd150167e0d49cc54bee1203f46db6d7a66
2014-07-21 16:16:23 -07:00
Fabrice Di Meglio
5bdf0423f9 Fix SettingsPreferenceFragment.startFragment()
- was always passing R.string.lock_settings_picker_title as a title res

Change-Id: Iab47ef3da00e91d5ce3b6dc50c50c943bd78b08f
2014-07-01 15:36:47 -07:00
Fabrice Di Meglio
c70b7f6f35 Improve Search results highlighting
- remove unnecessary code
- use keyed Tag with a well known App key for preventing collisions
- fix missing Brightness Level preference key (used for highlight)

Change-Id: I070e3b8c3cb43da7addd34be192aade21951f57c
2014-06-19 13:58:22 -07:00
Fabrice Di Meglio
4a2ee7e2b6 Improve Preference highlighting for Search
- cache hightlight Drawable
- set mPreferenceHighlighted as early as possible

Change-Id: I512d4677e94309175ead22c46b7a78e2aa387e1c
2014-05-21 16:19:41 -07:00
Fabrice Di Meglio
676751ebbd Fix bug #15115542 Ripple effect is crashing Settings with java.lang.NullPointerException
- for having the tint attribute to be populated you need to have the Theme passed.
This is why Fragment.getActivity().getDrawable(...) should be used instead of
Fragment.getResources().getDrawable(...)

Change-Id: I945eca98e1d73fda3b290a6ababfd1fb41118d8f
2014-05-21 13:58:46 -07:00
Alan Viverette
ba348ca996 TouchFeedbackDrawable is now RippleDrawable
Change-Id: Id025b58e9b62baa8d07f13b7eae2de61a3e4c90a
2014-05-19 15:10:36 -07:00
Fabrice Di Meglio
405febf56a Fix bug #14288652 Settings crash on hitting back key from Tap and Pay screen
Gasp ... the Observer registering/unregistering code was not totally correct as
we were unregistering on a different RootAdapter.

- refactor the code for registering / unregistering the Observer
- unregister when the Fragment is stopped thru onStop().

Change-Id: I036eacd87c80fd2c9dedca705fb94a57a0c9a21d
2014-04-24 10:35:56 -07:00
Fabrice Di Meglio
829c8fb2bc Fix NPE java.lang.IllegalStateException: Observer com.android.settings.SettingsPreferenceFragment$1@373ee1aa is already registered.
- propertly register / unregister the DataSetObserver

Change-Id: I04de3c7ec14e71591edc174ebafabe9a1fb165c2
2014-04-21 11:49:36 -07:00
Fabrice Di Meglio
c853a4282d Enable highlighting of Print services
- add to SettingsPreferenceFragment to know when the associated
RootAdapter is changing and thus being able to find the highlighted
Preference
- also, add the correct Search key during indexing. She should
match the one created when adding dynamically the Preference
- last, increase to 400ms the delay to do the highlight

Change-Id: I3a1a81fdf5c8ab5f3aaab29f16ea9879ab6df056
2014-04-21 09:28:17 -07:00
Fabrice Di Meglio
f2a5226c1e Improve Preference highlighting
- use PreferenceFragment.onBindPreferences() to launch  highlighting
- improve SettingsPreferenceFragment code for highlighting: now we can
find the View to highlight thru its Tag if there is no ListAdapter available
- add HighlightingFragment for highlighting a View from its tag/key. This
is dealing with cases when the content is custom and not relying on
SettingsPreferenceFragment (like DataUsageSummary)

Also:

- improve DataUsageSummary so that onResume() is not recreating the
Tabs all the time
- add missing "android:keys" on some Security Settings preference files

Change-Id: Ib1dd8238fe2fb57c151d584c0810a0e0a5ad97c4
2014-04-18 13:42:46 -07:00
Fabrice Di Meglio
5035ec6944 Fix potential NPE with Preference highlighting
- there are some cases where the ListView adapter is null

Change-Id: I9dcd171f57d9ca7b8032d890f5a18c3a01fd38cf
2014-04-16 18:26:19 -07:00
Fabrice Di Meglio
906ff6fdf9 Improve Preference highlight effect
- restrict the effect to the Preference View itself

Change-Id: I3ab04433e1acecb906d0a458b31314f97b9bda03
2014-04-16 18:18:41 -07:00
Fabrice Di Meglio
6602d02f57 Improve Preference highlighting from a Search result
- fix computation of the Preference position in its PreferenceScreen
- use "highlight" (scrolling and Ripple effect) for showing the result
- "highlight" is only done once

Change-Id: I232d79d795b0983beac5a9fec3dfbe9da329c98f
2014-04-16 16:16:45 -07:00
Fabrice Di Meglio
c1457323d2 Add support for saving and using the Preference's key value
- modify the SQlite data model
- update Index code for managing the key value
- pass the key when launching a Fragment or and Activity
- implement a small animation for highlighting the Preference
from a Search result

Change-Id: I617643a4e5e3b752ece8f45ce7d5429037e479da
2014-04-08 13:08:44 -07:00
Fabrice Di Meglio
377dd62bd7 Fix bug #12993929 Screen orientation change replaces wifi password dialog with Add network dialog
- use the correct Fragment manager: it should be the child's one

Change-Id: I286b276bc6c5180b7c0e458d8562938671d493c8
2014-02-18 18:24:30 -08:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Geoffrey Borggaard
6e1102d9fa Restriction pin changes.
Fixed bug in WirelessSettings where it was asking users for a PIN when
they weren't restricted.  Did this by refactoring the preference level
pin checking into the superclass, where it checks for the restricted mode first.
Also pin protected changes to certificates for restricted users.

Change-Id: I8310fd39f0862159668318fc1360ec6859cc00d5
2013-08-07 14:57:43 -04:00
Amith Yamasani
350938ecc6 Potential fix for a monkey-related NPE
Cache the content resolver so that async callbacks, events can
continue to get the cntent resolver when detached from the activity.
This should help with stability.

Bug: 8005271

Change-Id: Ia566bc312ce678b438004bdf4ed7537ac1604608
2013-04-09 10:25:43 -07:00
Amith Yamasani
258f7c7e1c Improve error message to figure out which fragment class is problematic.
Bug: 8057867
Change-Id: I6ad0bc8c8a6ed9bc8a1cca5debffe15c6de3a1b5
2013-02-05 10:56:55 -08:00
Amith Yamasani
aeb57edaef Pass the locale code in the help url for help pages.
Otherwise the help will always be shown in English.

Bug: 7564049
Change-Id: I94da36aa1ae5aabd118178866b7e570bb77add34
2012-12-06 14:40:51 -08:00
Amith Yamasani
c861cf8447 Improved dialog management in Settings>Users
Bug: 7266284 Delete not functional after orientation change
Bug: 7266182 Set up now not functional after orientation change

Also remove "vibrate when ringing" on tablets
Bug: 7253081

Change-Id: Ie616747f2e3292c401613eb2041b5a5a289cde20
2012-10-02 14:51:46 -07:00
Amith Yamasani
9627a8ea15 Show more settings and add restrictions/dialogs for secondary users
Bug: 7213029 crash in About>Status
Bug: 7212495 hide System updates for second user
Bug: 7212230 nickname editor should select the text
Bug: 7160487 TTS settings
Bug: 7129411 Settings needs visibility changes for secondary users

Change-Id: Ia2d1229c08b392edfa6b671fce4a382410405b14
2012-09-23 18:43:31 -07:00
Amith Yamasani
b3a593eb76 Delay calling setHasOptionsMenu() to avoid a crash in Wifi Settings
If it is called in onCreate(), it's too early for Wifi Settings,
which does its initialization in onActivityCreated().

Change-Id: I3d9b49f63d342e724fd4795fbca48d08faa3c3cc
2012-04-23 18:03:52 -07:00
Amith Yamasani
b0b37ae21c Help menus for several screens.
Bug: 5144896
Change-Id: Ib2f5146f6f62f2a33261bb165c3bf1bf13b22f38
2012-04-23 15:35:36 -07:00
Gilles Debunne
6465054995 Bug 5050590: wrong title for lock screen
Change-Id: Iba170a25ac56db4140ab91f4fd583c0f676b02b0
2011-08-23 11:01:41 -07:00
Amith Yamasani
8875edede1 Fix crash after adding a word to the user dictionary.
Bug: 3407951

Make sure that the parent fragment is a SettingsPreferenceFragment. Otherwise it's not
necessary to manage the mDialogFragment.

Change-Id: I331a3507fe11a7331ff24ecf64fe8c8c3f613636
2011-01-31 12:46:57 -08:00
Hung-ying Tyan
18eb39d085 Clear mDialogFragment when it's detached
and re-associate it when it's re-created.

Before this CL, the association is gone when fragment goes through the pause-resume
cycle.

Similarly, restore onDismiss and onCancel listeners in VpnSettings.onCreateDialog(),
restore states in onCreate() instead of onActivityCreated() so that screen rotation
can be handled correctly.

Now that profiles are shared between Settings instances, always handle state change
in VpnSettings.changeState() so that state changed in one instance can be conveyed
to the other and preferences can be correctly enabled/disabled.

In additions, fix some trivial mistakes in VpnSettings.

Bug: 3396394
Change-Id: I242e1ed6c6d410b4dfefb373d8f98266fc9b46d0
2011-01-28 23:39:45 +08:00
Dianne Hackborn
300768fea5 Fix issue #3400255 Dialog fragments crash on rotation in Settings app
Change-Id: I337c1fb41e3fbedd7982418df497487481bb35d2
2011-01-27 20:39:21 -08:00