OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge changes Ie8b78c7c,If02081d2
Treehugger Robot [Wed, 1 Nov 2017 21:53:12 +0000 (21:53 +0000)]
Merge changes Ie8b78c7c,If02081d2

* changes:
  Use the class loader context when optimizing secondary dex files
  Add DexClassLoader to the list of supported class loaders

6 years agoMerge changes I7bd99fc0,I329bc929
Treehugger Robot [Wed, 1 Nov 2017 21:52:34 +0000 (21:52 +0000)]
Merge changes I7bd99fc0,I329bc929

* changes:
  Save PackageDexUsage on PMS shutdown
  Record dex files users in the dex-usage list

6 years agoUse the class loader context when optimizing secondary dex files
Calin Juravle [Sat, 22 Jul 2017 19:33:41 +0000 (12:33 -0700)]
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 f1ff36f0f99ebb41d0c7e0f3248506a56998fa3f)

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 3bec94d78b0a66c4fa5cebd851ea33bcc51916b0)

Merged-In: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
Change-Id: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8

6 years agoSave PackageDexUsage on PMS shutdown
Calin Juravle [Fri, 28 Jul 2017 23:13:35 +0000 (16:13 -0700)]
Save PackageDexUsage on PMS shutdown

This ensures that we persist the in memory data between restarts (makes
testing much easier).

(cherry picked from commit 14876bd21a4a4e7d78d36f910493269f14b2e905)

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

(cherry picked from commit 6ef7f0b8c6e72e849a220513425a9fd37804af90)

Merged-In: I7bd99fc03c3a40cbbf5d615886f857b5f84f438c
Change-Id: I7bd99fc03c3a40cbbf5d615886f857b5f84f438c

6 years agoAdd DexClassLoader to the list of supported class loaders
Calin Juravle [Tue, 25 Jul 2017 00:56:51 +0000 (17:56 -0700)]
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 f8c14e920ea2911ab7657de9bc3e0a834cd7e8b9)

Bug: 38138251
Bug: 36044779

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

(cherry picked from commit d08b3156e8e908bae63dfd8f47c8e6f7ba98967f)

Merged-In: If02081d29f4d8ac917dacd877eb75985ea3895a9
Change-Id: If02081d29f4d8ac917dacd877eb75985ea3895a9

6 years agoRecord dex files users in the dex-usage list
Calin Juravle [Sat, 4 Feb 2017 00:55:49 +0000 (16:55 -0800)]
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 535a4753e313bdc2ae3e8be9f50606b82edcce0c)

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

6 years agoMerge "[framework] Add check that classpath is up to date to getDexOptNeeded"
Treehugger Robot [Wed, 1 Nov 2017 19:54:44 +0000 (19:54 +0000)]
Merge "[framework] Add check that classpath is up to date to getDexOptNeeded"

6 years agoMerge "Display the number of LTE signal bars is based on RSRP only"
Jordan Liu [Wed, 1 Nov 2017 18:00:31 +0000 (18:00 +0000)]
Merge "Display the number of LTE signal bars is based on RSRP only"
am: 896dd7cdb7

Change-Id: Ic2bc88b627ba2110e16103f027843c7b90131e31

6 years agoMerge "Debug: Remove obsolete InstructionCount code."
Narayan Kamath [Wed, 1 Nov 2017 17:50:16 +0000 (17:50 +0000)]
Merge "Debug: Remove obsolete InstructionCount code."
am: f5a8edeaf0

Change-Id: Ia070e4dee54ac652545b174881defca2abbfd5df

6 years agoMerge "Display the number of LTE signal bars is based on RSRP only"
Jordan Liu [Wed, 1 Nov 2017 17:47:58 +0000 (17:47 +0000)]
Merge "Display the number of LTE signal bars is based on RSRP only"

6 years agoMerge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive"
Narayan Kamath [Wed, 1 Nov 2017 17:39:12 +0000 (17:39 +0000)]
Merge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive"
am: dc616ab11c

Change-Id: I6b4e8042eb9c657950157dcc49121b24efc196c1

6 years agoMerge "Debug: Remove obsolete InstructionCount code."
Narayan Kamath [Wed, 1 Nov 2017 17:27:40 +0000 (17:27 +0000)]
Merge "Debug: Remove obsolete InstructionCount code."

6 years agoMerge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive"
Treehugger Robot [Wed, 1 Nov 2017 17:23:27 +0000 (17:23 +0000)]
Merge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive"

6 years agoMerge "Federate platform docs against support library API file" into stage-aosp-master
TreeHugger Robot [Wed, 1 Nov 2017 16:38:14 +0000 (16:38 +0000)]
Merge "Federate platform docs against support library API file" into stage-aosp-master

6 years ago[framework] Add check that classpath is up to date to getDexOptNeeded
Calin Juravle [Tue, 12 Sep 2017 07:58:33 +0000 (00:58 -0700)]
[framework] Add check that classpath is up to date to getDexOptNeeded

(cherry picked from commit 576e6c0cbb0231d6650dee70319d7443c601fa1b)

