743 Commits

Author SHA1 Message Date
Christopher Tate
6597e3435f Notification listener backup & restore
We now back up & restore the set of enabled notification listeners.  Post-
restore, a listener that had been enabled on the ancestral device will be
enabled on the current device as soon as it's installed, matching the
user's previous configuration.  After this has happened the enable/disable
state for that app is not "sticky"; disabling it again will work as
expected.

The infrastructure for accomplishing this is general: it can be leveraged
by any ManagedServices derivative.  There's a bit of extra wiring in the
settings provider to support the restore-time information flow as well.
This is because ManagedServices -- like many other parts of the system --
monitors writes to the settings provider and does work in response to new
writes of the elements that it cares about.  Unfortunately this means that
there is no way to use the BackupAgent's restoreFinished() hook to post-
process the restored data: by the time it is run, the ManagedService's
observers have already executed and culled any unknown components from
the description that was just pushed into settings.

As of this patch, the settings provider's restore logic knows that a
particular settings element will require a message to interested observers
about the restore-driven change.  The message is delivered as a broadcast,
and is sent after the new value has been committed to the settings db.
Adding other system ManagedService handling that parallels this will only
require adding a new corresponding entry to the table of individual settings
for which the relevant "this settings element is being restored" broadcast
is sent, found in SettingsHelper.

(It isn't sent for all settings elements because very few settings elements
have semantics that require it; 3rd party code won't be running yet during
platform restore anyway; and sending up to hundreds of broadcasts during
setup & restore is far from ideal.)

Bug 19254153

Change-Id: Ib8268c6cb273862a3ee089d2764f3bff4a299103
2015-03-16 16:24:28 -07:00
Dianne Hackborn
b9a5e4ad30 Add new debug feature to automatically create heap dumps.
Not yet working, unless you turn off SELinux enforcing.
We need to update SElinux to allow the system process
to give apps access to /data/system/heapdump/javaheap.bin.

Currently watching can only be enabled through the shell,
such as:

adb shell am set-watch-heap com.android.systemui 1024

The last number is the process pss size in bytes, so this is
asking us to warn if it goes about 1K which will be all the
time.

Change-Id: I2089e5db2927afca0bf01a363c6247ee5dcb26e8
2015-03-06 16:42:03 -08:00
Adam Powell
e30c9af356 Add ChooserTargetService API
A ChooserTargetService can be implemented by apps that wish to offer
additional deep-link targets for the system intent chooser to in turn
offer to the user. This allows apps to create contextually relevant
shortcuts for UI flows that would otherwise require several steps of
explicit disambiguation. For example, a chat app might offer one-touch
access to recent conversations when sharing a photo to it from
elsewhere.

The chooser implementation must limit the number of
ChooserTargetServices it elects to query in order to respect available
system resources. Only the system chooser is permitted to bind to a
ChooserTargetService.

Change-Id: Ia7e075ee649c51cf2035f20aee166c5a27d91aeb
2015-03-04 14:23:30 -08:00
Christopher Tate
73570db59f Use scheduled job rather than periodic alarms for key/value backups
Instead of a runs-forever periodic alarm that drives key/value backup
passes, we instead schedule-on-demand a trigger job that will kick off
the pass after a batching interval.  The key semantic change is that
we now never wake for key/value backup work unless we've been explicitly
asked to do so.  We also use a rather longer batching interval than
was previously the case.

Bug 19536032

Change-Id: Ie377562b2812c9aeda0ee73770dfa94af6017778
2015-03-02 18:01:28 -08:00
Jim Miller
ba67aee02c Add fingerprint settings support to the framework
- cleanup thread issue and simplify native FingerprintService methods
- add new permissions and enforce them
- add fingerprint hardware detection API

Change-Id: I87c2243ea2412061f1e85b044138480d0161bcdf
2015-02-27 12:03:32 -08:00
Filip Gruszczynski
cfb3185a27 am 0fbcc708: am 1e74b5d6: Merge "Burn in protection." into lmp-mr1-modular-dev
* commit '0fbcc7086fe742e641915ed5f097119d01613cb5':
  Burn in protection.
