176663 Commits

Author SHA1 Message Date
Colin Cross
01f185633c Re-enable -Wall and -Werror that were lost in a merge
-Wall and -Werror were lost during a merge when they were added to
aaptCFLAGS instead of aaptCFlags.  Fix the typo, and the warnings
that crept in while it was disabled.

Change-Id: Ib944b8d6149278e4f3861c1acac277bcd95cc7c2
2015-04-08 17:48:23 -07:00
Olawale Ogunwale
343e291b67 am e8a3c320: Merge "Prevent windows from freezing screen while timeout"
* commit 'e8a3c320e658f6c7f8d1db3d8ad3c3f189c0f54e':
  Prevent windows from freezing screen while timeout
2015-04-09 00:32:45 +00:00
Alex Klyubin
2cb1e1dca0 am 1da3d7fc: Merge "Add more digests to AndroidKeyStore API."
* commit '1da3d7fcf33fd61f0143f8a410f0a77783fe1bfe':
  Add more digests to AndroidKeyStore API.
2015-04-09 00:32:38 +00:00
Alex Klyubin
f853f64998 Require IND-CPA by default for new AndroidKeyStore keys.
Bug: 18088752
Change-Id: I01e44b7155df4326b5c9d83dda57f889c1f23ec7
2015-04-08 16:28:27 -07:00
Alex Klyubin
da66cab36e am f1a1160c: am c0d6b7cb: Merge "Fix typo"
* commit 'f1a1160c68f6c289d3b82573f1a16f9c52aebab4':
  Fix typo
2015-04-08 22:03:55 +00:00
Alex Klyubin
9be1016b44 am c48e8cf0: am edd0e6c0: Merge "Refuse to reuse IV in encryption mode in AndroidKeyStore."
* commit 'c48e8cf07a180e185948673579828d064e6efc7a':
  Refuse to reuse IV in encryption mode in AndroidKeyStore.
2015-04-08 22:03:51 +00:00
Alex Klyubin
8ad875f52d am 0649c832: am 3283d2d2: Merge "Add BlockMode.GCM constant to AndroidKeyStore API."
* commit '0649c832b8285d1b07c6e07362dbfe3ca0535609':
  Add BlockMode.GCM constant to AndroidKeyStore API.
2015-04-08 22:03:47 +00:00
Olawale Ogunwale
e8a3c320e6 Merge "Prevent windows from freezing screen while timeout" 2015-04-08 21:56:16 +00:00
Alex Klyubin
f1a1160c68 am c0d6b7cb: Merge "Fix typo"
* commit 'c0d6b7cb752b50ed37197e15cc6f305a0038e61b':
  Fix typo
2015-04-08 21:37:26 +00:00
Alex Klyubin
c48e8cf07a am edd0e6c0: Merge "Refuse to reuse IV in encryption mode in AndroidKeyStore."
* commit 'edd0e6c09820b08f22937bbbc00149adc6d66f07':
  Refuse to reuse IV in encryption mode in AndroidKeyStore.
2015-04-08 21:37:11 +00:00
Alex Klyubin
0649c832b8 am 3283d2d2: Merge "Add BlockMode.GCM constant to AndroidKeyStore API."
* commit '3283d2d208c0686fa964008e1520179948886adb':
  Add BlockMode.GCM constant to AndroidKeyStore API.
2015-04-08 21:37:04 +00:00
Alex Klyubin
1da3d7fcf3 Merge "Add more digests to AndroidKeyStore API." 2015-04-08 21:32:09 +00:00
Alex Klyubin
70376a7728 Add more digests to AndroidKeyStore API.
This adds MD5, SHA-1, SHA-224, SHA-384, and SHA-512. SHA-256 was
already there.

MD5 is not exposed for HMAC on purpose, because MD5 has been
deprecated for years.

Bug: 18088752
Change-Id: I4df3d3f6cf10805c7910a1bdb577a91c85055945
2015-04-08 14:17:21 -07:00
Dan Albert
1b4f316651 Fix UB in ResourceTable::stringToInt.
Was here because UBsan found integer overflow in the parsing for hex
numbers, since hex numbers here are actually unsigned but assigned to
a signed integer.

Also fixes a number of missing error conditions.

Change-Id: Iaea576daedfc6c75521cde02de3fe9dd0198a3b7
2015-04-08 14:12:21 -07:00
Quddus Chong
163e501609 am ff5e9554: am 67f0c8db: am a147451a: am c61fd055: am ff4c6325: Merge "cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e" into lmp-docs
* commit 'ff5e9554cf0a1a2eaf2e353698b91400a3c57f17':
  cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e
2015-04-08 19:10:47 +00:00
Andrew Solovay
3aba19a6c0 Docs: Correcting section on how to escape quotes in strings.
The behavior for single and double-quotes is different--I expanded
this section to note how they differ.

(New version of a Gerrit CL I abandoned because of a commit mess-up.)

See first comment for doc stage location.

