277828 Commits

Author SHA1 Message Date
Miao Wang
1e95fc8658 [RenderScript] Update RenderScript JNI with the corresponding
AllocationGetSurface driver implementation change.

 - AllocationGetSurface now returns opaque handle to ANativeWindow*,
 instead of IGraphicBufferProducer*, as IGraphicBufferProducer is not
 part of NDK. So the JNI side need to change accordingly.

Bug: 34396220
Test: mm, CTS tests pass.
Change-Id: If9b6a733202d29bc40c0e0b87c4fb48db092cbe5
2017-03-06 10:03:30 -08:00
Miao Wang
33287e8a89 [RenderScript] Use ANativeWindow_fromSurface to get ANativeWindow
from Java Surface.

 - ANativeWindow_fromSurface and ANativeWindow_release has to be used in
 pairs to avoid leaks.

Bug: 34396220
Test: mm, CTS tests pass.
Change-Id: Id67fd005a056df4d496a48f705d445a2d8c45232
2017-03-06 09:59:06 -08:00
Treehugger Robot
8871623b8d Merge "Bluetooth: Use content observer for airplane mode" 2017-03-06 17:59:03 +00:00
Peter Qiu
16034c6903 hotspot2: update documentation for WifiManager#queryPasspointIcon
Address API Councils comment on documentation for
WifiManager#queryPasspointIcon.

Bug: 35845899
Test: None
Change-Id: Ia8fe0f8203482f8b8f410081f06b580e8fdbac46
2017-03-06 09:55:41 -08:00
Ajay Panicker
b208a1f0ac Bluetooth: Use content observer for airplane mode
We are making this switch as the airplane mode switch intent is going away.

Fix: 35256299
Test: Toggle Airplane Mode
Change-Id: I3b1e5bbdf689b0db98cfbb0ab377198d34f0ba05
2017-03-06 17:55:34 +00:00
Martijn Coenen
85d12da977 Remove interfaceChain from IServiceManager::add()
Bug: 32742469
Test: hidl_test, hidl_test_java, binderized marlin boots
Change-Id: I418a5123e62517961a685a6433fe4ba384264862
2017-03-06 15:43:42 +01:00
Hugo Benichi
704520c392 Merge "Revert "ConnectivityManager: no double NetworkCallback registration" because oit caused regressions http://b/35955593, http://b/35921499." 2017-03-06 12:20:45 +00:00
Erik Kline
e0cce21f4d Start of tethering OffloadController
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: If8f7df069f37f1b3d440d446ab1b160a52ba9e09
2017-03-06 19:34:38 +09:00
Hugo Benichi
649e32484e Revert "ConnectivityManager: no double NetworkCallback registration" because oit caused regressions http://b/35955593, http://b/35921499.
This reverts commit faa70976b490116323107166f90fdd944c5bdc77.

Change-Id: I86c07c113f24753be7c977e6d7f570b99391e1b5
2017-03-06 06:16:51 +00:00
youhei.x.miyoshi
b3cd7b51d3 Disable a phone number log for user build
A phone number is privacy data. Therefore, it should be prevented
from logging in user build.

Test: manual - checked log
Bug: 34582911
Change-Id: Id040653dbfd236250e7eb07c9c2e9587ded3d63f
2017-03-06 14:53:10 +09:00
Treehugger Robot
c337e32bb0 Merge "Make seccomp honor setenforce" 2017-03-04 02:08:54 +00:00
Paul Lawrence
ffad2adfa5 Make seccomp honor setenforce
Note: This code is in frameworks, since we might want to have tools
linked against seccomp_policy that continue to enforce seccomp

Bug: 35950093
Test: Builds, Seccomp: 2 is in zygote & zygote64 status
      Run setenforce 0 && stop && start
      Seccomp: 0 is in zygote & zygote64 status

Change-Id: I797a6c29f58725f84089c570f784125fb99f57ce
2017-03-03 13:08:08 -08:00
Treehugger Robot
6ac19c0d23 Merge "wifi: WifiConfiguration: update documentation for isHomeProviderNetwork" 2017-03-03 19:02:28 +00:00
Yang Ni
45438c9402 Removed close guards for Element and Type objects
Bug: 28053769

These objects are tiny and unlikely to cause memory issues.

In addition, llvm-rs-cc auto-generated code contains such objects, which are
not visibible to developers and impossible to manually destroy, leaving
distracting warnings in Strict Mode.

Test: RsTest with StrictMode on and CTS tests

Change-Id: Iec68cca4f1259124b9f503a230c1a28b97ede1f3
2017-03-03 10:44:30 -08:00
Brad Ebinger
d2369792dd Return generic Binder on onBind
By returning a generic Binder on onBind in
ImsServiceBase, we can detect when the process
crashes and restart the service, if necessary.

