Commit Graph

333525 Commits

Author SHA1 Message Date
Ivan Lozano
3485c844a0 Merge "Disable integer sanitization in gcIfManyNewRefs." 2017-11-03 03:42:24 +00:00
Treehugger Robot
a7c51a3d7f Merge "Added default home values of CDMA roaming indicator" 2017-11-03 01:13:27 +00:00
Treehugger Robot
e9e3bfe353 Merge "[framework] Compile secondary dex files in isolation" 2017-11-03 01:05:05 +00:00
Jack Yu
166234b1ce Added default home values of CDMA roaming indicator
Some carriers use the standard roaming indicator number
assigment for roaming indication. Added the default home values
suggested by 3GPP2 C.R1001 table 8.1-1.

Test: Manual
bug: 67855275
Change-Id: Ib0a613ad8caba74645930f3e5188999be08b2116
(cherry picked from commit cf4a8b40a2)
2017-11-02 16:58:25 -07:00
Treehugger Robot
eb3bff53f6 Merge "PMSCompilerMapping: Hardcode a value for pm.dexopt.shared" 2017-11-02 21:57:29 +00:00
Ivan Lozano
2ea713530f Disable integer sanitization in gcIfManyNewRefs.
Prevent gcIfManyNewRefs from emitting runtime errors on
integer sanitized builds by disabling unsigned integer overflow
sanitization.

Test: Compiles, device boots.
Bug: 30969751
Change-Id: I90bbf831d03a60b40e047327d633102444058f69
2017-11-02 14:20:06 -07:00
con
5c7de22a06 Merge "Fix StateMachine init/quit race." 2017-11-02 20:05:09 +00:00
Calvin On
f5b9f7b50e Fix StateMachine init/quit race.
The quitNow method places the SM_QUIT_CMD at the front
of the queue. This can cause StateMachine to throw exception
if it has not yet processed the SM_INIT_CMD from start().

Bug: 67370902
Test: make checkbuild
Test: StatMachineTest unittest
Change-Id: I409242845854e70b77ad9b2378b69faed076847c
Merged-In: I7cec7bb91e0447e3c565d33cb7c34ccf59566639
2017-11-02 11:40:47 -07:00
Treehugger Robot
80bb035d4e Merge "Use ScopedPrimitiveArrayRO instead of manually managing Java primitive" 2017-11-02 18:33:18 +00:00
Treehugger Robot
5e5fc34b42 Merge changes from topic "explicit_shared_compile_reason_cherrypick"
* changes:
  Add an explicit reason for the compilation of shared apks
  Fix spelling mistake in dumpsys output
2017-11-02 18:13:54 +00:00
Treehugger Robot
88946d4cf2 Merge "Handle configuration splits when creating the class loader context" 2017-11-02 18:11:02 +00:00
Treehugger Robot
1ad0304e7d Merge "Ensure dexopt is executed only with consistent package data" 2017-11-02 18:10:42 +00:00
Calin Juravle
8a5a708df1 [framework] Compile secondary dex files in isolation
The class loader context adds the overhead of extracting in-memory and
possibly extra verification which is being frowned upon when the loading
happens on the UI thread. Revert the correct fix of compiling secondary
dex files with their loading context until b/64530081 is done.

Partial revert of commit f1ff36f0f9.

(cherry picked from commit 27f9262124)

Test: adb shell cmd package compile -m quicken -f --secondary-dex
com.google.android.gms
Bug: 64530081
Bug: 66984396
Merged-In: Ib2815ce67b224883fe95c28d1424103e56342c6e
Change-Id: Ib2815ce67b224883fe95c28d1424103e56342c6e
2017-11-02 09:37:15 -07:00
Andreas Gampe
e131dac848 PMSCompilerMapping: Hardcode a value for pm.dexopt.shared
This is a temporary hack while we sort out the larger issues.

Test: make & flash
Bug: 68755013
Change-Id: I59caf79027dd8be2fd698606822a20b19c0d942a
2017-11-02 09:35:28 -07:00
Calin Juravle
5e507fad89 Add an explicit reason for the compilation of shared apks
Some devices might find it more beneficial to compile shared apks like gms
or gms modules with quicken rather then speed.

(cherry picked from commit f53201f8c7)

