OSDN Git Service

android-x86/frameworks-base.git
7 years agoDO NOT MERGE: Add a null check for the OnStartTetheringCallback.
Jeremy Klein [Sun, 13 Mar 2016 00:29:54 +0000 (16:29 -0800)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.

This avoids a NullPointerException when trying to call the callback
and gives a more readable error message.

(cherry picked from commit 5f277e1667b49976a77c9fa79b9a04d775f3b49e)

Change-Id: Ia419ff68ef10f308f9e44be47420e27099ee6070

7 years agoMerge changes from topic 'framework-net-aosp'
Treehugger Robot [Fri, 9 Dec 2016 03:19:13 +0000 (03:19 +0000)]
Merge changes from topic 'framework-net-aosp'

* changes:
  DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
  DO NOT MERGE: TokenBucket for rate-limiting and throttling
  DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
  DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
  DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
  DO NOT MERGE: IpConnectivity metrics: add version number

7 years agoDO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
Hugo Benichi [Tue, 18 Oct 2016 01:36:33 +0000 (10:36 +0900)]
DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents

This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).

Test: new test in IpConnectivityMetricsTest
Bug: 1550402

(cherry picked from commit e1c173d2240a8eedf7685c9371087dc047a6931f)

Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e

7 years agoDO NOT MERGE: TokenBucket for rate-limiting and throttling
Hugo Benichi [Mon, 17 Oct 2016 23:43:30 +0000 (08:43 +0900)]
DO NOT MERGE: TokenBucket for rate-limiting and throttling

This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637

(cherry picked from commit 998493f0ee39ae0e9ffdea27f48f1b11b0807fcb)

Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031

7 years agoDO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
Hugo Benichi [Wed, 19 Oct 2016 02:17:28 +0000 (11:17 +0900)]
DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings

Test: IpConnectivityMetricsTest passes. Also manually changed the new
setting and verified the buffer size is as expected after flushing the
buffer.
Bug: 32198637

(cherry picked from commit 05686dbb6b965eb1a54591d2ed2334337886c6ee)

Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d

7 years agoDO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
Lorenzo Colitti [Fri, 21 Oct 2016 09:41:25 +0000 (18:41 +0900)]
DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.

This makes the policy for mixed HTTP/HTTPS content match Chrome.
This allows us to display login pages where unimportant
subresources are HTTP.

Bug: 32171569

(cherry picked from commit 625166377b2d7c5f09d1e7617b3eac3a464fba53)

Change-Id: Ia82958192d978280715442e182c34f9da5c88c66

7 years agoDO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Hugo Benichi [Wed, 19 Oct 2016 04:48:40 +0000 (13:48 +0900)]
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports

Test: manually created a bug report and inspected content.

(cherry picked from commit 51d14cb60793a9a073b8a29ff7875bb518cd7d54)

Change-Id: I9649cc2f9bb7a1975e60baaae55fcdb2a48c3b93

7 years agoDO NOT MERGE: IpConnectivity metrics: add version number
Hugo Benichi [Thu, 13 Oct 2016 04:16:16 +0000 (13:16 +0900)]
DO NOT MERGE: IpConnectivity metrics: add version number

This patch adds a version field to ipconnectivity.proto and populates it
to 2, which is the logical version number for NYC-MR2.

Test: IpConnectivity{EventBuilder,Metrics}Test pass
Bug: 32127906

(cherry picked from commit d680d4c856f54bea0c60dea74ba4204822391e49)

Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52

7 years agoMerge "Don't include front most excluded task in Multi-Window mode"
Treehugger Robot [Thu, 8 Dec 2016 20:52:14 +0000 (20:52 +0000)]
Merge "Don't include front most excluded task in Multi-Window mode"

7 years agoMerge changes from topic 'framework-net-aosp'
Lorenzo Colitti [Thu, 8 Dec 2016 09:56:18 +0000 (09:56 +0000)]
Merge changes from topic 'framework-net-aosp'

* changes:
  DO NOT MERGE: [CS] Remove timeout event after first available
  DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
  DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
  DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
  DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
  DO NOT MERGE: Move FakeSettingsProvider to a common location.
  DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
  DO NOT MERGE: Add option to skip and avoid captive portals.
  DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
  DO NOT MERGE: Do not synchronize boolean reads/writes
  DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
  DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
  DO NOT MERGE: Support timeouts for requestNetwork() invocations.
  DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.

7 years agoDO NOT MERGE: [CS] Remove timeout event after first available
Etan Cohen [Thu, 27 Oct 2016 22:05:50 +0000 (15:05 -0700)]
DO NOT MERGE: [CS] Remove timeout event after first available

Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.

Bug: 31402633
Test: all timeout related unit tests pass (new one added)

(cherry picked from commit 681fcda5896fd6c94f8a543ef9983c0a0644e87e)

Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748

7 years agoDO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
Hugo Benichi [Wed, 2 Nov 2016 04:43:22 +0000 (13:43 +0900)]
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest

Test methods not tagged with @{Small,Medium,Large}Test will not appear
in the Android Platform Continuous Testing dashboard.

Test methods tagged with @LargeTest will not be run in the Android
Platform Continuous Testing dashboard.

Test: ApfTest passes ($runtest frameworks-net)
Bug: 31479480

(cherry picked from commit 4195c28347cc100954f83c3c92b4dde4673f8608)

Change-Id: Ia215fc8e2ccc61f6223c24fdf390e1e759de302f

7 years agoDO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
Lorenzo Colitti [Fri, 28 Oct 2016 08:45:55 +0000 (17:45 +0900)]
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.

This was broken by the implementation of IPv6 tethering, which
relies on various private classes which end up calling unmockable
final classes like NetworkInterface.

Making everything public like this is almost certainly not the
best way of fixing this test, but on the other hand there is
value to the test continuing to pass.

Test: runtest frameworks-net  # Everything passes.
Test: IPv6 tethering continues to work.

(cherry picked from commit 7e0eeca8ba4063d0d35dda9a8dfcc612e45efb87)

Change-Id: I8a3cf466871c026f4ae0f5cfa73071338cdf5b7e

7 years agoDO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
Lorenzo Colitti [Fri, 28 Oct 2016 03:48:36 +0000 (12:48 +0900)]
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.

This will give us a good place to put all the networking tests.

Fix: 31479480
Test: adb  shell am instrument -w -e notClass com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest 'com.android.frameworks.tests.net/android.support.test.runner.AndroidJUnitRunner'  # PASS

(cherry picked from commit ecc986d430f4b8158f177ed97d2edb741f11ff71)

Change-Id: I993eeaa5dec001c39389023f355f506129b356e7

7 years agoDO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
Lorenzo Colitti [Fri, 28 Oct 2016 03:56:03 +0000 (12:56 +0900)]
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.

Removing the static dependency on guava reduces test compile time
by about 20 seconds on a Z840, thus substantially speeding up the
compile/test cycle.

Make FutureIntent public instead of package-private because it is
used directly by NetworkPolicyManagementServiceTest, which as of
this CL is now in a different package.

(cherry picked from commit 281a17c9580de5c9898be7d9654d428801976511)

Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest  # PASS
Test: runtest frameworks-services -c com.android.server.NetworkPolicyManagerServiceTest  # PASS
Test: runtest frameworks-services -c com.android.server.net.NetworkStatsServiceTest  # PASS
Test: runtest frameworks-services -c com.android.server.NetworkManagementServiceTest  # Already failing.
Bug: 31479480
Change-Id: Ifab32c9214e9caab71dbf93b3d3ca88df6f49636

7 years agoDO NOT MERGE: Move FakeSettingsProvider to a common location.
Lorenzo Colitti [Fri, 28 Oct 2016 03:37:38 +0000 (12:37 +0900)]
DO NOT MERGE: Move FakeSettingsProvider to a common location.

(cherry picked from commit 7df1a82802cdf842d07a86a80383c7d5ea7ae53a)

Test: runtest frameworks-util -c com.android.internal.util.test.FakeSettingsProviderTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-services -c com.android.server.retaildemo.PreloadAppsInstallerTest
Test: runtest frameworks-services -c com.android.server.retaildemo.RetailDemoModeServiceTest
Bug: 31479480
Change-Id: I8d4d4de2937012dd33924f53e68f96241a9b2b4f

7 years agoDO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
Hugo Benichi [Mon, 17 Oct 2016 06:54:51 +0000 (15:54 +0900)]
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such

This patch extracts into its own independent test a test sub-block looking
for a race condition when not waiting on handlers to become idle:
there is no way to prevent the race from not happening when looking for
it this way. This makes the test flakky.

This new independent test is tagged with @FlakkyTest(tolerance = 3).

Test: ConnectivityServiceTest passes, with higher probability.
Bug: 31479480

(cherry picked from commit c8c1027762d66c12c9c153ccbb8f80acdee8571c)

Change-Id: I3c702bd981ed80ed606be0fb52d61eb3d7195a6f

7 years agoDO NOT MERGE: Add option to skip and avoid captive portals.
Calvin On [Tue, 11 Oct 2016 22:10:46 +0000 (15:10 -0700)]
DO NOT MERGE: Add option to skip and avoid captive portals.

Test: ConnectivityServiceTest updated with test cases.
Test: Manually tested against att-wifi in B42.
Bug: 30222699

(cherry picked from commit be96da11ccb5dd500f920c3ba90d350857293b3d)

Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696

7 years agoDO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
Hugo Benichi [Mon, 17 Oct 2016 05:21:33 +0000 (14:21 +0900)]
DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime

This patch replaces System.currentTimeMillis() with
SystemClock.elapsedRealTime() to make RA lifetime computation more
resilient to various external events inducing jumps in
currentTimeMillis().

Test: ApfTest passes.