bug: 19959941
Change-Id: I417546a473f0ebe76a6e4102b87883a85365ac26
2015-04-08 12:00:42 -07:00
Quddus Chong
ff5e9554cf am 67f0c8db: am a147451a: am c61fd055: am ff4c6325: Merge "cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e" into lmp-docs
* commit '67f0c8db35be1c43b3f588e3414557749a277e6f':
  cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e
2015-04-08 18:59:37 +00:00
Quddus Chong
67f0c8db35 am a147451a: am c61fd055: am ff4c6325: Merge "cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e" into lmp-docs
* commit 'a147451ab92e29141cd85d5c75a881586d5959df':
  cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e
2015-04-08 18:48:57 +00:00
Quddus Chong
a147451ab9 am c61fd055: am ff4c6325: Merge "cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e" into lmp-docs
* commit 'c61fd05581a80bcecf50509acb220ea3e2817e56':
  cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e
2015-04-08 18:38:47 +00:00
Quddus Chong
5985981ba4 am b49748cf: am 0c5752be: am c736e8cf: am f0ab39c1: Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev
* commit 'b49748cfd3a4f87c394307787665c09521faa77d':
  Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873
2015-04-08 18:33:43 +00:00
Quddus Chong
c61fd05581 am ff4c6325: Merge "cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e" into lmp-docs
* commit 'ff4c632592cce177997d63b3ff81c0b2be9cf9bb':
  cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e
2015-04-08 18:27:56 +00:00
Quddus Chong
b49748cfd3 am 0c5752be: am c736e8cf: am f0ab39c1: Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev
* commit '0c5752be40a9e7ced5be2659965f3c4ba3c3f4eb':
  Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873
2015-04-08 18:23:52 +00:00
Quddus Chong
ff4c632592 Merge "cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e" into lmp-docs 2015-04-08 18:16:58 +00:00
Alex Klyubin
c0d6b7cb75 Merge "Fix typo" 2015-04-08 18:16:38 +00:00
Quddus Chong
0c5752be40 am c736e8cf: am f0ab39c1: Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev
* commit 'c736e8cf41445e7a32721da617d6d7eacd189703':
  Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873
2015-04-08 18:11:55 +00:00
Alex Klyubin
6895a549ec Fix typo
Change-Id: I1c47ade98ad3ae41dc55e7bcafcad6901b559c89
2015-04-08 11:08:37 -07:00
Alex Klyubin
edd0e6c098 Merge "Refuse to reuse IV in encryption mode in AndroidKeyStore." 2015-04-08 18:04:39 +00:00
Quddus Chong
0e3547bd44 cherrypick from lmp-mr1-dev. Fixed broken link in UiAutomation.setRunAsMonkey() method description.
bug: 19711873. Original Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e

Change-Id: I48d1e2f8e1f7d94dffac61a274f9c1a2df31a822
2015-04-08 10:59:27 -07:00
Quddus Chong
c736e8cf41 am f0ab39c1: Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev
* commit 'f0ab39c10b614514ba4a600aa6fd4354253cde73':
  Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873
2015-04-08 17:53:44 +00:00
Alex Klyubin
3283d2d208 Merge "Add BlockMode.GCM constant to AndroidKeyStore API." 2015-04-08 17:51:13 +00:00
Quddus Chong
f0ab39c10b Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev 2015-04-08 17:46:21 +00:00
Alex Klyubin
d1ccb45945 Refuse to reuse IV in encryption mode in AndroidKeyStore.
This makes IV-using Cipher implementations backed by AndroidKeyStore
refuse to be reused. After Cipher.doFinal completes, invoking update
or doFinal will raise an exception. This is to make it harder to
violate the security best practice of not reusing IV in encryption
mode.

Bug: 18088752
Change-Id: I5102f9e8b2ff428254294703e48948ea8576603d
2015-04-08 09:46:16 -07:00
Olawale Ogunwale
81954cf308 am 8ddc3e26: am 393f89f2: Merge "[ActivityManager] Avoid NullPointerException if no crash info"
* commit '8ddc3e26e6534adc6f0cdc5c8b9e6ddc3fe3dd10':
  [ActivityManager] Avoid NullPointerException if no crash info
2015-04-08 16:40:24 +00:00
Olawale Ogunwale
8ddc3e26e6 am 393f89f2: Merge "[ActivityManager] Avoid NullPointerException if no crash info"
* commit '393f89f26df724a3da7a21b28925a21fe5fb253f':
  [ActivityManager] Avoid NullPointerException if no crash info
2015-04-08 16:28:52 +00:00
tiger_huang
951e27f344 Prevent windows from freezing screen while timeout
The original logic lets windows be able to freeze screen again (by
setting win.mOrientationChanging=true) after WINDOW_FREEZE_TIMEOUT is
triggered before mInnerFields.mOrientationChangeComplete is set to
true. In this case, we would lose the protection of
WINDOW_FREEZE_TIMEOUT. If the app never finishes drawing the window,
the screen would keep freezing that the user cannot operate the
device.

