Commit Graph

83308 Commits

Author SHA1 Message Date
Mathew Inwood
84259cea59 Merge "Hidden API blacklisting killswitch."
am: 46656fa28e

Change-Id: I1276e1eb5b2d4438ebc6f071ed28f1f322a8bc6e
2018-02-16 16:31:26 +00:00
Mathew Inwood
fe1eebec5d Hidden API blacklisting killswitch.
Just support "*" for now, meaning disable all API blacklisting for all
apps.

Test: Manually verified by:
- installing test app that accesses hidden API
- manually blacklist the API
- $ adb shell settings put global hidden_api_blacklist_exemptions \\*

This is a cherry pick of change I9a41a104742c9aaaf3a753e7b0f3a1106e37d4d3
from internal master.

Merged-In: I9a41a104742c9aaaf3a753e7b0f3a1106e37d4d3
Change-Id: Ibb2a1d054c1b099fc6093e37f24b2ed421a2313c
2018-02-16 09:57:09 +00:00
Hugo Benichi
054bed5968 Merge "Add missing'}' in javadoc of public API method"
am: f50d9fbdc1

Change-Id: I3afcd9a3752ff6d158d68ca3ce19272151c1908c
2018-02-16 07:43:08 +00:00
Calin Juravle
68024999b7 Merge "Pass the compilation reason to dexopt"
am: b0817b238a

Change-Id: Id8b60a2963b35a44c9420d9846283091b5e0619e
2018-02-16 05:34:41 +00:00
Treehugger Robot
f50d9fbdc1 Merge "Add missing'}' in javadoc of public API method" 2018-02-16 03:19:35 +00:00
Calin Juravle
b0817b238a Merge "Pass the compilation reason to dexopt" 2018-02-16 02:25:48 +00:00
Hall Liu
1c2da9f909 Merge "Add setting and logging for RTT"
am: b823d08d21

Change-Id: I0207ee73eee69096dc83d89553d21d462886b788
2018-02-16 00:38:10 +00:00
Hall Liu
b823d08d21 Merge "Add setting and logging for RTT" 2018-02-15 21:01:10 +00:00
Calin Juravle
b981617ec7 Pass the compilation reason to dexopt
Record the compilation reason in the oat files to enable better
performance monitoring.

Test: DexoptOptionsTest
      manual
Bug: 73102540

Change-Id: Ifa487d4bc33dcd06f12af6bdd1d9a9c5f4562f4b
2018-02-15 12:49:26 -08:00
Calin Juravle
b3da44d9a1 Merge changes from topic "cp_calin_framework_2017"
am: b98102b4dc

Change-Id: I524b166fbd551200a539a40e3531883b494f68db
2018-02-15 20:46:22 +00:00
Hall Liu
ee57508851 Add setting and logging for RTT
Add a system setting to store preferred RTT mode for calls. Add logging
for RTT in Telecom base classes.

Bug: 63934808
Test: manual
Change-Id: Ie26fac800931604379bbe7b8abfed7caa8c0236d
Merged-In: Ie26fac800931604379bbe7b8abfed7caa8c0236d
2018-02-15 18:55:35 +00:00
Treehugger Robot
b98102b4dc Merge changes from topic "cp_calin_framework_2017"
* changes:
  Allow public profile compilation for primary apks
  [framework] Pass .dm files to dexopt at install time
  Extend the ArtManager profiling API to cover boot image profiling
  [framework] Extend profile operations to take the profile name
  Accept UserHandle.USER_ALL during profile preparation
  [framework] Prepare profile for app code paths
  Perform a non strict matching of .dm files when computing the size
  Support installation of DexMetadata files (.dm)
  Rename snapshotProfile to createProfileSnapshot for consistency
  Implement ArtManager#snapshotProfile API
  Add SystemApis to expose runtime profile information
  Log SHA256 of secondary dex files during reconcile.
2018-02-15 16:17:06 +00:00
David Brazdil
42ab3eeb4c Merge "Update hidden API toast message"
am: 10034d94cf

Change-Id: I7e5c4c5333be8d1bc5722b0924c31a8ad94be29e
2018-02-15 13:01:54 +00:00
Chalard Jean
6fe110fa36 Merge changes I3d68dbf8,I6ea524bb,I978d9119
am: edab226d0e

Change-Id: I6ffc0a841d0aa8479bb5b6afba49c5130af879da
2018-02-15 12:57:16 +00:00
David Brazdil
10034d94cf Merge "Update hidden API toast message" 2018-02-15 11:55:15 +00:00
Lorenzo Colitti
bf66580c0b Merge changes Icd56662d,I0ece820f
am: 47ef64b0d2

