Commit Graph

6832 Commits

Author SHA1 Message Date
Jeff Sharkey
9ff67746e6 Merge "Final push of installd to Binder; goodbye socket!" am: 1950377f91
am: 104fd011b2

Change-Id: I4b2ae2329e8842def8682199c5ee8544c22c2be4
2016-12-10 23:07:59 +00:00
Jeff Sharkey
104fd011b2 Merge "Final push of installd to Binder; goodbye socket!"
am: 1950377f91

Change-Id: If10d4f4aafa68b78ddd9a98e8699fe008bbda49b
2016-12-10 23:01:59 +00:00
Jeff Sharkey
740f523b25 Final push of installd to Binder; goodbye socket!
Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.

Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug: 13758960, 30944031
Change-Id: I9afb9f71858febde34a94f53839b2986493b68a0
2016-12-09 15:30:34 -07:00
Jeff Sharkey
41d75809aa Merge "Prepare to move dexopt calls to Binder." am: d7b144a5e9
am: 35cbe8ffb0

Change-Id: Ice3c37568ae7185dfe028d3019abf5204aa93963
2016-12-09 16:58:48 +00:00
Jeff Sharkey
35cbe8ffb0 Merge "Prepare to move dexopt calls to Binder."
am: d7b144a5e9

Change-Id: I49cce8519d5b09a646609fffc6e62ecbe1a086ef
2016-12-09 16:53:46 +00:00
Jeff Sharkey
d7b144a5e9 Merge "Prepare to move dexopt calls to Binder." 2016-12-09 16:42:25 +00:00
Hugo Benichi
05ad47add8 DO NOT MERGE: TokenBucket for rate-limiting and throttling
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637

(cherry picked from commit 998493f0ee)

Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031
2016-12-09 11:21:29 +09:00
Jeff Sharkey
c98c7bccdc Prepare to move dexopt calls to Binder.
Since InstallerConnection is about to be replaced by a new installd
Binder interface, this change moves OtaDexoptService to override and
manually cook up the 'dexopt' command line that it expects to collect
from PackageDexOptimizer.

Since OtaDexoptService is designed to be run in isolation, add a new
mode to Installer which ignores calls that aren't being intercepted.

Also moves to a single dexopt() method instead of having overloads.

Test: builds, boots, fake OTA works
Bug: 13758960, 30944031
Change-Id: I3a6a115289f1542d6df3e2993b9720118b7d1e8d
2016-12-08 09:11:50 -07:00
Ned Burns
6a860f7f3b DO NOT MERGE Fix android:noHistory for Wear
am: d7a313fb11

Change-Id: I4de91badcff2690e701d3c46edf3b06498b003ee
2016-12-07 21:14:36 +00:00
Jeff Sharkey
ba6f8c8bef Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

(cherry picked from commit 850c83e6da)

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088

Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5

Change-Id: Ic2be10dc8478d613cea6e2c976b9987c250b86b7
2016-12-07 12:24:21 -08:00
Ned Burns
d7a313fb11 DO NOT MERGE Fix android:noHistory for Wear
Modifies swipe-to-close activities to be opaque by default (instead
of translucent by default). Previously, android:noHistory properties
on most activities in Wear were being ignored because they were
usually transitioning to a swipe-to-close activity that was marked
as translucent. This meant that the noHistory activity was still
technically visible, and so would never be culled from the task
history.

Now, we convert a swiped activity to translucent as soon as a swipe
begins, and convert it back after the swipe finishes. The previous
version of SDL tries to do this, but fails in the case where the
context is a ContextWrapper.

This approach is hacky and isn't merge-able into master. We leave
it DO NOT MERGE and will do a long-term fix after the holidays.

Test: Built a test app to verify that noHistory is now being
correctly respected. Manually verified that new activities start
out opaque and not translucent. Manually verified that Home
correctly starts/stops when it's revealed from underneath a
partially swiped activity. Tested general swipe behavior on Settings,
Contacts, Flashlight, Fit.

Bug: 33252029

Change-Id: Ib2e7f21ea1e0d52db03e78d25676501e5f73b31f
2016-12-07 15:05:25 -05:00
Ned Burns
081fd25237 Modify SwipeDismissLayout to perform its own exit animation
am: 7d6cb913de