Bug: 65591595
Test: build
Merged-In: I90b79e9f6bc4b4d6b3f5c0b90ab95e8880c4ac9d
Change-Id: I90b79e9f6bc4b4d6b3f5c0b90ab95e8880c4ac9d
2017-11-02 09:32:26 -07:00
Calin Juravle
527a2b205c Fix spelling mistake in dumpsys output
(cherry picked from commit 94837e35e3)

Bug: 65843255
Test: build
Merged-In: Icc748dd14b52641e37b149f51d61a4086e55ed41
Change-Id: Icc748dd14b52641e37b149f51d61a4086e55ed41
2017-11-02 09:30:32 -07:00
Calin Juravle
9aab3b513d Handle configuration splits when creating the class loader context
Configuration splits have no dependencies which can lead to exceptions
when computing their class loader context.

In general, we do not need to compute the class loader context for apks
without code.

This CL addresses the issue by ignoring "code" paths with no actual code.

(cherry picked from commit da09815e2c)

Bug: 65159159
Test: adb install-multiple config_splits
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java

Merged-In: Ida1eb901eecba4a4266de73022f6ee4659367873
Change-Id: Ida1eb901eecba4a4266de73022f6ee4659367873
2017-11-02 09:27:59 -07:00
Calin Juravle
563a5cad66 Ensure dexopt is executed only with consistent package data
The main objects bookkeeping packages (PackageParser.Package and its
corresponding ApplicationInfo) may be updated at different times. This
creates a window where the data stored in the ApplicationInfo is out of
date with respect to the data stored in PackageParser.Package.

During install, the two objects are "synced" during doRename which updates
the package code paths.

This CLs moves the dexopt invocation from the install flow after doRename
to ensure that dexopt logic gets a consistent view of the package.

(cherry picked from commit 4c2b9555b7)

Bug: 64493351

Test: run cts-dev -t android.appsecurity.cts.ClassloaderSplitsTest -m
CtsAppSecurityHostTestCases
      inspect oat files after
adb install-multiple CtsClassloaderSplitApp/CtsClassloaderSplitApp.apk
    CtsClassloaderSplitAppFeatureA/CtsClassloaderSplitAppFeatureA.apk
    CtsClassloaderSplitAppFeatureB/CtsClassloaderSplitAppFeatureB.apk

Merged-In: I9131bcf49eb473a8fdc5eb0032d94080d4e9e94b
Change-Id: I9131bcf49eb473a8fdc5eb0032d94080d4e9e94b
2017-11-02 09:22:28 -07:00
Charles He
dfe472ecae Merge "TokenWatcher: fix bug in repeated calls to acquire()." 2017-11-02 10:36:01 +00:00
Treehugger Robot
762f27c6a2 Merge "Allow equality checking and hash for HIDL interface proxies." 2017-11-02 03:39:42 +00:00
Treehugger Robot
3a16db62ec Merge "Frameworks: Fix idle-background-job flag" 2017-11-02 03:31:30 +00:00
Treehugger Robot
7ef653733f Merge "Fix dexopt dump" 2017-11-02 02:29:50 +00:00
Yifan Hong
73b6c27a6b Allow equality checking and hash for HIDL interface proxies.
IFoo.Proxy.equals() -> HidlSupport.equals() ->
IHwInterface.asBinder().equals() -> HwRemoteBinder.equals().
IFoo.Stub.equals() -> default Object.equals()

Notice that IHwInterface.asBinder() returns mRemote(of type
HwRemoteBinder) for proxies and itself (of type HwBinder) for stubs.
If IFoo.Stub.asBinder() had not return "this", its equals()
should also be overridden.

Bug: 68727931
Test: hidl_test_java

Change-Id: I916983d7bc739747145e2ebb6830226310fd4980
2017-11-01 18:30:04 -07:00
Pengquan Meng
87a336846e Merge "Fix getSimOperator to return mccmnc based on subId" 2017-11-02 01:11:29 +00:00
Calin Juravle
84d9a81c7d Fix dexopt dump
Dexopt dump prints the status of primary oat file instead of secondary.
We cannot get the secondary dex file status without an installd call so
this CL just removes the status line.

(cherry picked from commit cf72222f41)

Bug: 65843255
Test: adb shell dumpsys package dexopt
Merged-In: I76028704267eed68ba8c51f45ce8b54f403cc255
Change-Id: I76028704267eed68ba8c51f45ce8b54f403cc255
2017-11-01 17:20:57 -07:00
Andreas Gampe
c041c33c02 Frameworks: Fix idle-background-job flag
Correctly pass flag to installd.