Test: Telephony Unit Tests
Change-Id: I2fbe2708c3df37704f0c526210267a35c75ee1eb
2017-03-03 10:15:09 -08:00
Andreas Gampe
7f8466fab4 Framework: Ensure image heap string literals for Patterns
Do not use Pattern.toString to construct complex patterns. Instead,
make the string literals explicit so they can be compile-time
allocated, thus ending up as clean memory in the image heap.

Bug: 34956610
Test: m
Test: Device boots
Change-Id: I20d45c31243af00168553c218f75fb0795b55149
2017-03-03 09:38:58 -08:00
Tobias Thierer
3e6c189c68 Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore" 2017-03-03 12:02:09 +00:00
Narayan Kamath
982f42f71c Merge "fd_utils: switch to libbase logging." 2017-03-03 10:59:25 +00:00
Narayan Kamath
9dbcff7d73 Merge "fd_utils: add missing logging for a couple of failure cases." 2017-03-03 10:34:37 +00:00
Calin Juravle
d56d98b860 Merge changes from topic 'secondary-dex1'
* changes:
  Use DexManager logic to decide if a package is used by other apps
  Skip class path checking for secondary dex files
2017-03-03 03:42:34 +00:00
Calin Juravle
c649449093 Use DexManager logic to decide if a package is used by other apps
Stop relying on the file marker recorded by the runtime. We have the
same data available from the DexManager.

The clean up CL to remove the handling of the file markers will follow.

Test: verify that "shared packages" (e.g. gmscore) are not compiled with speed-profile.

Bug: 32871170

(cherry picked from commit 07b6eabe79261267ecd7114790e96e1f6828672a)

Change-Id: I2969b75fa77d38dde0073ef67aa89b1dc91237b5

Merged-In: I6cc5834ac88489e69896cd5fba9ed9968aa7f5a2
2017-03-03 02:16:04 +00:00
Calin Juravle
f8afcdc7b7 Skip class path checking for secondary dex files
Pass '&' marker to dex2oat classpath when compiling secondary dex files.
This will skip class path checking when loading the oat files.

Test: adb shell cmd package compile -m speed -f --secondary-dex com.google.android.gms
      oatdump --header-only --oat-
file=/data/user/0/com.google.android.gms/app_chimera/m/00000006/oat/arm64/DynamiteModulesC_GmsCore_prodmnc_alldpi_release
      check that the class path contains the special '&' marker

Bug: 32871170

(cherry picked from commit aae35767b6bca6f872c906a0fd38d7adb61217bd)

Change-Id: I7f3c6743e749316ee02e8586a525ad28ae1ef765

Merged-In: If0628aeb4e3f5717604bfc4a87a4b1d438e5fa65
2017-03-03 02:12:24 +00:00
Elliott Hughes
c657b769ab Merge "Remove the name length limit for system properties." 2017-03-03 00:22:31 +00:00
Calin Juravle
9e88c53337 Merge changes from topic 'secondary-dex'
* changes:
  Fix typo in dexopt.secondary system property
  Save package dex usage info after secondary dex reconciliation
  Compile secondary dex files during background dexopt job
  Add a shell command to force the background dexopt job
  A bit more refactoring in BackgroundDexOptService
  [PM] Clean up logic for secondary dex oat files
  Compile secondary dex files in DexManager
  Notify DexManager about new package installs
2017-03-02 23:54:24 +00:00
Elliott Hughes
33cc60ccc9 Remove the name length limit for system properties.
Bug: http://b/33926793
Test: builds
Change-Id: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
Merged-In: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
2017-03-02 14:17:03 -08:00
Treehugger Robot
603fb2ef56 Merge "hotspot2: expose string constants for cert type and auth methods" 2017-03-02 22:11:01 +00:00
Calin Juravle
ad014af09a Fix typo in dexopt.secondary system property
Test: adb shell cmd package bg-dexopt-job
Bug: 32871170

(cherry picked from commit 4466c5ad84e4429284b7d5e13ad8a87c924ea7fc)

Change-Id: Ibfe3111198877ed0d758b68be89afb23c4756053

Merged-In: Ic8a14a3fc5c9aa63f6cb376f337b5bf459997325
2017-03-02 13:14:30 -08:00
Calin Juravle
61fd6eab46 Save package dex usage info after secondary dex reconciliation
Bug: 1833991
Test: add a bogus entry to /syste/data/package-dex-usage.list
      adb shell cmd package reconcile-secondary-dex-files
com.android.google.gms
      wait a bit and check the bogus entry is gone