Change-Id: Ie9784fa9b7c878371f1e12acbb362b36fc66e023
2016-12-06 02:33:23 +00:00
Ned Burns
7d6cb913de Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
2016-12-05 19:38:14 -05:00
TreeHugger Robot
5e2155058d Merge "Move dump() to dumpAsync(), more oneway calls." into nyc-mr1-dev-plus-aosp 2016-12-05 20:45:00 +00:00
Michael Kwan
85ba660b16 Disable swipe-to-dismiss for not cancelable dialogs.
am: f7964be938

Change-Id: I6d71bb4c6acdc9d994766eebd7a6320356aa3a23
2016-12-05 18:09:10 +00:00
Michael Kwan
f7964be938 Disable swipe-to-dismiss for not cancelable dialogs.
Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
2016-12-02 17:33:56 -08:00
Jeff Sharkey
c06f184ae9 Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
2016-12-02 15:17:20 -08:00
Hall Liu
1a8bdf8bf9 Merge "Add removeState method to StateMachine" am: 0310de1136
am: 01106c45ca

Change-Id: I4f31491b1c9db29fe14222788d7fbd1fd6bce068
2016-11-28 21:06:44 +00:00
Hall Liu
01106c45ca Merge "Add removeState method to StateMachine"
am: 0310de1136

Change-Id: Ib7d8e435c76bc7bcd83d6350c3c0622bb44d6552
2016-11-28 20:58:43 +00:00
Hall Liu
b222d2045d Add removeState method to StateMachine
Method to be used by BluetoothRouteManager in Telecom.

Test: unit tests in Telecom
Change-Id: Icdd1a3d42224246a5f26100fabb26313ce83b14c
2016-11-23 11:52:58 -08:00
Baligh Uddin
b1df48d326 Merge remote-tracking branch 'goog/cw-f-dev' into fix_merger
Bug: 32849428

* goog/cw-f-dev: (98 commits)
  Revert "Catch KeyStoreException for setting profile lock"
  Fix createConfirmDeviceCredentialIntent for wear for CTS.
  Fix default dialog background colour for watch devices.
  Catch KeyStoreException for setting profile lock
  Add cross-links between FINE and COARSE location permissions. bug: 25371600
  Fixed a bug with the emergency affordance in multi user
  Zygote: Additional whitelists for runtime overlay / other static resources.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Zygote : Block SIGCHLD during fork.
  colors: add missing accent_material_{700,50} resources.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Zygote : Block SIGCHLD during fork.
  DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous"
  ...

Change-Id: I63468da5bfa21ed9ac5985bbdbf3a61d4c389aa0
2016-11-22 17:19:45 -08:00
Torne (Richard Coles)
9565860b08 Merge "Precreate the classloader for the WebView." am: 566b1c80e4
am: 1feb782f01

Change-Id: Iec0bf848e4c25afc6a6b9ee83339a03f314adee9
2016-11-21 17:08:46 +00:00
Torne (Richard Coles)
1feb782f01 Merge "Precreate the classloader for the WebView."
am: 566b1c80e4

Change-Id: Ic79079748dae515cb8d89ef99148755ac65f1d47
2016-11-21 17:04:22 +00:00
Torne (Richard Coles)
3b6ca99b10 Precreate the classloader for the WebView.
We want to create the classloader for the WebView in advance in the
zygote so that it can preload Java and native code for its children, but
the zygote can't talk to the package manager (so doesn't have a
PackageInfo for the APK) and also doesn't have an ActivityThread, so
constructing a LoadedApk is difficult.

Instead, we use the fact that ApplicationLoaders contains a
process-global cache of classloaders for APKs, and prepopulate a cache
entry without constructing a LoadedApk. This requires making
ApplicationLoaders public. To calculate the correct library paths from
the information the zygote has, we reuse the logic in LoadedApk (which
is already public, and just needs a small change to allow a null
ActivityThread when checking for instrumentation).

The other parameters for classloader creation (target SDK, bundled app,
etc) are hardcoded to usable values for the WebView's case. WebView
never needs to use any system libraries that aren't public so claiming
it's not bundled is fine even when that isn't actually true, and WebView
will always target the current platform API level.