(cherry picked from commit 305af8e98a4fce712c1a93daf3b050dac2e8b91a)

Change-Id: If19011fc0c905948f2e42b975cfcc5f8672a95fb

7 years agoDO NOT MERGE: Do not synchronize boolean reads/writes
Hugo Benichi [Tue, 4 Oct 2016 02:24:12 +0000 (11:24 +0900)]
DO NOT MERGE: Do not synchronize boolean reads/writes

This patch removes the synchronization around the private variable
mRunning inside of IpReachabilityMonitor and instead qualifeis the field
as volatile.

Synchronization is not needed for reads/writes on native fields or
object references because they are already guaranteed to be atomic.

Synchronization here was used for enforcing memory visibility across
concurrent threads indirectly through monitor acquire/release.
The volatile keyword achieves this in a more explicit way.

Also, this patch changes the way that probeAll() copies the
IpReachabilityMonitor's mIpWatchList by temporary holding mIpWatchList
keys into an ArrayList instead of a more expensive HashSet. Since Java
HashSet are just degenerated HashMaps, and that key iteration order is
based on key hash, the iteration order over this temporary collection
will be consistent for the same mIpWatchList.

Test: refactoring CL. Existing unit tests still pass.

(cherry picked from commit b0f1186c034c4df9eb54ed29944d16ce6d7ade56)

Change-Id: I48d2b4d837a459150cd431b400ec01b87b48c014

7 years agoDO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
Hugo Benichi [Thu, 13 Oct 2016 00:26:01 +0000 (09:26 +0900)]
DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters

This patch adds a getUint8 getter for ByteBuffers and changes ApfFilter
to make uses of getUint8/16/32 everywhere.

The return types of getUint16 is also changed from long to int, which
will expand gracefully to long as an unsigned int as it is guaranteed to
be positive after getUint16.

Test: ApfTest passes

(cherry picked from commit 995dd94673005b43d32456e2de5fda0090b23576)

Change-Id: I606ebc5aedfcacde400d27cc6bc37145769b122c

7 years agoDO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
Hugo Benichi [Thu, 6 Oct 2016 06:19:36 +0000 (15:19 +0900)]
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing

Test: added new unit tests

(cherry picked from commit 8acea76a2b7555b3bd5ca1170cca9d09e979fafc)

Change-Id: I847d7e4895766042043c0bba1c9b9a698a705d87

7 years agoDO NOT MERGE: Support timeouts for requestNetwork() invocations.
Erik Kline [Wed, 25 Nov 2015 03:49:38 +0000 (12:49 +0900)]
DO NOT MERGE: Support timeouts for requestNetwork() invocations.

(cherry-pick of 06c3ef1367e850746eef0a5462bdce8674d74c30)
(cherry picked from commit 57faba9ec73fbb311d5ca1df3278aee9728589d5)

Bug: 21414325
Change-Id: I1a58823a372154589f972b98c4c428eab0e0523e

7 years agoDO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is
Pierre Imai [Mon, 8 Feb 2016 07:01:40 +0000 (16:01 +0900)]
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is
specified for a given network.

Bug: 10705136

(cherry picked from commit 54f0d9edbf7f6ea6dd805dc77fdbf2c3848188e2)

Change-Id: I89e2fdfbbfa981d435a2974422d9d9c009872d76

7 years agoMerge "Support multiple caches in NetworkScoreService."
Treehugger Robot [Thu, 8 Dec 2016 02:09:39 +0000 (02:09 +0000)]
Merge "Support multiple caches in NetworkScoreService."

7 years agoSupport multiple caches in NetworkScoreService.
Amin Shaikh [Wed, 7 Dec 2016 22:08:09 +0000 (14:08 -0800)]
Support multiple caches in NetworkScoreService.

- Use RemoteCallbackList for managing multiple callbacks
- Add unregisterNetworkScoreCache to the service interface
- Added NetworkScoreServiceTest

Test: runtest frameworks-services

Bug: 32913019
Change-Id: I16ca1682acca9cbe403812e520394688a026414b

7 years agoMerge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED."
Treehugger Robot [Wed, 7 Dec 2016 23:00:26 +0000 (23:00 +0000)]
Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED."

7 years agoMerge "Remove user-triggered disconnect counters"
Michael Plass [Wed, 7 Dec 2016 22:56:57 +0000 (22:56 +0000)]
Merge "Remove user-triggered disconnect counters"

7 years agoMerge "Yet another set of installd Binder methods."
Jeff Sharkey [Wed, 7 Dec 2016 22:38:48 +0000 (22:38 +0000)]
Merge "Yet another set of installd Binder methods."

7 years agoMerge "Move dump() to dumpAsync(), more oneway calls."
Treehugger Robot [Wed, 7 Dec 2016 21:43:24 +0000 (21:43 +0000)]
Merge "Move dump() to dumpAsync(), more oneway calls."

