OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "ConnectivityService: simplify WakeLock management"
Hugo Benichi [Mon, 3 Apr 2017 08:56:23 +0000 (08:56 +0000)]
Merge "ConnectivityService: simplify WakeLock management"

7 years agoConnectivityService: simplify WakeLock management
Hugo Benichi [Thu, 30 Mar 2017 14:18:10 +0000 (23:18 +0900)]
ConnectivityService: simplify WakeLock management

This patch simplifies wakelock management by acknowledging that only one
acquisition at most is in flight at any time. This allows to remove the
serial number associated with wakelock acquisition and to avoid double
release when regaining a default network.

Example of $ adb shell dumpsys connectivity logs:
  NetTransition WakeLock activity (most recent first):
    03-31 00:15:13.816 - RELEASE (EVENT_CLEAR_NET_TRANSITION_WAKELOCK)
    03-31 00:14:59.216 - ACQUIRE for NetworkAgentInfo [WIFI () - 101]
    03-31 00:09:05.799 - RELEASE (EVENT_EXPIRE_NET_TRANSITION_WAKELOCK)
    03-31 00:08:05.738 - ACQUIRE for NetworkAgentInfo [WIFI () - 100]

Test: watched wakelock section $ adb shell dumpsys connectivity while
      turning on and off Wifi (with no other network).
Bug: 36703718
Change-Id: I899b0816c0e41b3991d9540e9b9a604914ff673a

7 years agoMerge "ConnectivityService: log wakelock activity in dumps"
Hugo Benichi [Sun, 2 Apr 2017 23:40:25 +0000 (23:40 +0000)]
Merge "ConnectivityService: log wakelock activity in dumps"

7 years agoMerge changes from topic 'ipsec-transport-impl'
nharold [Sun, 2 Apr 2017 00:10:33 +0000 (00:10 +0000)]
Merge changes from topic 'ipsec-transport-impl'

* changes:
  Add Initial IPsec APIs to IpSecService
  IpSecManager and IpSecTransform API Cleanup

7 years agoMerge "In MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE."
Treehugger Robot [Sat, 1 Apr 2017 06:46:31 +0000 (06:46 +0000)]
Merge "In MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE."

7 years agoMerge "Bluetooth 5 advertising duration refactoring (4/4)"
Jakub Pawlowski [Sat, 1 Apr 2017 04:34:50 +0000 (04:34 +0000)]
Merge "Bluetooth 5 advertising duration refactoring (4/4)"

7 years agoBluetooth 5 advertising duration refactoring (4/4)
Jakub Pawlowski [Fri, 31 Mar 2017 02:10:08 +0000 (19:10 -0700)]
Bluetooth 5 advertising duration refactoring (4/4)

Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: I44df300995ef985526b93f8c24389775720b3432

7 years agoMerge "Bluetooth LE Advertising minor improvements"
Jakub Pawlowski [Sat, 1 Apr 2017 04:34:30 +0000 (04:34 +0000)]
Merge "Bluetooth LE Advertising minor improvements"

7 years agoBluetooth LE Advertising minor improvements
Jakub Pawlowski [Thu, 30 Mar 2017 18:19:24 +0000 (11:19 -0700)]
Bluetooth LE Advertising minor improvements

This patch adds some additional error checking for the advertising set
parameters, and some more comments.

Test: manual
Bug: 30622771
Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e

7 years agoMerge "Bluetooth: Add additional BluetoothSocket logging to root cause errors"
Treehugger Robot [Sat, 1 Apr 2017 03:18:45 +0000 (03:18 +0000)]
Merge "Bluetooth: Add additional BluetoothSocket logging to root cause errors"

7 years agoMerge "Fix advertise data size estimation"
Jakub Pawlowski [Sat, 1 Apr 2017 02:06:30 +0000 (02:06 +0000)]
Merge "Fix advertise data size estimation"

7 years agoAdd Initial IPsec APIs to IpSecService
Nathan Harold [Tue, 7 Mar 2017 21:23:36 +0000 (13:23 -0800)]
Add Initial IPsec APIs to IpSecService

-Plumb IpSecManager APIs to NetD
-Add Resource Management to IpSecService

Bug: 33695893
Test: CTS verifies nearly all of these paths
Change-Id: Ic43965c6158f28cac53810adbf5cf50d2c54f920

7 years agoFix advertise data size estimation
Jakub Pawlowski [Fri, 31 Mar 2017 23:49:13 +0000 (16:49 -0700)]
Fix advertise data size estimation

UUID in service data field can be 2, 4, or 16 bytes long.

Test: manual
Bug: 36553478
Change-Id: Ib5ba2d16065496ca311e8642a15a7ea6bc84d4c1

7 years agoBluetooth: Add additional BluetoothSocket logging to root cause errors
Ajay Panicker [Tue, 28 Mar 2017 21:28:27 +0000 (14:28 -0700)]
Bluetooth: Add additional BluetoothSocket logging to root cause errors

Bug: 34780400
Test: Code still compiles
Change-Id: I166842ecc6889f9ea403e7aa3678ed818cd80968

7 years agoIpSecManager and IpSecTransform API Cleanup
Nathan Harold [Thu, 30 Mar 2017 18:01:37 +0000 (11:01 -0700)]
IpSecManager and IpSecTransform API Cleanup

