174828 Commits

Author SHA1 Message Date
Miao Wang
2ef9955c82 Merge "[RenderScript] Remove duplicate include in jni" 2015-03-19 20:35:56 +00:00
Jason Sams
f75e4ca394 Merge "Make it harder to leak contexts" 2015-03-19 18:38:16 +00:00
Elliott Hughes
89da4ca67d Merge "Remove unused printapk.cpp." 2015-03-19 18:06:17 +00:00
Alex Klyubin
f9034cc4ae Add android.security.NetworkSecurityPolicy.
The initial purpose of the NetworkSecurityPolicy class is to provide a
way for network libraries to check whether cleartext network traffic
(e.g., HTTP, WebSockets, XMPP, IMAP, SMTP) should be blocked from this
process.

The policy is set declaratively by the app developer in the app's
manifest and can be queried from ApplicationInfo.flags. Unfortunately,
several network stacks (bundled and unbundled) do not have a reference
to ApplicationInfo or Context.

Alternatives:
* Keep this API hidden (and thus potentially move it from framework to
  libcore), thus precluding unbundled HTTP stacks from using the API.
* Introduce a new java.lang.System property instead of this API.
  However, such properties are a mess and not as powerful/extensible
  as a public class.

Bug: 19215516
Change-Id: If22056a74d257bf1d805ebb4fc284240b3d338f1
2015-03-19 10:27:48 -07:00
Mathieu Chartier
b7d997a7b7 Merge "Revert "Change jit properties to be debug properties"" 2015-03-19 16:44:59 +00:00
Alex Klyubin
4177b8cbbf Merge "Add app-level usesCleartextTraffic manifest attribute." 2015-03-19 16:10:20 +00:00
Elliott Hughes
e519c81f35 Remove unused printapk.cpp.
This is one of the few remaining users of libzipfile, but doesn't get built.
Not worth porting to libziparchive.

Change-Id: Ica466b22e3a7ebaf123727c0d703af39cc89cf9c
2015-03-19 09:03:41 -07:00
Miao Wang
919b6475d3 [RenderScript] Remove duplicate include in jni
Change-Id: Ib6019ab22a83d952dce3fd6f5351120d94b49d58
2015-03-18 19:16:47 -07:00
Mathieu Chartier
1fb7aab9b2 Revert "Change jit properties to be debug properties"
Bug: 19735273

This reverts commit 1ad10ef1e4b83ef9e845761a82e202bb57e2379d.

Change-Id: Iac930925ab6d5cd5947fa4077c8d93e2984927d5
2015-03-18 19:07:02 -07:00
Shawn Willden
e921b8a28f Merge "Rename KM_TAG_USER_AUTH_ID to KM_TAG_USER_AUTH_TYPE." 2015-03-19 00:30:30 +00:00
Shawn Willden
e90774ddbc Rename KM_TAG_USER_AUTH_ID to KM_TAG_USER_AUTH_TYPE.
Also change to an ENUM, to match changes in keymaster_defs.h

Change-Id: Ieda3402563b0b9e4e8b100eb69a94651e51c6347
2015-03-18 18:28:39 -06:00
Shawn Willden
254c58c4e7 Merge changes Id9a22ad3,I629ab2c4
* changes:
  Add KM_TAG_AUTH_TOKEN.
  Add support for KM_TAG_USER_SECURE_ID.
2015-03-19 00:27:38 +00:00
Andreas Gampe
c3e1c21482 Frameworks/base: Change String == to equals in Preference
Bug: 19797138
Change-Id: I496b12c425da45ee098db12e72ad843c22444ba3
2015-03-18 17:18:13 -07:00
Jason Sams
e16da12b7b Make it harder to leak contexts
Change-Id: Ied60b6428bedb200d7b5b627e8196fbf2b4151e1
2015-03-18 17:04:18 -07:00
Mathieu Chartier
437ac8f844 Merge "Add JIT late override property" 2015-03-18 22:56:55 +00:00
Andreas Gampe
13dbc3d48d Merge "Frameworks/base: Fix potential NPE in InputMethod" 2015-03-18 22:19:58 +00:00
Andreas Gampe
9cc36ac2a2 Merge "Frameworks/base: Remove duplicate check in Mesh" 2015-03-18 22:19:27 +00:00
Andreas Gampe
2a247b3610 Merge "Frameworks/base: Fix visibility flag in Editor" 2015-03-18 22:19:08 +00:00
Mathieu Chartier
7a49028aa2 Add JIT late override property
Required for JIT debug property since user builds can't restart
the shell.

Bug: 19735273