7 years agoMove dump() to dumpAsync(), more oneway calls.
Jeff Sharkey [Wed, 9 Nov 2016 19:25:44 +0000 (12:25 -0700)]
Move dump() to dumpAsync(), more oneway calls.

When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

(cherry picked from commit 850c83e6da3b34a4eab804133420247fc9dbb8a1)

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088

Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5

Change-Id: Ic2be10dc8478d613cea6e2c976b9987c250b86b7

7 years agoYet another set of installd Binder methods.
Jeff Sharkey [Wed, 7 Dec 2016 17:37:47 +0000 (10:37 -0700)]
Yet another set of installd Binder methods.

Pretty straightforward refactoring.

Test: builds, boots, apps install fine
Bug: 1375896030944031
Change-Id: Ide533a04e1e31475a16046722f48b1934d8cacd3

7 years agoRemove user-triggered disconnect counters
Michael Plass [Mon, 21 Nov 2016 19:35:27 +0000 (11:35 -0800)]
Remove user-triggered disconnect counters

Removes these fields of WifiConfiguration:
  numUserTriggeredWifiDisableLowRSSI
  numUserTriggeredWifiDisableBadRSSI
  numUserTriggeredWifiDisableNotHighRSSI
  numTicksAtBadRSSI
  numTicksAtNotHighRSSI
  numUserTriggeredJoinAttempts

Add parcel test for WifiConfiguration.

Bug: 33013630
Test: unit tests pass
Change-Id: I39566c4e7845b01899739c36d6ec633f272fec6f

7 years agoMerge "Add legacy-performance-test-hostdex target"
Paul Duffin [Wed, 7 Dec 2016 16:37:10 +0000 (16:37 +0000)]
Merge "Add legacy-performance-test-hostdex target"

7 years agoAdd legacy-performance-test-hostdex target
Paul Duffin [Wed, 7 Dec 2016 14:21:53 +0000 (14:21 +0000)]
Add legacy-performance-test-hostdex target

This is needed for some internal targets that currently depend
directly on the source files and which break when the source
file is moved.

Bug: 30188076
Test: make legacy-performance-test-hostdex
Change-Id: I653325605204c1f272bd5f669e2297eedeaf7d61

7 years agoMerge "Replace core-junit with junit"
Paul Duffin [Wed, 7 Dec 2016 12:52:01 +0000 (12:52 +0000)]
Merge "Replace core-junit with junit"

7 years agoMerge "Handle IpReachabilityMonitor errors better."
Treehugger Robot [Wed, 7 Dec 2016 09:17:21 +0000 (09:17 +0000)]
Merge "Handle IpReachabilityMonitor errors better."

7 years agoHandle IpReachabilityMonitor errors better.
Erik Kline [Fri, 14 Oct 2016 09:33:22 +0000 (18:33 +0900)]
Handle IpReachabilityMonitor errors better.

If construction of a new IpReachabilityMonitor throws an IAE then
log it and immediately call onProvisioningFailure().

Test: runtest frameworks-wifi
      passes, except for selectQualifiedNetworkDoesNotChooseDeletedEphemeral()
      which fails with an NPE for unrelated reasons.

Bug: 31038971
Bug: 31742703
Change-Id: Ie91b8bdd509d06ad54d062bf446e74c092eb096c
(cherry picked from commit e4526604664cb66ecdcbeca4d8f64e8c94750c31)

7 years agoMerge "Move more installd methods to Binder."
Jeff Sharkey [Wed, 7 Dec 2016 06:39:27 +0000 (06:39 +0000)]
Merge "Move more installd methods to Binder."

7 years agoMerge "Workaround for javac compilation issue of lambda code"
Andreas Gampe [Wed, 7 Dec 2016 02:05:08 +0000 (02:05 +0000)]
Merge "Workaround for javac compilation issue of lambda code"

7 years agoMove more installd methods to Binder.
Jeff Sharkey [Tue, 6 Dec 2016 06:39:46 +0000 (23:39 -0700)]
Move more installd methods to Binder.

Test: builds, boots, apps install fine
Bug: 1375896030944031
Change-Id: Ic00968214cec03d67fff7964e5175ab9e6132b36

7 years agoWorkaround for javac compilation issue of lambda code
Mark Renouf [Tue, 1 Nov 2016 15:48:24 +0000 (11:48 -0400)]
Workaround for javac compilation issue of lambda code

Since ag/32554459 some Robolectric tests are compiling
framework code with javac. For reasons unclear so far this
code fails to compile with javac:

> ShortcutService.java:408: error: variable ri might not have been initialized

https://android-build.googleplex.com/builds/submitted/3416256/angelfish-userdebug/latest/logs

Removing the lambda expressions corrects the issue.

(cherry picked from commit e065f7c5a9ad4e47f5490793401445660af37624)

BUG: 32554459
Test: m
Change-Id: I189c8ef02dc93b46ef6418c1ff14f2312097898a

7 years agoMerge "Fix crashing StrictJarFile due to doubled closing."
Treehugger Robot [Wed, 7 Dec 2016 01:40:48 +0000 (01:40 +0000)]
Merge "Fix crashing StrictJarFile due to doubled closing."

