1466 Commits

Author SHA1 Message Date
Elliott Hughes
70bef1c4bd Fix lseek argument order.
Change-Id: Ibc2f98e4c26d0ac6ac7b4a73775c5213c4df4518
2015-10-20 13:23:18 -07:00
Brian Carlstrom
f916524f44 Merge "Add support for --user to "pm path" for work profile use" 2015-10-15 15:55:45 +00:00
Adam Lesinski
fe1934e470 Merge "RRO: idmap: allow flock(2) to block" 2015-10-12 19:30:23 +00:00
Adam Lesinski
bac309ca8f Merge "RRO: idmap: fix sorting of overlays.list" 2015-10-12 19:29:39 +00:00
Adam Lesinski
2327239d65 Merge "Handle 'root' pseudo-package in the appops command" 2015-10-12 19:29:14 +00:00
Snild Dolkow
3875bf6c04 Handle 'root' pseudo-package in the appops command
The AppOpsService handles the 'root' pseudo-package as any other; it
gets no automatic allowances. This is reasonable, but it blocked me from
accessing the mms-sms provider through the 'content' command, even in a
root shell.

So I tried to change the rules:

$ adb root
$ adb shell appops set root WRITE_SMS allow
Error: No UID for root in user 0

This error occurs in the appops command because there isn't really a
package called root, so the UID lookup via PackageManager fails.

But we know that root is UID 0, so we can just skip the lookup.
(Also, AppOpsService handles the other way around in getOpsLocked method.)

Change-Id: Ie0cad67efa438a74a4d9921d29933610cfb13974
2015-10-07 19:58:17 +02:00
Mårten Kongstad
7197d91eb7 RRO: idmap: fix sorting of overlays.list
Multiple overlay packages with targetPackage="android" are loaded in the
wrong order due to the incorrect order they are listed in overlays.list.
This will cause runtime resource overlay to fail when multiple overlay
packages target the same resources in framework-res.apk.

Correct the order in which overlays are loaded by changing the sorting
of overlays.list.

Background: commit f90f2f8d changed the order in which overlay packages
should be added to ResTables. The expected order is now in ascending
priority. This must be reflected in overlays.list.

Change-Id: I249984c0e34b6009e7280ce2777750c76ab16e37
2015-10-07 19:51:50 +02:00
Mårten Kongstad
83ab0d7c18 Make 'idmap --scan' accept more than one input directory
The 'idmap --scan' command was limited to only scan a single directory
for overlay packages. Update idmap to support any number of directories.

Change-Id: I851f5720a3c1d844235911a0833670652a20a3c8
2015-10-07 19:45:09 +02:00
Mårten Kongstad
df1a5b22cd RRO: idmap: allow flock(2) to block
During creation of an idmap an advisory lock is applied on the
output file using flock(2). This commit removes the LOCK_NB flag
from the call to flock(2).

The reason for this is that if the function were to return
EWOULDBLOCK, the entire idmap operation would be aborted leading
to the device booting without the correct overlay packages applied.

Change-Id: Iad319779976e950d4354e4f60b30439f6f208b77
2015-10-07 19:02:09 +02:00
Brian Carlstrom
f83612b295 Add support for --user to "pm path" for work profile use
Change-Id: Ic8bb923e15a40f32cc7daa6a344250abfc81e423
2015-09-25 13:08:35 -07:00
Chris Tate
555f91db7c am e62421f1: Merge "Teach Pm about the "always ask" link-handling state" into mnc-dev
* commit 'e62421f1fbc1ea44e7737989e134fdf9fc1ec4cc':
  Teach Pm about the "always ask" link-handling state
2015-08-26 00:20:03 +00:00
Christopher Tate
47dd08d7fb Teach Pm about the "always ask" link-handling state
Bug 23511867

Change-Id: I74b3c8222a7d22541a96b698edd1a175d378e48f
2015-08-25 12:39:04 -07:00
Tom Cherry
9f5e9ec76a am b9ac485a: am 49948146: Merge "bundle init.rc contents with its service"
* commit 'b9ac485a8e49a4db080bab8ea684a9b262215563':
  bundle init.rc contents with its service
