1436 Commits

Author SHA1 Message Date
Kenny Guy
e6b1e0e1c2 am 72be5067: am af52ae07: am 2adcb40d: am 2ba3fec6: Merge "Support waiting for adb shell am stop-user to complete." into mnc-dev
* commit '72be506795c4b7260612458c183282b9c59717ef':
  Support waiting for adb shell am stop-user to complete.
2015-07-23 21:49:30 +00: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
75fc69addd am 8f9a223e: am 22fac49a: am 6391a8d4: am d9c2ff99: Merge "Add \'pm\' operation to set a package\'s app-linking state" into mnc-dev
* commit '8f9a223e2f9601d579a47c93efcd92772ee0c405':
  Add 'pm' operation to set a package's app-linking state
2015-07-21 20:08:52 +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
Jim Miller
2e56339a4a am bcedcde8: am 204c2de8: am c7b0435c: resolved conflicts for merge of 1d4247c4 to mnc-dr-dev
* commit 'bcedcde8093b48c3d013cc57dde42bdd17d6dcb9':
  Improve tracking of screen on reasons.
2015-07-15 22:26:05 +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
1fa2a08882 am 1281575c: am 41fac5e8: am 189f3136: am 98724126: Merge "Added sendBroadcastMultiplePermissions method" into mnc-dev
* commit '1281575c257d52f256f4a08559611e6ec0b6190e':
  Added sendBroadcastMultiplePermissions method
2015-07-15 01:42:58 +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
159efe23e6 am 480f0e73: am 381cf235: am cda18204: am a419076e: Merge "Add grant flag support to "install-create" verb." into mnc-dev
* commit '480f0e734e5b8770b7700e139b6847bfd76b56cf':
  Add grant flag support to "install-create" verb.
2015-07-09 17:59:43 +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
97db8395cd am ec99c3e1: am 3340da0e: am ee83bc75: am 9d3cd848: Merge "Add libhidcommand_jni.so to required module." into mnc-dev
* commit 'ec99c3e11ec26cb08b6ce0bbd5338bbf8320d1f9':
  Add libhidcommand_jni.so to required module.
2015-07-08 12:52:58 +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
3fd5ebfd77 am 7cc8de60: am 0ce19f8e: am 240f8e5f: am 3e07ee07: Merge "Grant installer and verifier install permissions robustly" into mnc-dev
* commit '7cc8de60682b1ed22be1b452809b36a5ceaae02a':
  Grant installer and verifier install permissions robustly
2015-07-08 01:39:40 +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
Mathieu Chartier
8fb8207412 resolved conflicts for merge of 0f14548c to mnc-dev-plus-aosp
Change-Id: I2f79840f82150eddebfbd549afd1eca28075eb43
2015-06-24 15:59:18 -07:00
Adam Lesinski
0ebba0e1a6 am 53d0d065: am b21a77fe: Merge "Allow callers holding PACKAGE_USAGE_STATS permission to call ActivityManager#getPackageImportance()" into mnc-dev
* commit '53d0d0655ca33fbf6a1475a6b97f1a956e5c25f5':
  Allow callers holding PACKAGE_USAGE_STATS permission to call ActivityManager#getPackageImportance()
2015-06-24 22:11:45 +00:00
Adam Lesinski
c30454c104 Allow callers holding PACKAGE_USAGE_STATS permission to call ActivityManager#getPackageImportance()
Bug:22055550
Change-Id: I1e732e95698daf44bcb223cafde3d3c22746d232
2015-06-24 13:35:46 -07:00
Man Cao
cfa78b2080 Add an AM option to start with allocation tracking
The new option "--track-allocation" is to work with the new
allocation tracker in ART.

Bug:20037135
Change-Id: Ic5f8945ab4c1f167c27b05ad0d11d04bac680c1f
2015-06-24 13:29:29 -07:00
Wale Ogunwale
59ab4b336e am 90cee497: am dd7705bb: Merge "Update surfaces secure flag on screen capture setting change" into mnc-dev
* commit '90cee497c0803861b8a779ca5cd87f4f8c4fde72':
  Update surfaces secure flag on screen capture setting change
2015-06-23 18:07:54 +00:00
Wale Ogunwale
f5ad42f432 Update surfaces secure flag on screen capture setting change
Also, added 'wm screen-capture [userId] [true|false]'
command.