7 years agoMerge "Adding a new string array resource for network recommendations."
Treehugger Robot [Wed, 7 Dec 2016 01:17:16 +0000 (01:17 +0000)]
Merge "Adding a new string array resource for network recommendations."

7 years agoClarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED.
Stephen Chen [Wed, 7 Dec 2016 00:08:52 +0000 (16:08 -0800)]
Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED.

Bug: 32913919
Test: n/a
Change-Id: Ied075bdcc1ebb8f0a4bc0d3bf9758fa6719ce0b9

7 years agoAdding a new string array resource for network recommendations.
Jeremy Joslin [Thu, 1 Dec 2016 00:44:11 +0000 (16:44 -0800)]
Adding a new string array resource for network recommendations.

The new resource allows for multiple package names to be specified
in priority order.

Test: Nothing to test.
BUG: 33158362
Merged-In: I4a066d9220c723a17dd11e2566161fade6bb471b
Merged-In: Ifed73e493fe7de64b3dd051a53d16d39da1e4eef
Change-Id: I26ac87a49ae94dd0763173af5c8a2c6abe7cb5f8

7 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Tue, 6 Dec 2016 23:17:16 +0000 (15:17 -0800)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD

7 years agoMerge "API for requesting network recommendations."
Treehugger Robot [Tue, 6 Dec 2016 23:08:02 +0000 (23:08 +0000)]
Merge "API for requesting network recommendations."

7 years agoMerge "Move moveCompleteApp() to Binder."
Jeff Sharkey [Tue, 6 Dec 2016 22:24:25 +0000 (22:24 +0000)]
Merge "Move moveCompleteApp() to Binder."

7 years agoAPI for requesting network recommendations.
Jeremy Joslin [Tue, 29 Nov 2016 01:47:35 +0000 (17:47 -0800)]
API for requesting network recommendations.

Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.

Test: Coming in a future CL.
BUG: 32909424
Merged-In: I2d5c0a843b928b04e87c1862a78702a02fd54c31
Change-Id: Idd33095c6cd2f5b391796c900399f18a2c40fcc3

7 years agoMerge "Move dump() to dumpAsync(), more oneway calls."
Jeff Sharkey [Tue, 6 Dec 2016 20:45:22 +0000 (20:45 +0000)]
Merge "Move dump() to dumpAsync(), more oneway calls."
am: 5773d9702e  -s ours

Change-Id: Ifc71dfc411dfd8d4fc23b8e7f0843ee90607bb3b

7 years agoMerge "Move dump() to dumpAsync(), more oneway calls."
Treehugger Robot [Tue, 6 Dec 2016 20:15:27 +0000 (20:15 +0000)]
Merge "Move dump() to dumpAsync(), more oneway calls."

7 years agoMerge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
Stephen Chen [Tue, 6 Dec 2016 19:20:24 +0000 (19:20 +0000)]
Merge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
am: 70ae1bf4db

Change-Id: If3d13f94a131188ddbebc7a35c82ea357b37e022

7 years agoMerge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
Treehugger Robot [Tue, 6 Dec 2016 19:11:28 +0000 (19:11 +0000)]
Merge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."

7 years agoMove dump() to dumpAsync(), more oneway calls.
Jeff Sharkey [Wed, 9 Nov 2016 19:25:44 +0000 (12:25 -0700)]
Move dump() to dumpAsync(), more oneway calls.

When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5

7 years agoresolve merge conflicts of 9600df0 to stage-aosp-master
Jason Monk [Tue, 6 Dec 2016 16:34:12 +0000 (11:34 -0500)]
resolve merge conflicts of 9600df0 to stage-aosp-master

Change-Id: I139c64bb2440d64312d7e763e53bdb13dcb9f1aa

7 years agoMerge "Check for nullptr when casting IBinder to IBase."
Yifan Hong [Tue, 6 Dec 2016 15:39:02 +0000 (15:39 +0000)]
Merge "Check for nullptr when casting IBinder to IBase."
am: 5014028691

Change-Id: I4a3c320351a9afa305a40e3912cc2e968494497c

7 years agoMerge "Fix Hotspot tile is shown on Guest user"
Jason Monk [Tue, 6 Dec 2016 15:11:18 +0000 (15:11 +0000)]
Merge "Fix Hotspot tile is shown on Guest user"

7 years agoMerge "Check for nullptr when casting IBinder to IBase."
Treehugger Robot [Tue, 6 Dec 2016 15:08:39 +0000 (15:08 +0000)]
Merge "Check for nullptr when casting IBinder to IBase."

7 years agoReplace core-junit with junit
Paul Duffin [Thu, 1 Dec 2016 13:50:06 +0000 (13:50 +0000)]
Replace core-junit with junit

Bug: 30188076
Test: make checkbuild
Change-Id: I0cb6f89907eb099714b54bac57b51c4be186c3e0