2015-08-21 18:20:32 +00:00
Tom Cherry
c2de7a7e87 bundle init.rc contents with its service
Bug: 23186545
Change-Id: I080e73d6a124873c2ddd0fba85315d7082faf3f5
2015-08-19 17:24:47 -07:00
Sebastien Hertz
e95386852e am 9a010d0a: Merge "Allow debugging only for apps forked from zygote" into mnc-dev
* commit '9a010d0a4157f97870bc38bd3dd0a8f4fd18a172':
  Allow debugging only for apps forked from zygote
2015-08-18 07:50:27 +00:00
Sebastien Hertz
9a010d0a41 Merge "Allow debugging only for apps forked from zygote" into mnc-dev 2015-08-18 07:41:50 +00:00
Chris Tate
d7a164bf3f am 7e7d79ef: Merge "Make "Ask every time" actually work that way" into mnc-dev
* commit '7e7d79ef2f4aa6a8da86af459d419bd24c47b440':
  Make "Ask every time" actually work that way
2015-08-14 17:15:18 +00:00
Christopher Tate
56f0ff3c48 Make "Ask every time" actually work that way
..in link-opening behavior.  If a candidate is marked as "ask
every time," then the user is guaranteed to get a disambiguation
prompt including that candidate even when some other candidate
app is in the "always prefer this over a browser" state.

Bug 23147746

Change-Id: I904d8697a992b3f16f32b1c1b49c2bf9424c7137
2015-08-13 18:56:05 -07:00
Sebastien Hertz
7a09b8322c Allow debugging only for apps forked from zygote
When starting the runtime from app_process, we only pass JDWP options
if starting zygote. It prevents from opening a JDWP connection in
non-zygote programs while Android apps (forked from zygote) remain
debuggable.

Bug: 23050463
Change-Id: If8ea719063a65db4cdeed69a838b52e87b078b08
2015-08-10 20:39:13 +02:00
Yusuke Sato
c2369c5301 am b98e2353: am 158560ad: Merge "Distinguish user-requested shutdown from power-related ones"
* commit 'b98e235364c2b221521f622c546733b2862e4677':
  Distinguish user-requested shutdown from power-related ones
2015-07-31 23:34:06 +00:00
Yusuke Sato
705ffd1efe Distinguish user-requested shutdown from power-related ones
With this patch, when the user requested shutdown,
PowerManagerService sets sys.powerctl is set to
"shutdown,userrequested", and init runs fsck on shutdown.

When shutdown is triggered due to a low power state etc.,
the service sets the property to "shutdown,", and init
immediately shuts down the system without running the
command.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
2015-07-30 23:47:13 -07:00
Roshan Pius
d26bc1c0b4 am 944b6362: Merge "Add a command to register SIM Phone account." into mnc-dev
* commit '944b63624b40c96f4a31af750e1678c0b9c88ad1':
  Add a command to register SIM Phone account.
2015-07-29 19:16:16 +00:00
Roshan Pius
d3586e174f Add a command to register SIM Phone account.
Phone accounts with SIM_SUBSCRIPTION capabiltiy needs system permission.
Hence adding a command to add sunc phone accounts for CTS testing of
remote connections.

BUG: 20303674
Change-Id: Ieb7349f906ec8209776ffbe39ed3633f01ba1e7c
2015-07-28 15:49:42 -07:00
John Reck
549dfccc35 am 6b66a4a8: use findProcess instead of getProcess
* commit '6b66a4a8a342b8156f73d83771caa1db2f866529':
  use findProcess instead of getProcess
2015-07-24 01:02:41 +00:00
John Reck
6b66a4a8a3 use findProcess instead of getProcess
Bug: 22701182
Change-Id: I2ec56c55c49401f2f213bbd318e867fd73b37672
2015-07-24 00:37:23 +00:00
Tim Kilbourn
43250dd37f am a2bf7616: Merge "Add a wm command to dismiss the keyguard." into mnc-dev
* commit 'a2bf7616044051769df86cf5f0bb4b21dedd5269':
  Add a wm command to dismiss the keyguard.