Once the classloader is created, look up the factory class and call
preloadInZygote on it to give it a chance to preload the native library
and do other shared initialisation.

Bug: 21643067
Test: enable multiprocess WebView, examine librank output to see sharing
Change-Id: I696ead637e3f7382bcc58cfaf61eac5921862015
2016-11-21 15:04:13 +00:00
Selim Cinek
6cc0b517ba Fixed a bug with the emergency affordance in multi user
am: b8a7f78d24

Change-Id: I68fa35dbedb3740eff1c83d03c9c9b5080d3ea81
2016-11-15 01:18:35 +00:00
Selim Cinek
b8a7f78d24 Fixed a bug with the emergency affordance in multi user
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.

Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
2016-11-14 23:00:24 +00:00
Andreas Gampe
8a8f33416b Merge "Zygote: Avoid string concatentation for systrace" am: 8bcd159234
am: fdfc79a878

Change-Id: I105f07f2b2ca925139da6fc78641ee486eb68410
2016-11-01 17:24:19 +00:00
Andreas Gampe
fdfc79a878 Merge "Zygote: Avoid string concatentation for systrace"
am: 8bcd159234

Change-Id: I484e5a56b790f57d097970f727959438debafafb
2016-11-01 17:19:44 +00:00
Andreas Gampe
c425362049 Zygote: Avoid string concatentation for systrace
Avoid the allocation of an unneeded string. With more than 4000
classes being preloaded, this adds up.

Test: m
Test: device boots
Change-Id: I61f10f61ebdd08d17e09aaedd8bf54cc40c41838
2016-10-28 18:19:30 -07:00
Robert Sesek
aa544e975e Merge "Create the WebViewZygote and implement WebViewZygoteInit." am: 8be2850546
am: f80fab010a

Change-Id: I37d0d62662ee96a9eefe2dfa71670d8e4b724889
2016-10-22 03:17:15 +00:00
Robert Sesek
f80fab010a Merge "Create the WebViewZygote and implement WebViewZygoteInit."
am: 8be2850546

Change-Id: I608ea53be52cb91f0e8cf73998de4578b39e099a
2016-10-22 03:12:18 +00:00
Treehugger Robot
8be2850546 Merge "Create the WebViewZygote and implement WebViewZygoteInit." 2016-10-22 03:03:10 +00:00
Adrian Roos
102aa8b6f1 Separate ambient display triggers am: b7e4e10618
am: 59116440e7

Change-Id: I588f5541c73ae356b255ffa6b1e23c1fbcd1693e
2016-10-18 22:19:43 +00:00
Adrian Roos
59116440e7 Separate ambient display triggers
am: b7e4e10618

Change-Id: I575f96338cffa0f6e8adb1b9ff300dbd322398dc
2016-10-18 22:07:03 +00:00
Adrian Roos
b7e4e10618 Separate ambient display triggers
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.

Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
2016-10-18 10:43:44 -07:00
Yohei Yukawa
36e5feffb7 Handle exceptions from #requestPermission() am: 93278ca144
am: f8621ff5bf

Change-Id: I682e19b9f0657f840536b558204faf37872a7b36
2016-10-15 00:44:43 +00:00
Yohei Yukawa
f8621ff5bf Handle exceptions from #requestPermission()
am: 93278ca144

Change-Id: I5e8a3a9a670b1e794ce3af670fb30ffc4b8302a5
2016-10-15 00:37:24 +00:00
Yohei Yukawa
93278ca144 Handle exceptions from #requestPermission()
This is a follow up CL to my previous CL [1] that let
IInputConnectionWrapper to call InputContentInfo#requestPermission()
automatically so that temporary URI permissions can be granted
automatically on API 25+ devices whenever
INPUT_CONTENT_GRANT_READ_URI_PERMISSION is specified.

