Commit Graph

2820 Commits

Author SHA1 Message Date
Adrian Roos
57d1601849 Assist: Allow disabling the disclosure animation
am: 2335bd6787

Change-Id: I2a88e088da3062b7bd10581650de526629973c67
2016-08-12 20:35:22 +00:00
Adrian Roos
2335bd6787 Assist: Allow disabling the disclosure animation
Change-Id: I6e7ed00f066fda7cc268119e7aa4133010aa69c1
Fixes: 30809067
2016-08-12 12:04:53 -07:00
Anthony Hugh
96e9cc5700 Add panic detection to back button
Adds "panic" detection to the back button.  Implemented solution
uses 4x button presses in a short duration to detect for "panic".
The value used to determine the duration between key up and key down
that still count as a multi-button press is configurable via the
Settings Provider.

BUG: 28027764

Change-Id: Ibf1370ff3cb539a9a54002a8704922744a3ca5d7
2016-08-03 15:24:58 -07:00
Fyodor Kupolov
51ce8ee3b1 Set secure setting when all preloaded apps are installed
Bug: 30280710
Change-Id: Id87b51c53b1e553a6ab0a257be93baf7d31b6fe5
2016-07-28 13:22:26 -07:00
Jeff Davidson
94ae1e739f Merge "Add support for carrier "associated" apps." into nyc-mr1-dev 2016-07-27 17:57:39 +00:00
Jeff Davidson
24b9d96007 Add support for carrier "associated" apps.
The platform currently supports the notion of default carrier apps.
These apps are set to DISABLED_UNTIL_USED until a SIM is inserted
which grants them carrier privileges, at which point they are enabled.
Apps are not touched if they have been updated from the version on
/system or if their state has been modified externally (e.g. by the
user).

This CL extends this notion to associated apps, which may not have
carrier privileges themselves, but should be enabled/disabled
alongside a particular carrier app. This should include helper apps
that should not be visible to users who don't use the given carrier
unless the user explicitly enables the app.

As additional protection, we add a check to ensure that we never
disable apps after the first time we've run. Since we need to store
this information in secure settings, we also move the call site from
PackageManagerService#main() to PackageManagerService#systemReady(),
which enables use of secure settings but still occurs before
third-party apps can be started.

Bug: 30141427
Change-Id: Iee72ba4e70e5ca97999c9147a65af82c670a23e8
2016-07-26 14:54:53 -07:00
Justin Klaassen
06c0cb7acd Add Settings#ACTION_NIGHT_DISPLAY_SETTINGS
- The ACTION_NIGHT_DISPLAY_SETTINGS action can be used to launch
  Night display settings directly.
- Updated NightDisplayTile to use ACTION_NIGHT_DISPLAY_SETTINGS.

Bug: 30291948
Change-Id: I6d912cf481f72ef5b52f53fa23942071fc795452
2016-07-21 19:22:09 -07:00
Justin Klaassen
6384878d69 Cleanup TwilightService
TwilightService now just reports the current twilight state, it's up to
clients to provide their own locking mechanism (e.g. always day or
night).

Bug: 29620105
Change-Id: I2a8bb544eab0f44d269c59f36a53fbdf842b423a
2016-07-18 16:57:15 -07:00
Mike Tsao
fc47ba75e4 Back up Night Light settings
Bug: 30150787
Change-Id: I79697b41b68e0f123de20e7b8782c6058bef7977
2016-07-15 13:12:17 -07:00
Justin Klaassen
22eb19939d Refactor display color transforms
- Removed Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX, it's not desirable
  to persist the actual color transformation matrix.
- Refactored all SurfaceFlinger transforms to DisplayTransformManager,
  which allows color transforms to be set independently from the a11y
  manager service.

Bug: 30042357
Change-Id: Iefa477dedb66aac90e1218e327802a3fab6899ed
2016-07-14 11:28:07 -07:00
Tomasz Mikolajewski
0e7bb571fd Merge "Fix javadoc broken links in DocumentsContract." into nyc-mr1-dev 2016-07-14 03:16:42 +00:00
Tomasz Mikolajewski
90a753330d Fix javadoc broken links in DocumentsContract.
Bug: 30074847
Change-Id: I187ac7b8055be4bb313b2fea68c101d84e586b5d
2016-07-13 10:14:59 +09:00
Mahaver Chopra
3d9805d502 Added UM.DISALLOW_OEM_UNLOCK, Removed Global.OEM_UNLOCK_DISALLOWED.
Currently we used global setting to restrict user from enabling oem
unlock. As global settings can be chagned using adb, using user
restrictions instead.