Change-Id: Ifd2ffe68cfff511d010ce5e755b4b680ad1df52c
2018-02-15 11:43:29 +00:00
Chalard Jean
edab226d0e Merge changes I3d68dbf8,I6ea524bb,I978d9119
* changes:
  Deprecate CONNECTIVITY_ACTION.
  Publish FOREGROUND and add NOT_SUSPENDED capabilities.
  Send null UIDs to apps instead of single-uid lists.
2018-02-15 11:25:36 +00:00
Lorenzo Colitti
47ef64b0d2 Merge changes Icd56662d,I0ece820f
* changes:
  Restrict OWNERS in android.net.*
  Add OWNERS to the libandroid_net library.
2018-02-15 10:03:26 +00:00
David Brazdil
5234d559b4 Update hidden API toast message
Change the toast message shown by an Activity when VMRuntime reports
that the app has used a private API.
(a) fix a typo: compatiblity -> compatibility
(b) change guidance from "please consult log" to "go to <url> for
    more info" where devs can learn how to proceed if their app does
    have compatibility issues.

Bug: 64382372
Test: make, visual
Change-Id: Idbe32a724438bb7b0826d0b4e11ef505015cb321
2018-02-15 09:09:55 +00:00
Lorenzo Colitti
fd76d5040b Restrict OWNERS in android.net.*
Test: None
Change-Id: Icd56662dcbc86b49015d094fd8ae2ade235aa475
2018-02-15 16:43:44 +09:00
Jakub Pawlowski
edb16b0f4b Merge "Hearing Aid profile"
am: aca4460b64

Change-Id: I2f0367b57ec720c3b46b0f2984b77068db3fa3c1
2018-02-15 05:37:45 +00:00
Treehugger Robot
aca4460b64 Merge "Hearing Aid profile" 2018-02-15 04:14:43 +00:00
Jakub Pawlowski
ea580fa1d1 Hearing Aid profile
This is implementation of Hearing Aid Profile that will in future
be connected to Bluetooth Manager - see TODOs in BluetoothHearingAid.java

Bug: 69623109
Test: compilation. Manual test with HA.
Change-Id: I79643ea1e14e9df7f5771169359c964a60c56618
2018-02-14 14:24:44 -08:00
Benedict Wong
3988c929ad Merge "Copy IpSecConfig when IpSecTransforms are created"
am: 2c8456b22e

Change-Id: I24ac6baa0492a46bf5810bc6bc146d9aaa9eccab
2018-02-14 21:14:19 +00:00
Benedict Wong
2c8456b22e Merge "Copy IpSecConfig when IpSecTransforms are created" 2018-02-14 19:37:53 +00:00
Calin Juravle
29c772cb48 [framework] Pass .dm files to dexopt at install time
(cherry picked from commit cc65194e8e)

Test: DexoptOptionsTest
      adb install foo.apk foo.dm
Bug: 30934496

Merged-In: If7e705a0efc0954a385ec3bfe7a93921c0d83351
Change-Id: If7e705a0efc0954a385ec3bfe7a93921c0d83351
2018-02-14 08:19:42 -08:00
Calin Juravle
e4ad74e834 Extend the ArtManager profiling API to cover boot image profiling
The boot image profile is available only on userdebug and eng builds and
combines the boot classpath and system server classpath.

Also, update ArtManager API to use Executors instead of Handlers.

(cherry picked from commit fcbb74a429)

Test: gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496
Merged-In: Ie501947a659d644acbde04fb46157dd0c7944e81
Change-Id: Ie501947a659d644acbde04fb46157dd0c7944e81
2018-02-14 08:19:42 -08:00
Calin Juravle
ea6c0ffb4a [framework] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.

(cherry picked from commit 6ae39fc2e5)

Test: manual (dexopt apps, merge profiles, clear profiles)
      gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496

Merged-In: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
2018-02-14 08:19:42 -08:00
Calin Juravle
b62a9045c2 [framework] Prepare profile for app code paths
This CL is an intermediate step to enable the use of profiles shipped in
the dex metadata files.

The preparation consist of:
- creating the current profile
- merging the profile from the dex metadata file (if present) into the
reference profile

and happens:
- after the application data directory is created, to capture system
apps.
- post-install (right before we dexopt), to capture any new code paths

(cherry picked from commit 3621be71d0)

Test: manual (install apps and splits, take OTA)
Bug: 30934496