-Remove Int-based SPI usage from the IpSecTransform.Builder
 This is essentially a less-safe method overload, and it is both
 unnecessary and difficult to implement: the cross-validation
 between SPI and Transform is actually useful, and the kernel
 requires two different mechanisms to use an unreserved vs a
 reserved (alloc'd) SPI: CREATESA vs UPDATESA, which makes this
 hard to support. API Council has questioned the value of this,
 and they are right: everything points to "remove this". In the
 future, if we find that SPI reservation is overhead, we can
 always add it back.

-Hiding the TunnelMode builder method and application/remove
 methods. These will not land by the time the next API
 stabilizes, so better to hide them now that this is a
 near-certainty. Expectation is to un-hide them in the subsequent
 API bump.

Bug: 36073210
Test: Compilation, verified nobody is calling these stubs
Change-Id: Ic1a3f2cf7128633318ac175d6b56b45eb8d21cab

7 years agoMerge "Add carrier config to hide merge button for IMS conference"
Tyler Gunn [Fri, 31 Mar 2017 15:05:35 +0000 (15:05 +0000)]
Merge "Add carrier config to hide merge button for IMS conference"

7 years agoMerge "Self Managed CS Implementation"
Treehugger Robot [Fri, 31 Mar 2017 04:11:53 +0000 (04:11 +0000)]
Merge "Self Managed CS Implementation"

7 years agoSelf Managed CS Implementation
Tyler Gunn [Tue, 14 Mar 2017 01:15:15 +0000 (18:15 -0700)]
Self Managed CS Implementation

- Add API guide for developers giving an overview of what they need
to implement.
- Add @hide setLabel method in PhoneAccount; used when registering a
self-managed CS's phone account; we override it with their app label to
ensure they don't try to give themselves another name.

Test: Unit
Bug: 34159263
Change-Id: I0c890dc2feeb3ee438a80ed425db2aaf1f4c1fdd

7 years agoMerge "Introduce Authentication Failure reason codes"
Treehugger Robot [Fri, 31 Mar 2017 01:43:50 +0000 (01:43 +0000)]
Merge "Introduce Authentication Failure reason codes"

7 years agoMerge "Partially revert "Add blocking and retrying wrappers for INetd uses.""
Joel Scherpelz [Fri, 31 Mar 2017 00:28:11 +0000 (00:28 +0000)]
Merge "Partially revert "Add blocking and retrying wrappers for INetd uses.""

7 years agoMerge "Disable voice call barring notification for Verizon."
Sanket Padawe [Fri, 31 Mar 2017 00:01:29 +0000 (00:01 +0000)]
Merge "Disable voice call barring notification for Verizon."

7 years agoConnectivityService: log wakelock activity in dumps
Hugo Benichi [Thu, 30 Mar 2017 01:46:05 +0000 (10:46 +0900)]
ConnectivityService: log wakelock activity in dumps

This patch adds wakelock acquire and release activity to
ConnectivityService logs in dumpsys. All of the last 20 acquire and
release operations are logged.

This patch also:
  - does a bit of cleanup to related dumpsys logs
  - unify pretty printing of internal event ids to their names.
  - delete mInetLog which was obsolete and not used.

Example of logs:
  NetTransition WakeLock activity (most recent first):
    03-30 02:15:40.628 - RELEASE 1 by EVENT_EXPIRE_NET_TRANSITION_WAKELOCK: not released (serial number was 2)
    03-30 02:15:09.965 - ACQUIRE 2 for NetworkAgentInfo [WIFI () - 101]
    03-30 02:15:01.877 - RELEASE 1 by EVENT_CLEAR_NET_TRANSITION_WAKELOCK: released
    03-30 02:14:40.598 - ACQUIRE 1 for NetworkAgentInfo [WIFI () - 100]

Test: inspected result of $ adb shell dumpsys connectivity
Bug: 36703718
Change-Id: Ia8e2016fc512ee798ef0adc3f612d1f6c33d4870

7 years agoIntroduce Authentication Failure reason codes
Sohani Rao [Mon, 6 Feb 2017 22:02:17 +0000 (14:02 -0800)]
Introduce Authentication Failure reason codes

In order to differentiate between various reasons for authentication
failure, add reason codes. These will be hidden since we don't intend to
have API change.

Bug: 33245941
Test: Unit test
Change-Id: I7222520df18e54d684ba9e50ff95be5d46a7d70c

7 years agoDisable voice call barring notification for Verizon.
Sanket Padawe [Tue, 28 Mar 2017 22:26:13 +0000 (15:26 -0700)]
Disable voice call barring notification for Verizon.

Test: Manual
Bug: 31490566
Change-Id: I2cb9f9b08f54faa276ddef9df36725aa76337746
Merged-in: I2cb9f9b08f54faa276ddef9df36725aa76337746

7 years agoMerge "Move some VPN logic out of ConnectivityService"
Robin Lee [Thu, 30 Mar 2017 16:00:39 +0000 (16:00 +0000)]
Merge "Move some VPN logic out of ConnectivityService"

7 years agoMerge "Change reserveSecurityParameterIndex() to take a remoteAddress"
Treehugger Robot [Thu, 30 Mar 2017 03:33:12 +0000 (03:33 +0000)]
Merge "Change reserveSecurityParameterIndex() to take a remoteAddress"

7 years agoMerge "Hide periodic scanning"
Jakub Pawlowski [Thu, 30 Mar 2017 03:17:48 +0000 (03:17 +0000)]
Merge "Hide periodic scanning"

7 years agoPartially revert "Add blocking and retrying wrappers for INetd uses."
Joel Scherpelz [Thu, 30 Mar 2017 01:13:03 +0000 (01:13 +0000)]
Partially revert "Add blocking and retrying wrappers for INetd uses."

Direct access to Netd from the bluetooth process is disallowed by
SELinux policy. This change reverts to the old behavior where IpManager
interacts with NetdService indirectly via NetworkManagementService.

Bug: 36492299

This partially reverts commit af39244a34f4449c12a5f925222c9bc8d8049320.

Change-Id: Icf20b1e24abf7dd3123760f8637928bde7afe06b

7 years agoChange reserveSecurityParameterIndex() to take a remoteAddress
Nathan Harold [Wed, 29 Mar 2017 17:47:59 +0000 (10:47 -0700)]
Change reserveSecurityParameterIndex() to take a remoteAddress

To make the SPI reservation more semantically consistent with the
transform creation API, and to ensure that we always create SPI
reservations relative to a well-known remote, we should take the
SPI request relative to a remote (rather than to a destination).
This necessitates that we now consider direction separately, which
is used for keying the SA-Id.

Bug: 36073210
Test: compilation
Change-Id: I81e955c20128c1f8e04fd68eb26669561f827a78

7 years agoHide periodic scanning
Jakub Pawlowski [Thu, 30 Mar 2017 00:00:44 +0000 (17:00 -0700)]
Hide periodic scanning

Bug: 30622771
Test: manual
Change-Id: I5d786b13cf99287732e16769e2563ac7c4fe715c

7 years agoMerge "Remove implementation of bssid hotlist"
Treehugger Robot [Wed, 29 Mar 2017 23:50:01 +0000 (23:50 +0000)]
Merge "Remove implementation of bssid hotlist"

7 years agoIn MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE.
Robert Sesek [Mon, 20 Mar 2017 21:30:05 +0000 (17:30 -0400)]
In MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE.

When creating an isolatedProcess=true service and when the native bridge
is in use, MountEmulatedStorage() is called with force_mount_namespace=true
and MOUNT_EXTERNAL_NONE. This led to an abort crash, since the process
would attempt to mount an empty path string.

Test: android.externalservice.cts.ExternalServiceTest built for ARM, run on Fugu
Bug: 36072260
Change-Id: I9441bcbd30167971ad486726bbeae57f3c4aebe9

7 years agoMerge "Add a Skeleton IpSecService"
Treehugger Robot [Wed, 29 Mar 2017 22:50:49 +0000 (22:50 +0000)]
Merge "Add a Skeleton IpSecService"

7 years agoMerge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()"
Treehugger Robot [Wed, 29 Mar 2017 22:41:13 +0000 (22:41 +0000)]
Merge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()"

7 years agoRemove implementation of bssid hotlist
Michael Plass [Mon, 27 Mar 2017 18:11:47 +0000 (11:11 -0700)]
Remove implementation of bssid hotlist

Test: Relevant unit tests pass
Bug: 30147676
Change-Id: I268907cc13ef21c0ba547722fe7c866ee4cdae5a

7 years agoMerge "Ignore toast request of pinning if request interval is too short"
Treehugger Robot [Wed, 29 Mar 2017 18:41:53 +0000 (18:41 +0000)]
Merge "Ignore toast request of pinning if request interval is too short"

7 years agoAdd a Skeleton IpSecService
Nathan Harold [Thu, 2 Mar 2017 02:55:06 +0000 (18:55 -0800)]
Add a Skeleton IpSecService

-Add IpSecService with the necessary glue to connect to netd
-Add code to retrieve IpSecService from System Server

Bug: 34811227
Test: Service boots (and dumpsys works), more via b/34811227
Merged-In: I4cdcb643421141202f77a0e2f87a37012de0cd92
Change-Id: I4cdcb643421141202f77a0e2f87a37012de0cd92

7 years agoMerge changes I5c16c650,I3151fb6b
Mukesh Agrawal [Wed, 29 Mar 2017 18:20:35 +0000 (18:20 +0000)]
Merge changes I5c16c650,I3151fb6b

* changes:
  StateMachine: make toString() terser
  utiltests: add script to run tests

7 years agoMerge "Bluetooth: fix comment wording"
Treehugger Robot [Wed, 29 Mar 2017 18:20:22 +0000 (18:20 +0000)]
Merge "Bluetooth: fix comment wording"

7 years agoMerge "Report the temperature during an OTA update"
Tianjie Xu [Wed, 29 Mar 2017 18:16:44 +0000 (18:16 +0000)]
Merge "Report the temperature during an OTA update"

7 years agoAdd new internal API: enableOptionalCodecs()/disableOptionalCodecs()
Pavlin Radoslavov [Fri, 24 Feb 2017 18:19:14 +0000 (10:19 -0800)]
Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()

This API can be used to enable the optional codecs, or disable them
and use only the mandatory SBC.
Internally, it is implemented by raising the SBC priority to
highest (so SBC will be used/selected), or reducing the SBC priority
to its default value (lowest).

Test: A2DP streaming and enabling/disabling/selecting optional codecs
Bug: 35873828
Change-Id: Ia82036ac33590a3a402b1f5a36102264d47a9029

7 years agoMerge "[AWARE] Remove Publish/Subscribe Count configuration"
Etan Cohen [Wed, 29 Mar 2017 17:03:41 +0000 (17:03 +0000)]
Merge "[AWARE] Remove Publish/Subscribe Count configuration"

7 years agoBluetooth: fix comment wording
Jakub Pawlowski [Thu, 23 Mar 2017 05:53:18 +0000 (22:53 -0700)]
Bluetooth: fix comment wording

Test: manual
Bug: 30622771
Change-Id: I5a589c98553f35248b0d95d332e9f35774075b24

7 years agoMerge "[AWARE] Fix unit tests"
Etan Cohen [Wed, 29 Mar 2017 14:56:40 +0000 (14:56 +0000)]
Merge "[AWARE] Fix unit tests"

7 years agoIgnore toast request of pinning if request interval is too short
Koji Fukui [Thu, 6 Oct 2016 14:00:00 +0000 (23:00 +0900)]
Ignore toast request of pinning if request interval is too short

Symptom:
System crash happens if an application repeatedly requests to finish
itself in pinning state.

Root cause:
Toast for pinning state is shown when the application requests to
finish itself. Every toasts use file descripters and they consumes all
available file descripters. System crash happens because of file
descriptor shortage.

Solution:
Ignore toast request for pinning state if request interval is too short.

Bug: 34211454

Change-Id: I4c3b45825270ab96fcfb24723195e9189709c2ec

7 years agoStateMachine: make toString() terser
mukesh agrawal [Tue, 28 Mar 2017 03:26:38 +0000 (20:26 -0700)]
StateMachine: make toString() terser

The current implementation of the toString()
method calls dump(). This causes two problems:

1. toString() may return a large string. This
   is at odds with the advice in the documentation
   for Object.toString(), which says that the
   returned String should be concise, and easy
   to read.
2. The dump() method is overriden by many of the
   StateMachine subclasses. Some of those subclasses
   have dump() implementations that are expensive,
   and/or have dependencies on other objects.

To resolve these problems, we simpify
StateMachine.toString().

Along the way: remove a stale comment about
implementing dump() using toString().

Note: only ran the StateMachine tests, since some
other tests are already failing.

Bug: 36661851
Test: tests/utiltests/runtests.sh \
      -e class com.android.internal.util.StateMachineTest
Change-Id: I5c16c650f01178c4d018b6a65e4aa95fb905aff6

7 years agoutiltests: add script to run tests
mukesh agrawal [Wed, 29 Mar 2017 01:19:49 +0000 (18:19 -0700)]
utiltests: add script to run tests

Make it easier to run the tests, so that more people
will run them.

Bug: 36698401
Test: tests/utiltests/runtests.sh \
      -e class com.android.internal.util.StateMachineTest

Change-Id: I3151fb6b2f609f45c7d8154b51f13cce58ccdc13

7 years agoMerge changes from topic 'dex'
Calin Juravle [Wed, 29 Mar 2017 01:19:57 +0000 (01:19 +0000)]
Merge changes from topic 'dex'

* changes:
  Compile secondary dex files according to REASON_BACKGROUND_DEXOPT
  Register secondary dex files for JIT profiling
  Move DexLoadReporter out of LoadedApk
  Set pm.BackgroundDexOptService as the source of true
  Add missing return in DexManager
  Update package use info when the app data is updated

7 years agoMerge "Add HidlSupport.java for utility methods for HIDL."
Treehugger Robot [Wed, 29 Mar 2017 00:32:18 +0000 (00:32 +0000)]
Merge "Add HidlSupport.java for utility methods for HIDL."

7 years agoReport the temperature during an OTA update
Tianjie Xu [Tue, 28 Mar 2017 23:59:16 +0000 (16:59 -0700)]
Report the temperature during an OTA update

Bug: 32518487
Test: mma
Change-Id: I00494aff91b473ae54eff8d56910198f88083d40

7 years agoCompile secondary dex files according to REASON_BACKGROUND_DEXOPT
Calin Juravle [Fri, 10 Mar 2017 02:41:10 +0000 (18:41 -0800)]
Compile secondary dex files according to REASON_BACKGROUND_DEXOPT

Test: adb shell cmd package bg-dexopt-job works for sercondary dex files

Bug: 32871170
Bug: 26719109

(cherry picked from commit a70b1b120365976f5eeb7cb3f577f5f6ff7ad18e)

Merged-In: Iaee8071449c83e774b2fe331aaccfc5433856f4f
Change-Id: I2334e4d73a5acdd1106e913c59ddf642782f1eee

7 years agoRegister secondary dex files for JIT profiling
Calin Juravle [Tue, 14 Mar 2017 06:30:30 +0000 (23:30 -0700)]
Register secondary dex files for JIT profiling

Test: boot, and check that profiles get recorded for secondary dex files

Bug: 32871170
Bug: 26719109

(cherry picked from commit f5a7bfc8d5f9e74d6fa1e5be3246e7b4cde65bf6)

Merged-In: I2de23ef44eee3f1783ae698821f1c6d88c66c9a6
Change-Id: Id9bbd630b8485dc17eeef846295458df5cfe446a

7 years agoAdd HidlSupport.java for utility methods for HIDL.
Yifan Hong [Mon, 27 Mar 2017 20:02:34 +0000 (13:02 -0700)]
Add HidlSupport.java for utility methods for HIDL.

The old .equals code uses Objects.deepEquals,
which does not handle for, e.g. ArrayList<byte[]>.
Create our own recursive HidlSupport.deepEquals
and deepHashCode method to handle these edge cases.

Bug: 36454147
Test: hidl_test_java
Change-Id: I56dc48985486b561263c260cf43aa90f30d581d0

7 years agoMerge "Remove non-localized message"
Brad Ebinger [Tue, 28 Mar 2017 22:21:53 +0000 (22:21 +0000)]
Merge "Remove non-localized message"

7 years agoMove DexLoadReporter out of LoadedApk
Calin Juravle [Tue, 14 Mar 2017 02:02:32 +0000 (19:02 -0700)]
Move DexLoadReporter out of LoadedApk

The DexLoadReporter was part of LoadedApk in order to lazily initialize
it when the first class loader of the app was created. However there's
no real association between the two and doing the initialization in
LoadedApk buys us nothing.

Extract the reporter in its own class and set it to BaseDexClassLoader
during bindApplication stage.

Test: boot, and check that loaded dex files are reported

Bug: 32871170
Bug: 26719109

(cherry picked from commit 37dfc8ee3ec676a0f059a9f9f1ec5d273e78a502)

Merged-In: I9a0e734ae4c16d5d0979aa6d0061fbc9b6e144f6
Change-Id: I9a0e734ae4c16d5d0979aa6d0061fbc9b6e144f6

# Conflicts:
# core/java/android/app/LoadedApk.java

7 years agoSet pm.BackgroundDexOptService as the source of true
Calin Juravle [Thu, 16 Mar 2017 01:38:57 +0000 (18:38 -0700)]
Set pm.BackgroundDexOptService as the source of true

The real dexopt maintainance job is
com.android.server.pm.BackgroundDexOptService, and not
com.android.server.BackgroundDexOptJobService

Partial revert of commit 096d304ae3d85c1bfcda1a1d9cd4eb13d0815500.

Test: manual inspection
Bug: 36140426

(partial cherry picked from commit
91d40f1baa2eeed2aa68d2492e20650d5e71dab5)

Merged-In: I983ac91117f107282095fa7eefdbce08e0dcfce3
Change-Id: I983ac91117f107282095fa7eefdbce08e0dcfce3

# Conflicts:
# core/res/AndroidManifest.xml
#
services/core/java/com/android/server/pm/PackageManagerService.java
# services/java/com/android/server/SystemServer.java

7 years agoAdd missing return in DexManager
Calin Juravle [Sat, 11 Mar 2017 02:24:33 +0000 (18:24 -0800)]
Add missing return in DexManager

Harmless issue but which can spam the logs.

Test: mostly manual since the check is buried deep inside and cannot be
verified accurately. I added another test to DexManager to stress that
code path and then checked the logs.

Bug: 36117123

(cherry picked from commit 2dfc1b3e125860221bc67835c2d5c99198a12f8a)

Merged-In: I1a878a200f3f726dfaa85f1bed1398acc8dce979
Change-Id: Ib2c034add2e8229b90eb4aaa0067d42d26798670

7 years agoUpdate package use info when the app data is updated
Calin Juravle [Thu, 23 Feb 2017 03:05:06 +0000 (19:05 -0800)]
Update package use info when the app data is updated

- clear usesByOtherApps flag when the package is updated
- delete secondary dex usage data when the app data is destroyed

Test: runtest -x .../PackageDexUsageTests.java
      runtest -x .../DexManagerTests.java
Bug: 32871170
Bug: 35381405

(cherry picked from commit 99dd37b3c5262910150ef955d16a33d32da264dd)

Merged-In: I3a249b9e8680e745fa678c7ce61b4ae764078fb9
Change-Id: Ia8416e7232cda3e42a8dccd51cb152a237e0f317

7 years agoMerge "ActivityManager: Allow DiskRead for wrap.sh determination"
Treehugger Robot [Tue, 28 Mar 2017 20:28:30 +0000 (20:28 +0000)]
Merge "ActivityManager: Allow DiskRead for wrap.sh determination"

7 years agoMerge "Bluetooth API spelling fixes ("wether" -> "whether")"
Jakub Pawlowski [Tue, 28 Mar 2017 20:01:30 +0000 (20:01 +0000)]
Merge "Bluetooth API spelling fixes ("wether" -> "whether")"

7 years agoMerge "improve the format of locale argument when calling recovery"
Tianjie Xu [Tue, 28 Mar 2017 19:42:53 +0000 (19:42 +0000)]
Merge "improve the format of locale argument when calling recovery"

7 years agoMerge "Just broadcast intent to bring up MTP/PTP as soon as switching function"
Jerry Zhang [Tue, 28 Mar 2017 18:41:59 +0000 (18:41 +0000)]
Merge "Just broadcast intent to bring up MTP/PTP as soon as switching function"

7 years agoActivityManager: Allow DiskRead for wrap.sh determination
Andreas Gampe [Tue, 28 Mar 2017 17:59:25 +0000 (10:59 -0700)]
ActivityManager: Allow DiskRead for wrap.sh determination

Avoid killing debuggable apps which at the same time have a strict-mode
policy installed.

Bug: 33668201
Test: m
Change-Id: Ic3c56b01fe42a473e28c1d6280526afdc85793df

7 years ago[AWARE] Remove Publish/Subscribe Count configuration
Etan Cohen [Mon, 20 Mar 2017 18:33:12 +0000 (11:33 -0700)]
[AWARE] Remove Publish/Subscribe Count configuration

Simplify API: semantics of publish/subscribe count restrictions
aren't clear at the app level. They depend on DW configuration as
well as discovery session type - number of packets transmitted over
the air.

There's already an app-facing discovery session lifetime configuration -
the TTL. That has clearer semantics and is sufficient (for now).

Bug: 36446307
Test: unit tests and integration (sl4a) tests.
Change-Id: I9129975bd2e1a61b3d23a4b6acaae703b42216c7

7 years agoBluetooth API spelling fixes ("wether" -> "whether")
Jakub Pawlowski [Thu, 23 Mar 2017 05:44:09 +0000 (22:44 -0700)]
Bluetooth API spelling fixes ("wether" -> "whether")

Bug: 30622771
Test: manual
Change-Id: I01c8b18d0057f2fd6e477ce2ca0b779321b6c0e6

7 years ago[AWARE] Fix unit tests
Etan Cohen [Tue, 28 Mar 2017 17:31:47 +0000 (10:31 -0700)]
[AWARE] Fix unit tests

Update to reflect new mockito semantics.

No functional change, no change to test semantics!

Bug: 36680830
Test: unit tests now passing
Change-Id: Ic210f20ce47ab19da25bd0835ae2ee5ae0f73011

7 years agoMerge "String changes for Voice/Data/Emergency service blocked."
Sanket Padawe [Tue, 28 Mar 2017 17:45:37 +0000 (17:45 +0000)]
Merge "String changes for Voice/Data/Emergency service blocked."

7 years agoMerge "Add a carrier option to hide the option of "Enhanced 4G LTE Mode""
Ying Xu [Tue, 28 Mar 2017 16:55:09 +0000 (16:55 +0000)]
Merge "Add a carrier option to hide the option of "Enhanced 4G LTE Mode""

7 years agoMerge "Correct ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS"
Robert Greenwalt [Tue, 28 Mar 2017 16:12:15 +0000 (16:12 +0000)]
Merge "Correct ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS"

7 years agoString changes for Voice/Data/Emergency service blocked.
Sanket Padawe [Mon, 27 Mar 2017 21:04:42 +0000 (14:04 -0700)]
String changes for Voice/Data/Emergency service blocked.

Bug: 31490566
Change-Id: Iaae2c5ef2a856ae265d4e4ea933d714491744e49
Merged-in: Iaae2c5ef2a856ae265d4e4ea933d714491744e49

7 years agoMerge changes If94102c7,I8d51e8e0
Lorenzo Colitti [Tue, 28 Mar 2017 12:22:42 +0000 (12:22 +0000)]
Merge changes If94102c7,I8d51e8e0

* changes:
  Make ConnectivityServiceTest pass on wifi-only devices.
  Restore the net.dnsX system properties.

7 years agoMerge "WifiManager(aidl): Remove pingSupplicant binder call"
Roshan Pius [Tue, 28 Mar 2017 05:25:25 +0000 (05:25 +0000)]
Merge "WifiManager(aidl): Remove pingSupplicant binder call"

7 years agoMerge "Add Bluetooth LDAC ABR UI to the Developer Options"
Treehugger Robot [Tue, 28 Mar 2017 04:54:19 +0000 (04:54 +0000)]
Merge "Add Bluetooth LDAC ABR UI to the Developer Options"

7 years agoAdd Bluetooth LDAC ABR UI to the Developer Options
fen wang [Mon, 13 Mar 2017 10:35:09 +0000 (19:35 +0900)]
Add Bluetooth LDAC ABR UI to the Developer Options

Bug: 35381097
Change-Id: Idcc2fabe86acaf441f5a71f5d2bb66ad29252cdb

7 years agoMake ConnectivityServiceTest pass on wifi-only devices.
Lorenzo Colitti [Tue, 21 Mar 2017 09:54:11 +0000 (18:54 +0900)]
Make ConnectivityServiceTest pass on wifi-only devices.

Test: ConnectivityServiceTest passes on ryu on internal master
Test: ConnectivityServiceTest passes on bullhead
Change-Id: If94102c7df0257ea9e69e72b07a685ae3c2c4022

7 years agoMerge "Add null check to IpManager.dump()"
Treehugger Robot [Tue, 28 Mar 2017 02:19:21 +0000 (02:19 +0000)]
Merge "Add null check to IpManager.dump()"

7 years agoMerge "hotspot2: register Passpoint related intents as protected broadcast"
Treehugger Robot [Mon, 27 Mar 2017 23:44:42 +0000 (23:44 +0000)]
Merge "hotspot2: register Passpoint related intents as protected broadcast"

7 years agoAdd carrier config to hide merge button for IMS conference
Wei Huang [Tue, 1 Mar 2016 07:25:04 +0000 (15:25 +0800)]
Add carrier config to hide merge button for IMS conference

There is the case that operator's network does not support IMS
conference call although it supports IMS normal call. It sometimes
happens when operator starts up IMS service. In such case, it is
necessary to hide merge button for IMS conference.

Bug: 29430010
Change-Id: Iab8afaab297cd401ddea8ef4bbd6a06edfbcfeb3

7 years agoCorrect ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS
Robert Greenwalt [Fri, 24 Mar 2017 18:55:47 +0000 (11:55 -0700)]
Correct ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS

The name is not allowed for an internal, non-public
intent.  Changed to use com.android.internal.* namespace.

bug:35266833
Test: Ran cts.IntentTest.shouldNotFindUnexpectedIntents
Change-Id: Ifd7d7f0aa537bfbbc7d67aa3b73b0887acd6104a

7 years agohotspot2: register Passpoint related intents as protected broadcast
Peter Qiu [Mon, 27 Mar 2017 18:49:33 +0000 (11:49 -0700)]
hotspot2: register Passpoint related intents as protected broadcast

These intents should only be broadcast by the System Service, so
register them as protected broadcast.

Bug: 36655814
Test: Build with go/aog/355397, verify in logcat that no non-protected
      broadcast error gets thrown when
      android.net.wifi.action.PASSPOINT_OSU_PROVIDERS_LIST intent
      is broadcasted

Change-Id: I57849d0decef407624cac380a0f12f5428e0f1de

7 years agoRestore the net.dnsX system properties.
Lorenzo Colitti [Fri, 6 Jan 2017 01:25:02 +0000 (10:25 +0900)]
Restore the net.dnsX system properties.

In order to avoid app breakage, we are putting back the system
properties and using selinux to disallow access from apps
targeting the O SDK or above.

This CL is cherry-picked from internal commit
e3b85dfbc1dde8d229410f54c75c1efa4bb09fbe, but with a different
commit description.

Bug: 33308258
Bug: 33807046
Bug: 34028616
Bug: 34115651
Test: system properties are readable as root and shell
Change-Id: I8d51e8e0a620d581c4251fb2f3c1d0a813b929be

7 years agoMerge "wifi: catch UnsupportedOperationException for getMatchingWifiConfig"
Peter Qiu [Mon, 27 Mar 2017 21:21:41 +0000 (21:21 +0000)]
Merge "wifi: catch UnsupportedOperationException for getMatchingWifiConfig"

7 years agoMerge "Bluetooth GATT callback naming fix "Ext" -> "" (1/2)"
Jakub Pawlowski [Mon, 27 Mar 2017 21:15:20 +0000 (21:15 +0000)]
Merge "Bluetooth GATT callback naming fix "Ext" -> "" (1/2)"

7 years agowifi: catch UnsupportedOperationException for getMatchingWifiConfig
Peter Qiu [Mon, 27 Mar 2017 20:45:25 +0000 (13:45 -0700)]
wifi: catch UnsupportedOperationException for getMatchingWifiConfig

On a device without Passpoint support, an UnsupportedOperationException
will be thrown when invoking WifiManager#getMatchingWifiConfig.
So catch it to avoid crash.

Bug: 36649203
Test: manually set config_wifi_hotspot2_enabled to false and verify
      Settings app doesn't crash

Change-Id: I69f37897449033da9d21edda9953ad2738f7e314

7 years agoMerge "make carrier default app direct boot aware"
Chen Xu [Mon, 27 Mar 2017 20:45:13 +0000 (20:45 +0000)]
Merge "make carrier default app direct boot aware"

7 years agoAdd null check to IpManager.dump()
Erik Kline [Mon, 27 Mar 2017 20:28:02 +0000 (05:28 +0900)]
Add null check to IpManager.dump()

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 36650508
Change-Id: I2270bec20b966de487048f0ea0c97360e242cd9d

7 years agoBluetooth GATT callback naming fix "Ext" -> "" (1/2)
Jakub Pawlowski [Mon, 27 Mar 2017 19:14:40 +0000 (12:14 -0700)]
Bluetooth GATT callback naming fix "Ext" -> "" (1/2)

Gatt callback don't need the "Ext" postfix, as it was removed from new
API.

Test: manual
Bug: 30622771
Change-Id: I54596ffdcb818343cc313123266cfa16291c6236

7 years agoMerge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi."
Lorenzo Colitti [Mon, 27 Mar 2017 19:08:24 +0000 (19:08 +0000)]
Merge "Make CONNECTIVITY_USE_RESTRICTED_NETWORKS @SystemApi."

7 years agoMerge "Update settings to use latest IDs for zones"
Treehugger Robot [Mon, 27 Mar 2017 14:06:34 +0000 (14:06 +0000)]
Merge "Update settings to use latest IDs for zones"

7 years agoMove some VPN logic out of ConnectivityService
Robin Lee [Fri, 10 Mar 2017 16:17:06 +0000 (16:17 +0000)]
Move some VPN logic out of ConnectivityService

This cleanup helps declutter ConnectivityService, and encapsulates the
always-on setting inside of Vpn instead of spreading it across two
classes.

In particular having the save code in one file and the load code in
another file was weird and I apologise for that.

Added a SystemServices wrapper for Settings.Secure and PendingIntent
calls to decouple some of the global state nastiness and make it
testable without forcing ConnectivityService to drive the load/save.

Test: runtest -x tests/net/java/com/android/server/ConnectivityServiceTest.java
Test: runtest -x tests/net/java/com/android/server/connectivity/VpnTest.java
Bug: 33159037
Change-Id: Ie2adb1c377adfcef0a5900dc866e6118f451b265

7 years agoUpdate settings to use latest IDs for zones
Neil Fuller [Thu, 23 Mar 2017 14:46:52 +0000 (14:46 +0000)]
Update settings to use latest IDs for zones

Various zones in timezones.xml were being identified by old
IDs. The settings picker and setup wizard uses the exact
ID when pre-selecting the user's current zone. Since the
autodetection uses the new IDs in places like Buenos
Aires users would not have the correct zone pre-selected
during setup.

Thanks to Marcio Ikeda of LG for the report.

Other legacy IDs found with:

for TZ in `grep 'id=' timezones.xml \
    | awk -F\" '{ print $2 }'`; do \
grep ${TZ} ~/Downloads/tzdata2016g/zone.tab > /dev/null; \
if (( $? != 0 )); then echo Bad: ${TZ}; fi; \
done

New IDs found using tzdata NEWS and "backward" file.

Test: Manual testing: selection of the zone in the settings
Bug: 36469833
(cherry picked from commit b4d003da66beb414e8e7fcec94a82a53027dbbfa)
Merged-In: I8c20494a48870cdc600854756061e86db730e14a
Change-Id: I829a70921eb13b763b5446820c87672615f2524d

7 years agoMerge "Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces""
Joel Scherpelz [Mon, 27 Mar 2017 05:17:20 +0000 (05:17 +0000)]
Merge "Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces""

7 years agoRevert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces"
Joel Scherpelz [Fri, 24 Mar 2017 02:39:14 +0000 (02:39 +0000)]
Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces"

On second thought, let's set accept_ra_rt_info_m**_plen in
Netd (InterfaceController::initializeAll())

This reverts commit 25870a2c9effd7a7d31c0678c34a6e952b2d56a1.

Change-Id: I22b000623bb852e375385d4aae789d007e84ba3d

7 years agoJust broadcast intent to bring up MTP/PTP as soon as switching function
puma_hsu [Fri, 24 Mar 2017 02:41:56 +0000 (10:41 +0800)]
Just broadcast intent to bring up MTP/PTP as soon as switching function

Bug:36113457
Change-Id: I3a7ab6fdcd157740b8e55ded67b3d5dddf15b0e0
Signed-off-by: puma_hsu <puma_hsu@htc.com>
7 years agoMerge "Expose connection update callback (4/4)"
Jakub Pawlowski [Fri, 24 Mar 2017 20:31:31 +0000 (20:31 +0000)]
Merge "Expose connection update callback (4/4)"

7 years agomake carrier default app direct boot aware
fionaxu [Fri, 24 Mar 2017 19:20:52 +0000 (12:20 -0700)]
make carrier default app direct boot aware

when device is not ready (based on user state), broadcast will only be
delivered to components which are direct boot aware.
mark default carrier app to be direct boot aware to avoid missing
important redirection signal during booting.

Bug:34628643
Test: Manaul
Change-Id: I1893f9ffb6e805d1a41704f61fbaa1f16e500e1d

7 years agoAdd a carrier option to hide the option of "Enhanced 4G LTE Mode"
yinxu [Tue, 14 Mar 2017 22:36:17 +0000 (15:36 -0700)]
Add a carrier option to hide the option of "Enhanced 4G LTE Mode"

The option "Enhanced 4G LTE Mode" currently may be hidden according to
the VoLTE state of the plateform and device. With this new option we can
choose to hide the "Enhanced 4G LTE Mode" irrespective of VoLTE state.

Bug: 36220377
Test: manual
Change-Id: I516ad050e623a368f2c2ef3d81650eb20c20fd5b

7 years agoExpose connection update callback (4/4)
Jakub Pawlowski [Fri, 24 Mar 2017 02:05:55 +0000 (19:05 -0700)]
Expose connection update callback (4/4)

Test: manual
Bug: 30622771
Change-Id: I56a3c42814249abc33e95e84ce092c2d8df65434

7 years agoMerge "Deprecated getDeviceId and added getMeid and getImei"
Jack Yu [Fri, 24 Mar 2017 17:02:58 +0000 (17:02 +0000)]
Merge "Deprecated getDeviceId and added getMeid and getImei"

7 years agoRemove non-localized message
Shuto Nagamatsu [Thu, 23 Mar 2017 21:55:01 +0000 (06:55 +0900)]
Remove non-localized message

Remove non-localized english "code" from ImsException constructor.
Non-localized message causes user confusion.

Bug: 32792378
Change-Id: I0c71c35e7830db7de5b1d041211de54c92285b4d