Commit Graph

3368 Commits

Author SHA1 Message Date
Christopher Tate
46b9d3cf44 am 425bd876: am d1741ef9: am 1af5fe23: Merge "Require that verified intent filters only have http/https <data> decls" into mnc-dev
* commit '425bd87661e318d715458fdfa5de440a2474d437':
  Require that verified intent filters only have http/https <data> decls
2015-06-24 21:08:31 +00:00
Christopher Tate
413020a6ca Require that verified intent filters only have http/https <data> decls
It is malformed to write a single intent filter like this:

  <intent-filter android:autoVerify="true">
    <data android:host="foo.example"
          android:path="/"
          android:scheme="http" />
    <data android:host="*"
          android:path="/custom"
          android:scheme="fooexamplecustomscheme" />
  </intent-filter>

In practice this app is accidentally defining a filter that will match
"http://*".  This is now detected, and will never be auto-verified for
any of the mentioned domains.

Verified intent filters must *only* handle the http & https schemes.

Bug 21920537

Change-Id: I933cddbea23185d242565cac940e1e7a7e4e289b
2015-06-24 13:16:20 -07:00
Svetoslav Ganov
b96d1f1e69 am 242c1f33: am 4475dbca: am 2c99ea35: Merge "Remove not needed contacts related permissions." into mnc-dev
* commit '242c1f333431b32445336faed18feb1a90ebd6e4':
  Remove not needed contacts related permissions.
2015-06-23 23:42:34 +00:00
Svetoslav Ganov
2c99ea3524 Merge "Remove not needed contacts related permissions." into mnc-dev 2015-06-23 23:04:20 +00:00
Svetoslav Ganov
6d2c0e5ee2 Remove not needed contacts related permissions.
This reverts commit ed5ff51b2c.

Change-Id: If2407e4e474a438d95e1b7ad1aa6f441bb3ace08
2015-06-23 23:03:55 +00:00
Xiaohui Chen
b1cc316dce Merge "Introduce system user and primary user." 2015-06-23 22:44:03 +00:00
Xiaohui Chen
70f6c38644 Introduce system user and primary user.
Bug: 19913735
Change-Id: I2c7855915d778cf80a7154314321ddd90e2eaaac
2015-06-23 15:25:37 -07:00
Jeff Davidson
43469fd4a4 resolved conflicts for merge of 8685db85 to master
Change-Id: I8fbf397082ac90d6a173785538fd6eeb8e4976f7
2015-06-23 15:11:37 -07:00
Amith Yamasani
1d69d48596 am ab8d7e31: am af259ee4: am 862ab87b: Merge "Runtime permissions cannot be set on legacy apps by device policy" into mnc-dev
* commit 'ab8d7e31fb1b6526479844111b177be81a54a31c':
  Runtime permissions cannot be set on legacy apps by device policy
2015-06-23 21:31:05 +00:00
Jeff Davidson
8d9ad19341 Merge "Default permissions for carrier apps." into mnc-dev 2015-06-23 20:43:06 +00:00
Amith Yamasani
0bf8f7cc39 Runtime permissions cannot be set on legacy apps by device policy
Clarify docs that runtime permissions can be granted or revoked by
a profile owner/device owner only for MNC apps and not legacy apps.

Check the targetSdkVersion and return false if legacy app.

Remove all policy flags from permissions when cleaning up
a device or profile owner.

Bug: 21835304
Bug: 21889278
Change-Id: I4271394737990983449048d112a1830f9d0f2d78
2015-06-23 12:01:36 -07:00
Dianne Hackborn
ee9a55fd4b am 80e364a7: am 11ef84c8: am 6af40c83: Merge "Fix issue #21799741: AbstractThreadedSyncAdapter crashes..." into mnc-dev
* commit '80e364a71ac41672436f86b2ceb61698f4fb59d1':
  Fix issue #21799741: AbstractThreadedSyncAdapter crashes...