Change-Id: I1983852e80010c344b45e0bb459de47c56adfce8
2015-03-18 15:18:52 -07:00
Andreas Gampe
8df1bedcba Merge "Frameworks/base: Fix potential NPE in Script" 2015-03-18 22:18:26 +00:00
Mark Salyzyn
e2c8e504d1 Merge "logd: optimize statistics" 2015-03-18 20:13:35 +00:00
Jason Sams
1aadd34741 Merge "Avoid duplicate surface creation." 2015-03-18 19:44:37 +00:00
Andreas Gampe
ad555f91a0 Frameworks/base: Fix potential NPE in Script
Bug: 19797138
Change-Id: I5cd9394bd2c0f7c044c1f2f24665384fa797cd97
2015-03-18 12:24:57 -07:00
Alex Klyubin
01a959d60a Add app-level usesCleartextTraffic manifest attribute.
The attribute declares whether the app intends to use cleartext
network traffic (e.g., HTTP, WebSockets, XMPP, SMTP, IMAP -- without
TLS or STARTTLS). The default value is true. If set to false, the app
declares that it does not intend to use cleartext network traffic. In
this case the app requests the platform, tooling, and third-party
libraries to prevent it from using cleartext traffic. The danger of
cleartext network traffic is that its confidentiality, authenticity,
and integrity are not guaranteed.

This feature is designed to help apps which care about security of
data exchanged over the network. These apps can accidentally
regress/downgrade to using cleartext network communications. This
typically happens when the server the app communicates with all of a
sudden tells it to use cleartext communications (e.g, HTTP URL
instead of an HTTPS URL) or when one of the components of the app gets
updated and regresses to cleartext communications without the
developer noticing.

In general, the prevention measures are on best effort basis. It's
impossible to automatically prevent all instances of cleartext
traffic. For example, an app bent on bypassing restrictions could
perform low-level network I/O with unusual TCP packet fragmentation,
or could use a custom application-level protocol.

The expectation is that most apps use libraries for network
communications and these libraries over time will start to honor this
flag, thus increasing the protections offered by it.

Bug: 19215516
Change-Id: I8700d51ddbc5d528faa4b6a5fa5bc9551ad02d13
2015-03-18 10:46:56 -07:00
Andreas Gampe
8ef92bd311 Frameworks/base: Fix request removal in VoiceInteractionSession
Fix and simplify removeRequest.

Bug: 19797138
Change-Id: I0eca877e3109c9f39cebd4c888f166ce334fcc0e
2015-03-17 21:22:49 -07:00
Andreas Gampe
4236ad7a2f Frameworks/base: Fix potential NPE in InputMethod
Don't read the size of an unchecked list.

Bug: 19797138
Change-Id: I9d8c087aff7bc9cc1e8aae9a0b489e23b5442765
2015-03-17 21:07:21 -07:00
Andreas Gampe
16720c1849 Frameworks/base: Remove duplicate check in Mesh
Bug: 19797138
Change-Id: I0b11c4ff63a8031d5e58a06ac13f91ae0bbac5dc
2015-03-17 19:10:14 -07:00
Chad Brubaker
5654b36b46 Add authorization binder methods
Add methods for sending an auth token to keystore and to query the
authorization state of a given operation.

Change-Id: I223df5c56ae2a251ef31cfe60f06c046c12a5cd8
2015-03-17 16:59:52 -07:00
Jason Sams
1e68bac5f8 Avoid duplicate surface creation.
Change-Id: I43104c8b48dd26681735940e6b2e1ba902af2020
2015-03-17 16:36:55 -07:00
Andreas Gampe
4976e2de8d Frameworks/base: Fix visibility flag in Editor
Fix double check.

Bug: 19797138
Change-Id: I95e694f384f1f25d6cf3b6a1669052940385e41d
2015-03-17 16:08:43 -07:00
Andreas Gampe
28e6aeca3a Merge "Frameworks/base: Make IDENTITY_MATRIX final" 2015-03-17 21:33:09 +00:00
Andreas Gampe
399fa8a60a Frameworks/base: Make IDENTITY_MATRIX final
Bug: 19797138
Change-Id: I127f24b7060a0c4dab401ce8e3057d362c6d6b06
2015-03-17 21:31:42 +00:00
Andreas Gampe
9568772acb Merge "Frameworks/base: Fix format string in Geofence" 2015-03-17 21:30:49 +00:00
Andreas Gampe
1414a6291d Frameworks/base: Fix format string in Geofence
%p is not a valid conversion in format strings. It is also superfluous,
as it is already known that location is null.