7 years agoDon't include front most excluded task in Multi-Window mode
Yoshinori Hirano [Mon, 21 Nov 2016 06:42:20 +0000 (15:42 +0900)]
Don't include front most excluded task in Multi-Window mode

A front most excluded task is shown on Overview when changing font size
in Multi-Window mode. To fix this issue, RecentActivity should not reset
the config launch flags when it is restarted by configuration changes and
it should not reload the tasks which include a front most excluded task
when it is launched while docking a task.

Bug: 33031985
Test: manual - display app task excluded from Overview screen and then
               change font size in Multi-Window mode

Change-Id: Ic0c35cd06c14d9ed8d2dc46a01f2153738bad849

7 years agoMove moveCompleteApp() to Binder.
Jeff Sharkey [Tue, 6 Dec 2016 06:14:41 +0000 (23:14 -0700)]
Move moveCompleteApp() to Binder.

Also start manually checking thread-locking, since Binder methods
don't funnel through the old transact().

Test: builds, boots, apps install fine
Bug: 1375896030944031
Change-Id: I661eade7dc8e060689ecbcb9b6d19528e5c4ca66

7 years agoFix crashing StrictJarFile due to doubled closing.
Tomasz Mikolajewski [Tue, 6 Dec 2016 01:05:05 +0000 (10:05 +0900)]
Fix crashing StrictJarFile due to doubled closing.

If the constuctor throws, then the handles would be closed without
setting "closed" to true. As a result, the finalizer would close
the handles again, which would cause a crash on the native side.

Test: Unit tests are no longer flaky.
Bug: 33301253
Change-Id: I527ba38d5d65ce844258d894441d4fe16bac6e23

7 years agoAdd Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag.
Stephen Chen [Wed, 16 Nov 2016 23:46:51 +0000 (15:46 -0800)]
Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag.

This flag enables the NetworkScoreService.requestRecommendations API,
defined in b/32909424.

Bug: 32913919
Bug: 32909424
Test: runtest --path
frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java

Change-Id: If592e4a2ec574929aa0c829c39ad4ce9b0317805

7 years agoMerge "Initial Binder interface for installd."
Jeff Sharkey [Tue, 6 Dec 2016 00:23:56 +0000 (00:23 +0000)]
Merge "Initial Binder interface for installd."
am: 19fc36fa33

Change-Id: I22e910b705327eafa5c158ec43d6d86eb0b429d0

7 years agoMerge "Initial Binder interface for installd."
Jeff Sharkey [Tue, 6 Dec 2016 00:14:53 +0000 (00:14 +0000)]
Merge "Initial Binder interface for installd."

7 years agoCheck for nullptr when casting IBinder to IBase.
Yifan Hong [Mon, 5 Dec 2016 21:10:13 +0000 (13:10 -0800)]
Check for nullptr when casting IBinder to IBase.

Test: compiles

Bug: 33307202
Change-Id: I6ef880188e2f43766e52317244366b2fdd38c728

7 years agoInitial Binder interface for installd.
Jeff Sharkey [Mon, 5 Dec 2016 18:19:28 +0000 (11:19 -0700)]
Initial Binder interface for installd.

Start using new installd Binder interface, with a quick-disable
switch if something breaks.

Test: builds, boots
Bug: 1375896030944031
Change-Id: Ia6e55d49595c96ae928aefc8a6606ee690e58764

7 years agoMerge "[AWARE] Fix javadocs for match filter update"
Etan Cohen [Mon, 5 Dec 2016 15:57:37 +0000 (15:57 +0000)]
Merge "[AWARE] Fix javadocs for match filter update"
am: 7241d28826

Change-Id: I67b2798b0eb1bc7e4ccd727aad9e761da49a8823

7 years agoMerge "[AWARE] Fix javadocs for match filter update"
Etan Cohen [Mon, 5 Dec 2016 15:51:17 +0000 (15:51 +0000)]
Merge "[AWARE] Fix javadocs for match filter update"

7 years agoMerge "Introduce a new user restriction for disallowing Bluetooth."
ltrochtova [Mon, 5 Dec 2016 15:44:06 +0000 (15:44 +0000)]
Merge "Introduce a new user restriction for disallowing Bluetooth."
am: 5fb37a7641  -s ours

Change-Id: Ib4a1173b40701562fc41738319371e126eba6c04

7 years agoMerge "Introduce a new user restriction for disallowing Bluetooth."
ltrochtova [Mon, 5 Dec 2016 15:35:21 +0000 (15:35 +0000)]
Merge "Introduce a new user restriction for disallowing Bluetooth."

7 years agoIntroduce a new user restriction for disallowing Bluetooth.
Lenka Trochtova [Fri, 2 Dec 2016 11:19:39 +0000 (12:19 +0100)]
Introduce a new user restriction for disallowing Bluetooth.

Only the device owner will be able to set the restriction
and the restriction will prevent usage of Bluetooth on the
entire device - i.e. in all the users.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Merged-In: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