2015-07-23 22:42:49 +00:00
Tim Kilbourn
f40c66d1a1 Add a wm command to dismiss the keyguard.
If the user has a screen lock, the user is prompted to authenticate.
Otherwise the keyguard is dismissed.

Bug: 22694837
Change-Id: I783fc6f08fb21977aa4f1e884b0a4354a3154805
2015-07-23 14:51:41 -07:00
Jeff Sharkey
e5a0e17667 am f6e9a3ed: Merge "More info to support CTS, fix reconcile bug." into mnc-dev
* commit 'f6e9a3ede53ae487838c19714ad62f25a4a6ca4c':
  More info to support CTS, fix reconcile bug.
2015-07-23 18:57:02 +00:00
Kenny Guy
8ea8c98a1f am 2ba3fec6: Merge "Support waiting for adb shell am stop-user to complete." into mnc-dev
* commit '2ba3fec6e0222754d93ed7a491354164d113ad6e':
  Support waiting for adb shell am stop-user to complete.
2015-07-22 20:18:35 +00:00
Jeff Sharkey
f6e9a3ede5 Merge "More info to support CTS, fix reconcile bug." into mnc-dev 2015-07-22 19:40:44 +00:00
Jeff Sharkey
85ced63268 More info to support CTS, fix reconcile bug.
Surface more details and commands for storage volumes to support
CTS testing.  Fix user reconciliation bug that skipped user setup on
empty volumes.

Bug: 22658804, 22633097
Change-Id: I4221312d1cce24d1f5a2c108095cf3cf471598ed
2015-07-22 11:11:50 -07:00
Kenny Guy
2ba3fec6e0 Merge "Support waiting for adb shell am stop-user to complete." into mnc-dev 2015-07-22 13:49:20 +00:00
Christopher Tate
9b76ff8783 am d9c2ff99: Merge "Add \'pm\' operation to set a package\'s app-linking state" into mnc-dev
* commit 'd9c2ff99bf9469f155eabf341880d055741e9db5':
  Add 'pm' operation to set a package's app-linking state
2015-07-21 19:28:44 +00:00
Kenny Guy
2c7836befc Support waiting for adb shell am stop-user to complete.
Use stop user callback to wait for AM.stopUser to complete
if -w flag is passed to adb shell am stop-user

bug: 22599411
Change-Id: I8adbfdbb1ba69a88a67431da65f0a85035587c2d
2015-07-21 18:22:28 +01:00
Christopher Tate
387225ff01 Add 'pm' operation to set a package's app-linking state
Set an app's state:

  pm set-app-link [--user USER_ID] PACKAGE {always|ask|never|undefined}

Read an app's current state:

  pm get-app-link [--user USER_ID] PACKAGE

The latter prints to stdout one of the strings usable as an argument to
set-app-link.  If an error is encountered, the string printed to
stderr begins with "Error: ".

Bug 19628527

Change-Id: I68b6dc24445917807345a8cf5baa2078490740af
2015-07-20 17:45:17 -07:00
Dianne Hackborn
e632586957 am 1d4247c4: Merge "Improve tracking of screen on reasons." into mnc-dev
* commit '1d4247c4cc89c6d62e44ed3115f26579979b44b5':
  Improve tracking of screen on reasons.
2015-07-15 17:25:01 +00:00
Dianne Hackborn
280a64e793 Improve tracking of screen on reasons.
- New screen on app op to record the last time each app has
  caused the screen to be turned on.
- New battery stats event that tells us the reason the screen
  has been asked to turn on.
- Propagate out power manager API to specify the reason a caller
  is asking to have the screen turned on.

Note that currently the window flag to turn the screen on bypasses
much of this because it is being handled in the window manager by
just directly telling the power manager to turn the screen on.  To
make this better we need a new API where it can specify who it is
calling the API for.