2015-06-23 18:23:06 +00:00
Jeff Davidson
2a88031208 Default permissions for carrier apps.
Grant permissions in the PHONE and LOCATION buckets to default carrier
apps as defined by the telephony stack. Provide a system API to grant
default permissions for carrier apps, as the set of apps may change
when a new SIM is inserted.

Since the phone process is separate from the system process, we need
to allow for binder calls to these APIs.

Also fix a log tag that is too long (android.util.Log drops messages
silently if the tag is > 23 characters).

Bug: 21696731
Change-Id: I98ca0c49c69f621f835ba57c1fd0505f2cec0d0d
2015-06-23 09:55:23 -07:00
Dianne Hackborn
6af40c8338 Merge "Fix issue #21799741: AbstractThreadedSyncAdapter crashes..." into mnc-dev 2015-06-23 16:45:50 +00:00
Christopher Tate
af6052f546 am 309499e0: am a116123f: am 6d2268a5: Merge "Back up / restore default app and intent filter verification state" into mnc-dev
* commit '309499e0cd138d30d340460d6c99ecb8292717d1':
  Back up / restore default app and intent filter verification state
2015-06-23 05:38:23 +00:00
Christopher Tate
6d2268a576 Merge "Back up / restore default app and intent filter verification state" into mnc-dev 2015-06-23 01:02:12 +00:00
Dianne Hackborn
d01ed46c63 Fix issue #21799741: AbstractThreadedSyncAdapter crashes...
...when permissions aren't granted

Eat the SecurityException, turn it into a new callback.

Change-Id: Ibeffce061aa51beba097c90f431de07ce70b3c4e
2015-06-22 17:41:44 -07:00
Christopher Tate
6038d15cbc Back up / restore default app and intent filter verification state
For apps not present on device, the state inherited from the ancestral
device is applied when the app is ultimately installed.

Bug 20144515

Change-Id: Ie05b4f1751357fc62f14e259da174b8cf465e913
2015-06-22 17:20:26 -07:00
Matthew Williams
0272474379 am 9ac21d4c: am 1a9245d5: am 8b1db074: Merge "Cancel Syncs that aren\'t making progress." into mnc-dev
* commit '9ac21d4cf8d0870d7f452665fa110e1aba356f89':
  Cancel Syncs that aren't making progress.
2015-06-22 22:22:59 +00:00
Matthew Williams
8b1db0746f Merge "Cancel Syncs that aren't making progress." into mnc-dev 2015-06-22 21:41:49 +00:00
Matthew Williams
1967c8ddd5 Cancel Syncs that aren't making progress.
BUG: 18266674
1) If a sync has up/downloaded less than 10bytes in 60 seconds it is
considered to be making no progress and is summarily cancelled.

2) Apply a 30min hard time-out to initialization syncs.

Note that there is little proof that cancelling a sync has an
impact. All it results in is a Thread.interrupt on the sync
thread, which the adapter must itself implement. To this effect
this CL also updates the javadoc to make this clearer, and adds
some (unimplemented) threats about killing the hosting process.

Change-Id: I83c447648152ccbf76bb1fbd7e9216e01a37952f
2015-06-22 14:36:36 -07:00
Kenny Guy
bf190b2ebb am 38914619: am 32327b72: am 43423549: Merge "Fix LauncherApps registerCallback adding duplicate callbacks." into mnc-dev
* commit '389146190e1d391a91871f07518be755d01d31de':
  Fix LauncherApps registerCallback adding duplicate callbacks.
2015-06-22 18:13:52 +00:00
Kenny Guy
434235496c Merge "Fix LauncherApps registerCallback adding duplicate callbacks." into mnc-dev 2015-06-22 16:50:05 +00:00
Svet Ganov
971e091d52 am 27479b57: am f5da7202: am 1e575a0f: Merge "Only grant runtime permissions to special components." into mnc-dev
* commit '27479b5752bcb06853ef5ada1813dc139efb7dd0':
  Only grant runtime permissions to special components.
