Commit Graph

32 Commits

Author SHA1 Message Date
Ruben Brunk
e1c98ca821 Add settings VR listener service.
Bug: 22855417
Bug: 26724891

- Adds a settings panel allowing users to toggle the
  enabled/disabled state of each VrListenerService
  component installed.
- If disabled, a VrListenerService will not be bound
  from the framework, even when requested by a VR
  application.

Change-Id: I606eb712c011d160b9fbdd3c0e8fd744c653ef07
2016-03-04 16:07:09 -08:00
Julia Reynolds
1d33d59be2 Api review: AutomaticZenRule
Bug: 27364144
Change-Id: Ic0ea5d4958711cf5216e87ad8054460ad4246856
2016-02-26 18:38:50 -05:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
366d8809c8 Add policy disabled msg as empty views in zenmode related fragments.
Change-Id: I0d7489d2884ffd5c227a37a638d560bf033f5cd9
2016-01-25 21:10:24 +00:00
Julia Reynolds
0cca0f5c02 Obey rule instance limit.
Do not show a rule type in the 'Add rule' dialog if the number of
current instances of that rule equals the max number of instances 
allowed by that rule type.

Bug: 25563007
Change-Id: I18f2598c6d92aec93c27755bb6b04c460ee294d0
2016-01-15 15:21:41 +00:00
Julia Reynolds
2ba71ad15d Don't show orphaned rule instances in Settings.
Bug: 25472361
Change-Id: Ic9bec4872777b720aa786679cbc960a9ee51dbe1
2015-12-17 08:46:09 -05:00
Julia Reynolds
bebd2a482e Null check in onPostExecute.
Change-Id: I8bc8c0b062583b4b9c54152c516f160df4f645e7
2015-11-04 10:11:41 -05:00
Julia Reynolds
2714f2ba07 Permission changes for DND Add Rule page.
Don't whitelist CPs when visiting the Add Rule Page; update
the permission CPs are tracked by; don't show CPs in the add
rule dialog if the user hasn't whitelisted them.

Bug: 22977552
Change-Id: I8b363d7106de088e68b9659e3f0098848c6d3153
2015-10-30 11:32:05 -04:00
Julia Reynolds
0768ef68ca Temporarily reenable 3P condition providers.
This code will go away once there is a better way for a user to
approve 3P CPs.

Change-Id: I56a72d03a75c2c60f6f19f82f091d9a1c7f3f715
2015-10-28 09:55:04 -04:00
Julia Reynolds
35f8f6bcf3 Always show rule creation option.
Change-Id: I3508c15a0e9b727d7bc3dd63bd6482a623aaef5b
2015-10-27 15:29:24 +00:00
Julia Reynolds
8fe6efc8e1 Update sorting for rule types and instances.
Bug: 22977552
Change-Id: I671f45f156f8f3faa4ce55608dd1d61b9f07d16a
2015-10-16 11:43:54 -04:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Julia Reynolds
25cb8f0691 Use id-based zen rule APIs.
Also names no longer have to be unique.

Bug: 22977552
Change-Id: I8dbee85c15d12d5380345447047a0d49c903522e
2015-10-08 13:07:07 -04:00
Julia Reynolds
f7748e4ae1 Update zen rule type selection and view.
Separate rule type selection from naming, launch 3P UI for non-system rules.

Bug: 22977552
Change-Id: Ifbd82da2192c4aaf5f239a188a016d9e1af542d6
2015-09-30 16:00:19 -04:00
Julia Reynolds
7d8a9aead5 Use public APIs for modifying automatic zen rules.
Bug: 22977552
Change-Id: I544f1462ad77cdeb33ccff3c9de11ea37df5505d
2015-09-30 08:57:47 -04:00
Julia Reynolds
cf92ef10a5 Updates to automatic rule listing page for 3P rules.
Show the provider app icon and name; allow deletion from
listing page; remove the rule summary for consistency.

Bug: 22977552
Change-Id: Ib71832fa4ff64b7321ade39f9964ac52cee6c643
2015-09-21 11:30:02 -04:00
John Spurlock
bd352af3cf Settings: Migrate zen event conditions to use calendar name.
And make sure any existing calendar value always appears in the
picker, even before it exists in the calendar provider.

Bug: 17755700
Change-Id: I8aa298a0d5804c288e2596f18c2dc7318f752121
2015-05-28 22:20:44 -04:00
John Spurlock
fa76a652e4 Settings: Display corp profile calendars in event rule selection.
And sort the accounts by display name.

Bug: 21155107
Change-Id: I8789022535ba7c66d950f5ec6f93c40ffb8106d3
2015-05-26 12:55:56 -04:00
Chris Wren
46c8f759fd Merge "log more settings actions" into mnc-dev 2015-05-11 15:07:18 +00:00
Chris Wren
1b6ffba9e6 log more settings actions
airplane mode
  bluetooth
  cell data
  do not disturb