Bug: 62269291
Test: manual, install new apk/splits and force updates.
I used com.android.cts.classloadersplitapp as the test app.
1) install-multiple split apks with dependency: Base -> A -> B
2) push an update for A
3) adb shell cmd package compile
4) check that A & B got recompiled and that B was because a class loader
context mismatch (e.g. "ClassLoaderContext classpath element checksum
mismatch for position 1.").

Merged-In: I4092562966413dc8976c9d41b26a90bbb9e37e1e
Change-Id: I4092562966413dc8976c9d41b26a90bbb9e37e1e

6 years agoPMSCompilerMapping: Hardcode a value for pm.dexopt.inactive
Narayan Kamath [Wed, 1 Nov 2017 15:01:48 +0000 (15:01 +0000)]
PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive

This is a temporary hack while we sort out the larger issues.

Test: make & flash
Bug: 68755013

Change-Id: I39f2e7f2e39f4d886ea5fa3d91648404347485ef

6 years agoDebug: Remove obsolete InstructionCount code.
Narayan Kamath [Tue, 30 May 2017 17:04:36 +0000 (18:04 +0100)]
Debug: Remove obsolete InstructionCount code.

Support for instruction counting has been removed from ART
and the VMDebug APIs in question throw UnsupportedOperationException
unconditionally.

Test: make

Change-Id: Ibcaa160f755a5708bc6fbef3a783acfc26f0ba90

6 years agoDisplay the number of LTE signal bars is based on RSRP only
Wenting Xiong [Wed, 18 Oct 2017 06:05:49 +0000 (15:05 +0900)]
Display the number of LTE signal bars is based on RSRP only

Some carriers require to display the number of LTE signal bars is
based on RSRP only.
This carrier config is used to control it.

Test: manual - Checked that the number of LTE signal bars display
which base on RSRP only can be controlled by carrier config.
Bug: 67831028

Change-Id: I077ef253f34fc503a591dcb3f01d60ab6573f298

6 years agoMerge "Change the location of current profiles for secondary dex files"
Calin Juravle [Wed, 1 Nov 2017 02:48:59 +0000 (02:48 +0000)]
Merge "Change the location of current profiles for secondary dex files"
am: 80c3c70930

Change-Id: I5ece1daa5796915c0dc6d19e791a0e81c311feb7

6 years agoMerge changes Ia0623d38,Iaabd5d8b,I579bb12f,Ia9930edd
Calin Juravle [Wed, 1 Nov 2017 02:43:04 +0000 (02:43 +0000)]
Merge changes Ia0623d38,Iaabd5d8b,I579bb12f,Ia9930edd
am: 2b1357fe90

Change-Id: Iee60be352c2e742fdd1d3f7ce15e58e455ac1ead

6 years agoMerge "Reduce app size by downgrading inactive apps"
Shubham Ajmera [Wed, 1 Nov 2017 02:31:46 +0000 (02:31 +0000)]
Merge "Reduce app size by downgrading inactive apps"
am: 8bcd66d35f

Change-Id: I4bfba3f7eb16442a7a69466cf72b22198acde6c4

6 years agoMerge "Change the location of current profiles for secondary dex files"
Treehugger Robot [Wed, 1 Nov 2017 02:22:48 +0000 (02:22 +0000)]
Merge "Change the location of current profiles for secondary dex files"

6 years agoMerge changes Ia0623d38,Iaabd5d8b,I579bb12f,Ia9930edd
Treehugger Robot [Wed, 1 Nov 2017 02:21:42 +0000 (02:21 +0000)]
Merge changes Ia0623d38,Iaabd5d8b,I579bb12f,Ia9930edd

* changes:
  Fix splits class loader context for non dependant splits
  Encode the entire class loader context for dex2oat
  Add a command line option to optimize individual splits
  Refactor the arguments passed to dexopt invocations

6 years agoMerge "Reduce app size by downgrading inactive apps"
Treehugger Robot [Wed, 1 Nov 2017 02:19:57 +0000 (02:19 +0000)]
Merge "Reduce app size by downgrading inactive apps"

6 years agoMerge "Adds APIs to extract/import arrays of primitive Java types out of/into a HwBlob."
Andreas Huber [Tue, 31 Oct 2017 23:08:26 +0000 (23:08 +0000)]
Merge "Adds APIs to extract/import arrays of primitive Java types out of/into a HwBlob."
am: a546c38130

Change-Id: I969ec51ed8fc6c7e11e7cfe7c4e1a3d6aa5802de

6 years agoMerge "Adds APIs to extract/import arrays of primitive Java types out of/into a HwBlob."
Treehugger Robot [Tue, 31 Oct 2017 22:59:34 +0000 (22:59 +0000)]
Merge "Adds APIs to extract/import arrays of primitive Java types out of/into a HwBlob."

6 years agoMerge changes I2ef3737f,If080281f
Mathieu Chartier [Tue, 31 Oct 2017 22:31:32 +0000 (22:31 +0000)]
Merge changes I2ef3737f,If080281f
am: bb3de35e5f

Change-Id: Ibe1af669d200057f1d91142299055694b55b5660

6 years agoChange the location of current profiles for secondary dex files
Calin Juravle [Thu, 27 Jul 2017 23:05:25 +0000 (16:05 -0700)]
Change the location of current profiles for secondary dex files

Move the secondary dex profiles inside the oat folder. This makes it
easier to clean them up and "protects" them against apps which may delete
unknown files from their directories (e.g. search).

(cherry picked from commit eec18f41e2ecbdf95dab6584e72a64f827bb89f7)

Bug: 62336157
Test: Manual: boot the device, use the app, check the profiles are
collected in the new location.

Merged-In: I2fbce7591589d162775e4652b12e4698083adcff
Change-Id: I2fbce7591589d162775e4652b12e4698083adcff

6 years agoMerge "Change storage migration to use quota APIs."
Jeff Sharkey [Tue, 31 Oct 2017 22:22:21 +0000 (22:22 +0000)]
Merge "Change storage migration to use quota APIs."
am: 0fccecc6a0

Change-Id: I15f1aa9f01b5cef928b8b68e2568bf67e1e387b9

6 years agoMerge "Reland "HIDL Java getService now the same as C++.""
Steven Moreland [Tue, 31 Oct 2017 22:16:18 +0000 (22:16 +0000)]
Merge "Reland "HIDL Java getService now the same as C++.""
am: c1616f6820

Change-Id: I5d53c369ae9cb1bc963b06e734cf9c47ad61265f

6 years agoFix splits class loader context for non dependant splits
Calin Juravle [Fri, 14 Jul 2017 23:40:07 +0000 (16:40 -0700)]
Fix splits class loader context for non dependant splits

If the app doesn't request for splits to be loaded in isolation or does
not declare inter-split dependencies, then all the splits are loaded in
the base apk class loader (in the order of they are defined).

Fix the class loader context passed to dex2oat to reflect the runtime
loading logic.

(cherry picked from commit 305aeea38f96f0b94ad4be5cb979dd9cf98cf7df)

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

Merged-In: Ia0623d38883ae244fd16c0afb053fef016bf260a
Change-Id: Ia0623d38883ae244fd16c0afb053fef016bf260a

6 years agoEncode the entire class loader context for dex2oat
Calin Juravle [Thu, 13 Jul 2017 01:52:49 +0000 (18:52 -0700)]
Encode the entire class loader context for dex2oat

Until now the split dependencies were passed as a flatten list to dex2oat.
In the presence of DelegateLastClassLoaders this is no longer enough to
ensure the correctness of the compilation.

This CL encodes the split dependencies together with their declared class
loader in a format accepted by dex2oat.

(partially cherry picked from commit 19da1cf72e8c448743a8c27ac6d73424ae42c7ec)

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

Merged-In: Iaabd5d8bd5e6d027a8de5a408777fd517063d9f1
Change-Id: Iaabd5d8bd5e6d027a8de5a408777fd517063d9f1

6 years agoReduce app size by downgrading inactive apps
Shubham Ajmera [Thu, 25 May 2017 00:46:36 +0000 (17:46 -0700)]
Reduce app size by downgrading inactive apps

This will trigger when the device will have low space.
Active apps here refer to the apps which were either active
in foregrond or in background and also used by other packages.
Apps which are inactive for X days downgraded to verify. X is
determined by sysprop pm.dexopt.unopt_after_inactive_days

If the system properties are not set, no effect will take place.

The above operations will take place in background dexopt service.
If user uses the app again, it will again be speed-compiled when
background dexopt service starts next time.

(cherry picked from commit 246dccf9327631597767afe418ce43ae6d07d102)

Bug: 36598475
Test: manual
* Remove the check in the code that allows downgrade only when
  the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
  in dalvik_cache

Merged-In: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
Change-Id: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51

6 years agoAdd a command line option to optimize individual splits
Calin Juravle [Mon, 17 Jul 2017 22:23:21 +0000 (15:23 -0700)]
Add a command line option to optimize individual splits

The new option is "--split SplitName" and applies to "adb shell cmd
package compile" command.

Usage example:
adb shell cmd package compile -m speed --split split_feature_a.apk
com.android.cts.classloadersplitapp

(cherry picked from commit b6f844d28cc7a7bf2b477a904263fcbe9b26d2c4)

Bug: 38138251

Test: adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitAppFeatureA.apk CtsClassloaderSplitAppFeatureB.apk
      adb shell cmd package compile -m speed --split split_feature_a.apk
com.android.cts.classloadersplitapp
      check the status of split_feature_a
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java

Merged-In: I579bb12fa6699f99cd3824f185bd9352fb8007c5
Change-Id: I579bb12fa6699f99cd3824f185bd9352fb8007c5

6 years agoRefactor the arguments passed to dexopt invocations
Calin Juravle [Mon, 17 Jul 2017 22:12:01 +0000 (15:12 -0700)]
Refactor the arguments passed to dexopt invocations

Wrap the arguments passed to the various performDexopt calls into the
DexoptOptions object.

This will make adding extra arguments (like compile only a split) much
easier and avoid extending quite a few internal methods.

(cherry picked from commit 1d0e83d2cee794ba576d573119e826905a4422cd)

Bug: 38138251
Test: adb shell cmd package compile ....
      adb shell cmd package bg-dexopt-job ...
      install new apps and check that they compiled
      runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptOptionsTests.java

Merged-In: Ia9930edd2dceb7535d6168eceb8e3199c82b6306
Change-Id: Ia9930edd2dceb7535d6168eceb8e3199c82b6306

6 years agoMerge changes I2ef3737f,If080281f
Treehugger Robot [Tue, 31 Oct 2017 21:48:30 +0000 (21:48 +0000)]
Merge changes I2ef3737f,If080281f

* changes:
  Add property for system server compiler filter
  Compile secondary dex at boot after OTA

6 years agoMerge "Change storage migration to use quota APIs."
Treehugger Robot [Tue, 31 Oct 2017 21:47:19 +0000 (21:47 +0000)]
Merge "Change storage migration to use quota APIs."

6 years agoAdds APIs to extract/import arrays of primitive Java types out of/into a HwBlob.
Andreas Huber [Tue, 31 Oct 2017 18:51:50 +0000 (11:51 -0700)]
Adds APIs to extract/import arrays of primitive Java types out of/into a HwBlob.

Bug: 68654583
Test: hidl_test_java
Change-Id: I6ec799b423396f9212e4c221e41791adc9086410

6 years agoMerge "Reland "HIDL Java getService now the same as C++.""
Treehugger Robot [Tue, 31 Oct 2017 21:15:31 +0000 (21:15 +0000)]
Merge "Reland "HIDL Java getService now the same as C++.""

6 years agoReland "HIDL Java getService now the same as C++."
Steven Moreland [Wed, 25 Oct 2017 04:50:46 +0000 (04:50 +0000)]
Reland "HIDL Java getService now the same as C++."

Add getService(retry) for Java for C++ feature parity.

Test: hidl_test_java, boot
Bug: 67981006

Change-Id: I4e6711f8c2d7ad0ef6994ce9c480118320e1bde8

6 years agoAdd property for system server compiler filter
Mathieu Chartier [Fri, 16 Jun 2017 02:09:38 +0000 (19:09 -0700)]
Add property for system server compiler filter

The property is dalvik.vm.systemservercompilerfilter, this changes
if dexopt is needed.

(cherry picked from commit 5e07a0d9cacb1bf943f4617b1edcb930e1578dad)

Bug: 62356545
Test: adb shell setprop dalvik.vm.systemservercompilerfilter quicken
Test: adb shell stop && adb shell start

Merged-In: I2ef3737f24816a4cb75e718abf274a891eb9fda1
Change-Id: I2ef3737f24816a4cb75e718abf274a891eb9fda1

6 years agoCompile secondary dex at boot after OTA
Shubham Ajmera [Fri, 9 Jun 2017 22:40:58 +0000 (15:40 -0700)]
Compile secondary dex at boot after OTA

(cherry picked from commit ce54397368dc98182d7b4eb2ff3c142bbd87e39d)

Bug: 38413085
Test: build successful
Merged-In: If080281fb3147fea625bcafce91167e8c1439736
Change-Id: If080281fb3147fea625bcafce91167e8c1439736

6 years agoChange storage migration to use quota APIs.
Jeff Sharkey [Thu, 6 Jul 2017 17:29:06 +0000 (11:29 -0600)]
Change storage migration to use quota APIs.

New quota APIs are much faster than trying to measure manually, and
removing this last user of calculateDirectorySize() means we can
remove it once and for all.

(cherry picked from commit c8b29ac6f0340bd0c3c9eb388c4be2d446de9a59)

Bug: 36056324
Test: builds, boots
Merged-In: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8
Change-Id: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8

6 years agoFederate platform docs against support library API file
Alan Viverette [Wed, 5 Apr 2017 14:21:58 +0000 (10:21 -0400)]
Federate platform docs against support library API file

Bug: 36959367
Test: make docs
Change-Id: I7c6dffed25566c2bb1183aba60103c437888ba21

6 years agoMerge "Put libcore generated source files into LOCAL_INTERMEDIATES_SOURCES"
Colin Cross [Tue, 31 Oct 2017 15:33:53 +0000 (15:33 +0000)]
Merge "Put libcore generated source files into LOCAL_INTERMEDIATES_SOURCES"
am: 834be81189

Change-Id: Iec1547cc91bf3cb08a47194e91838eb77b4126d7

6 years agoMerge "Put libcore generated source files into LOCAL_INTERMEDIATES_SOURCES"
Treehugger Robot [Tue, 31 Oct 2017 15:24:11 +0000 (15:24 +0000)]
Merge "Put libcore generated source files into LOCAL_INTERMEDIATES_SOURCES"

6 years agoMerge "OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com"
Tobias Thierer [Tue, 31 Oct 2017 13:41:34 +0000 (13:41 +0000)]
Merge "OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com"
am: b519569eb3

Change-Id: Ib9099673a4b643b10f38a0c94ddea49949f796eb

6 years agoMerge "OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com"
Treehugger Robot [Tue, 31 Oct 2017 13:26:23 +0000 (13:26 +0000)]
Merge "OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com"

6 years agoMerge "Fix Robolectric Bluetooth tests"
Hansong Zhang [Tue, 31 Oct 2017 02:40:45 +0000 (02:40 +0000)]
Merge "Fix Robolectric Bluetooth tests"
am: 01c9c0e4ba

Change-Id: I7987ddaa520c202a15af03bf0791c39a1720d3b3

6 years agoMerge "Fix Robolectric Bluetooth tests"
Treehugger Robot [Tue, 31 Oct 2017 02:25:31 +0000 (02:25 +0000)]
Merge "Fix Robolectric Bluetooth tests"

6 years agoFix Robolectric Bluetooth tests
Hansong Zhang [Mon, 30 Oct 2017 23:38:16 +0000 (16:38 -0700)]
Fix Robolectric Bluetooth tests

The Bluetooth HID profile name BluetoothInputDevice is recently changed
to BluetoothHidHost, but it is not updated in the SDK for Robolectric
tests, and it causes problems with SettingsLib tests. Thus, we need to
replace the HID profile use case with PAN. This change will not
influence the test coverage.

Test: make RunSettingsLibRoboTests
Bug: 68213274
Change-Id: If30ef0e82252d8f7229815b80e403ae63ab10643

6 years agoOWNERS: Prefer Jeff Sharkey's @android.com account over @google.com
Tobias Thierer [Mon, 30 Oct 2017 17:52:00 +0000 (17:52 +0000)]
OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com

He prefers to use his @android.com account.

Test: Treehugger
Bug: 63673347
Exempt-From-Owner-Approval: Allow @android.com to approve this CL :)