Merged-In: Id36474ab629ad3ffafd24381d30e3d88ac02d576
Change-Id: Id36474ab629ad3ffafd24381d30e3d88ac02d576
2018-02-14 08:19:42 -08:00
Calin Juravle
a8f1a4c339 Perform a non strict matching of .dm files when computing the size
'adb shell pm install' creates the PackageLite structure without
validating or renaming the input files to '.apk'.

Be more permissive in DexMetadataHeler when computing the size of the
package to allow for this scenario.

(cherry picked from commit 10b27eb2cc)

Test: atest
core/tests/coretests/src/android/content/pm/dex/DexMetadataHelperTest.java
Bug: 72267410

Merged-In: Ica446b0822be71826d02d01ada015a43d8133c68
Change-Id: Ica446b0822be71826d02d01ada015a43d8133c68
2018-02-14 08:19:42 -08:00
Calin Juravle
011603ab76 Support installation of DexMetadata files (.dm)
Add support in the package installer to install dex metadata files
alongside the application apks (base or splits).

During installation or update the dex metadata files will need to have a
matching apk file. The matching is done by checking the file extension
(e.g. base.apk -> base.dm, split_a.apk -> split.dm).

On disk, the metadata files are placed next to the apks.

The .dm files will be used during install-time optimizations and passed
verbatim to dex2oat.

Test: adb shell am instrument -w \
1) adb shell am instrument -w \
  -e class android.content.pm.DexMetadataHelperTest

com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

2) adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitApp.dm CtsClassloaderSplitAppFeatureA.apk
CtsClassloaderSplitAppFeatureA.dm CtsClassloaderSplitAppFeatureB.apk

3) gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

(cherry picked from commit 3fc56c3000)

Bug: 30934496
Merged-In: I86f0a8307705ff3d6a5a85c2fcaae085dd62d4af
Change-Id: I86f0a8307705ff3d6a5a85c2fcaae085dd62d4af
2018-02-14 08:00:56 -08:00
Calin Juravle
369fbd2983 Implement ArtManager#snapshotProfile API
Complete the implementation of ArtManager#snapshotProfile. The snapshot is
performed by calling the installer and then return to the caller via the
specified callback.

(cherry picked from commit fd9f8ae973)

Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases
Merged-In: I87131487846d91d79a56041445420376b61ca8e7
Change-Id: I87131487846d91d79a56041445420376b61ca8e7
2018-02-14 08:00:56 -08:00
Calin Juravle
1d875ad3ae Add SystemApis to expose runtime profile information
The API allows a system apps which acquired
{@code android.permission.READ_RUNTIME_PROFILE} to snapshot the runtime
profiles of installed packages.

The API is implemented in a new service class (AndroidRuntimeManager)
accessible from the context using
context().getPackageManager().getAndroidRuntimeManager().

The main functionality is exposed as a one way call into the
AndroidRuntimeManager with the result being posted on a callback. The
profile is available to the caller as a read-only ParcelFileDescriptor.

This CL only adds the API interfaces and validation. It does not fully
implement the functionality.

oneway void snapshotRuntimeProfile(in String packageName,
  in String codePath, in ISnapshotRuntimeProfileCallback callback)

(cherry picked from commit 45f8b29ce0)

Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

Merged-In: Iaa6be4715840f24508acba3162ea9c1ab725bd38
Change-Id: Iaa6be4715840f24508acba3162ea9c1ab725bd38
2018-02-14 08:00:56 -08:00
Nicolas Geoffray
d0f327cc60 Merge "Refactor runtime hidden API flag from negative to positive"
am: 46b4862d20

Change-Id: Ib750c357265a13f60032104371d84974df17776e
2018-02-14 13:57:37 +00:00
David Brazdil
b3a4aab310 Refactor runtime hidden API flag from negative to positive
There are only two situations in which we want to enable hidden API
access flag checks. Turning the flag from DISABLE_ to ENABLE_
simplifies logic in ART and reduces the number places where the flag
had to be passed down to ART.

Bug: 64382372
Test: boot device, install and run apps, check log messages

(cherry picked from commit f7e31c0a2b)

Change-Id: Ib2f70696d98c6e1500d1d419d6acf0a8d0487213
2018-02-14 10:13:06 +00:00
Chalard Jean
054cd16781 Deprecate CONNECTIVITY_ACTION.
That was its destiny.
Use NetworkCallbacks instead.

Test: runtest frameworks-net, but this is only doc changes
Change-Id: I3d68dbf817de92c66d899a7cc4519c5639e4c049
2018-02-14 15:14:44 +09:00
Chalard Jean
804b8fb968 Publish FOREGROUND and add NOT_SUSPENDED capabilities.
NOT_SUSPENDED and FOREGROUND are capabilities that need to
be public so as to reach feature parity with what information
can be gotten through the use of CONNECTIVITY_ACTION and
synchronous calls to ConnectivityManager. This change makes
them public, and wires up the NOT_SUSPENDED capability.
This deprecates in effect the old onSuspended and onResumed
callbacks, but these have never been public.