Bug: 20264417
Change-Id: I726033a126fba9f9dffc916806d636feea04033b
2015-05-08 18:48:24 -04:00
John Spurlock
33bf636e72 Settings: Use new EventInfo.ANY_CALENDAR constant.
Bug: 20064962
Change-Id: I08a8c5feb61bfd440fc6a297d97de4abba5b19b3
2015-05-08 17:37:23 -04:00
John Spurlock
42ae11d4d5 Merge "Settings: Remove zenswitch from DND settings page." into mnc-dev 2015-05-05 14:42:16 +00:00
John Spurlock
4b43b72054 Settings: Calendar event zen rule string updates.
- Remove Attendance option.
 - Use new reply value, tweak wording and summaries.

Bug: 20064962
Change-Id: I6977b494e54752fa87ea08df0ed085129a09a3d3
2015-05-05 10:12:26 -04:00
John Spurlock
beff087b3a Settings: Remove zenswitch from DND settings page.
- Remove the ability to view/modify zen mode/condition from
   the Settings app.

Bug: 20064962
Change-Id: I8757780e5e9ef578e05203577871b9f513997798
2015-05-05 07:32:31 -04:00
John Spurlock
f57bad7d5b Settings: Do not disturb automatic rule updates.
- Remove FAB for adding rules, move to last preference.
 - Add first-class event condition type and config sub-page.
 - Always show radio buttons when adding rules.
 - Add new data model for event rules.
 - Add stub condition provider for event rules (always false for now).
 - Add rule-type icons to rule preference rows.

Bug: 20064962
Change-Id: Id5acde371eb2e7d22b1f195459897614db5ba80a
2015-04-30 11:28:27 -04:00
John Spurlock
4f8d4f0d2b Settings: Ensure zen day-of-week formats use current locale.
Don't share SimpleDateFormat instances per-process, convert to
per-instance to ensure we're always using the current locale.

Updated version of:
  https://android-review.googlesource.com/#/c/147246/

Change-Id: Id464c35035c1de0a7894e5e19b57934f77df9769
2015-04-23 20:32:56 -04:00
John Spurlock
b8e02b8bd0 Settings: Fabulous "Add rule" button.
Bug: 20064962
Change-Id: If7ff9d6cdfc61e5dd9e0d3bc4e2228c5fdaf9fa9
2015-04-16 05:50:46 -04:00
John Spurlock
c96a5dcbfc Settings: External automatic rule settings.
- Add external automatic rule settings page with the common
   settings for all rules (enabled, name, zen mode).
 - Pull common rule-instance settings into settings base class, share
   with existing schedule rule settings.
 - New page not searchable since it is at the rule-instance level.
 - Obtain external rule information from existing conditions provider
   metadata.  Includes rule type caption, sub-configuration activity,
   and default condition id.
 - If external condition providers exist with the appropriate metadata,
   display the external rule types as options in the new rule dialog.
   (max of 3 external types)
 - Pull common managed service listing code out of common settings base
   class and into a more reusable helper class.

Bug: 20064962
Change-Id: Ibc13607490b7312a7d9f7f3bd61c3cfcf71a2794
2015-04-13 12:19:55 -04:00
John Spurlock
d333a7d9f1 Settings: Improve automatic rule summary when enabled.
Bug: 20064962
Change-Id: I139679def84f0ba3ea859399499a5657fd85e763
2015-04-10 00:02:32 -04:00
John Spurlock
45fa140b8c Settings: An update on Downtime.
- Migrate settings to the new zen mode state model.
 - Remove downtime settings.
 - Add automatic rule management page (add/remove)
 - Bind new automatic schedule rules to detail editor.
 - Clean up a few found miscapitalized string captions.
 - Migrate zen switch to report the shared summary string.

Bug: 20064962
Change-Id: Ia561e7f77c90c962729240b4d51ba1915297f64a
2015-04-09 20:56:16 -04:00
John Spurlock
b47b2c3f6a Zen: Move zen mode preference to switch bar.
- Add summary line support to SwitchBar.
 - Remove obsolete strings.
 - Wire up switchbar to zen mode w/ dialog prompt.
 - Remove obsolete callback pref helper.

Bug: 20064962
Change-Id: Ifede00b5d43d441ccd94db96bd2796bc57d1a990
2015-04-04 15:47:43 -04:00
John Spurlock
d8b3683570 Settings: Move downtime to new automation sub-settings page.
Bug: 20064962
Change-Id: I6238439bbd679c143fc986743a65ed64057f2755
2015-04-03 16:27:45 -04:00