Change-Id: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

7 years agoIntroduce a new user restriction for disallowing Bluetooth.
Lenka Trochtova [Fri, 2 Dec 2016 11:19:39 +0000 (12:19 +0100)]
Introduce a new user restriction for disallowing Bluetooth.

Only the device owner will be able to set the restriction
and the restriction will prevent usage of Bluetooth on the
entire device - i.e. in all the users.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Merged-In: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

Change-Id: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

7 years agoMerge "Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64"
Tobias Thierer [Mon, 5 Dec 2016 09:35:10 +0000 (09:35 +0000)]
Merge "Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64"
am: 1e498a96c1

Change-Id: I28b8deadc9386b8772bd94870809213fdddad7e6

7 years agoMerge "Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64"
Tobias Thierer [Mon, 5 Dec 2016 09:28:46 +0000 (09:28 +0000)]
Merge "Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64"

7 years agoMerge "ExifInterface: fix NegativeArraySizeException"
Sungsoo Lim [Mon, 5 Dec 2016 04:41:30 +0000 (04:41 +0000)]
Merge "ExifInterface: fix NegativeArraySizeException"
am: c57b472d67

Change-Id: Ifbe9af9b62837923e6e56159759da6c59795b3aa

7 years agoMerge "ExifInterface: fix NegativeArraySizeException"
Sungsoo Lim [Mon, 5 Dec 2016 04:35:17 +0000 (04:35 +0000)]
Merge "ExifInterface: fix NegativeArraySizeException"

7 years agoMerge "Use IBase instead of IBinder for IServiceManager."
Yifan Hong [Sat, 3 Dec 2016 23:10:08 +0000 (23:10 +0000)]
Merge "Use IBase instead of IBinder for IServiceManager."
am: 8ead2f0c9a

Change-Id: Ia18426c336f1ba9c9bceb57db0222ba6c59667a9

7 years agoMerge "Use IBase instead of IBinder for IServiceManager."
Treehugger Robot [Sat, 3 Dec 2016 23:04:24 +0000 (23:04 +0000)]
Merge "Use IBase instead of IBinder for IServiceManager."

7 years agoMerge "Update Samsung Print Recommendation Plugin (to support Mopria printers)"
Sergey Yakovlev [Sat, 3 Dec 2016 04:19:44 +0000 (04:19 +0000)]
Merge "Update Samsung Print Recommendation Plugin (to support Mopria printers)"
am: 41f14f47a5

Change-Id: I476bab68c662809bd998f0334441fdd31f6c940a

7 years agoMerge changes from topic 'fast-bss-transition'
Roshan Pius [Sat, 3 Dec 2016 04:18:00 +0000 (04:18 +0000)]
Merge changes from topic 'fast-bss-transition'
am: f301986727

Change-Id: I0b0334f193120d379031d9790d68bc2840254391

7 years agoAdd capability flag for 802.11r fast BSS transition
Paul Stewart [Sat, 3 Dec 2016 04:17:49 +0000 (04:17 +0000)]
Add capability flag for 802.11r fast BSS transition
am: 07f4d23a88

Change-Id: Ife9a8e1342b6b090dec749cf505fd3091ff33f89

7 years agoAdd constants for 802.11r
Paul Stewart [Sat, 3 Dec 2016 04:16:58 +0000 (04:16 +0000)]
Add constants for 802.11r
am: e72f7dc385

Change-Id: I06d93c3ce96cddd6447b340304ce9fec2d4e41f2

7 years agoMerge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."
Stephen Chen [Sat, 3 Dec 2016 04:16:06 +0000 (04:16 +0000)]
Merge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."
am: d758ce1586

Change-Id: I1bf1effbb635d57980728555587e8056f630edb9

7 years agoMerge "Convert libandroidfw to Android.bp"
Colin Cross [Sat, 3 Dec 2016 04:14:58 +0000 (04:14 +0000)]
Merge "Convert libandroidfw to Android.bp"
am: 46ec8dba83

Change-Id: I32a737c491eeb95ad080adacd47602ee814ba0cb

7 years agoMerge "Update Samsung Print Recommendation Plugin (to support Mopria printers)"
Treehugger Robot [Sat, 3 Dec 2016 03:53:17 +0000 (03:53 +0000)]
Merge "Update Samsung Print Recommendation Plugin (to support Mopria printers)"

7 years agoMerge changes from topic 'fast-bss-transition'
Roshan Pius [Fri, 2 Dec 2016 23:57:39 +0000 (23:57 +0000)]
Merge changes from topic 'fast-bss-transition'

* changes:
  Add capability flag for 802.11r fast BSS transition
  Add constants for 802.11r

7 years agoMerge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."
Treehugger Robot [Fri, 2 Dec 2016 23:41:36 +0000 (23:41 +0000)]
Merge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."

7 years agoMerge "Convert libandroidfw to Android.bp"
Treehugger Robot [Fri, 2 Dec 2016 23:16:48 +0000 (23:16 +0000)]
Merge "Convert libandroidfw to Android.bp"