2015-02-25 21:47:12 +00:00
Filip Gruszczynski
d2e8640c2c Burn in protection.
Bug: 19373758
Change-Id: I7242f73acadd21bdee03262b4205c8af0734fccb
2015-02-25 12:22:49 -08:00
Mike Lockwood
98a0b38819 AndroidManifest.xml: Remove two obsolete protected broadcasts
android.media.action.USB_AUDIO_ACCESSORY_PLUG and android.media.action.USB_AUDIO_DEVICE_PLUG
were removed in a previous change.

Change-Id: I22d09b9a0eb4f6f29a31a50ed8bfa7e09c52b064
2015-01-27 15:07:29 -08:00
Dianne Hackborn
5f86b66c9b am 24bc8d76: am 29807195: Merge "Fix issue #18901214: APR: Frequent crash in android" into lmp-mr1-dev
automerge: d17218e

* commit 'd17218e7df24da8a2bcf6e7714dc0151155c3286':
  Fix issue #18901214: APR: Frequent crash in android
2015-01-05 23:16:42 +00:00
Dianne Hackborn
b182955a1e Fix issue #18901214: APR: Frequent crash in android
The ShutdownActivity was implemented in the system server
code, which is no longer part of the boot class path.  This would
work fine when requesting a shutdown from the primary user, since
in that case the activity would be loaded in to the main system
process which also has the system service code loaded.

However, when executed from a secondary user, we need to spin up
a new system process for it; that system process is just a regular
app process, without the system service code, so *boom*.

To fix this, move ShutdownActivity to the framework jar.

Change-Id: Icb831cd6ed619da5feede5605c45ef177a892fbc
2015-01-05 14:40:24 -08:00
Jing Zhao
a0973778ca am 8d50d0fb: am 23ad6efb: am df1d07b4: Add checking to find AppDirectedSmsProxy for App Directed SMS feature
* commit '8d50d0fb27c1958dbd047bb8a46d7183d873f131':
  Add checking to find AppDirectedSmsProxy for App Directed SMS feature
2014-12-09 00:19:03 +00:00
Cheuksan Wang
8b3f47b35a am 673f443f: am 695b5d25: am 0752da22: Merge "add system|signature protection to android.permission.BIND_CARRIER_MESSAGING_SERVICE" into lmp-mr1-dev
* commit '673f443f7e92956399c322b31a14178436fa723b':
  add system|signature protection to android.permission.BIND_CARRIER_MESSAGING_SERVICE
2014-12-09 00:18:12 +00:00
Jing Zhao
df1d07b4c7 Add checking to find AppDirectedSmsProxy for App Directed SMS feature
Adding new system permission android.permission.CARRIER_FILTER_SMS

Bug: 18609762
Change-Id: I80a133653101cd4ec1793e726faf3601e2970224
2014-12-05 20:42:33 +00:00
Cheuksan Wang
981344861c add system|signature protection to
android.permission.BIND_CARRIER_MESSAGING_SERVICE

Bug: 18005911
Change-Id: Iacb16a20c5cef4a55be0187af0a47e0cb82b409b
2014-12-05 19:04:55 +00:00
Cheuksan Wang
412766a7d6 am 29ac679f: am dba26aa2: am 109ec376: Merge "new SMS/MMS carrier app API" into lmp-mr1-dev
* commit '29ac679f9f85a68eca03c262e740d62f8af66797':
  new SMS/MMS carrier app API
2014-12-04 21:55:19 +00:00
Cheuksan Wang
109ec376da Merge "new SMS/MMS carrier app API" into lmp-mr1-dev 2014-12-04 00:19:06 +00:00
Mike Lockwood
008dfadb31 Remove obsolete AudioManager audio dock plugged Intents
We have no code that listens for AudioManager.ACTION_ANALOG_AUDIO_DOCK_PLUG
and AudioManager.ACTION_DIGITAL_AUDIO_DOCK_PLUG

