Commit Graph

3383 Commits

Author SHA1 Message Date
Svetoslav
ee4e4e79f5 am 358a8362: am ae45cfa6: am 03b5f128: Merge "Grant default permissons to the default SMS, Phone, Browser app." into mnc-dev
* commit '358a8362781736a8ddaa27713a0727d4eac1cfd0':
  Grant default permissons to the default SMS, Phone, Browser app.
2015-06-30 01:22:42 +00:00
Svetoslav
cdfd230a39 Grant default permissons to the default SMS, Phone, Browser app.
The default SMS, Phone, Browser are selected in the UI and we
grant default permissions to these. We do this regardless if
they are on the system image as the user has made an explicit
choice in the UI and the permission we grant are considered
essential for such type of a core app to operate properly.

bug:22104986

Change-Id: Ide8caeb524b43dde11a20460666cf34c4d35f84b
2015-06-29 17:44:19 -07:00
Christopher Tate
7257462a73 am de3d02e4: am e436e19e: am b035c6d9: Merge "Properly scope the "only http/https schemes" intent filter semantics" into mnc-dev
* commit 'de3d02e4c3057c8ab7e40c0592dc2e94f0b42e64':
  Properly scope the "only http/https schemes" intent filter semantics
2015-06-27 01:21:11 +00:00
Christopher Tate
b035c6d9a6 Merge "Properly scope the "only http/https schemes" intent filter semantics" into mnc-dev 2015-06-27 00:48:10 +00:00
Christopher Tate
2134744efd Properly scope the "only http/https schemes" intent filter semantics
That restriction applies only to default-app linkage verification, and
not to any general questions of "is this app effectively a web browser?"

Bug 21688029

Change-Id: I9f6a7bc6dcac5e12ee07f8da6465ad51c1aeddfb
2015-06-26 17:45:22 -07:00
Rubin Xu
ab446232be am ba5c0728: am d1858a7d: am 0a202eac: Merge "Use StorageManager.wipeAdoptableDisks to wipe external disks" into mnc-dev
* commit 'ba5c07286f9980220bda4ed6e9e29f392669c05c':
  Use StorageManager.wipeAdoptableDisks to wipe external disks
2015-06-26 23:13:01 +00:00
Rubin Xu
0a202eac01 Merge "Use StorageManager.wipeAdoptableDisks to wipe external disks" into mnc-dev 2015-06-26 22:36:13 +00:00
Dianne Hackborn
1b96b13026 am fb46261c: am a5de0eb5: am 7c5b5f71: Merge "Fix issue #22023824: Download folder is not created in internal storage" into mnc-dev
* commit 'fb46261c1eb015896d201a0275b41c3ebae11d02':
  Fix issue #22023824: Download folder is not created in internal storage
2015-06-26 21:04:55 +00:00
Dianne Hackborn
ca8e6da41c Fix issue #22023824: Download folder is not created in internal storage
The media provider and some other things need to be given storage access.

Also, seems like we should give storage access to the camera app as well.

And add a dump dump command that will dump data about a particular
permission name.

Change-Id: Idaaa9bba2ff4dc95290cf6d17e5df933df91e909
2015-06-26 13:28:29 -07:00
Jeff Sharkey
aedb56fd18 Merge commit 'b02c73d5' into manualmerge
Change-Id: I3ec37c9d45d685c2393087bdefa6ab512cc70062
2015-06-26 09:32:09 -07:00
Rubin Xu
e8490f1d78 Use StorageManager.wipeAdoptableDisks to wipe external disks
Retire FORMAT_AND_FACTORY_RESET which is more fragile.

Bug: 9433509
Change-Id: I158ee987274bb4db41d466de9f1e3c60ffc1d140
2015-06-26 15:58:21 +01:00
Jeff Sharkey
9527b223a9 Let's reinvent storage, yet again!
Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app.  This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that.  This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions.  When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: I62fb25d126dd815aea699b33d580e3afb90f8fd2
2015-06-25 22:25:48 -07:00
Svetoslav
dcbe525ed1 am be17a55c: am 6a01c7ff: am 263b6e69: Merge "Prevent certain actions of app has revoked permissions" into mnc-dev
* commit 'be17a55c923f057f3f14656e7f56b2744607db45':
  Prevent certain actions of app has revoked permissions
2015-06-25 20:15:59 +00:00
Svetoslav
263b6e6983 Merge "Prevent certain actions of app has revoked permissions" into mnc-dev 2015-06-25 18:20:16 +00:00
Svetoslav
7008b51817 Prevent certain actions of app has revoked permissions
bug:21808294

Change-Id: I7214c1fe47c15fe185423a54a74b58caf8d82daa
2015-06-25 10:55:11 -07:00
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