2015-06-20 00:11:52 +00:00
Amith Yamasani
0c25fbde82 resolved conflicts for merge of 5f1c2dbc to master
Change-Id: I4d08ad224c8cddd1d379c0f9ec326165a08dd651
2015-06-19 17:04:02 -07:00
Svet Ganov
1e575a0f32 Merge "Only grant runtime permissions to special components." into mnc-dev 2015-06-19 22:26:32 +00:00
Svet Ganov
adc1cf4604 Only grant runtime permissions to special components.
Now runtime permissions are granted only to components that are
part of the system or perform special system operations. For
exmple, the shell UID gets its runtime permissions granted by
default and the default phone app gets the phone permissions
granted by default.

bug:21764803

Change-Id: If8b8cadbd1980ffe7a6fc15bbb5f54a425f6e8f9
2015-06-19 15:17:56 -07:00
Amith Yamasani
b94761d0a4 Merge "App Standby : Association between content providers and their sync adapter" into mnc-dev 2015-06-19 22:08:13 +00:00
Amith Yamasani
37a40c24de App Standby : Association between content providers and their sync adapter
Set sync adapters to active if the associated content providers are used
at foreground process state.

Minimize how frequently published content providers are reported by
keeping track of last reported time.

Also cache sync adapters associated with an authority in SyncManager.

Bug: 21785111
Change-Id: Ic2c8cb6a27f005d1a1d0aad21d36b1510160753a
2015-06-19 15:04:58 -07:00
Wale Ogunwale
c97f8742c8 am 91c0fbd1: am 0b3be03c: am 4186c977: Merge "Don\'t write IntentFilter autoVerify field to xml if false." into mnc-dev
* commit '91c0fbd126b2a9802f6c58de953e971d74a7d85a':
  Don't write IntentFilter autoVerify field to xml if false.
2015-06-19 17:10:48 +00:00
Sudheer Shanka
eb6195c7a2 am eaa25779: am a0fa30dc: am a408061c: Merge "Use the intent filter icon in ResolveInfo for managed profile." into mnc-dev
* commit 'eaa2577953eeff27754f6707ac0efa11b77ed947':
  Use the intent filter icon in ResolveInfo for managed profile.
2015-06-19 16:25:48 +00:00
Kenny Guy
172a21697d Fix LauncherApps registerCallback adding duplicate callbacks.
LauncherApps wraps the callback passed so checking
using List.contains isn't valid.

Bug: 21947184
Change-Id: Ice0973935574adda15e295073faedb62374ff627
2015-06-19 17:21:28 +01:00
Wale Ogunwale
15b9fd268a Don't write IntentFilter autoVerify field to xml if false.
Bug: 21205789
Change-Id: I650265eeec99d470ae2f089d8ae3ef3c866c0096
2015-06-19 08:59:52 -07:00
Sudheer Shanka
a408061cc7 Merge "Use the intent filter icon in ResolveInfo for managed profile." into mnc-dev 2015-06-19 09:25:59 +00:00
Christopher Tate
c6c902963c am ff69c55e: am 528e9abe: am 728b7500: Merge "Document possible null returns in PackageManager" into mnc-dev
* commit 'ff69c55eb078060b4bd7cd2e16ebe35229957356':
  Document possible null returns in PackageManager
2015-06-18 21:21:44 +00:00
Christopher Tate
728b7500b3 Merge "Document possible null returns in PackageManager" into mnc-dev 2015-06-18 20:53:12 +00:00
Christopher Tate
abe6580199 Document possible null returns in PackageManager
In particular queryIntentServices() but also a few others.

Bug 19127758