Change-Id: I96a746c84e5a4b17df1b9fbdbb5de77e6bc39714
2014-12-02 12:23:04 -08:00
Cheuksan Wang
b72eb97e4b new SMS/MMS carrier app API
Changes based on api council review

BUG: 18005911
Change-Id: I23bd207ce70f7fa201d6d964c1700cfc44cb009b
2014-12-01 18:11:07 -08:00
Andres Morales
8f70a2558b am ffc71028: am 83f4847f: am 59093d92: Merge "Define permission for system apps to query size of block" into lmp-mr1-dev
* commit 'ffc710281c38aba9546d200a25d6b19b0f85470a':
  Define permission for system apps to query size of block
2014-11-25 18:51:42 +00:00
Andres Morales
6b0c7acd7f Define permission for system apps to query size of block
Allows ManagedProvisioning to determine whether there's a
challenge and thus whether to disable NFC provisioning.

Other implementation option: new hidden boolean API method.
Can't think of benefit of new API method "isBlockInUse", other
than doesn't leak PDB size and is more explicitly tied to the
use case. Open to either impl if anyone has opinions on the matter.

Bug: 18508767
Change-Id: I28d2eb5a0837ff85cb91f140b17ce1dd843fe9d6
2014-11-25 15:55:28 +00:00
Jeff Davidson
c79924f741 am b431a198: am e6bc5adf: am e0cb56b0: Merge "Enforce VPN control "permission" with an actual permission." into lmp-mr1-dev
* commit 'b431a198ec255be7efb30b4c81a779a4eb5009f6':
  Enforce VPN control "permission" with an actual permission.
2014-11-18 02:30:54 +00:00
Jeff Davidson
e0cb56b02e Merge "Enforce VPN control "permission" with an actual permission." into lmp-mr1-dev 2014-11-17 21:02:10 +00:00
Abhijith Shastry
e3435feed4 am 0f064207: am 530f25d6: am fb8db1c8: Merge "new sms/mms carrier app API" into lmp-mr1-dev
* commit '0f0642075e42f415d7f5244c5d94fe726756afa0':
  new sms/mms carrier app API
2014-11-14 19:16:33 +00:00
Abhijith Shastry
fb8db1c84b Merge "new sms/mms carrier app API" into lmp-mr1-dev 2014-11-13 22:15:46 +00:00
Cheuksan Wang
f9c50c45c6 new sms/mms carrier app API
BUG: 18005911

Change-Id: Ib961badc1ccac270f1244f8d971d9abec324b73f
2014-11-12 15:29:41 -08:00
Jeff Davidson
bc19c181c8 Enforce VPN control "permission" with an actual permission.
The current implementation uses a whitelist of package names. Use a
system|signature permission instead of rolling our own security and
add that permission to the existing set of whitelisted packages
(SystemUI and VpnDialogs).

In addition to being less of a security risk (using well-known methods
like Context.enforceCallingPermission rather than manually querying
PackageManager and checking UIDs for package names), this enables
other system-privileged apps to control VPN as needed per the below
bug.

Bug: 18327583
Change-Id: I38617965c40d62cf1ac28e3cb382c0877fb1275d
2014-11-12 08:56:20 -08:00
Alan Viverette
3b54b6d78c am cf7f3b6b: am a9b503ae: Merge "Fix Material styling in remaining dialogs and layouts" into lmp-mr1-dev automerge: 0aaebd4
* commit 'cf7f3b6be252f313536e58cc62763075d4f45e5a':
  Fix Material styling in remaining dialogs and layouts
2014-11-11 18:39:44 +00:00
Alan Viverette
f89b58ca83 Fix Material styling in remaining dialogs and layouts
Also updates existing row and dialog layouts to use preferred list item
or dialog padding as appropriate, fixes incorrect activity themes, and
updates ChooseAccountActivity variants for Material.

BUG: 18314215
BUG: 18292562
Change-Id: I2fde4ba6db80d839104abdaa334a46ad1861600f
2014-11-10 16:14:27 -08:00
Evan Charlton
12fc80b2b2 am 13cf9cf1: am 3caf6fc7: Merge "Apply @hide / @SystemApi to android.telecom.*" into lmp-mr1-dev automerge: e2e649f
* commit '13cf9cf1d3f426d82a2af46c36bdf308ff43d428':
  Apply @hide / @SystemApi to android.telecom.*