(cherry picked from commit b1097411028103b6c88ce325af23d2ff1ec746c8)

Change-Id: I23248b11ea07bceb6527f55bf62618d1b2c3d83d

Merged-In: Ic07126bfb8730933081a5e010e3c357d338786e8
2017-03-02 13:14:03 -08:00
Calin Juravle
574994afde Compile secondary dex files during background dexopt job
Extend the backgound dexopt job to compile secondary dex files when
"dalvik.vm.deopt.secondary" system property is set to true.

Test: adb shell cmd package bg-dexopt-job
Bug: 32871170

(cherry picked from commit 51f521c3bf46e6040f36757bc53ea57ddc7be85e)

Change-Id: I220ff4ea26c4eee030ab1a9f4c957a09aa9f2f4c

Merged-In: If3a4b77f785e92c7f2f7869e25ff9b99904f165a
2017-03-02 13:13:45 -08:00
Calin Juravle
f7edab63d9 Add a shell command to force the background dexopt job
Add 'bg-dexopt-job' command to 'adb shell cmd package' which will force
the background  dexopt job to run the optimizations immediately.

Note that the command only runs the background optimizer logic. It may
overlap with the actual job but the job scheduler will not be able to
cancel it. It will also run even if the device is not in the idle
maintenance mode.

Test: adb shell cmd package bg-dexopt-job
Bug: 32871170

(cherry picked from commit cb5f41ea11b1a6fcd0977a64ee146dde8f537076)

Change-Id: I82c781d46fe16e7b7566a5b5ee91be723a2125cb

Merged-In: I8b0112074220b2e09baf13d842401ee1cf306a89
2017-03-02 13:13:12 -08:00
Calin Juravle
a57ef16375 A bit more refactoring in BackgroundDexOptService
Extract convenient methods to help with:
- adding a shell command to run the background dexopt job
- extending idleOptimizations to cover secondary dex files

Test: device boots, background job run.
Bug: 32871170

(cherry picked from commit c660475aafe91269be306c802823cf543005ce36)

Change-Id: I146e4faeea90f2d58144a5dba26ae7f90a36b402

Merged-In: I18fde62a1cb05c030a620722d5f217589beaefb1
2017-03-02 13:12:47 -08:00
Calin Juravle
e69fba3f7f [PM] Clean up logic for secondary dex oat files
Add logic in DexManager to reconcile secondary dex records with the
actual files on disk. If secondary dex files are moved or removed then
DexManager will remove the generated oat files during the call to
reconcileSecondaryOdex() and update its internal state.

Add 'adb shell cmd package reconcile-secondary-dex packageName' which
will force DexManager to sync its data with the actual secondary dex
files.

Test: devices bots
      runtest -x .../PackageDexUsageTests.java
      runtest -x .../DexManagerTests.java
      adb shell cmd package reconcile-secondary-dex
com.android.google.gms (after artificially/temporarily renaming some
dex files)

Bug: 32871170

(cherry picked from commit c22c30ed1c05c5c24185dc4d380d1c5026923d46)

Change-Id: Ied9fcbfe367ed3a8250a9ba8d202518b264c64e8

Merged-In: Id2d72dc89995f89cf1ddf79ae4e992afd3f3c127
2017-03-02 13:12:21 -08:00
Calin Juravle
7218363a92 Compile secondary dex files in DexManager
Add logic for secondary dex compilation in DexManager. Also, extend the
`cmd package compile` command with '--secondary-dex' option which will
compile all used secondary dex files for the given package.

Test: flash & boot,
      cmd package compile --secondary-dex -f -m speed
com.google.android.gms
Bug: 32871170

(cherry picked from commit c22c30ed1c05c5c24185dc4d380d1c5026923d46)

Change-Id: I3cf26edbfb5e9f3683e608bb2a596e1ab5682bd4

Merged-In: Ia2b95cb70d26c4ead5cb650047641b0881ca84ae
2017-03-02 13:11:52 -08:00
Calin Juravle
fcd672fca3 Notify DexManager about new package installs
This will update the internal cache so that the secondary dex files of
the new package can be found when loaded.

Test: runtest -x .../DexManagerTests.java

Bug: 32871170

(cherry picked from commit 0d4b8f8b0c963d9a1f5cb6aff11a11195a3df225)

Change-Id: I34008f6d262f19e88a346a36b83e4093b4129105