Change-Id: Ie80cc7864de7b91ae44ad57f0bae9b859d034803

6 years agoMerge "Track moving of OkHttp facade API to new package."
Tobias Thierer [Mon, 30 Oct 2017 17:51:28 +0000 (17:51 +0000)]
Merge "Track moving of OkHttp facade API to new package."
am: 45183fc5a7

Change-Id: Ied0bf8a62be2dd2038adf3de2251419bf5f3e964

6 years agoMerge "Track moving of OkHttp facade API to new package."
Tobias Thierer [Mon, 30 Oct 2017 17:40:36 +0000 (17:40 +0000)]
Merge "Track moving of OkHttp facade API to new package."

6 years agoTrack moving of OkHttp facade API to new package.
Tobias Thierer [Tue, 24 Oct 2017 23:58:29 +0000 (00:58 +0100)]
Track moving of OkHttp facade API to new package.

Another CL in this topic moves the classes from
  libcore.net.http
to
  com.squareup.okhttp.internalandroidapi.
In jarjar'ed build targets, this becomes
  com.android.okhttp.internalandroidapi.

This facade constitutes the API via which non-libcore parts
of the Android platform (currently framework) may access
OkHttp. It's moving because libcore.net.http is already
part of libcore, and the overlap of packages is problematic
for builds with EXPERIMENTAL_USE_OPENJDK9 set to true.