2014-11-10 22:42:46 +00:00
Evan Charlton
0e094d926c Apply @hide / @SystemApi to android.telecom.*
Move the android.telecom.* namespace back to @hide, and also mark it
with @SystemApi so that system-privileged apps can use them.

Bug: 18302450
Change-Id: I33ae1b9b0dfdb1c5eff51ca3c829196bcfc9411c
2014-11-10 11:52:31 -08:00
Jeff Davidson
3527aa01cd am fb68a976: am dd40ccf3: am b42bdef5: Merge "Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED." into lmp-mr1-dev
* commit 'fb68a9762087a262146eec5d0e0d3fbdbdf25b6b':
  Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED.
2014-11-05 21:48:16 +00:00
Jeff Davidson
b42bdef51c Merge "Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED." into lmp-mr1-dev 2014-11-05 21:33:16 +00:00
Jeff Davidson
161977998f Rename BROADCAST_SCORE_NETWORKS to BROADCAST_NETWORK_PRIVILEGED.
This is necessary/desired for two reasons:

1. UX around network scoring shipped with L despite lacking underlying
platform support. We do not want network scoring applications to
trigger this UX on L devices, and therefore we must break the contract
of what defines a network scorer so that apps build against the new
contract don't trigger the old UX.

2. As a start towards generalizing the term "score" for a potentially
broader role in the future, though that role is very much undefined.

Bug: 18160480
Change-Id: If228977513e32e45bc44dbeda24aa18436fdfca6
2014-11-04 10:55:49 -08:00
Santos Cordon
71a4f2129f am 082f4978: am 04f3eebe: am 27be7b35: Merge "Split Telecom PhoneAccount registration permissions." into lmp-mr1-dev
* commit '082f49786ec25b254992781a5ad3c67e75ceb8ee':
  Split Telecom PhoneAccount registration permissions.
2014-11-03 08:09:40 +00:00
Santos Cordon
2ef87ee728 Split Telecom PhoneAccount registration permissions.
Bug: 18106506
Change-Id: Ic825b44c2dc42709073a3990f6a7ca8e372025e9
2014-10-31 14:44:30 -07:00
Evan Charlton
b2dda69031 am 4d4b2cfd: am 2ad5eb53: Merge "Move telecom permission to the public API" into lmp-mr1-dev automerge: 8e25057
* commit '4d4b2cfd4c611800787b71d0896c6d8781875732':
  Move telecom permission to the public API
2014-10-28 07:16:08 +00:00
Evan Charlton
cef5a5404a Move telecom permission to the public API
Make REGISTER_PROVIDER_OR_SUBSCRIPTION and REGISTER_CONNECTION_MANAGER
part of the public API so that they can be used by third-party apps.

Bug: 18114695
Change-Id: I1b8578cbc82e95ea78b4a2166f4a23650a0c375f
2014-10-24 15:40:35 -07:00
Wink Saville
be11d12462 am f9bec04d: am f4d86a1d: am f44628e3: am 6bacccbf: Merge "Radio Capability Support." into lmp-sprout-dev
* commit 'f9bec04d89ce6270d71b738be341f3e443abcce5':
  Radio Capability Support.
2014-10-20 21:42:28 +00:00
Wink Saville
2af2d57d57 Radio Capability Support.
New design of capability switch for L.
Add new RIL requests:
     RIL_REQUEST_GET_RADIO_CAPABILITY
     RIL_REQUEST_SET_RADIO_CAPABILITY
     RIL_UNSOL_RADIO_CAPABILITY

These commands allow the framework to communicate what the Radio
Capabilities for each logical modem has or should be using.

It can support 2/3/4G switch and has flexible architecture to support
future technology.