Bug: 19797138
Change-Id: I5784e28b05b4ca9aac57e0fc9da4a7f01d9b3247
2015-03-17 21:30:20 +00:00
Andreas Gampe
aae42eb261 Merge "Frameworks/base: Fix format string in Camera" 2015-03-17 20:52:21 +00:00
Andreas Gampe
02ffb2aad9 Frameworks/base: Fix format string in Camera
One cannot print a boolean with %d. That will result in an exception.

Bug: 19797138
Change-Id: I86c42ea834cebebaecff8463637cc9de14d1fc88
2015-03-17 20:51:38 +00:00
Andreas Gampe
be549f9b8e Merge "Frameworks/base: Fix precedence bug" 2015-03-17 20:36:21 +00:00
Andreas Gampe
869d26fda0 Frameworks/base: Fix precedence bug
Explicit cast has higher precedence than shift.

Bug: 19797138
Change-Id: Ifcf569bf774fbf65ee50c078f736ad167bcc6b8c
2015-03-17 20:31:22 +00:00
Andreas Gampe
0ae488e1cb Merge "Frameworks/base: Use || instead of |" 2015-03-17 20:28:53 +00:00
Andreas Gampe
e1b9262084 Frameworks/base: Use || instead of |
Nothing wrong with | in this case, but || is canonical.

Bug: 19797138
Change-Id: I5f145736a5470f7cde06efce9a217d86eda2135f
2015-03-17 20:27:42 +00:00
Andreas Gampe
4d9076437c Merge "Frameworks/base: Fix trivial equals implementation" 2015-03-17 20:25:20 +00:00
Andreas Gampe
610b2c778c Frameworks/base: Fix trivial equals implementation
The comparator's equal implementation doesn't satisfy the constraints
of an equals method, namely being reflexive. Use the standard Object
implementation instead.

Bug: 19797138
Change-Id: I74f888e99533e1945aab7ab10fe8ee3ded6388f4
2015-03-17 20:24:45 +00:00
riddle_hsu
2541306ad5 [ActivityManager] Avoid killing unrelated processes.
Kernel will reuse process id, when wrap-around happens,
there may be just after a pid is freed, a new thread/process
uses the pid immediately.

For examples, there may be a process with pid 1234 killed
by lowmemorykiller or itself (app.killed=false).
Before the death recipient enters AMS, a new thread/process
is started with pid 1234, then when appDiedLocked executes,
this new pid 1234 will be killed again.

It is especially easy happens to zygote:
During zygote starting process, it will stop 5 daemons threads.
And restart the 5 threads after fork is called, so it has
larger pid range to hit the resue case.
https://code.google.com/p/android/issues/detail?id=160661

Solution:
If the dead event is from binder, it is not necessary
to call killProcessQuiet again, because it should really
be dead.
Keep no checking for killProcessGroup because zygote does
not have record under /acct/, and also the parameter uid
has restriction that will not kill another application
which reuses the pid.

Change-Id: Iec4a4884ae641c4d036f4d024ce463f7a351a17b
2015-03-17 18:22:51 +08:00
Mykola Kondratenko
b159633aa3 hwui : fix memory leak due to duplicate in shadow cache
New ShadowTask with the ShadowDescription key that already
exists in the shadow LruCache will leak as it is not being
added.

Fix adds check for the existing key that is common in the hwui
code but missing for the TessellationCache::precacheShadow
function.

Change-Id: I37fd5ec82f8b8da5d1ec0f2ab9fd04c5f8534367
2015-03-17 08:57:41 +01:00
Mathieu Chartier
008ec61e0c Merge "Change jit properties to be debug properties" 2015-03-17 02:04:34 +00:00
Andreas Gampe
345a8f69ea Merge "Frameworks/base: Fix a comparison" 2015-03-17 00:12:25 +00:00
Mathieu Chartier
1ad10ef1e4 Change jit properties to be debug properties
Bug: 19735273
Change-Id: I266cf447a7af0595366bf89109d2823094f5cf41
2015-03-16 16:22:52 -07:00
Yang Ni
cc1ca488e2 Added copyright notice and formatted to convention
Pure format change. No other changes at all.

Change-Id: I74a53aa67ef0960f70becaf288b85be40066a0ae
2015-03-16 15:53:18 -07:00
Andreas Gampe
5eb421221b Merge "Frameworks/base: Force long computation" 2015-03-16 20:37:02 +00:00
Andreas Gampe
f3e581c99f Merge "Frameworks/base: Check before foreach in Script" 2015-03-16 19:17:45 +00:00