Bug: 68025088
Test: m
Test: manual test
Change-Id: Ia5b19b1f1375a3c8b0c8e19b1978dcba29c83470
2017-11-01 17:05:53 -07:00
Jordan Liu
c173c93c1c Merge "Added interface to get the decimal digit from hex ICCID." 2017-11-01 23:20:39 +00:00
Hall Liu
f1167ced38 Merge "Add @TestApi for EMBMS APIs needed for CTS" 2017-11-01 22:35:51 +00:00
Treehugger Robot
07fe9042cf Merge "make update-api" 2017-11-01 22:18:39 +00:00
Treehugger Robot
e686fabf42 Merge changes from topic "bgdex2oatd_cherry_pick"
* changes:
  Use dex2oatd when available on debug builds
  Add package use info to dexopt dump
2017-11-01 21:55:02 +00:00
Treehugger Robot
1eb700a545 Merge changes Ibf9e7b9e,I8031590c
* changes:
  Record usage information per split
  Use PackageUseInfo in DexOptimizer
2017-11-01 21:53:50 +00:00
Treehugger Robot
fe177b78d7 Merge changes Ie8b78c7c,If02081d2
* changes:
  Use the class loader context when optimizing secondary dex files
  Add DexClassLoader to the list of supported class loaders
2017-11-01 21:53:12 +00:00
Treehugger Robot
deee2e12de Merge changes I7bd99fc0,I329bc929
* changes:
  Save PackageDexUsage on PMS shutdown
  Record dex files users in the dex-usage list
2017-11-01 21:52:34 +00:00
David Sehr
11c22e3ce0 Use dex2oatd when available on debug builds
Enable use of dex2oatd for background dexopt service for eng and
userdebug builds.  This allows us to have more extensive checking
on dogfood devices.

(cherry picked from commit 2118ec4d7e)

Bug: 68025088
Test: runtest -x services/tests/servicetests/src/com/android/server/pm/dex/DexoptOptionsTests.java
Merged-In: I292ac7f355350edc8cf06f417740226ee6bac65d
Change-Id: I292ac7f355350edc8cf06f417740226ee6bac65d
2017-11-01 13:07:35 -07:00
Calin Juravle
943d1e7654 Record usage information per split
Increase the granularity of usage information to store data on each split
separately.

Now, splits get their own useByOtherApps flag and can be compiled
speed-profile when only the primary apk is loaded by other apps.

(cherry picked from commit 52a452cf68)