Change-Id: Iedf7f608d2ba3c06a883500f2d85abb98e69d9c1
2014-10-20 10:31:05 -07:00
Yorke Lee
0e8b697f23 am 76e3689b: am 438723e6: am a801d349: am 9621b793: am e4e3fcec: Merge "Make READ_VOICEMAIL/WRITE_VOICEMAIL system permissions" into lmp-dev
* commit '76e3689b45189902a85b06de22053cfa5d25a1cd':
  Make READ_VOICEMAIL/WRITE_VOICEMAIL system permissions
2014-10-17 23:40:14 +00:00
Yorke Lee
9621b79396 am e4e3fcec: Merge "Make READ_VOICEMAIL/WRITE_VOICEMAIL system permissions" into lmp-dev
* commit 'e4e3fcec415cdc9739f32ce1eaaec67666e5454d':
  Make READ_VOICEMAIL/WRITE_VOICEMAIL system permissions
2014-10-17 23:19:31 +00:00
Yorke Lee
65d241b92d Make READ_VOICEMAIL/WRITE_VOICEMAIL system permissions
Bug: 18020724
Change-Id: I5a0e5ef8a1e40ee23f4b132f5877b63a738e776e
2014-10-17 10:23:37 -07:00
Amit Mahajan
fa72516ac9 am ed454542: am 38e48c2f: am 3547c13e: am 097c8d60: am 1901e175: Merge "Change protectionLevel for READ_PRECISE_PHONE_STATE from dangerous to signatureOrSystem." into lmp-dev
* commit 'ed4545423b0166f2436adee077d11b85b62ed07a':
  Change protectionLevel for READ_PRECISE_PHONE_STATE from dangerous to signatureOrSystem.
2014-10-14 17:30:18 +00:00
Amit Mahajan
097c8d6011 am 1901e175: Merge "Change protectionLevel for READ_PRECISE_PHONE_STATE from dangerous to signatureOrSystem." into lmp-dev
* commit '1901e175079e3b7242ace7d4b3ec38af3723f91b':
  Change protectionLevel for READ_PRECISE_PHONE_STATE from dangerous to signatureOrSystem.
2014-10-13 22:03:52 +00:00
Amit Mahajan
1901e17507 Merge "Change protectionLevel for READ_PRECISE_PHONE_STATE from dangerous to signatureOrSystem." into lmp-dev 2014-10-13 19:32:36 +00:00
Mike Lockwood
59a24d6ca9 am 4dd24730: am b3bab92e: am 0a4e2245: am 8ca4886e: am 317f9ce8: Merge "Change RECEIVE_BLUETOOTH_MAP permission to signature or system" into lmp-dev
* commit '4dd247305f4e4f3b3a7a9f52a8d1a9c6641391f3':
  Change RECEIVE_BLUETOOTH_MAP permission to signature or system
2014-10-13 19:17:17 +00:00
Mike Lockwood
8ca4886e43 am 317f9ce8: Merge "Change RECEIVE_BLUETOOTH_MAP permission to signature or system" into lmp-dev
* commit '317f9ce85a492a213b8f1dac477b1aefad55f621':
  Change RECEIVE_BLUETOOTH_MAP permission to signature or system
2014-10-13 18:48:11 +00:00
Amit Mahajan
5742335cbd Change protectionLevel for READ_PRECISE_PHONE_STATE from dangerous to
signatureOrSystem.

Bug: 17952946
Change-Id: I4a75da11cb092ca795d0eacf824890eb12c7446a
2014-10-13 11:38:03 -07:00
Mike Lockwood
6e383350e4 Change RECEIVE_BLUETOOTH_MAP permission to signature or system
Bug: 17954105
Change-Id: I8b16cab7193c97e5f54d6e4ef33ebf8cda0da197
2014-10-13 10:00:08 -07:00
Dan Sandler
a3bfb78084 am d23fa0f6: am 97a7fbfb: am 621fa30c: am 9eef8749: am 2200f86f: All (er, L) is finally revealed.
* commit 'd23fa0f65077ba83d7b9b24805096f2b4532b9da':
  All (er, L) is finally revealed.
2014-10-08 19:07:18 +00:00