Bug: 29893399
Change-Id: Ic83112a4838b8279bf50408a29ae205e0b8639ee
2016-07-12 19:29:14 +01:00
Doris Ling
a60d31d70f Add a secure setting for double twist gesture for camera flip.
Add Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED to control whether the
double twist gesture should flip the camera between front and back mode
is enabled or not. Also move SYSTEM_NAVIGATION_KEYS_ENABLED from
Global to Secure.

Bug: 29869445
Change-Id: I614289e6de7b1ee4221de7047a5e0dd784607bed
2016-07-08 14:32:32 -07:00
Justin Klaassen
911e88939c Add Night display feature
Bug: 28615069

Tints the display at night automatically according to your schedule or
using the sunrise/sunset corresponding to your current location.

Change-Id: Ie56b4eed88cc2fcbae88002492b1edad5820b6b1
2016-07-08 11:47:50 -07:00
TreeHugger Robot
33fa5dfa1d Merge "Making timeouts configurable through Settings" into nyc-mr1-dev 2016-07-08 14:36:34 +00:00
Suprabh Shukla
dbbc7af063 Making timeouts configurable through Settings
Adding a global setting for timeouts used in retail demo mode.
Also renaming the protected intent ACTION_RESET_DEMO to reflect proper
owner package.

Bug: 29917613
Change-Id: I9a174503626ab28cceb5024a8e63d27612439b92
2016-07-07 14:12:14 -07:00
Svet Ganov
84954568db Merge \"Use proper lock when accessing the generation registry\" into nyc-dev
am: dcf2e205bf

Change-Id: I00b1a6aba01fd9155e4b0db17e9bd65d31425489
2016-07-07 01:25:04 +00:00
Svet Ganov
51b839544b Use proper lock when accessing the generation registry
We use 'this' for synchronization in NameValueCache but some code
that accesses the generation registry uses 'this' in a different
context ending up syncing on the wrong instance. This is why
sync on this is just a bad idea.

bug:29956424

Change-Id: Ide2d4f07a5f40cb3f0e8f50e4c8de216d15a31ee
2016-07-06 19:52:36 +00:00
Daniel Nishi
d9f0e37dc1 Merge "Add counters for the automatic storage manager." into nyc-mr1-dev 2016-06-30 21:17:18 +00:00
Daniel Nishi
6401217532 Merge "Use the Deletion Helper when system storage is low." into nyc-mr1-dev 2016-06-29 21:37:07 +00:00
Daniel Nishi
690346b145 Use the Deletion Helper when system storage is low.
A notification is posted when the system storage gets too low.
Currently, it redirects into the Storage Settings. Instead,
it should redirect into the Deletion Helper to directly let the
user clear out their storage.

Bug: 29437277
Change-Id: I4e35adf300d5e479d4171f1e6f090f2a757400f2
2016-06-27 15:22:35 -07:00
Daniel Nishi
f678cc9c2b Add counters for the automatic storage manager.
In order to attribute storage savings, we log how much data has
been freed and the last time that the automatic storage manager
has run.

Bug: 29643106
Change-Id: Ibb57b44b5e7550d4ab11e95b47db2f5d6599a96f
2016-06-24 15:49:25 -07:00
Dmitri Plotnikov
b1ca092db8 Merge "Unhiding DEVICE_NAME" into nyc-mr1-dev 2016-06-24 00:23:13 +00:00
Chris Manton
d4ac4c7786 Merge "Add global settings for cell radio state" into nyc-mr1-dev 2016-06-23 16:42:16 +00:00
Ta-wei Yen
1121017213 Add more configuration state for visual voicemail
Bug: 26944391
Change-Id: I7e0c2649097edca96d6a78fe2dc250a4b4855133
2016-06-22 17:48:52 -07:00
Chris Manton
95a6c899d6 Add global settings for cell radio state
Provide persistable state for cell radio
to handle airplane mode similar to any
other radio in the system.

Change-Id: I87398fe84de3f6a10b0e1002e9e5bf7e61f9441f
2016-06-22 16:44:53 -07:00
Dmitri Plotnikov
f19b6ec8bb Unhiding DEVICE_NAME
Bug: 28439637
Change-Id: Iea9efbaf18b2110c21f0d27a3e44fd6590f2d372
2016-06-21 16:22:56 -07:00
Svetoslav Ganov
8011f5ed1c Merge \"Fix a race in local settings caches\" into nyc-dev
am: f4ddb7ce30