Merged-In: I0cb7158af249feeb01cf578a7544dda978eede9d
2017-03-02 13:11:28 -08:00
Treehugger Robot
b8648ae07a Merge "Fix Javadoc for StrictMode#permitUnbufferdIo" 2017-03-02 17:23:45 +00:00
Narayan Kamath
84b5511535 fd_utils: switch to libbase logging.
Test: make, boots
Change-Id: I4976508f489ca15af0484f75a9ef02ed575beff5
2017-03-02 17:11:00 +00:00
Narayan Kamath
a352d2473a fd_utils: add missing logging for a couple of failure cases.
Also start using libbase style logging. Other log statements will
be converted in a follow up.

Test: make
Bug: 33579623
Change-Id: I34bb2ccab57e5bdd22aa35be8f8dcb68fdc4e097
2017-03-02 17:11:00 +00:00
Etan Cohen
aebf17e7f1 [CM] Allow timeout in request network
Add (unhide) a public API which provides network requests with a
timeout. When timed-out the (newly unhidden) onUnavailable() callback
is triggered.

Note: this CL does not add a handler to the API to be consistent
with the existing APIs. There is a separate effort (b/32130437)
to update these APIs with Handlers.

Bug: 31399536
Test: unit tests and CTS (new)
Change-Id: I45ce9ada63372cb56937bb620bfbb7729e5e25d2
2017-03-02 08:06:27 -08:00
Treehugger Robot
06a192fa49 Merge "ConnectivityManager: no double NetworkCallback registration" 2017-03-02 07:56:26 +00:00
Hugo Benichi
faa70976b4 ConnectivityManager: no double NetworkCallback registration
Test: new test in ConnectivityManagerTest
Bug: 20701525
Change-Id: I205333d31d43e6e6c7fe704ce63b458065f345ce
2017-03-02 15:19:37 +09:00
Treehugger Robot
d7b60d7869 Merge "Added two new RIL commands support" 2017-03-02 06:02:20 +00:00
Jack Yu
1bab118bed Added two new RIL commands support
Added RIL_REQUEST_SEND_DEVICE_STATE and
RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER RIL requests support.

Test: telephony sanity tests
bug: 32223897, 20125037, 28294587

Merged-In: I148a4322dfab2d8d84faf6505fb89dfc290411e3
Change-Id: I148a4322dfab2d8d84faf6505fb89dfc290411e3
2017-03-02 03:29:07 +00:00
Elliott Hughes
cbafc8d682 Merge "Basic javadoc for android.os.UpdateEngine." 2017-03-02 02:52:09 +00:00
Peter Qiu
f7303ba18e wifi: WifiConfiguration: update documentation for isHomeProviderNetwork
Address API Councils comment on documentation for isHomeProviderNetwork
field.  Specifically, the expected value for this field for non-Passpoint
network configuration.

Bug: 35855359
Test: make -j32
Change-Id: Ie6cdcc39c5156dccc14ed144e58a6d2f201aef17
2017-03-01 16:06:55 -08:00
Peter Qiu
f8dbd216c8 hotspot2: expose string constants for cert type and auth methods
So that we can use these constants in WifiService and the apps
as well in the future.

While there, remove auth method "CHAP" from the supported list,
since it is currenlty not supported by WifiService.

Bug: 34206769
Test: make -j32
Change-Id: Icadc3b13f2b135d51445d336116fbba86e96b70f
2017-03-01 16:05:52 -08:00
Treehugger Robot
2142b14a88 Merge "Fix up EAP-SIM documentation" 2017-03-02 00:01:33 +00:00
Treehugger Robot
4904e7ae2a Merge "Remove FastJNI optimization on AssetManager to avoid dead lock." 2017-03-01 23:13:14 +00:00
Tim Zhang
14e0a1e819 Remove FastJNI optimization on AssetManager to avoid dead lock.
I found there was a dead lock among main, android.display and GC threads
when running monkey test.
 - Main thread got a mutex and was suspended by GC thread.
 - Android.display thread waited for mutex held by main thread.
 - GC thread waited for suspention of android.display thread.

This will lead to ANR or screen freeze.

Merged-In: I13cf1eca3cb3b7c01aa754874f2b48aab0b472e8
Change-Id: I13cf1eca3cb3b7c01aa754874f2b48aab0b472e8
2017-03-01 22:17:19 +00:00
Paul Stewart
906a077cf8 Fix up EAP-SIM documentation
Address API Council comments on doucmentation for the method calls
and constants related to EAP-SIM.  While here, improve unit tests
to ensure that passing a null certificate (chain) causes the config
to forget any existing client certificates.

Bug: 35847887
Test: Unit tests

Change-Id: I1c4e18e1a7cfb61aa4764e32778793368938e70b
2017-03-01 14:02:28 -08:00
Treehugger Robot
7f0300f1e2 Merge "getTransport checks interface and instance names." 2017-03-01 21:24:25 +00:00