Commit Graph

30 Commits

Author SHA1 Message Date
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Ruchi Kandoi
37efa64d63 Fixes Settings app crashing when NfcAdapter is null
If a device doesn't support NFC then
android.settings.NFCSHARING_SETTINGS and
android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT intents shouldn't
do anything and gracefully exit.

Test: Manual; Emulate a non-NFC device and test with apks sending intents
Bug: 80094104
Bug: 80092438
Change-Id: I5b3c3fdd582679e2cb16f474ef3331bc246b0d42
2018-08-01 13:35:18 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
hjchangliao
51ea41a541 Update Android Beam screen layout
Use preference footer layout to replace
the old layout android_beam.

Change-Id: I878333ecc001631020706cb02edde48496859dcb
Fixes: 80085332
Test: Manual test
2018-05-28 11:27:26 +08:00
arangelov
9308154090 Make "Action not allowed" dialog compliant with Material Spec and replace full screen activities with the dialog.
Bug: 64893948
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogTest -j40 RunSettingsRoboTests
Test: make ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest -j40 RunSettingsRoboTests
Change-Id: I9308d8d86a3789b8f2c92b9f4f20cf00cce71d14
2018-03-05 17:35:48 +00:00
Doris Ling
72489725c6 Change superclass to InstrumentedFragment.
- for fragments that do not implement the preference screen, change them
to inherit from InstrumentedFragment instead.

Change-Id: I791c2634024bd2c248efea955be5c680180d735c
Fixes: 68277111
Test: make RunSettingsRoboTests
2018-02-02 13:41: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
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
Fan Zhang
2d0b344736 Add InstrumentFragment for non-PreferenceFragment types.
This allows app fragment use a less heavyweight fragment as super class
if they don't need PreferenceFragment. Using this class as base is
generally easier to set up robolectric tests too.

Bug: 33354536
Test: RunSettingsRoboTests
Change-Id: I91c4d242ea0333c76c8767c03c3f18dee6b6e104
2016-12-05 17:13:33 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Fan Zhang
016f875ae7 Fix crash when rotating screen in a few screens.
Bug: 26946312

Fixed in the following screens:
Apps > Gear > Special Access > Modify system settings
Apps > Gear > Special Access > Draw over other apps
Apps > Gear > Special Access > Apps with usage access
Language & input > Personal dictionary
Wireless & networks (More) > Android Beam

Change-Id: I0b9bd6c19f710302625dd87989e9d4ce3c96a9a2
2016-05-09 17:56:06 +00:00
Suprabh Shukla
b84720c075 Moving HelpUtils to SettingsLib
Moved HelpUtils to SettingsLib in frameworks/base so it can be shared by
packageinstaller as well.

Bug: b/22096093
Change-Id: I8d620abcde8279a3b4d11bbcff8ae9b6f46a1895
2016-04-05 14:37:33 -07:00
Sudheer Shanka
b51457db10 Fix crash in AndroidBeam class.
SwitchChangeListener is not added if admin disables the options, so
don't try to remove the listener in this case.

Bug: 27828118
Change-Id: Id0f9c71a10f93fc4c87af2b02ab7f04482145217
2016-03-24 12:21:45 -07:00
Sudheer Shanka
f1e78d35dc Add disabled by policy empty views to more screens.
Bug: 27588316
Bug: 27588671
Bug: 27588740
Change-Id: Id614067d76e936e9c3c585fdaed304bfbc88dc74
2016-03-16 22:33:37 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05: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
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
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Amith Yamasani
25a1e95ed6 Handle disallowed NFC beam restriction
Don't enable the beam setting and toggle if it is disallowed for
the current user.

Bug: 17387303
Change-Id: Ifdfe049bef281454c978a37acb49c59758344ae6
2014-09-09 12:07:11 -07:00
Fabrice Di Meglio
138ff8c045 Make the SwitchBar appear immediately
- change the way the SwitchBar is shown and hidden
- save its state
- remove the delay transition code

Change-Id: I07260430e6709b42517ca011f6d3c3446a626731
2014-06-12 11:13:23 -07:00
Fabrice Di Meglio
962a141f4c Fix bug #15173703 Crash in Settings is observed when Android Beam page orientation is changed. DO NOT MERGE
- use onActivityCreated() / onResume() / onPause() for the SwitchBar

Change-Id: I24b346fdc5c19acedbe845d3b7697718412b5e5d
(cherry picked from commit 4c42a88828)
2014-05-23 02:33:42 +00:00
Fabrice Di Meglio
072d98aba6 Use SwitchBar for Android Beam Settings
- follow up CL to 4193776698

Related to bug #14898161 On/Off switches must move down from Action Bar

Change-Id: I2e3ffb34a589b32deda9de19107f38041aa341c9
2014-05-15 15:00:19 -07:00
Fabrice Di Meglio
ede1435518 Make all the Settings Switches appear again
- use the ActionBar Theme context when creating the Switch for
getting the correct Theming

Change-Id: Ic3701c53662b0f245c7149b119de8bb5cbaae232
2014-04-18 16:49:35 -07: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
Martijn Coenen
658508c8f6 Fix Android Beam toggle switch on Manta.
Bug: 7974617
Change-Id: I9200c070a13415b5c0ca545211a31b3e9c544cac
2013-02-26 15:46:02 -08:00
Fabrice Di Meglio
b27223f139 Fix Switches padding for Settings app
- use setPaddingRelative() instead of setPadding()

Change-Id: Ifd14193a5f60d303035b394616dc65a70e1ef5f9
2013-01-15 18:54:11 -08:00
Fabrice Di Meglio
79d8e80a30 Make Settings app aware of layout direction
- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: I696c0f66a16640af767da3c05b5d300fd2284ecb
2012-07-24 15:02:12 -07:00
Jeff Hamilton
3d670de5ce Bring back the Android Beam settings panel.
Bug: 5350022
Change-Id: I22d2c6f91f7ab86501021fe97a2d57b109ed10bf
2011-09-22 12:35:55 -05:00