Bug: 20934462
Change-Id: I14711003d7691fc4495428c12c9ff3457cd3773c
2015-06-23 09:08:29 -07:00
Michael Wright
8022f38ada am 2cb8acc9: am 12119732: Merge "Add new hid command." into mnc-dev
* commit '2cb8acc9cf587bc0171a70e00500d89d2f577c3c':
  Add new `hid` command.
2015-06-23 13:05:47 +00:00
Michael Wright
121197326c Merge "Add new hid command." into mnc-dev 2015-06-23 12:45:12 +00:00
Christopher Ferris
7493793b2c am d9f60741: am bf30b4fd: Merge "Add libwilhelm to app_process." into mnc-dev
* commit 'd9f607417206552ecf48ba7a7f449321031619a7':
  Add libwilhelm to app_process.
2015-06-20 00:10:11 +00:00
Christopher Ferris
bf30b4fd92 Merge "Add libwilhelm to app_process." into mnc-dev 2015-06-19 23:46:55 +00:00
Dianne Hackborn
2133afc77a am d21b695f: am 22433a33: Merge "Fix issue #21814207 and issue #21814212 (alarm manager)" into mnc-dev
* commit 'd21b695f8b344b12e623694db86856a89642d934':
  Fix issue #21814207 and issue #21814212 (alarm manager)
2015-06-17 22:43:51 +00:00
Christopher Ferris
ad81791641 Add libwilhelm to app_process.
If an app exposes new/delete from a shared library, the libwilhelm
shared library can wind up using the new from the app shared library,
and the delete from libc++. It is completely legal for the app to
export new/delete in this way, so in order to avoid this situation,
preload libwilhelm in the zygote. This forces libwilhelm to always
resolve the new/delete from libc++.

This library cannot be added to android_runtime since libwilhelm
has a shared library which depends on android_runtime.

Bug: 21032018
Change-Id: Id89c196df62d98d62855a1421f397b75a7e990a9
2015-06-17 15:30:29 -07: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
Narayan Kamath
407753c456 ZipFileRO: Use precise widths for zip file types.
getEntryInfo crashes on 64-bit devices because "long" types
were being passed int pointers (that pointed to a stack frame)
that were reinterpret_cast'ed to long* (sigh.). To fix this issue
once and for all, use types with explicitly defined widths.

This change also removes some dead invariant checking from
Asset.cpp instead of cleaning it up.

Note that we've introduced a wart in NativeLibraryHelper, where
we need to deal with zlib's uLong type, which is "at least 32 bits
wide".

bug: 21622286

(cherry picked from commit 4600dd053dbdbd4b95f3b11057a1cc55b99f9c77)

Change-Id: I7886cb37a229cc27c625699c80e6a6a6117d2203
2015-06-17 13:13:16 +00:00
Narayan Kamath
4c50df66f9 am 5131e025: am 4600dd05: ZipFileRO: Use precise widths for zip file types.
* commit '5131e0255d676c2ead28dbfb7957d753da21e9ab':
  ZipFileRO: Use precise widths for zip file types.
2015-06-17 10:04:50 +00:00
Narayan Kamath
4600dd053d ZipFileRO: Use precise widths for zip file types.
getEntryInfo crashes on 64-bit devices because "long" types
were being passed int pointers (that pointed to a stack frame)
that were reinterpret_cast'ed to long* (sigh.). To fix this issue
once and for all, use types with explicitly defined widths.

This change also removes some dead invariant checking from
Asset.cpp instead of cleaning it up.

Note that we've introduced a wart in NativeLibraryHelper, where
we need to deal with zlib's uLong type, which is "at least 32 bits
wide".

bug: 21622286

Change-Id: Iae675a9601db7aae03a8b80b40321d2cc1d97f50
2015-06-17 08:40:25 +00:00
Dan Albert
492253742a am 3a059d2d: am f35f66a8: Merge "Use new sanitizer option."
* commit '3a059d2d89dd87690ccf4081097d8d069bb7f3c4':
  Use new sanitizer option.
2015-06-16 21:45:32 +00:00
Narayan Kamath
ba6e9b12a2 am 2d13fe56: am 275294db: Merge "Better systrace slices for application startup." into mnc-dev
* commit '2d13fe56eec54030fe09cae74c7a92be54c8bd19':
  Better systrace slices for application startup.
2015-06-16 21:24:04 +00:00
Dan Albert
f98dae5675 Use new sanitizer option.
Change-Id: Iabc46da2820f252f6cd8cef8a447064890f3a76d
2015-06-16 14:06:49 -07:00
Narayan Kamath
fbb32f6440 Better systrace slices for application startup.
This change adds three new timeslices :

