Commit Graph

6796 Commits

Author SHA1 Message Date
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
Nancy Zheng
ce2cef46b3 Fix race condition in checkPattern and verifyPattern.
am: 9475460e66

Change-Id: I88a9304c1f7d23b70cb23988112fc6c34db51338
2016-10-07 18:00:24 +00:00
Nancy Zheng
1e746a415d Merge "Fix race condition in checkPattern and verifyPattern." into cw-f-dev 2016-10-07 17:47:47 +00:00
Nancy Zheng
9475460e66 Fix race condition in checkPattern and verifyPattern.
Bug: 31939282
Change-Id: I3250ab900f190ca9c820ac355ce94a699315b137
2016-10-07 10:41:00 -07:00
Dimitry Ivanov
629ad7e37e Merge "Relax namespace restriction on system server classloader" am: a8135325c1 am: 3c6b4961cb
am: 097ff24545

Change-Id: I9fcc4eeb399da4bdfef2a415e175f2a59f332c84
2016-10-07 09:00:19 +00:00
Dimitry Ivanov
097ff24545 Merge "Relax namespace restriction on system server classloader" am: a8135325c1
am: 3c6b4961cb

Change-Id: I60ab1b74e82a11da485e30a7ea5e45e49c5498c9
2016-10-07 08:53:06 +00:00
Dimitry Ivanov
3c6b4961cb Merge "Relax namespace restriction on system server classloader"
am: a8135325c1

Change-Id: Ie6b5e9041c1a03a8a6b2343069ef2a37b9aba9aa
2016-10-07 08:45:18 +00:00
Dimitry Ivanov
a8135325c1 Merge "Relax namespace restriction on system server classloader" 2016-10-07 08:34:41 +00:00
Dianne Hackborn
a89e1ec692 Fix issue #31305336: File corrupt: too many wake locks 101 am: cb99a72e62
am: 50b9f3513c

Change-Id: Idfc3a5413248ac0b74f88d21a9f1f4f642b3f73c
2016-10-06 21:27:35 +00:00
Dianne Hackborn
50b9f3513c Fix issue #31305336: File corrupt: too many wake locks 101
am: cb99a72e62

Change-Id: I01062999e2a1207c5d1bc826e8c9372c0fb012f7
2016-10-06 20:58:54 +00:00
Dianne Hackborn
cb99a72e62 Fix issue #31305336: File corrupt: too many wake locks 101
The limit is MAX_WAKELOCKS_PER_UID+1, since OverflowArrayMap
will add one more to contain the overflow.

Change-Id: I53004582daa0c405427308816728f2c1d2bef40d
2016-10-03 17:00:02 -07:00
Jorim Jaggi
38afe3a0c0 Fix crash if drawable doesn't have constant state am: 92d0602a7c
am: 0ea9093df7

Change-Id: Idee382b4a6adb2322ce9d62c4f672e2b0c1d6191
2016-09-30 09:19:03 +00:00
Jorim Jaggi
0ea9093df7 Fix crash if drawable doesn't have constant state
am: 92d0602a7c

Change-Id: I8ab088ad588eac8baa674d551201713562d973ef
2016-09-30 09:10:11 +00:00
Jorim Jaggi
92d0602a7c Fix crash if drawable doesn't have constant state
Change-Id: I2364efb9dc1446bc1a8c50abf6bd34a73c226f7e
Fixes: 31755893
2016-09-29 14:37:14 +00:00
Hidenari Koshimae
9820efd269 Increase priority for broadcast intent triggered by HW key am: 469e65e37f
am: ab8a42f7d9

Change-Id: I3891fcfb79919bbf17b937aa8f645cb45d798ce9
2016-09-26 19:40:51 +00:00
Hidenari Koshimae
ab8a42f7d9 Increase priority for broadcast intent triggered by HW key
am: 469e65e37f

Change-Id: I7b2aec06b7d2d0375b2f680e7880ca401684cddd
2016-09-26 19:33:25 +00:00
Hidenari Koshimae
469e65e37f Increase priority for broadcast intent triggered by HW key
Add the FLAG_RECEIVER_FOREGROUND flag to the broadcast intent
triggered by hardware key.
This prevents the framework from delaying the delivery of the
intent to its recipients, and improves the response for hardware
key event under heavy load on the system.

Bug: 28735973
Change-Id: Ib7f219845be34794f4c7545927e53cc6c2b504a3
2016-09-26 18:29:06 +01:00
dongwan0605.kim
d986cfd62d Fix RTL issue of ImageFloatingTextView am: dd8611fc5a
am: 4d590a91c2

Change-Id: I6a563e996bc93dd8f3a53b48c185319fdd1886de
2016-09-23 22:17:33 +00:00
Selim Cinek
10691456b8 Added Emergency affordance feature am: 705442fa7d
am: 0e1f78da65

Change-Id: I6f8220b18bce7889e3b9efe1b075a680a0ae7187
2016-09-23 22:12:33 +00:00
dongwan0605.kim
4d590a91c2 Fix RTL issue of ImageFloatingTextView
am: dd8611fc5a