Bug: 68220880
Test: Treehugger
Change-Id: Ia79966563cc0b5ab0923d54c21e54b6192d8c990
Exempt-From-Owner-Approval: Jeff Sharkey is an owner, but only one of his accounts is listed as an owner (@android.com vs. @google.com)

6 years agoMerge "Quick Settings: Avoid expand indicators shortly showing on edit"
Adrian DC [Mon, 30 Oct 2017 15:42:14 +0000 (15:42 +0000)]
Merge "Quick Settings: Avoid expand indicators shortly showing on edit"
am: 47c83a5f9d

Change-Id: Id07c6a9413fb3f647d8ead5a77012800ce5b1bc8

6 years agoMerge "Quick Settings: Avoid expand indicators shortly showing on edit"
Treehugger Robot [Mon, 30 Oct 2017 15:25:27 +0000 (15:25 +0000)]
Merge "Quick Settings: Avoid expand indicators shortly showing on edit"

6 years agoMerge "Define OWNERS for permission grant changes."
Jeff Sharkey [Mon, 30 Oct 2017 03:11:43 +0000 (03:11 +0000)]
Merge "Define OWNERS for permission grant changes."
am: 8d2a5bd42a

Change-Id: Ib91c1ecc3d673ba103f966008609d2444107eb7e