- PostFork : As soon as possible after the app forks from the
  zygote. Can be used in conjunction with the system_server
  "Start proc:" event to derive an upper bound on fork() and
  zygote overhead.

- RuntimeInit & ActivityThreadMain for ZygoteInit#runtimeInit
  and ActivityThread#main.

ActivityThread#handleBindApplication and higher level functions
are already well instrumented in systrace. handleBindApplication
should occur immediately after ActivityThread#main.

Note that we use the Activity manager tag to make it easier to
correlate these new events with surrounding events (Start proc
and handleBindApplication) that are already using the AM tag.

bug: 21632700
Change-Id: Ibc01f1721f962c913f3c02a51763b6feb1eb6a4d
2015-06-16 12:06:31 +01:00
Yorke Lee
6a09cd7ab7 am 27af6ada: am 31104fbb: Merge "Add adb shell telecom get-system-dialer" into mnc-dev
* commit '27af6ada0647dfadf1f86fc23fba24d0e38de2f4':
  Add adb shell telecom get-system-dialer
2015-06-15 16:38:38 +00:00
Michael Wright
1f2c7688c1 Add new hid command.
This allows the shell user to inject HID events.

Change-Id: I37faff576299ff14092b61ed39f2a1c086f672a5
2015-06-12 11:49:29 +01:00
Yorke Lee
8cd95ee0d0 Add adb shell telecom get-system-dialer
Bug: 20303674
Change-Id: I7ce52e94c434846c262f2d6cc6d41992e259b45f
2015-06-11 15:49:08 -07:00
Felipe Leme
39ca7e49e3 am f1391dca: am a6dd714a: Merge "Added new options (--eial, --elal, --efal, and --esal) to pass multiple extras as ArrayList instead of Array. BUG: 21757911 Change-Id: I7e2a9c81ad4606a8aba90ea4820ba0732a1c8749 modified: src/com/android/commands/am/Am.java On branc
* commit 'f1391dcad1ec9a56104ee83e2b88187e7d68a948':
  Added new options (--eial, --elal, --efal, and --esal) to pass multiple extras as ArrayList instead of Array. BUG: 21757911 Change-Id: I7e2a9c81ad4606a8aba90ea4820ba0732a1c8749 	modified:   src/com/android/commands/am/Am.java  On branch handles_array_list  Changes to be committed: 	modified:   src/com/android/commands/am/Am.java
2015-06-10 23:15:57 +00:00
Felipe Leme
a6dd714a5a Merge "Added new options (--eial, --elal, --efal, and --esal) to pass multiple extras as ArrayList instead of Array. BUG: 21757911 Change-Id: I7e2a9c81ad4606a8aba90ea4820ba0732a1c8749 modified: src/com/android/commands/am/Am.java On branch handles_array_list Changes to be committed: modified: src/com/android/commands/am/Am.java" into mnc-dev 2015-06-10 20:53:24 +00:00
Felipe Leme
f36a0f5d17 Added new options (--eial, --elal, --efal, and --esal) to pass multiple extras as ArrayList instead of Array.
BUG: 21757911
Change-Id: I7e2a9c81ad4606a8aba90ea4820ba0732a1c8749
	modified:   src/com/android/commands/am/Am.java
 On branch handles_array_list
 Changes to be committed:
	modified:   src/com/android/commands/am/Am.java
2015-06-10 13:44:04 -07:00
Dan Stoza
bac2f3e4e4 am 1becb4e6: am 56b94e15: Merge "screencap: Rotate images when display is rotated" into mnc-dev
* commit '1becb4e6e0cfa98a17f751452d2632993f893de3':
  screencap: Rotate images when display is rotated
2015-06-10 18:42:12 +00:00
Dan Stoza
56b94e1593 Merge "screencap: Rotate images when display is rotated" into mnc-dev 2015-06-10 18:19:54 +00:00
Jeff Sharkey
d6c886f862 am f355a22d: am e687929f: Merge "Flags to select storage volume for app installs." into mnc-dev
* commit 'f355a22d1421a640bf057047b7833000acf94519':
  Flags to select storage volume for app installs.
2015-06-10 05:07:51 +00:00
Jeff Sharkey
ab2340996a Flags to select storage volume for app installs.
Remote callers can now provide the "--install-location" value from
the APK to help select a location, or they can explicitly force a
volume by UUID.

Bug: 21676789
Change-Id: Iefc92d770a851fc33e37edbf259fdb8df2b14ae5
2015-06-09 21:42:22 -07:00