Commit Graph

117 Commits

Author SHA1 Message Date
Maggie
3220c46bcc Set initialExpandedChildrenCount dynamically in location settings
In location settings, we want "Advanced" button show up right after "App
level permissions". But with different numbers of "recent location requests" apps,
the Preferences hidden under Advanced could change.

To fix this issue, we fetch the list of apps with "recent location
requests" in LocationSettings.onCreate(), and set
initialExpandedChildrenCount for location PreferenceScreen to the apps
count.

Bug: 70350519
Test: Manual
Change-Id: I4c4b6bdfa916213494a29e8ae8b5f33476411c88
2017-12-20 19:13:52 -08:00
Doris Ling
9ed29a2e57 Convert location settings to DashboardFragment.
- change LocationMode, LocationSettings, and ScanningSettings to be
DashboardFragment.
- remove LocationSettingsBase and moved base logics into base
controller.
- add controllers for the preferences under the 3 location settings
pages.

Fixes: 68719207
Test: make RunSettingsRoboTests
Change-Id: Icedf691c2a9f7989faebee39ea9da672209b7957
2017-11-13 17:05:14 -08:00
Fan Zhang
fc29247da4 Use small icon in location and vpn settings UI
Fixes: 65182905
Test: rerun tests
Change-Id: I18aa5c5bb4c8f573872cda3d003506c4dff5177c
2017-10-30 14:24:49 -07:00
Fan Zhang
89b8e5c103 Deprecate resId field in SearchIndexableResources
Change-Id: Ie69a68beae51e35c7bc861cd124d8195c1ed39dd
Bug: 37741509
Test: robotests
2017-10-24 09:59:16 -07:00
jeffreyhuang
5152bf87b0 Do not dim icons when Preference is Disabled
Change DimmableIconPreference into RestrictedPreference so
that the app icon background no longer turns darker

Fixes: 65207948
Test: Manual using settings app, Run SettingsRoboTests
Change-Id: I1c458439006c9d07642b9ef35455e845cb5545e6
2017-09-11 17:05:33 -07:00
jackqdyulei
f1ed210eaa Remove subtitle for Recent location apps
Bug: 65011654
Test: Screenshot
Change-Id: I840e6ee8f755b4bbb5392a80224dc5b4b19a8054
2017-08-25 14:37:39 -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
Fan Zhang
2d4d993ef3 Move "scanning" from location setting actionbar to pref xml
This fixes the breadcrumb for scanning settings when you search "scan".

- Also did some minor cleanup in LocationSettings (creating preference
using the correct context)

Change-Id: I8efc62246f2e18b2bd4b5eb411b40f24e36b0f2a
Fix: 36529569
Test: manual
2017-03-22 17:04:50 -07:00
TreeHugger Robot
4e1477b60e Merge "Update Security & screen lock preference" 2017-02-22 03:08:12 +00:00
Doris Ling
81610543a9 Update Security & screen lock preference
- change password category title to Privacy and move Location into it.
- remove Advanced security preference category
- remove SIM card preference category and move the SIM card lock
  preferece down.
- move Encryption and Credential settings to a separate screen.

Bug: 34976707
Test: make RunSettingsRoboTests
Change-Id: Iebaba4a8aad135fa88f163de0b60b488fd9510d0
2017-02-21 14:55:25 -08:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -08:00
songchenxi
dbf78d4c03 Move intent action to xml
This is a follow-up change for ag/1798497 which move the implementation
of OnPreferenceClickListener to the xml.
Test: Manual
bug: 34400189

Change-Id: I4691beecf829e8d98d5c6188b3ff74f4902104d2
2017-01-27 11:05:27 -08:00
songchenxi
b9cf917f40 Location Setting change for O
This is a change that adds a link from location settings to location
permissions

Test: Manual

Bug: 34400189
Change-Id: If873fbb6e53c1fd86a3cfe38e06465cdec56bef8
2017-01-26 09:33:26 -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
qinglian.x.zhang
178b198f70 Merge "Fix no options menu on location settings screen"
am: 5c15ff9

* commit '5c15ff923d6116e7634e7c51cde76ce33ed77368':
  Fix no options menu on location settings screen
2016-03-23 16:07:28 +00:00
qinglian.x.zhang
def100b32f Fix no options menu on location settings screen
Since a help URL for location settings is not provided,
LocationSettings fragment doesn't show options menu by default.
This change is to show options menu even if the help URL is
not set.

Change-Id: I1f37a1bfe155db73a639a8fa214159c044385377
2016-03-02 12:35:07 +09:00
Sudheer Shanka
9e9e63b7b3 Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
2016-02-16 11:04:11 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
0d9ac3469b Add padlock to location for work profile when disabled by admin.
Change-Id: Iee930c9340436cc68ee432ad15ec182ccc6fb0a1
2016-01-26 14:29:04 +00:00
Sudheer Shanka
9c32468cd5 Add padlocks to more preferences that can be disabled by policy.
Change-Id: I7cc999dd1d46c20c888e0ba67053564e4d50946b
2016-01-19 16:56:58 +00:00
Zoltan Szatmary-Ban
ad0ca96fcd Add UI to Settings > Location for Managed Profile Location Control
This CL adds Managed Profile Location Access control in the form of a switch
preference.

Bug:22541939
Change-Id: I1a2140c54e7386cda83ef0305f0840e4f8f9a6d1
2015-12-07 16:13:10 +00:00
Lifu Tang
02cde0a24f Merge "Remembers previous location mode when location off" 2015-12-02 00:06:40 +00:00
Lifu Tang
ee0db4c35b Remembers previous location mode when location off
Multipart CL. Must be submitted together with ag/821599