7 years agoMerge "Fix the deadlock problem"
Chris Tate [Fri, 2 Dec 2016 22:45:47 +0000 (22:45 +0000)]
Merge "Fix the deadlock problem"
am: fa228e06f6

Change-Id: I862d3cedcf38c81f22559439aa8f00ac2ab3cca3

7 years agoMerge "Fix the deadlock problem"
Chris Tate [Fri, 2 Dec 2016 22:39:57 +0000 (22:39 +0000)]
Merge "Fix the deadlock problem"

7 years agoMerge "Remove static link in Android framework under /frameworks/base."
Jaekyun Seok [Fri, 2 Dec 2016 19:35:03 +0000 (19:35 +0000)]
Merge "Remove static link in Android framework under /frameworks/base."
am: c60963e451

Change-Id: I0bbb3cf9a66752f6ee8218a4ac5545091130bbed

7 years agoConvert libandroidfw to Android.bp
Colin Cross [Thu, 1 Dec 2016 23:55:00 +0000 (15:55 -0800)]
Convert libandroidfw to Android.bp

See build/soong/README.md for more information.

Test: libandroidfw_tests
Merged-In: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
Change-Id: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
(cherry picked from commit 4f8d9e69eb63878a99abedfdc7b92c6284f30605)

7 years agoMerge "Remove static link in Android framework under /frameworks/base."
Treehugger Robot [Fri, 2 Dec 2016 19:21:46 +0000 (19:21 +0000)]
Merge "Remove static link in Android framework under /frameworks/base."

7 years agoMerge "Add new hostingType for startProcessLocked() that selects using the WebViewZyg...
Robert Sesek [Fri, 2 Dec 2016 17:15:23 +0000 (17:15 +0000)]
Merge "Add new hostingType for startProcessLocked() that selects using the WebViewZygote."
am: eda1af611f

Change-Id: I539fb728175c109a93cbff7d8929b584e88bb70c

7 years agoMerge "Add new hostingType for startProcessLocked() that selects using the WebViewZyg...
Treehugger Robot [Fri, 2 Dec 2016 17:02:31 +0000 (17:02 +0000)]
Merge "Add new hostingType for startProcessLocked() that selects using the WebViewZygote."

7 years agoMigrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64
Tobias Thierer [Thu, 1 Dec 2016 23:04:36 +0000 (23:04 +0000)]
Migrate StrictJarVerifier and ShortcutPackageInfo to java.util.Base64

Previously, they weres using libcore.io.Base64, which is @deprecated.

The two implementations' encoders produce the exact same result.

The two implementations' decoders' behavior differs for malformed
input:
 - In case of error, libcore.io.Base64.decode() returns null while
   java.util.Base64.getDecoder().decode() throws.
 - java.util.Base64 tends to be stricter about rejecting malformed
   input; specifically, it allows neither whitespace nor unexpected
   '=' characters (should only occur in the padding) whereas
   libcore.io.Base64.decode() leniently allows them throughout the
   input.
 - if the input terminates prematurely, libcore.io.Base64 tends to
   return fewer bytes (stops at a four byte boundary).

The behavior differences for malformed Base64 encoded data should
not affect ShortcutPackageInfo because it should only need to deal
with XML attribute values written by itself, which are well-formed.
Note that this CL does not lead to any known changes of the encoding
step, so values written by earlier versions should not cause problems
when read by later versions of ShortcutPackageInfo.

StrictJarVerifier may now reject or behave differently for .jar /
.zip files with malformed attribute values but this seems okay since,
per its name, it is meant to be strict. For example, after this CL,
StrictJarVerifier will no longer accept algorithm + "-Digest"
attribute values with extra whitespace or padding characters as valid.

Test: Confirmed that the two implementations' encoders produce the
      same result by running the following code just before this CL:
      assertEquals(
          libcore.io.Base64.encode(allBytes()),
          Base64.getEncoder().encodeToString(allBytes()));
      where allBytes() returns a byte[] with values (byte) 0 .. (byte) 255
Test: Test that phone still boots after flashing code that includes
      this CL.
Test: CtsLibcoreTestCases

Bug: 31292683

Change-Id: I775d32f329f693514a8f14d87e1ef0d7a757e6c3

7 years agoExifInterface: fix NegativeArraySizeException
NIEJuhu [Fri, 4 Nov 2016 09:13:13 +0000 (17:13 +0800)]
ExifInterface: fix NegativeArraySizeException

The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.

Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
7 years agoMerge "Protect broadcast emitted by Bluetooth mapmce and pbap profile"
Jack He [Fri, 2 Dec 2016 04:49:39 +0000 (04:49 +0000)]
Merge "Protect broadcast emitted by Bluetooth mapmce and pbap profile"
am: 7dd909684f

Change-Id: Ib90b23ef7b4271e2adc8a3c66963aaeb5c70a66f