Change-Id: If28342d6deab7d0b7e89029229bad060ce7c8a8d
2016-06-18 02:22:52 +00:00
Svetoslav Ganov
8c35dcc7ae Fix a race in local settings caches
We send a handle to the generation tracker along with the first accessed
setting but don't send the generation id of when the setting was
actually looked up. So by the time the client gets the setting with the
generation tracker from which to get and cache the last generation the
setting may have changed. We need to pass the generation id along with
the value and the generation tracker.

bug:29458487

Change-Id: I0ac4955ba5b10b547f8fe653a7c28e048a4691eb
2016-06-17 15:30:45 -07:00
Todd Kennedy
a97045b245 New API w/ multiple prefixes
Use the new API that contains multiple hash prefixes and a mask. Also
do some small refactoring necessary to handle multiple prefixes and
use a common implementation of the hash generation

Change-Id: Ib52f767ea6aadc30c67c5bdee949e9f9c5f04e44
2016-06-14 16:01:05 -07:00
Doris Ling
32300db186 Merge "Added config system navigation keys." into nyc-mr1-dev 2016-06-14 22:35:19 +00:00
Daniel Nishi
c535be179a Add a flag to toggle how much the storage manager should retain.
This flag is used to set how many days of storage the automatic
storage manager will retain when clearing data.

Bug: 28965462
Change-Id: I87afafb7d3252d8c390ea43b7c45fd923f911e4e
2016-06-13 10:54:31 -07:00
Doris Ling
628cea45e2 Added config system navigation keys.
1. Added config_supportSystemNavigationKeys to config and symbols
2. Added SYSTEM_NAVIGATION_KEYS_ENABLED to Settings.Global
3. Updated PhoneWindowManager to check for the system navigation keys enabled
   flag before expanding or collapsing the notification panel.

Bug 29120082

Change-Id: Ia73078520474ce5a1cbf2256c0d793ed74bbf589
2016-06-10 13:27:42 -07:00
Christopher Tate
0cd6ca14eb Merge "Don\'t back up/restore the "automatically restore app data" setting" into nyc-dev
am: 453951d077

* commit '453951d0777b1421e95bbcac501fb8b091c0f6a3':
  Don't back up/restore the "automatically restore app data" setting

Change-Id: Ia950b6992e76d05bccd5773cdda04308ddb054c0
2016-06-02 20:55:28 +00:00
Chris Tate
453951d077 Merge "Don't back up/restore the "automatically restore app data" setting" into nyc-dev 2016-06-02 20:45:16 +00:00
Chris Wren
d958f83a01 resolve merge conflicts of 43c3a7e5 to nyc-mr1-dev
Change-Id: I85619e6d8176bf23b6f4090c4573e5d9c248b585
2016-06-02 12:15:35 -04:00
TreeHugger Robot
43c3a7e5a7 Merge "make the notification enqueue rate threshold a setting" into nyc-dev 2016-06-02 15:08:03 +00:00
Chris Wren
763a9bb095 make the notification enqueue rate threshold a setting
Bug: 28693065
Change-Id: I08bd2ed342d5347c0075183b239558c50ada4a0a
2016-06-02 15:07:20 +00:00
Ta-wei Yen
912e2b2c80 Merge "Add support for source-specific VVM state in VoicemailContract" into nyc-mr1-dev 2016-06-01 21:49:47 +00:00
Ta-wei Yen
c75b215eb3 Add support for source-specific VVM state in VoicemailContract
Negative values of the field CONFIGURATION_STATE, DATA_CHANNEL_STATE,
NOTIFICATION_CHANNEL_STATE is reserved to voicemail source for its'
specific errors. SOURCE_TYPE can be set to help interpret the error
codes.

Typically the OMTP visual voicemail source will set SOURCE_TYPE to the
same value of visual voicemail type set with 
CarrierConfigManager.KEY_VVM_TYPE_STRING, such as "vvm_type_omtp".

For example, the OMTP visual voicemail source could set 
CONFIGURAITON_STATE to -5 and SOURCE_TYPE to "vvm_type_foo", and the
client can find -5 for "vvm_type_foo" means "PIN is not set by the user"

+ Field SOURCE_TYPE
+ Docs to specify negative values are reserved for the source
- Removed hidden helper method SetStatus() and SetQuota(). The 'ignore'
  value is conflicting with reserved values.