However, in that CL we forgot to handle exceptions thrown from
InputContentInfo#requestPermission().  This is problematic because it is
actually easy for IMEs to cause SecurityException by specifying a
content URI that does not allow grantUriPermission, e.g.:

  inputConnection.commitContent(
          new InputContentInfo(Uri.parse("content://call_log/test"),
          new ClipDescription("test", new String[]{"image/gif"}));

As a result, IMEs can let the application crash at any time because
InputContentInfo#requestPermission() is automatically called inside the
Framework.

This CL makes sure that exceptions thrown from
InputContentInfo#requestPermission() can be handled gracefully.

 [1]: Id955435dd2e72549ee7134f46b3c6951581694ad
      f3806f57a5

Bug: 32162481
Change-Id: I08916a1f54518390d3b67ab1673dc901e3f9716a
2016-10-14 22:26:35 +00:00
Christopher Wiley
5f9fedc5d7 Merge "IndexOutOfBoundsException observed in ProcessStats" am: 6408e2e5cc am: eedd2b529d
am: 53d12379f4

Change-Id: I4bcde8dde8c3bad7754e26dd56f8321032daa5a3
2016-10-14 14:21:39 +00:00
Robert Sesek
aa3c463a5b resolve merge conflicts of 0b58f19 to nyc-mr1-dev-plus-aosp
Change-Id: I374d842cab49b58b570d5ad7ef3dffb7b148d236
2016-10-13 16:49:47 -04:00
Christopher Wiley
53d12379f4 Merge "IndexOutOfBoundsException observed in ProcessStats" am: 6408e2e5cc
am: eedd2b529d

Change-Id: Ica176cd4b1bf569dfa03bdcefac622deddb57eca
2016-10-13 14:22:08 +00:00
Robert Sesek
d414158f79 resolve merge conflicts of 7031dac to nyc-mr1-dev-plus-aosp
Change-Id: I71fbde71dd97abab77f798b621972fb1d26af799
2016-10-12 15:03:19 -04:00
Christopher Wiley
eedd2b529d Merge "IndexOutOfBoundsException observed in ProcessStats"
am: 6408e2e5cc

Change-Id: I54ad3ac5a5e37371d787f4fee09fd8d73787665d
2016-10-10 22:41:23 +00:00
Robert Sesek
0b58f198df resolve merge conflicts of 8f8d187 to nyc-dev-plus-aosp
Change-Id: I75c7110ee4f0c9717e7276b609caa2402ef5c2be
2016-10-10 18:34:42 -04:00
Christopher Wiley
6408e2e5cc Merge "IndexOutOfBoundsException observed in ProcessStats" 2016-10-10 22:31:33 +00:00
Tobias Sargeant
7031dacaf5 Refactor ZygoteInit to support a WebView-specific zygote.
am: dd4bb31639

Change-Id: Ie61bf8517c5b7a20beb67259d84e351f4a47665b
2016-10-10 21:12:49 +00:00
Selim Cinek
e0c3c660a7 DO NOT MERGE - Added Emergency affordance feature
Added a service that listens whether emergency affordances
are necessary.

If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.

Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-10-10 18:58:23 +00:00
pengzhicai
5c6740a30c IndexOutOfBoundsException observed in ProcessStats
When the process dead, IndexOutOfBoundsException observed in ProcessStats
https://code.google.com/p/android/issues/detail?id=223791&thanks=223791&ts=1474967996

Change-Id: Idbe4adf060c6898e838b5eaeecf476ba6c3e586d
Signed-off-by: pengzhicai <pengzhicai@xiaomi.com>
2016-10-09 12:37:30 +00:00
Robert Sesek
8f8d187a78 Split the zygote logic out of android.os.Process into a new ZygoteProcess class.
There is no functional change. This is to support adding new types of zygotes
that all operate using the same protocol.

Bug: 21643067
(cherry picked from commit 94e824bc1b)
(cherry picked from commit 96b49848e7)

Change-Id: I2e12057e4c2e7567f909d699b487e70b1664cca8
2016-10-07 14:25:36 -07:00
Tobias Sargeant
dd4bb31639 Refactor ZygoteInit to support a WebView-specific zygote.
This is a non-functional change that separates out functionality
that should be shared between the system zygote and the WebView
zygote from that which is system zygote specific.

* Move MethodAndArgsCaller to Zygote.
* Split out server socket functions into ZygoteServer.
* Add a new (stub, for now) WebViewZygoteInit class.

Bug: 22084679
Bug: 21643067
(cherry picked from commit ba816e0c9e)
(cherry picked from commit b9679dc1fa)

Change-Id: Iefdb0784dd08ac09a23aafe18663c13dce421775
2016-10-07 14:25:20 -07:00