Change-Id: I590605ce4870b2ab300385678df8917cfade60f9
2015-06-18 13:48:42 -07:00
Dianne Hackborn
22afc5469e am 2133afc7: am d21b695f: am 22433a33: Merge "Fix issue #21814207 and issue #21814212 (alarm manager)" into mnc-dev
* commit '2133afc77aa36f186b9e5c0ff9954d0d26848e3e':
  Fix issue #21814207 and issue #21814212 (alarm manager)
2015-06-17 23:27:55 +00:00
Dianne Hackborn
a750a63d63 Fix issue #21814207 and issue #21814212 (alarm manager)
Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.

Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions.  There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.

Issue #21814212: Need to allow configuration of alarm manager parameters

The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController.  Also did a few
tweaks in the existing DeviceIdleController impl.

Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
2015-06-17 11:41:45 -07:00
dcashman
773f3ed1e2 am f176b3b5: am 95e1f8b2: am acc2df21: Merge "Add keyset support for ECDSA public keys." into mnc-dev
* commit 'f176b3b5a5fccad5d16dc71642a70f90a57ebf64':
  Add keyset support for ECDSA public keys.
2015-06-16 22:50:35 +00:00
dcashman
acc2df21de Merge "Add keyset support for ECDSA public keys." into mnc-dev 2015-06-16 22:14:35 +00:00
Dianne Hackborn
1317a6585c am d5111d46: am 4169b628: am 285cb414: Merge "Fix issue #21813831: Need API for asking to be added to power whitelist" into mnc-dev
* commit 'd5111d46d6589921c3ad3d7ee6771ccc0e257f8f':
  Fix issue #21813831: Need API for asking to be added to power whitelist
2015-06-15 19:49:46 +00:00
Dianne Hackborn
1958e5e787 Fix issue #21813831: Need API for asking to be added to power whitelist
Add the API.  Clean up a few related things.

Change-Id: I190adad1812f36f6095b98a1001fedb94874e8b5
2015-06-15 11:53:59 -07:00
Makoto Onuki
b3dcb74c69 am ed960080: am 5a9ef04f: am bd25b5f6: Merge "Fix ArrayIndexOutOfBoundsException in Transport.query" into mnc-dev
* commit 'ed9600801733b3481a3ede9af94d2129620a348e':
  Fix ArrayIndexOutOfBoundsException in Transport.query
2015-06-13 01:06:22 +00:00
Makoto Onuki
bd25b5f602 Merge "Fix ArrayIndexOutOfBoundsException in Transport.query" into mnc-dev 2015-06-13 00:28:20 +00:00
Makoto Onuki
34bdcdb105 Fix ArrayIndexOutOfBoundsException in Transport.query
The bug was that it used getCount() instead of getColumnCount().

Bug 21727804

Change-Id: I3ed6ed3be60c2cb25316340f588f993bac70f52b
2015-06-12 17:16:23 -07:00
Jeff Sharkey
69353453c0 am 551ca4ff: am 05107ddf: am 54b65ff3: Merge "Annotate ContentProviderClient arguments." into mnc-dev
* commit '551ca4ffc4bdd65043277244952ba8a7a0603518':
  Annotate ContentProviderClient arguments.
2015-06-12 17:48:29 +00:00
Dianne Hackborn
f8b3253180 am ccd6d0c1: am d55860d9: am 8a435ced: Merge "Fix APIs." into mnc-dev
* commit 'ccd6d0c14decd111e7e12bf9844fa5ff75aa912e':
  Fix APIs.
2015-06-12 17:48:22 +00:00
Jeff Sharkey
54b65ff300 Merge "Annotate ContentProviderClient arguments." into mnc-dev 2015-06-12 16:57:56 +00:00
Jeff Sharkey
73ed509d44 Annotate ContentProviderClient arguments.
Explicitly mark if they're @Nullable or @NonNull.

Bug: 21560515
Change-Id: Id0a208a38c5a9ea19dddbe60c65d285645d08bb0
2015-06-12 09:49:31 -07:00