Change-Id: I101527b922604640fef684c6216b99289ac97f25
2016-09-23 22:04:42 +00:00
Dimitry Ivanov
9e9061f608 Relax namespace restriction on system server classloader
Add java.library.path to list of permitted paths
for system server classloader. This allows libraries
loaded in system server classloader namespace to
dlopen libraries under /system/lib/somedir

Test: m
Bug: http://b/31652397
Change-Id: Ief70aaa81cde4983c8de1e07b4ef23e1fadf35a0
2016-09-23 15:03:27 -07:00
Selim Cinek
0e1f78da65 Added Emergency affordance feature
am: 705442fa7d

Change-Id: I03ebb84119f9cb310882ba9ea90ee1e1d7118d03
2016-09-23 22:00:42 +00:00
Selim Cinek
7f53b9bcb5 Merge changes If9baf6db,Idc6c5d7d into nyc-mr1-dev
* changes:
  Fix DismissView cannot be clicked sometimes after boot
  Fix RTL issue of ImageFloatingTextView
2016-09-23 21:52:13 +00:00
Selim Cinek
a05719a278 Merge changes If7c3a55e,I68dcba41,Ib96a15da into nyc-mr1-dev
* changes:
  Fixed a bug where the dimmed background could be invisible
  Fixed an issue where the inline controls where not usable
  Added Emergency affordance feature
2016-09-23 21:51:22 +00:00
Adam Powell
dbd1fc0d8e ResolverComparator transitivity am: 2366ff12a2
am: e698d8bfea

Change-Id: I25598afdb60fb24c2e28113f24826c660d5d19c3
2016-09-23 20:43:24 +00:00
Adam Powell
e698d8bfea ResolverComparator transitivity
am: 2366ff12a2

Change-Id: I8de9805eab7617a952579ff0c82616c0923e5513
2016-09-23 20:39:49 +00:00
dongwan0605.kim
dd8611fc5a Fix RTL issue of ImageFloatingTextView
Sometimes, makeSingleLayout() can be invoked before layout direction is resolved.
When not resolved, it indents in LTR layout although it should be RTL.

So, to guarantee the exact indenting, we should re-build the text layout
when the layout direction is changed.

Test: manual - Test BigTextStyle notifications with LargeIcon under RTL configurations.
Fixes: 31633875
Change-Id: Idc6c5d7d41632cb9e1b70d9c67c13852e3f25023
2016-09-23 13:07:22 -07:00
Adam Powell
2366ff12a2 ResolverComparator transitivity
Fix a bug where ResolverComparator's results were not consistent for
targets that cross profile boundaries.

Bug: 31640894
Change-Id: Ic6bf9512d2c2eb6f8fb7851e18eb9a347db29755
2016-09-23 10:36:01 -07:00
Selim Cinek
705442fa7d 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
Fixes: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
2016-09-22 12:25:57 -07:00
yuanhuihui
6ae3c66b92 Merge "fix wrong algorithm in WifiPowerPerPacket()" am: 16e1007481 am: b2eb8ea894
am: 731918e769

Change-Id: If8192c5b9976c7139d145da168bcb20ce1fc835c
2016-09-19 18:46:41 +00:00
yuanhuihui
731918e769 Merge "fix wrong algorithm in WifiPowerPerPacket()" am: 16e1007481
am: b2eb8ea894

Change-Id: I5ace39e2b6b679622f9c2ab27831a1e079541e32
2016-09-19 18:40:37 +00:00
yuanhuihui
b2eb8ea894 Merge "fix wrong algorithm in WifiPowerPerPacket()"
am: 16e1007481

Change-Id: I3bacf3deb99b10c5ae8fe22a02ad7066afc321e0
2016-09-19 18:34:42 +00:00
Treehugger Robot
16e1007481 Merge "fix wrong algorithm in WifiPowerPerPacket()" 2016-09-19 18:28:47 +00:00
yuanhuihui
9d8f51cbae fix wrong algorithm in WifiPowerPerPacket()
step1: PowerProfile.POWER_WIFI_ACTIVE represents energy consumption(mAh) per hour
devied by 3600, then WIFI_POWER ==> energy consumption(mAh) per second

step2: WIFI_BPS represents 1000000 bit per second
then (double)WIFI_BPS) / 8  ==> 1000000/8 Byte per second

step3: as upload and download, so divided  by 2;
then   (((double)WIFI_BPS) / 8 / 2048))  ==> 1000000/8/2048 KB per second
==> packet  per second (where 1 packet = 2 KB)

so WIFI_POWER / (((double)WIFI_BPS) / 8 / 2048) represents  mAh per Packet where 1 packet = 2 K.

when  divided by (60*60) again , that make WifiPowerEstimator narrow 3600 times.

Change-Id: Ic055a5145b6dfb1129c8969826329a3024c9e2b6
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
2016-09-18 09:33:39 +08:00
Lorenzo Colitti
4e3d827695 Give WakeupMessage the ability to transport an object as well.
am: 302c37008f

Change-Id: I06152851a392de80b351f2eb332e31363d916b1d
2016-09-16 18:47:26 +00:00
Etan Cohen
e77c8c6486 Merge changes from topic 'undo_do_not_merge' into stage-aosp-master
* changes:
  Give WakeupMessage the ability to transport an object as well.
  [NAN] Add transport type for NAN.
2016-09-16 18:41:36 +00:00