Bug: 64124380
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/*

Merged-In: Ibf9e7b9e67db9c6f0f45dc695bce8fbeb7be20ae
Change-Id: Ibf9e7b9e67db9c6f0f45dc695bce8fbeb7be20ae
2017-11-01 13:07:35 -07:00
Calin Juravle
b130d470a2 Add package use info to dexopt dump
(cherry picked from commit 41a57a65b2)

Bug: 64153885
Test: adb shell dumpsys package dexopt
Merged-In: I57768076de821980b1de84d5fe44ab642ceebeba
Change-Id: I57768076de821980b1de84d5fe44ab642ceebeba
2017-11-01 13:07:35 -07:00
Calin Juravle
fad6dc10b0 Use PackageUseInfo in DexOptimizer
Pass the PackageUseInfo directly to DexOptimizer and use it to detect if a
package is used by other apps. Move the usage checks closer to dexopt so
that they can be easily adapted when we add usage info for each of the
app's code paths separately.

This is a refactoring CLs to reduce the size and complexity of the
upcoming CLs which record the usage info for each of the application
splits.

(cherry picked from commit 3b74c41776)

Bug: 64124380
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/*

Merged-In: I8031590cdaff81ab1792ca19baddb6cb36dc021d
Change-Id: I8031590cdaff81ab1792ca19baddb6cb36dc021d
2017-11-01 13:07:35 -07:00
Calin Juravle
a18e992770 Use the class loader context when optimizing secondary dex files
Record the class loader context for secondary dex loads and pass it to
dexopt during compilation.

The class loader context is passed from libcore every time a
BaseDexClassLoader is created and its recorded in the package dex usage
file.

Note that the context may be:
- unknown: if the dex file was not use after the the upgrade and its
context was not yet updated
- unsupported: if any of the class loaders from the loading context is
unsupported (only PathClassLoader and DelegateLastClassLoader are
supported).
- variable: if it changes over time, form one run to another.

In all the above cases the old compilation behavior is preserved for
now.(i.e. the dex file with be compiled with SKIP_SHARED_LIBRARY_CHECK)

(cherry picked from commit f1ff36f0f9)

Bug: 38138251
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/
      adb shell cmd package compile -f -m quicken ^Csecondary-dex
com.google.android.gms

(cherry picked from commit 3bec94d78b)

Merged-In: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
Change-Id: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
2017-11-01 13:07:34 -07:00
Calin Juravle
c1fe2ce849 Save PackageDexUsage on PMS shutdown
This ensures that we persist the in memory data between restarts (makes
testing much easier).

(cherry picked from commit 14876bd21a)

Bug: 64151900
Test: Manual, flash + restart + check the dex usage file

(cherry picked from commit 6ef7f0b8c6)

Merged-In: I7bd99fc03c3a40cbbf5d615886f857b5f84f438c
Change-Id: I7bd99fc03c3a40cbbf5d615886f857b5f84f438c
2017-11-01 13:07:34 -07:00
Calin Juravle
916c7114ae Add DexClassLoader to the list of supported class loaders
DexClassLoader have the same behavior as PathClassLoader and is still in
use by apps. Add it to the list of supported class loaders so that it can be
recognized during secondary dex file loads.

(cherry picked from commit f8c14e920e)

Bug: 38138251
Bug: 36044779

Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java

(cherry picked from commit d08b3156e8)

Merged-In: If02081d29f4d8ac917dacd877eb75985ea3895a9
Change-Id: If02081d29f4d8ac917dacd877eb75985ea3895a9
2017-11-01 13:07:34 -07:00
Calin Juravle
09844b5426 Record dex files users in the dex-usage list
Add the users of the dex files in the package-dex-usage.list. This will
provide more data on why a package is marked as shared and not optimized
using profiles.

(cherry picked from commit 535a4753e3)

Test: runtest -x .../DexManagerTests.java
      users of the dex files are recorded in package-dex-usage.list

Bug: 63778376
Merged-In: I329bc929b17fa0afe1531f3e6879f6160157a787
Change-Id: I329bc929b17fa0afe1531f3e6879f6160157a787
2017-11-01 13:07:34 -07:00
Treehugger Robot
945b1dc43e Merge "[framework] Add check that classpath is up to date to getDexOptNeeded" 2017-11-01 19:54:44 +00:00
Jordan Liu
973005e208 Merge "Display the number of LTE signal bars is based on RSRP only"
am: 896dd7cdb7

Change-Id: Ic2bc88b627ba2110e16103f027843c7b90131e31
2017-11-01 18:00:31 +00:00
Narayan Kamath
47659c3351 Merge "Debug: Remove obsolete InstructionCount code."
am: f5a8edeaf0

Change-Id: Ia070e4dee54ac652545b174881defca2abbfd5df
2017-11-01 17:50:16 +00:00
Jordan Liu
896dd7cdb7 Merge "Display the number of LTE signal bars is based on RSRP only" 2017-11-01 17:47:58 +00:00
Narayan Kamath
cfb01b3f3f Merge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive"
am: dc616ab11c

Change-Id: I6b4e8042eb9c657950157dcc49121b24efc196c1
2017-11-01 17:39:12 +00:00
Narayan Kamath
f5a8edeaf0 Merge "Debug: Remove obsolete InstructionCount code." 2017-11-01 17:27:40 +00:00
Treehugger Robot
dc616ab11c Merge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive" 2017-11-01 17:23:27 +00:00
Tobias Thierer
ae71c4f23c make update-api
This CL almost exactly reverts http://r.android.com/471377 .

current.txt and friends were not reflecting the latest AOSP API,
ie. "make update-api" was not a no-op like it's supposed to be.

Apart from IpSecManager.SecurityParameterIndex.finalize(), this
seems to mostly revert http://r.android.com/471377 which suggests
that the tooling change that necessitated that CL was probably
reverted without "make update-api" being run on AOSP.

No further investigation was made for what CL(s) caused this or
whether any of this API change is undesired.

Test: Treehugger
Test: make update-api

Change-Id: I5b846627e38c47abb534def97f0cab9d28b1288c
2017-11-01 17:21:59 +00:00
Andreas Huber
2631df7c10 Use ScopedPrimitiveArrayRO instead of manually managing Java primitive
arrays.

Bug: 68654583
Test: hidl_test_java
Change-Id: I91e121ce593c5a9c95891b58000a36a34a6b6b28
2017-11-01 10:19:44 -07:00