Change-Id: I45a0a9e4b3f8d5b0b0043229bfa4890236ae8ab2
2015-04-08 16:10:04 +00:00
Olawale Ogunwale
393f89f26d Merge "[ActivityManager] Avoid NullPointerException if no crash info" 2015-04-08 16:07:44 +00:00
Olawale Ogunwale
ce5bdfea12 am 380415b6: am 1bdbce29: Merge "[ActivityManager] Finish the failed-to-pause activity"
* commit '380415b6431adeb8138bc328a926807b8ae41df9':
  [ActivityManager] Finish the failed-to-pause activity
2015-04-08 13:19:02 +00:00
Olawale Ogunwale
380415b643 am 1bdbce29: Merge "[ActivityManager] Finish the failed-to-pause activity"
* commit '1bdbce295cd7978e50b5444420ed222ec6c6281c':
  [ActivityManager] Finish the failed-to-pause activity
2015-04-08 13:09:42 +00:00
Olawale Ogunwale
1bdbce295c Merge "[ActivityManager] Finish the failed-to-pause activity" 2015-04-08 12:51:12 +00:00
louis_chang
3d86b88fa7 [ActivityManager] Avoid NullPointerException if no
crash info

Symptom:
This issue happens because the ANR process got killed
(because it crashed) before the ANR dialog dismissed.
In that case, the process record is marked as crashed
(ProcessRecord.crashing = true). When the ANR dialog
dismissed by user, it will cause NullPointerException
when writeToParcel while performing IPC because there
is no crash info (ApplicationErrorReport.crashInfo = null)

Solution:
Check crashinfo before access it

Change-Id: I2995de57684c1e13aab8297f5eea1e82ca3b7ad8
2015-04-08 18:04:11 +08:00
louis_chang
047dfd40fd [ActivityManager] Finish the failed-to-pause activity
Symptom:
In some scenario, the mPausingActivity may be replaced by other
activity. When previous activity paused, the completePausedLocked()
won't be invoked because it is no longer the mPausingActivity. If
the activity is also pending to finish, it would never be done
because the activity kept in PAUSING state. Since the activity's
window also remain visible and is above on Wallpaper, user would
see it when back to home.

Solution:
Finish the failed-to-pause activity if the activity is pending to
finish.

A Real Case:
(1) Screen turn off
(2) The top activity T1 crashed
(3) When finish activity T1, the next top activity T2 will be
    scheduled to resume and pause (due to screen off).
(4) The activity T2 is also set to finishing due to T1 crashed.
(5) Before T2 paused and before paused timeout occurs, there has
    a new process started which brings up the next top activity T3
    to resume and pause. So the pausing activity is now replaced.
(6) When activity T2 paused, it cannot completed the pause operation
    T2 will remain in PAUSING and finishing state with its window
    visible. The process won't be killed because the oomadj stays
    at 1 (Visible).

Change-Id: Ib10fded891b21c774b26a93071c717fa50516e22
2015-04-08 16:35:55 +08:00
Romain Guy
5b61a28225 am e4d787b2: am 80e455e3: Merge "Prevent possible memory leak in SpanSet"
* commit 'e4d787b277a4b9435688c7e6f380bfc367751f76':
  Prevent possible memory leak in SpanSet
2015-04-08 07:27:58 +00:00
Romain Guy
e4d787b277 am 80e455e3: Merge "Prevent possible memory leak in SpanSet"
* commit '80e455e32580fb909af18ad0a21fccc6b433dd4b':
  Prevent possible memory leak in SpanSet
2015-04-08 07:14:35 +00:00
Romain Guy
80e455e325 Merge "Prevent possible memory leak in SpanSet" 2015-04-08 06:56:26 +00:00
Eric Gilmore
d242647afa am 1fb61c46: am b1044aaf: am 8ba1380f: am a4f72eb0: am aac938a8: Merge "Fixing date." into lmp-docs
* commit '1fb61c4688c37677020c66b96f067074b1dab3b4':
  Fixing date.
2015-04-08 01:49:50 +00:00
Eric Gilmore
1fb61c4688 am b1044aaf: am 8ba1380f: am a4f72eb0: am aac938a8: Merge "Fixing date." into lmp-docs
* commit 'b1044aaf29227b2075e08098b6f5ed5eaf7cf2c0':
  Fixing date.
2015-04-08 01:29:10 +00:00
Eric Gilmore
b1044aaf29 am 8ba1380f: am a4f72eb0: am aac938a8: Merge "Fixing date." into lmp-docs
* commit '8ba1380fb59d3b7adec7e99f354eccabcead65b6':
  Fixing date.
2015-04-08 00:53:50 +00:00
Eric Gilmore
8ba1380fb5 am a4f72eb0: am aac938a8: Merge "Fixing date." into lmp-docs
* commit 'a4f72eb079938bed57e8183e8110da044fe03429':
  Fixing date.
2015-04-08 00:43:41 +00:00
Eric Gilmore
a4f72eb079 am aac938a8: Merge "Fixing date." into lmp-docs
* commit 'aac938a8597efb8d71ce7dc124779f1d268510eb':
  Fixing date.
2015-04-08 00:33:07 +00:00
Eric Gilmore
aac938a859 Merge "Fixing date." into lmp-docs 2015-04-08 00:05:28 +00:00