This also converts the onAvailable path from a multiple
binder call design to a simpler, single binder call. This
is only for internal convenience

Test: runtest frameworks-net
Test: cts
Test: also manual testing
Change-Id: I6ea524bb361ecef0569ea2f9006c1e516378bc25
2018-02-14 15:14:41 +09:00
Robert Sesek
9b13db0938 Merge "Refactor ZygoteProcess to deal in LocalSocketAddress."
am: 9fda81e274

Change-Id: If044eb9eb5b27e7fa21d750dd09a8e56c07b8e50
2018-02-14 05:36:58 +00:00
Treehugger Robot
9fda81e274 Merge "Refactor ZygoteProcess to deal in LocalSocketAddress." 2018-02-14 03:35:37 +00:00
Holly Jiuyu Sun
cddc0c12cc Merge "Public EuiccManager APIs."
am: 42339c464f

Change-Id: I95f1713b1a1be188e7eae62adbfc975bfca982c3
2018-02-14 00:08:35 +00:00
Benedict Wong
9dd3a38527 Copy IpSecConfig when IpSecTransforms are created
This change prevents IpSecTransforms from being inadvertently modified
by changes to the IpSecConfig. Specifically, once the transform is
created, it takes a copy of the config, rather than a reference.

Bug: 69385347
Test: New tests added, and all test passing
Change-Id: I89b8660c175ca20aa70352dcda893434ff7fd42b
2018-02-13 23:23:13 +00:00
Holly Jiuyu Sun
052fbabc35 Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: I8a2c78804cae56b679d311d613edca5be4bc2522
Merged-In: I68853e134e1e31fa9b91a83af6c491a2a8cca971
2018-02-13 12:53:45 -08:00
Robert Sesek
5ac8abf9ca Refactor ZygoteProcess to deal in LocalSocketAddress.
Currently ZygoteProcess only uses String names in the RESERVED socket
namespace. This CL reworks the class to use LocalSocketAddress, so that
other socket namespaces can be used to communicate with zygotes.

Bug: 63749735
Test: m (no functional change)
Merged-In: I4146f684bfcd78b16500829d02ff54590a8b48f5
Change-Id: I0113a7189530c2e57c48058df542057e855bae42
2018-02-13 14:23:30 -05:00
hansson
78d15fd15a Merge "fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log"
am: c0c9f53175

Change-Id: I25f1aad9e04c22e0cd4ffc848a53c30dd740bdac
2018-02-13 16:31:53 +00:00
yuanhuihui
e669ac2520 fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log
There will be the following situations about mApplicationObject:

1) fork app process will invoke ActivityThread.main(),
then set mApplicationObject.

2) fork system_server, don't set mApplicationObject value.

3) using app_process fork process except zygote, will inovke RuntimeInit,
don't set mApplicationObject value。

For example using command as below:
app_process /system/bin com.android.commands.am.Am "$@",

if this process throw uncaught exception,will output FATAL EXCEPTION IN SYSTEM PROCESS log,
it's not in system process but in normal process。

so should add condition: Process.SYSTEM_UID == Process.myUid()

BUG: 72759350
Test: manual

Change-Id: Ie8d769e4149cd9b938577058de871c4f8db9efe5
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
2018-02-13 12:52:38 +00:00
nharold
e736f83caf Merge "Require NETWORK_STACK Permission for IpSec Tunnel Mode"
am: 43699e90f3

Change-Id: I1f286f0215ce88f947775ded0ddfbc8e0cd7bc55
2018-02-10 01:46:00 +00:00
nharold
43699e90f3 Merge "Require NETWORK_STACK Permission for IpSec Tunnel Mode" 2018-02-09 23:36:59 +00:00
tiansiming [田思明]
d5d1718c4a Merge "Modify javadoc for onWindowShown"
am: 2d46e07e48

Change-Id: I126b0bcfbc5d1d10cad7564e7f8c8a7e419b96c6
2018-02-09 06:28:30 +00:00
Treehugger Robot
2d46e07e48 Merge "Modify javadoc for onWindowShown" 2018-02-09 03:50:05 +00:00
Yifan Hong
b901a37a85 Merge "VintfObject: add getTargetFcmVersion"
am: 5a748e5ee2

Change-Id: I902bf93cb06bdbab8aba58e41db8eb71a066dbb6
2018-02-09 00:33:38 +00:00