Bug: 25608291
Change-Id: Ibfa39ba9b844421cd86a5aa4266e4389534f16be
2015-12-01 15:53:27 -08:00
Jason Monk
d3de027649 Merge "Add some more summaries for Settings Home" 2015-11-30 16:23:43 +00:00
Jason Monk
9d80eeabe7 Add some more summaries for Settings Home
Change-Id: Iaca8db6bdce87e667832b5b670e4eb027580b668
2015-11-30 10:57:33 -05:00
Jason Monk
8b886c4649 Fix various crashes
Bug: 25894771
Bug: 25905442
Bug: 25747730
Change-Id: I9680d08514589288eadbe2a50a9ef5e03220a0c1
2015-11-30 10:54:56 -05:00
Tony Mantler
f313a75e26 Move RecentLocationApps to SettingsLib
Change-Id: I696126299e31da3d031778e58e43d298336ccb5f
2015-11-09 10:27:44 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Lifu Tang
4148f17616 Explicitly ask for option menu in Fragments
If a Fragment needs option menu, it has to ask for it explicitly by calling
setHasOptionsMenu(true). If a preference screen contains help URL, this
method is called automatically in the base class. However, if a preference
screen doesn't have help URL, this method will not be called. So any other
extra option menu will not be added correctly.

Typically we won't be able to see this bug. Because on standard Nexus builds,
all settings screen have their own help URL. But on AOSP build, as help URL
is empty by default, if the vendor doesn't modify the resource to provide
their own help URL, we'll end up missing some of the option menus.

Bug: 24241310
Change-Id: Iaabc91a1d102e21254b518ec23459025efbdcc84
2015-09-23 14:16:13 -07:00
Tom O'Neill
67dc554030 LocationSettings javadoc describes what's in the UI
- In particular, tells OEMs how to add their own settings

Change-Id: I45e4fb7ff59705a2bcb53a72c71fd230f2e085c5
2015-05-18 14:13:29 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Lifu Tang
cb193d55e1 Added a screen to configure wireless scanning
- Created "Scanning" preference screen

- Added overflow menu on "Location" settings to access "Scanning" settings

- Moved "Wi-Fi scanning always available" from Wi-Fi settings to "Scanning"
  settings

- Added "Bluetooth scanning always available" preference (UI only)

Change-Id: I85d8cd60ab309db5db9caee43f4b5a117192d904
2015-03-23 15:55:10 -07:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Zoltan Szatmary-Ban
86c877e9b6 Make Location Settings multiprofile aware
Injected location services and location access status are shown
for managed profiles on Settings > Location

Bug: 18602878
Change-Id: Ic6232f3dc03d9675b90fbfd0163fe5bae4bd13c6
2014-12-05 19:40:59 +00:00
Lifu Tang
42fa973457 Avoid removing switch even listener multiple times
- Fix b/16118646

Change-Id: I36cdc5c8d98dfb63924737af40efff35b9ca2e66
2014-07-16 23:12:03 +00:00
Lifu Tang
218f99c0e5 Register the listener for switch during onResume
- Fix b/16118646

Change-Id: I9ec87422ecc4e05ca332e116af71c07f06c6c65a
2014-07-14 21:06:26 +00:00
Lifu Tang
387ecc6931 Disable the switch bar instead of switch itself
- Fix b/15754817

Change-Id: I20c5bc85d35057a340ddcac691912863a4477804
2014-06-27 18:18:59 -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
3041003503 Use SwitchBar for Location Settings
- follow up CL to 4193776698

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

Change-Id: Ic46768d97fef3abbec3f46f90037d366c123a6e8
2014-05-14 20:03:00 -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
6068967fd9 Re-enable the switch into Location Settings
- get rid of that onIsHidingHeaders()

Change-Id: If0b3fc6900f70cb6dfb54094d1b46b44aba6290f
2014-04-04 17:02:46 -07:00
Lifu Tang
1bb6c75cdf Re-register listener for the switch upon onResume
- Fix b/13330300

Change-Id: I6a5f97c383913dd461ec30d4e30585d325287ccc
2014-03-12 11:55:30 -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
Lifu Tang
72bafff2b8 Used BroadcastReceiver to monitor mode changes
- Fix b/10648447

Change-Id: Ic6dc125b6548436e9786e50bc52908c39ea4579a
2014-01-31 12:20:23 -08:00
Lifu Tang
c120c6cf9f Fixed crash when rotating screen
- Fix b/11006855

Change-Id: I406727ca4260aae006e6128835f05f5f2ed9c1a3
2013-10-01 13:02:32 -07:00
Lifu Tang
5ab9fa432d Renamed "App settings" back to "Location services"
- Fix b/10610559

Change-Id: Id98a1b4e8d04238f371322fe6232647fa13b5c4a
2013-10-01 12:29:17 -07:00
Lifu Tang
5cbf971e19 Make recent location app list package based
- Link all items to app info pages instead of battery page

- Fix b/10855516

Change-Id: I241e81b179f468364b324ae714964fc3253cd2c9
2013-10-01 08:55:29 -07:00
Lifu Tang
d3a77665ef Gray recent apps section when location disabled
- Fix b/10638903

Change-Id: I1c09661b0e5ac8d089a515b64301ddfe9bcedaa9
2013-09-06 18:26:21 -07:00
Lifu Tang
0d56bb2950 Made "No Recent Apps" banner brighter
- Fix b/10638903

Change-Id: I83d3dc30315c05844ed57ee3065b099ce1ec1f96
2013-09-06 16:05:23 -07:00