6 years agoMerge "Define OWNERS for permission grant changes."
Treehugger Robot [Mon, 30 Oct 2017 03:00:55 +0000 (03:00 +0000)]
Merge "Define OWNERS for permission grant changes."

6 years agoDefine OWNERS for permission grant changes.
Jeff Sharkey [Fri, 27 Oct 2017 18:13:37 +0000 (12:13 -0600)]
Define OWNERS for permission grant changes.

Permission grant changes need explicit approval from product and
SWE leadership to ensure that CTS/CDD requirements are met.

Change-Id: I0a84712b5c5b4e11e72bf5921b72ef6a47e7fdc1

6 years agoMerge "Add support for send Message with messaging options"
Mengjun Leng [Sun, 29 Oct 2017 17:58:43 +0000 (17:58 +0000)]
Merge "Add support for send Message with messaging options"
am: 1400db6748

Change-Id: I29ffbb64c35214761b7f6921212920cf8ffc8599

6 years agoMerge "Add support for send Message with messaging options"
Treehugger Robot [Sun, 29 Oct 2017 17:48:44 +0000 (17:48 +0000)]
Merge "Add support for send Message with messaging options"

6 years agoQuick Settings: Avoid expand indicators shortly showing on edit
Adrian DC [Tue, 24 Oct 2017 19:17:03 +0000 (21:17 +0200)]
Quick Settings: Avoid expand indicators shortly showing on edit

 * Upon entering of the Quick Settings edit view, during
    the animation, all the expand indicators are rarely
    visible for a short period of time until hidden

 * To avoid this visual glitch, hide the expand_indicator
    by default and let the code show it when necessary
    instead of hiding it for most cases

Change-Id: Ia14d9a8d63178ccb54fbcb969ddf51f06c88f35c
Signed-off-by: Adrian DC <radian.dc@gmail.com>
6 years agoMerge "EMBMS - Add TestApi and provide service override"
Hall Liu [Fri, 27 Oct 2017 23:32:58 +0000 (23:32 +0000)]
Merge "EMBMS - Add TestApi and provide service override"
am: 1fab41e771

Change-Id: I5c44393e98c432b3c7a28c7b5b1906aa80f62372