Bug:26944391
Change-Id: I0930f684dadd25ae94e3ea68a7658c7ae423e3e3
2016-06-01 20:04:57 +00:00
Dianne Hackborn
0e443c1320 Merge "Work on issue #28942589: Tune job scheduler" into nyc-dev
am: 438693dd6c

* commit '438693dd6cc4e3fe2ffb336d551c0d69e9546102':
  Work on issue #28942589: Tune job scheduler

Change-Id: I8264ce4204762358ccbf893e7846434eed258a22
2016-06-01 16:38:12 +00:00
Dianne Hackborn
e9a988caca Work on issue #28942589: Tune job scheduler
We now have a new settings key that provides all of the existing
tuning parameters, plus some newly redone ones for dealing with
different memory levels.

Changed the minimum batching for overall jobs from 2 to 1, so
we will never get in the way of immediately scheduling jobs
when the developer asks for this.  We should now be able to rely
on the doze modes to do better batching of jobs for us when it
is really important.

Also work on issue #28981330: Excessive JobScheduler wakeup alarms.
Use a work source with scheduled alarms to blame them on the app
whose job they are being scheduled for, and add a check for whether
a job's timing constraint has been satisfied before considering it
a possible candidate for the next alarm.  (If it is satisified,
the time is in the past, so we should not schedule an alarm for it.)

Finally clean up a bunch of the dumpsys output to make it easier
to understand.

Change-Id: I06cf2c1310448f47cf386f393e9b267335fabaeb
2016-05-31 18:16:19 -07:00
Christopher Tate
1d7d9404e0 Don't back up/restore the "automatically restore app data" setting
It stomps on the Setup Wizard intended [or user-supplied!] behavior.

Bug 29030834

Change-Id: Iabb0ff88b7f8b9130abb59af68872d02e5534140
2016-05-31 12:03:25 -07:00
Felipe Leme
8c8ea506d9 Merge "Allow apps to bypass Power Save restrictions when launched from a Notification\'s PendingIntent." into nyc-dev
am: efa291a860

* commit 'efa291a8605e91d775faf46ada349ec7f81fcdb9':
  Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.

Change-Id: Ibd09b082140b66d25bd8583040761581bb20af76
2016-05-27 20:04:22 +00:00
Felipe Leme
a1b79bfd7a Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.
This scenario typically happens when the device is on Doze Mode and a
notification action is triggered from a Wear device.

In a nutshell, the workflow is:

- ProcessRecord has a flag telling whether a process has "whitelist
  management" privileges.
- When NotificationManager binds a new NotificationListenerService, it
  sets the BIND_ALLOW_WHITELIST_MANAGEMENT flag.
- On bind(), ActiveService asserts that only system apps can set that
  flag.
- On computeOomAdjLocked(), ActivityManagerService sets the
  ProcessRecord flag if necessary.
- Upon creating a notification, NotificationManager calls AM to mark its
  PendingIntents as coming from a notification.
- When PendingIntentRecord sends it to the target, it checks if it's
  from a notification and if so calls AM to do the temp whitelist.
- On unbind(), ActiveService removes the ProcessRecord flag if necessary.

Fixes: 28818704

Change-Id: I00d46036a2cbb73f7f733fd35bf0b743a02807a1
2016-05-27 11:45:09 -07:00
Seigo Nonaka
005ef10518 Merge "Fix system locale propagation during user creation." into nyc-dev
am: ce9f5e3657

* commit 'ce9f5e3657b7a8fb68c6c65a2cd5a27eaf556cc8':
  Fix system locale propagation during user creation.

Change-Id: I020babcf2ce1aa632099457f2baf3497f5ac2946
2016-05-26 04:07:33 +00:00
Seigo Nonaka
ce9f5e3657 Merge "Fix system locale propagation during user creation." into nyc-dev 2016-05-26 03:51:39 +00:00
Daniel Nishi
395d387c2c Add a flag to toggle the automatic storage manager on and off.
This flag will be used in both Settings and Setup Wizard to enable
and disable the automatic storage manager.

Bug:28905328
Change-Id: Iafc374448d96171ad0a4c36f6fea5e0118105a8c
2016-05-23 14:20:22 -07:00
Seigo Nonaka
5ac2c3b4a0 Merge "Clear locales without changing layout direction." into nyc-dev
am: 6686711ba2

* commit '6686711ba289740a20dc15133aed4a2b5bac5d44':
  Clear locales without changing layout direction.

Change-Id: I5c7714d3ef54fc7caf6580837d48a1b79e56a892
2016-05-20 19:52:54 +00:00