Change-Id: I667e56cb1f80508d054da004db667efbcc22e971
2015-07-15 09:59:07 -07:00
Fyodor Kupolov
29e8318cb4 am 98724126: Merge "Added sendBroadcastMultiplePermissions method" into mnc-dev
* commit '987241265b77542f45ce95838c25beeaf3ae6849':
  Added sendBroadcastMultiplePermissions method
2015-07-15 00:59:47 +00:00
Fyodor Kupolov
d4fd8c766d Added sendBroadcastMultiplePermissions method
Added Context.sendBroadcastMultiplePermissions(Intent intent, String[]
receiverPermissions) method, which allows an array of required permissions
to be enforced.

Bug: 21852542
Change-Id: I27c9130e8f004b428452501ebc8a36aabde1f343
2015-07-14 17:25:42 -07:00
Jeff Sharkey
2b74876562 am a419076e: Merge "Add grant flag support to "install-create" verb." into mnc-dev
* commit 'a419076eab4ebf54186c5801216f611e080edf5f':
  Add grant flag support to "install-create" verb.
2015-07-09 17:07:31 +00:00
Jeff Sharkey
396080dd02 Add grant flag support to "install-create" verb.
This matches the "install" behavior.

Bug: 22331569
Change-Id: I07bfe067bd4be01fc92126750b0ff25a5c5ba5c9
2015-07-09 09:16:07 -07:00
Seigo Nonaka
cc5311bead am 9d3cd848: Merge "Add libhidcommand_jni.so to required module." into mnc-dev
* commit '9d3cd8484e9ec70aef2ca8d4d33ea2943c7b67ea':
  Add libhidcommand_jni.so to required module.
2015-07-08 03:37:21 +00:00
Seigo Nonaka
9d3cd8484e Merge "Add libhidcommand_jni.so to required module." into mnc-dev 2015-07-08 03:25:33 +00:00
Svetoslav
51be65dd12 am 3e07ee07: Merge "Grant installer and verifier install permissions robustly" into mnc-dev
* commit '3e07ee078de8e364d6be0b18b2b514e40decdb3c':
  Grant installer and verifier install permissions robustly
2015-07-07 23:57:37 +00:00
Svetoslav
3e7d977ff7 Grant installer and verifier install permissions robustly
bug:22248271

Change-Id: I3a47ae9a112ba7d88b421fcb5f9651d1168ba7a5
2015-07-07 14:02:51 -07:00
Seigo Nonaka
edbeacc562 Add libhidcommand_jni.so to required module.
To install libhidcommand_jni.so and hid command at the same time,
set libhidcommand_jni as a required module of hid command.

Bug: 22131060
Change-Id: I73ad1954eb73896425362a63fab0e63a61b9c0a0
2015-07-02 17:58:29 +09:00
Svet Ganov
55cd6f44fd am 6fe87a56: am 68ffcf88: Merge "Teach receivers, activities, providers, and services app ops." into mnc-dev
* commit '6fe87a565be345c9455f610bbf26d5eaee593683':
  Teach receivers, activities, providers, and services app ops.
2015-07-02 01:02:04 +00:00
Svet Ganov
99b6043dad Teach receivers, activities, providers, and services app ops.
Perform app op check in addition to the permisison check for all four
paltform components - activities, content providers, broadcast receivers,
services - if they are guarded by a permssion that has an associated app
op. This ensures that legacy apps will behave correctly if the permission
of the caller has been revoked, i.e. the app op for that permission was
disabled.

bug:22199666

Change-Id: Ia22d1c38d58b3cd6aabdc655cb7c7bddd85da7a2
2015-07-01 16:20:00 -07:00
Dianne Hackborn
fb46261c1e am a5de0eb5: am 7c5b5f71: Merge "Fix issue #22023824: Download folder is not created in internal storage" into mnc-dev
* commit 'a5de0eb5e5d1ab9f6d2fe9661e5d6dcf60718e73':
  Fix issue #22023824: Download folder is not created in internal storage
2015-06-26 20:50:34 +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