6 years agoMerge "EMBMS - Add TestApi and provide service override"
Hall Liu [Fri, 27 Oct 2017 23:19:29 +0000 (23:19 +0000)]
Merge "EMBMS - Add TestApi and provide service override"

6 years agoMerge "Prevent INTERACT_ACROSS_USERS exception in DefaultDialerManager."
Tyler Gunn [Fri, 27 Oct 2017 21:37:34 +0000 (21:37 +0000)]
Merge "Prevent INTERACT_ACROSS_USERS exception in DefaultDialerManager."
am: 6d0f1eff8b

Change-Id: I55e7f4684f8160f70548e662cd030fce565b16a9

6 years agoMerge "Enable HID Device Profile Service (2/2)"
Hansong Zhang [Fri, 27 Oct 2017 21:27:03 +0000 (21:27 +0000)]
Merge "Enable HID Device Profile Service (2/2)"
am: 7e3fbd59d1

Change-Id: I993b08e37f0ebcc7bca0b2b536348c41dd548861

6 years agoMerge "Handle alternate status values."
Tyler Gunn [Fri, 27 Oct 2017 21:13:30 +0000 (21:13 +0000)]
Merge "Handle alternate status values."
am: b728e56959

Change-Id: I1c82dd103b03eecba025a7638e06906699429c74

6 years agoMerge "Prevent INTERACT_ACROSS_USERS exception in DefaultDialerManager."
Treehugger Robot [Fri, 27 Oct 2017 21:12:24 +0000 (21:12 +0000)]
Merge "Prevent INTERACT_ACROSS_USERS exception in DefaultDialerManager."

6 years agoMerge "Enable HID Device Profile Service (2/2)"
Treehugger Robot [Fri, 27 Oct 2017 21:06:44 +0000 (21:06 +0000)]
Merge "Enable HID Device Profile Service (2/2)"

6 years agoMerge "Handle alternate status values."
Treehugger Robot [Fri, 27 Oct 2017 20:55:53 +0000 (20:55 +0000)]
Merge "Handle alternate status values."

6 years agoPrevent INTERACT_ACROSS_USERS exception in DefaultDialerManager.
Tyler Gunn [Fri, 1 Sep 2017 22:17:05 +0000 (15:17 -0700)]
Prevent INTERACT_ACROSS_USERS exception in DefaultDialerManager.

When TelecomManager methods perform a read phonestate check from a work
profile user, it is possible to get an INTERACT_ACROSS_USERS exception.
This is due to the fact that the filterByIntent method was not calling
queryIntentActivitiesAsUser.

Test: Manual
Bug: 31304557
Merged-In: I6bc7419ba260050281d83e33f7f328ec5ccb3cd8
Change-Id: I2a1869162e5a52aed986a99cc378a6c630af4a70

6 years agoPut libcore generated source files into LOCAL_INTERMEDIATES_SOURCES
Colin Cross [Fri, 27 Oct 2017 17:46:53 +0000 (10:46 -0700)]
Put libcore generated source files into LOCAL_INTERMEDIATES_SOURCES

LOCAL_SRC_FILES is expected to be a list of files relative to the
Android.mk files.  If OUT_DIR is absolute then adding generated
files to the list produces bad paths when $(LOCAL_PATH)/ is prepended
to it.  Put libcore's generated sources into
LOCAL_INTERMEDIATE_SOURCES instead.

Bug: 64930165
Bug: 68375156
Test: m checkbuild
Change-Id: I4b36fd192570ea0cd52d8537a16c078c726d97fd

6 years agoHandle alternate status values.
Tyler Gunn [Fri, 25 Aug 2017 22:01:00 +0000 (15:01 -0700)]
Handle alternate status values.

Some carriers use sendrecv to indicate a call in a conference is active,
and sendonly to indicate that the remote party has held the call.
Adding support for these status values.

This ensures that remotely held calls for these carriers are set to held.

Test: Manual
Bug: 33272103
Merged-In: Ie386bdb4c77df1305d80f604f48174794c3ee0c1
Change-Id: I4a950c4e143d5ac396b30569dbda0b1cf4e92a3e

6 years agoMerge "Ensure CallId is not null when connection creation is complete."
Tyler Gunn [Fri, 27 Oct 2017 19:26:07 +0000 (19:26 +0000)]
Merge "Ensure CallId is not null when connection creation is complete."
am: 47b23176bd

Change-Id: Ifddd99f22edfa787a3447cbaa66dd4e70a430ba3

6 years agoMerge "Ensure CallId is not null when connection creation is complete."
Treehugger Robot [Fri, 27 Oct 2017 19:09:47 +0000 (19:09 +0000)]
Merge "Ensure CallId is not null when connection creation is complete."

6 years agoMerge "Fix: AccountManagerService crashed by accessing closed db"
Tetsutoki Shiozawa [Fri, 27 Oct 2017 18:53:20 +0000 (18:53 +0000)]
Merge "Fix: AccountManagerService crashed by accessing closed db"
am: 6ac8f42d9e

Change-Id: I35f289e43a7406087a13258b5e6cbf5e179dc529

6 years agoMerge "Fix: AccountManagerService crashed by accessing closed db"
Treehugger Robot [Fri, 27 Oct 2017 18:41:59 +0000 (18:41 +0000)]
Merge "Fix: AccountManagerService crashed by accessing closed db"

6 years agoEnsure CallId is not null when connection creation is complete.
Tyler Gunn [Sat, 17 Jun 2017 03:20:34 +0000 (20:20 -0700)]
Ensure CallId is not null when connection creation is complete.

When calling "get" on the mConnectoinById map, a null callId will result
in an NPE.

In findConnectionForAction, defaulting to returning the "null" connection
which is the same behavior as if it isn't found.
In notifyCreateConnectionComplete, specifically checking if the callId
is null and skipping the onCreateConnectionComplete callback.
This scenario is possible if the connection is remove from the
ConnectionService before the connection complete callback comes back from
Telecom.

Test: Manual
Fixes: 62588734
Merged-In: I1de7a0a4cc9c630019e38b8154bfc1d470f56ae3
Change-Id: Ie610c51155ed417e0f916000fe20e4484bdb6603

6 years agoMerge "Fixed NullPointerException in IpSecService-Netd binder layer"
Manoj Boopathi Raj [Fri, 27 Oct 2017 17:47:08 +0000 (17:47 +0000)]
Merge "Fixed NullPointerException in IpSecService-Netd binder layer"
am: bf74a93eb2

Change-Id: Ia73c6bda7cb265f91648139e15f4bd2668e6c531

6 years agoMerge "Add the operator name and MCC/MNC in string format into the CellIdentity."
Cassie Han [Fri, 27 Oct 2017 17:36:52 +0000 (17:36 +0000)]
Merge "Add the operator name and MCC/MNC in string format into the CellIdentity."
am: 1565803cd2

Change-Id: Ie0a1305eb73256f358a853d87778f755d3b9e4d0

6 years agoMerge "Fixed NullPointerException in IpSecService-Netd binder layer"
Manoj Boopathi Raj [Fri, 27 Oct 2017 17:32:56 +0000 (17:32 +0000)]
Merge "Fixed NullPointerException in IpSecService-Netd binder layer"

6 years agoMerge "Don't allocate GlobalRefs for BinderProxy"
Hans Boehm [Fri, 27 Oct 2017 17:28:39 +0000 (17:28 +0000)]
Merge "Don't allocate GlobalRefs for BinderProxy"
am: 1455a1d0c0

Change-Id: Id971af4742bb26790449c78f9520b9a7744df39a

6 years agoMerge "Add the operator name and MCC/MNC in string format into the CellIdentity."
Cassie Han [Fri, 27 Oct 2017 17:17:54 +0000 (17:17 +0000)]
Merge "Add the operator name and MCC/MNC in string format into the CellIdentity."

6 years agoMerge "Don't allocate GlobalRefs for BinderProxy"
Hans Boehm [Fri, 27 Oct 2017 17:15:41 +0000 (17:15 +0000)]
Merge "Don't allocate GlobalRefs for BinderProxy"

6 years agoEnable HID Device Profile Service (2/2)
Hansong Zhang [Wed, 27 Sep 2017 21:17:20 +0000 (14:17 -0700)]
Enable HID Device Profile Service (2/2)

Add Profile Proxy for HID Device Profile.

* Add a helper method doUnbind() to deal with unbinding to Bluetooth HID
Service.

* Fix docstrings.

Bug: 63384609
Test: SL4A Bluetooth HID test
Change-Id: I168c21c3b010baac9889c556635b914c0ba3f267

6 years agoMerge "Remove unused method on VersionedBroadcastListener"
Erik Kline [Fri, 27 Oct 2017 13:04:47 +0000 (13:04 +0000)]
Merge "Remove unused method on VersionedBroadcastListener"
am: 536d241fb2

Change-Id: I63c8ad050330dd4e938388d03fa9cf270b108e56

6 years agoMerge "Remove unused method on VersionedBroadcastListener"
Treehugger Robot [Fri, 27 Oct 2017 12:47:45 +0000 (12:47 +0000)]
Merge "Remove unused method on VersionedBroadcastListener"

6 years agoMerge changes from topic "tz_catchup1"
Neil Fuller [Fri, 27 Oct 2017 10:13:15 +0000 (10:13 +0000)]
Merge changes from topic "tz_catchup1"
am: 4e0a02ce1f

Change-Id: I629930379afd2e3037bbd460ebc83726a8bb0008

6 years agoBe more explicit about users
Neil Fuller [Fri, 27 Oct 2017 10:08:35 +0000 (10:08 +0000)]
Be more explicit about users
am: b755291e65

Change-Id: I0dd17273997adc207b5e389624b820e80ccaaa89

6 years agoMerge changes from topic "tz_catchup1"
Neil Fuller [Fri, 27 Oct 2017 09:54:15 +0000 (09:54 +0000)]
Merge changes from topic "tz_catchup1"

* changes:
  Add newly available version information to dumpsys
  Be more explicit about users

6 years agoRemove unused method on VersionedBroadcastListener
Erik Kline [Fri, 27 Oct 2017 05:16:56 +0000 (14:16 +0900)]
Remove unused method on VersionedBroadcastListener

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - manually enabling USB tethering toward Wi-Fi worked
Bug: 32163131

Change-Id: I38e4b77a7d59584ebeb450ebe5a9dcbcb36f4fa1

6 years agoMerge "Convert Binder & BinderProxy to NativeAllocationRegistry"
Hans Boehm [Fri, 27 Oct 2017 03:47:51 +0000 (03:47 +0000)]
Merge "Convert Binder & BinderProxy to NativeAllocationRegistry"
am: bd6d3c5743

Change-Id: Iae1e438cc9595efe1dd68c579d42ae129ac53e5e

6 years agoAdd support for send Message with messaging options
Mengjun Leng [Mon, 13 Mar 2017 09:08:26 +0000 (17:08 +0800)]
Add support for send Message with messaging options

Add support for following messaging options.

1.Add support for message priority in 3gpp2.

2.Add link control support while sending multiple messages.

3.Add validity period support in 3gpp.

Change-Id: I19f4fbc5a3b6922884196b301d30280acd9e501e

MSIM(Telephony): Add changes to SMS APIs as per new SmsManager design

Change SMS Msim APIs as per new SmsManager design

Change-Id: I14ad7685e23b14203a76dfe3cc5a95a337f7d0e3

6 years agoMerge "Convert Binder & BinderProxy to NativeAllocationRegistry"
Hans Boehm [Fri, 27 Oct 2017 03:27:29 +0000 (03:27 +0000)]
Merge "Convert Binder & BinderProxy to NativeAllocationRegistry"

6 years agoFix: AccountManagerService crashed by accessing closed db
Tetsutoki Shiozawa [Tue, 24 Oct 2017 09:44:00 +0000 (18:44 +0900)]
Fix: AccountManagerService crashed by accessing closed db

Symptom:
When a current user was switched, AccountManagerService crashed with
IllegalStateException.

Root cause:
accountsDb was closed when user was stopped. AccountManagerService
tried to insert a log record to the closed db and it failed.

Solution:
It catches the exception if it's failed to insert a log record.

Bug: 68233592
Change-Id: I97b63e4777bf7f8a1d38d96e494f6a21847d374b

6 years agoMerge "IMMS should preserve enabled/selected IMEs upon boot"
Yohei Yukawa [Fri, 27 Oct 2017 01:10:36 +0000 (01:10 +0000)]
Merge "IMMS should preserve enabled/selected IMEs upon boot"
am: 171c82acb4

Change-Id: I13b12269eb1cd29bb28bd6a1dadac59a2d539380

6 years agoMerge "IMMS should preserve enabled/selected IMEs upon boot"
Treehugger Robot [Fri, 27 Oct 2017 00:49:19 +0000 (00:49 +0000)]
Merge "IMMS should preserve enabled/selected IMEs upon boot"

6 years agoEMBMS - Add TestApi and provide service override
Hall Liu [Fri, 20 Oct 2017 18:30:16 +0000 (11:30 -0700)]
EMBMS - Add TestApi and provide service override

Add @TestApi annotations to methods that CTS needs
Add a manifest meta-data key that allows client apps to specify the
exact component name of the MBMS service to bind to.

Bug: 68049452
Test: CTS
Change-Id: I50654c41da38696a25fad93d0a5e0b0c11fa0b42

6 years agoIMMS should preserve enabled/selected IMEs upon boot
Yohei Yukawa [Thu, 26 Oct 2017 22:00:59 +0000 (15:00 -0700)]
IMMS should preserve enabled/selected IMEs upon boot

This is a follow up CL to my refactoring CL [1], which unintentionally
changed the condition to reset default enabled IMEs when the device
boots up.

Previously, InputMethodManagerService (IMMS) resets default enabled
IMEs upon device boot only for the first boot scenario, by checking
whether Settings.Secure.DEFAULT_INPUT_METHOD is already set or not.

My refactoring CL accidentally replaced that check with unconditional
"true", which means now IMMS always resets default enabled IMEs every
time the device boots up.  This behavior change is of course
unintentional but has no effect after the user unlocks the device
because IMMS also discard all the settings change made while
UserManager.isUserUnlocked() returns false [2].  Hence the above
behavior change is completely hidden on direct-boot disabled devices,
where the system behaves as if the user unlocked the device
immediately after the boot is completed.  The behavior change is
observable only on direct-boot devices.

Anyway, IMMS should try to do its best to keep the last used IME and
user selected IMEs even in user locked state as long as those IMEs
are compatible with direct-boot.  This CL revives the previous
behavior by adding the same condition check again.

 [1]: I5b37c450db4b25b3e635b6d634293a34eec8b9d4
      7924782c000733b2d7a180701b74988f0154adee
 [2]: Ifa2225070bf8223f8964cf063c86889e312c5e9a
      ed4952ad0f76a70549777472cd9cefcbc8705917

Fixes: 67093433
Fixes: 67491290
Test: Manually verified as follows
      1. Check out AOSP master
      2. Build an OS image for a direct-boot aware device then
         flash it.
      3. Open
            development/samples/SoftKeyboard/AndroidManifest.xml
         then add
            android:directBootAware="true"
         to the IME service.
      4. Open
            development/samples/SoftKeyboard/res/xml/method.xml
         then add
            android:isAsciiCapable="true"
         to "en_US" IME subtype.
      5. tapas SoftKeyboard
      6. make -j
      7. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
      8. Open system settings:
           System -> Languages & input -> Virtual keyboard
     -> Manage keyboards
      9. Enable Sample Soft keyboard
     10. Disable Android Keyboard (AOSP)
     11. Open system settings:
           Security -> Screen lock -> Password
         then set up a device password "aaaa".
     12. Reboot the device.
     13. Make sure that
          * Sample Soft keyboard is shown in the unlock screen.
          * AOSP Keyboard is not enabled in the unlock screen.
Change-Id: Id624d577d941245cca944498dc6935eb364865cf