OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge "WebView: rename initSafeBrowsing and remove shutdownSafeBrowsing" into oc...
Nate Fischer [Tue, 22 Aug 2017 22:40:39 +0000 (22:40 +0000)]
Merge "WebView: rename initSafeBrowsing and remove shutdownSafeBrowsing" into oc-mr1-dev

6 years agoMerge "Tethering offload stats updates are eventually consistent" into oc-mr1-dev
Lorenzo Colitti [Tue, 22 Aug 2017 22:06:46 +0000 (22:06 +0000)]
Merge "Tethering offload stats updates are eventually consistent" into oc-mr1-dev

6 years agoMerge "Use the installer package name for broadcasts" into oc-mr1-dev
Todd Kennedy [Tue, 22 Aug 2017 20:27:12 +0000 (20:27 +0000)]
Merge "Use the installer package name for broadcasts" into oc-mr1-dev

6 years agoMerge "Solve AppBackupUtils.signaturesMatch() policies" into oc-mr1-dev
TreeHugger Robot [Tue, 22 Aug 2017 19:12:17 +0000 (19:12 +0000)]
Merge "Solve AppBackupUtils.signaturesMatch() policies" into oc-mr1-dev

6 years agoMerge "Add trace counter for target screen brightness." into oc-mr1-dev
TreeHugger Robot [Tue, 22 Aug 2017 19:11:09 +0000 (19:11 +0000)]
Merge "Add trace counter for target screen brightness." into oc-mr1-dev

6 years agoMerge "DozeScrimController: Fix tight-posting bug" into oc-mr1-dev
Jorim Jaggi [Tue, 22 Aug 2017 18:05:02 +0000 (18:05 +0000)]
Merge "DozeScrimController: Fix tight-posting bug" into oc-mr1-dev

6 years agoMerge "USB debug dialog won't give permission if obscured." into oc-mr1-dev
TreeHugger Robot [Tue, 22 Aug 2017 17:03:17 +0000 (17:03 +0000)]
Merge "USB debug dialog won't give permission if obscured." into oc-mr1-dev

6 years agoMerge "Place focus on window when a11y performs an action" into oc-mr1-dev
Phil Weaver [Tue, 22 Aug 2017 16:42:13 +0000 (16:42 +0000)]
Merge "Place focus on window when a11y performs an action" into oc-mr1-dev

6 years agoDozeScrimController: Fix tight-posting bug
Adrian Roos [Tue, 22 Aug 2017 15:27:27 +0000 (15:27 +0000)]
DozeScrimController: Fix tight-posting bug

Fixes a typo that lead to never-ending posting of runnables

Change-Id: I6fb36d000d0af53142576a2deffa49151db270b4
Fixes: 64908631
Test: Repeatedly put the device to sleep and wake up with AOD enabled. Ensure system load stays low.

6 years agoSolve AppBackupUtils.signaturesMatch() policies
Bernardo Rufino [Fri, 18 Aug 2017 13:27:31 +0000 (14:27 +0100)]
Solve AppBackupUtils.signaturesMatch() policies

Now we reject unsigned apps, either source or target. Also
added javadoc.

Bug: 37977154
Test: runtest -p com.android.server.backup frameworks-services
Change-Id: I44df43d5322ae64d97f8b19c20db508033301f91

6 years agoTethering offload stats updates are eventually consistent
Hugo Benichi [Tue, 22 Aug 2017 04:57:41 +0000 (13:57 +0900)]
Tethering offload stats updates are eventually consistent

This patch removes the call to runWithScissors() in
OffloadController#getTetherStats() that was causing a deadlock when
NetworkStatsService would be polled for stats in certain threading
contexts.

Instead of trying to query the tethering offload HAL synchronously all
the time, this patch:
 - changes getTetherStats() to only call into the offload HAL when it
   detects that it is called on the same thread as the Tethering handler
   thread.
 - changes the map of interface to accumulated tethering forwarded stats
   to be concurrent.

This makes stats reading from getTetherStats() eventually consistent.
From the point of view of getTetherStats(), it preserves the guarantees
that tethering stats are monotonically increasing, and also guarantees
no tearing between rx bytes and tx bytes.

Bug: 29337859
Bug: 32163131
Bug: 64771555
Test: runtest frameworks-net
Change-Id: Ibcd351ad0225ef146b00a807833f76d2a886f6c1

6 years agoMerge "IpManager: use InitialConfiguration for provisioning" into oc-mr1-dev
Hugo Benichi [Tue, 22 Aug 2017 05:52:47 +0000 (05:52 +0000)]
Merge "IpManager: use InitialConfiguration for provisioning" into oc-mr1-dev

6 years agoMerge "[AWARE] Add a group network specifier allowing matches to multiple requests...
TreeHugger Robot [Tue, 22 Aug 2017 02:18:44 +0000 (02:18 +0000)]
Merge "[AWARE] Add a group network specifier allowing matches to multiple requests" into oc-mr1-dev

6 years agoWebView: rename initSafeBrowsing and remove shutdownSafeBrowsing
Nate Fischer [Tue, 22 Aug 2017 00:59:55 +0000 (17:59 -0700)]
WebView: rename initSafeBrowsing and remove shutdownSafeBrowsing

This renames the method as follows:

 * initSafeBrowsing -> startSafeBrowsing

This also updates documentation to fix javadoc references, and to
clarify that Safe Browsing checks are not guaranteed until after
startSafeBrowsing() invokes its callback.

This does not change the method name in WebViewFactoryProvider, because
changing this would break CTS tests (since the WebView APK implements
this under the old name).

This also removes shutdownSafeBrowsing, because we found there was no
good use for this (it's meaningless for AOSP, and we were recommended to
avoid calling the underlying GMSCore API for GoogleWebView). More
significantly, there's no good place for an application to call it from.

Bug: 64331900
Test: make update-api (docs are correct)
Change-Id: Idf2b9390306052f5c5dfb92909fca4cfeec74aef

6 years agoMerge "AOD: Only play wakeup animation when actually waking up" into oc-mr1-dev
Adrian Roos [Mon, 21 Aug 2017 22:07:05 +0000 (22:07 +0000)]
Merge "AOD: Only play wakeup animation when actually waking up" into oc-mr1-dev

6 years agoDO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentati...
Baligh Uddin [Mon, 21 Aug 2017 21:52:56 +0000 (21:52 +0000)]
DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: 230c78cec5  -s ours
am: f564bcc159  -s ours

Change-Id: I3bc8768f4790abe57ed64bb516db5dadd9a7dd9c

6 years agoDO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
Tyler Freeman [Mon, 21 Aug 2017 21:41:25 +0000 (21:41 +0000)]
DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
am: ca136cdd46  -s ours

Change-Id: I6ac35f90d62b08cb6cae66b9ed001265a7496aea

6 years agoDO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentati...
Baligh Uddin [Mon, 21 Aug 2017 21:40:53 +0000 (21:40 +0000)]
DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
am: 230c78cec5  -s ours

Change-Id: Ida80fe80780bf4f811aa54e0163f5c936f4d16a6

6 years agoDO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
The Android Automerger [Mon, 21 Aug 2017 21:28:42 +0000 (21:28 +0000)]
DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev

BUG:64864568

6 years agoMerge "Disable hwui blending for first draw to main FBO" into oc-mr1-dev
Chris Craik [Mon, 21 Aug 2017 20:02:21 +0000 (20:02 +0000)]
Merge "Disable hwui blending for first draw to main FBO" into oc-mr1-dev

6 years agoFix crash in the Alarm Manager service
Christopher Tate [Mon, 21 Aug 2017 18:24:30 +0000 (11:24 -0700)]
Fix crash in the Alarm Manager service

Revert the previous change that introduced an unguarded .equals()
invocation.

Fixes: 64881210
Test: manual

Change-Id: Iaf0b5a5e765ac4802df87083edf629a8cd9a90cd

6 years agoMerge "Log "launched from" packge for all activities" into oc-mr1-dev
TreeHugger Robot [Mon, 21 Aug 2017 17:58:05 +0000 (17:58 +0000)]
Merge "Log "launched from" packge for all activities" into oc-mr1-dev

6 years agoMerge "Handle compressed APK enable/disable" into oc-mr1-dev
TreeHugger Robot [Mon, 21 Aug 2017 16:52:53 +0000 (16:52 +0000)]
Merge "Handle compressed APK enable/disable" into oc-mr1-dev

6 years agoMerge "Log reportFullyDrawn into TRON" into oc-mr1-dev
TreeHugger Robot [Mon, 21 Aug 2017 16:47:21 +0000 (16:47 +0000)]
Merge "Log reportFullyDrawn into TRON" into oc-mr1-dev

6 years agoMerge "Use top fullscreen window to inherit SystemUI flags" into oc-mr1-dev
TreeHugger Robot [Mon, 21 Aug 2017 16:21:52 +0000 (16:21 +0000)]
Merge "Use top fullscreen window to inherit SystemUI flags" into oc-mr1-dev

6 years agoAOD: Only play wakeup animation when actually waking up
Adrian Roos [Mon, 21 Aug 2017 15:17:20 +0000 (17:17 +0200)]
AOD: Only play wakeup animation when actually waking up

Fixes an issue where the wake up animation could play when going to sleep,
if the screen turning on for AOD happened after the finishing going to sleep.

Change-Id: I6b00aaefb672a630f43ca229d6cc66d12bc4205c
Fixes: 64814671
Test: Pull up app launcher, turn off screen, verify AOD does not blink.

6 years agoHandle compressed APK enable/disable
Todd Kennedy [Fri, 18 Aug 2017 21:22:50 +0000 (14:22 -0700)]
Handle compressed APK enable/disable

There are two scenarios handled with this change:

* When updates are removed for a compressed APK, we re-scan
  the stub and disable the package. The stub must never be
  enabled by its own

* When a stub is enabled programatically [eg. via settings],
  extract the compressed APK to the data partition, scan
  the extracted APKs and only then enable the application

Bug: 64386107
Test: Manual; create a test stub app and verify enable/disable work as expected from the settings UI
Test: Manual; chagne the code to trigger various failures and verify the system remains stable
Change-Id: Ia4cb8e25ce8da11edc910d531eedaa37a9093002

6 years agoUse the installer package name for broadcasts
Todd Kennedy [Mon, 21 Aug 2017 14:06:27 +0000 (07:06 -0700)]
Use the installer package name for broadcasts

We would send the broadcast to the installer of record for
the _removed_ package [ie. replaced]. There was no value
containing the installer of record for the _installed_
package. Now prefer to send the broadcast to the installer
of record for the install. Otherwise, use the installer of
record for removal.

Change-Id: Idb1a7fa522a19273eb3641746e1966aa7af97e7c
Fixes: 62905206
Test: Manual. 'adb install test.apk' doesn't fire broadcast to the installer.
Test: Manual. 'adb install -i com.foo test.apk' fires broadcast to "com.foo".
Test: Manual. 'adb install -r test.apk' fires broadcast to "com.foo" installer.
Test: Manual. 'adb install -r -i com.foo2 test.apk' fires broadcast to "com.foo2".

6 years agoLog reportFullyDrawn into TRON
Jorim Jaggi [Thu, 17 Aug 2017 15:22:26 +0000 (17:22 +0200)]
Log reportFullyDrawn into TRON

Test: AppStartTests
Change-Id: I17c511c9c4305c4cb327d52c81d97ad6d6a8c9d3
Fixes: 36093481

6 years agoUse top fullscreen window to inherit SystemUI flags
Jorim Jaggi [Thu, 17 Aug 2017 11:41:11 +0000 (13:41 +0200)]
Use top fullscreen window to inherit SystemUI flags

The top fullscreen window of an app token is the one we use for
determining SystemUI flags normally. Thus, when showing the
snapshot, we need to inherit the flags from the same window.

Test: Open event in Calendar, go home, reopen Calendar app,
observe no status bar icon color change.
Test: go/wm-smoke

Change-Id: I96678000339617c8fc51e72c0f6e2e167f542491
Fixes: 62871307

6 years agoIpManager: use InitialConfiguration for provisioning
Hugo Benichi [Tue, 8 Aug 2017 04:08:06 +0000 (13:08 +0900)]
IpManager: use InitialConfiguration for provisioning

This patch changes IpManager to take into account static provisioning
information specified in the InitialConfiguration for IPv6 static
configuration.

When a valid InitialConfiguration with IPv6 content is specified,
IpManager will do the following things:

- at start(), it will push the IPv6 addresses in the config to netd
- it will observe all addresses be notified via Netlink
- when all addresses are there, it will patch in the associated IPv6
  routes in the config, so that they get passed to ConnectivityService
  through the usual mechanism

The logic triggering onProvisioningSuccess is also changed to take into
account InitialConfiguration: when all addresses and all routes in the
config are seen the provisioning is successful.

Bug: 62988545
Test: runtest frameworks-net, with newly added tests
Merged-In: I77ed7c576c4b198de7a4726be70c78b74689e98b
Merged-In: I131589680b68222e4fda4e9165ac2f50894ee28e
Merged-In: I6e42d26ae430c213f65e466a2c556760ff0e14eb
Merged-In: I8e9c6de63697b8c3f41480d69309360763119838
Merged-In: I80439f92cad469ac77c11430727e5207e75cf432

(cherry picked from commit d00ddf567235e20bcbdc527ae20824fa944c3a64)

Change-Id: I7b1ced13361f49a92b10174486de9a1f70dd68d1

6 years agoDisable task snapshot when image size is invalid
Juho Ha [Mon, 12 Jun 2017 11:15:31 +0000 (20:15 +0900)]
Disable task snapshot when image size is invalid

Since devices such as IoT can have no screen, the size of
graphic buffer can be 1x1. In this case the WindowManager crashes
while making bitmap with reduced size.
To prevent the crash, disabled snapshotting on this screen.

This may also happen on phones sporadically.

Bug: 62401135
Fixes: 64733031
Test: Device without the display does not crash when app dies.
Change-Id: I367008405e6238baf3e56974f7d363ea81dfa916
(cherry picked from commit 9035d72c61868193b5630db16a71a0d208bc4666)

6 years agoMerge "heif: add new file and mime types to MediaScanner -- DO NOT MERGE" into oc...
TreeHugger Robot [Mon, 21 Aug 2017 05:29:05 +0000 (05:29 +0000)]
Merge "heif: add new file and mime types to MediaScanner -- DO NOT MERGE" into oc-mr1-dev

6 years agoMerge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc...
Hugo Benichi [Mon, 21 Aug 2017 03:24:06 +0000 (03:24 +0000)]
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc-mr1-dev

6 years agoDO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentati...
Baligh Uddin [Sat, 19 Aug 2017 22:31:46 +0000 (15:31 -0700)]
DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"

Bug: 64864568

This reverts commit fd35d7c0a284e31231e2f424cade864be695965b, reversing
changes made to 07a21754f45672b27e765d8c7677c9663c6dce91.

6 years agoMinor fixes for netd restarts and StrictController.
Lorenzo Colitti [Tue, 18 Jul 2017 15:23:44 +0000 (00:23 +0900)]
Minor fixes for netd restarts and StrictController.

1. Ensure we don't change strict mode network policy for a given
   UID from a non-accept policy to another non-accept policy,
   as netd does not support this.
2. Move the "strict enable" and "bandwidth enable" commands
   inside the lock. This improves correctness, and it is safe to
   do now that those commands now only take a few milliseconds,
   instead of several hundred milliseconds.
3. Fix an NPE in connectNativeNetdService which causes the system
   to crash when netd crashes.

(cherry picked from commit 8c253ade20827e16720c4a0d58cddfe72350e677)

Bug: 28362720
Test: bullhead builds, boots
Test: "adb shell killall netd" no longer crashes the system
Change-Id: Iac72cf0011a7d3be4f4b1a5f21dd8cfb519e2b89
Merged-In: I2ce3b63e4cc9bf0416f02f550f44cf188980af50

6 years agoMerge "Add tether offload traffic to interface stats as well." into oc-mr1-dev
Lorenzo Colitti [Sat, 19 Aug 2017 00:54:59 +0000 (00:54 +0000)]
Merge "Add tether offload traffic to interface stats as well." into oc-mr1-dev

6 years agoMerge "Remove gender-specific pronouns from documentation" into oc-dev
Tyler Freeman [Sat, 19 Aug 2017 00:11:01 +0000 (00:11 +0000)]
Merge "Remove gender-specific pronouns from documentation" into oc-dev

6 years agoMerge "Improve alarm in-flight diagnostics" into oc-mr1-dev
TreeHugger Robot [Sat, 19 Aug 2017 00:09:41 +0000 (00:09 +0000)]
Merge "Improve alarm in-flight diagnostics" into oc-mr1-dev

6 years agoheif: add new file and mime types to MediaScanner -- DO NOT MERGE
Chong Zhang [Wed, 16 Aug 2017 18:57:02 +0000 (11:57 -0700)]
heif: add new file and mime types to MediaScanner -- DO NOT MERGE

bug: 64077740
Change-Id: I6d36c2394a5ae527026c98c83786009e70b20958

6 years agoDisable hwui blending for first draw to main FBO
Arun [Mon, 23 Jan 2017 12:47:57 +0000 (12:47 +0000)]
Disable hwui blending for first draw to main FBO

bug:34809371

In some applications, the first draw is not opaque - either because the
application is misbehaved, or because hwui is not able to reliably tell
whether the layer is opaque or translucent. This is undefined behaviour
in OpenGL ES and has a significant performance and bandwidth impact on
some tiler GPUs as it requires loading the previous frame's color data.
This change disables blending in that case and also for effectively
opaque blend modes (SRC=GL_ONE, DST=GL_ZERO). It increases performance
by ~10% for Leanback CTS on some low-end GPUs (gradient layer that hwui
incorrectly believes to be translucent).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I2cbf1c76678acae1a36923e72fd18ed55cd89dc2

6 years agoMerge "SyncManager: detect suspicious periodic sync removal." into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 23:31:37 +0000 (23:31 +0000)]
Merge "SyncManager: detect suspicious periodic sync removal." into oc-mr1-dev

6 years agoMerge "Fixed a bug where a removed notification would stick around" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 22:18:57 +0000 (22:18 +0000)]
Merge "Fixed a bug where a removed notification would stick around" into oc-mr1-dev

6 years agoLog "launched from" packge for all activities
Todd Kennedy [Fri, 18 Aug 2017 22:05:01 +0000 (15:05 -0700)]
Log "launched from" packge for all activities

Change-Id: I2d06dcd7d4ff7686e72ee24bd349e0f5e1b8273e
Fixes: 63992855
Test: Manual. Start an app and see that the from package is logged.

6 years agoRemove gender-specific pronouns from documentation
Tyler Freeman [Wed, 9 Aug 2017 20:55:44 +0000 (13:55 -0700)]
Remove gender-specific pronouns from documentation

Bug: 64847340

Change-Id: Ifc48cebbab8ad1d7223d75637eb63049bc28ae7c

6 years agoMerge "Don't resume activity if user is locked and encryption is unsupported" into...
Bryce Lee [Fri, 18 Aug 2017 21:33:46 +0000 (21:33 +0000)]
Merge "Don't resume activity if user is locked and encryption is unsupported" into oc-mr1-dev

6 years agoImprove alarm in-flight diagnostics
Christopher Tate [Fri, 18 Aug 2017 00:12:52 +0000 (17:12 -0700)]
Improve alarm in-flight diagnostics

Also, use .equals() rather than == when searching the list of in-flight
operations.  Sometimes we appear to fail to match PendingIntents when
their send() completes, for unknown reasons, and this specific point of
usage is one where a mismatch might lead to the observed behavior.
(It is still unknown why == might ever fail here, and the problem is not
readily reproducible.)

Bug: 64358454
Test: manual, observing correctness of the diagnostics

Change-Id: I4f5c07b0df44dfb4c292976b3a49482ed408d12c

6 years agoSyncManager: detect suspicious periodic sync removal.
Makoto Onuki [Thu, 17 Aug 2017 21:03:48 +0000 (14:03 -0700)]
SyncManager: detect suspicious periodic sync removal.

- Also disallow and detect JobScheduler.cancelAll() for the system UID.
- Also wtf() if jobs.xml can't be read.

Bug: 64536115
Test: boot, add & remove google accounts

Change-Id: I953c12f70b479cf5f71a81a3787c103599f243c8

6 years agoMerge "Avoid potential reboot loop due to package cache" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 20:50:07 +0000 (20:50 +0000)]
Merge "Avoid potential reboot loop due to package cache" into oc-mr1-dev

6 years agoMerge "Building IMSI encryption support." into oc-mr1-dev
Pankaj Kanwar [Fri, 18 Aug 2017 20:23:08 +0000 (20:23 +0000)]
Merge "Building IMSI encryption support." into oc-mr1-dev

6 years agoFixed a bug where a removed notification would stick around
Selim Cinek [Fri, 18 Aug 2017 19:24:38 +0000 (12:24 -0700)]
Fixed a bug where a removed notification would stick around

Because we going back to the keyguard, the translation was
reset and the callback would not be called, leaving us with
a stuck notification.

Test: have only 1 notification in shade locked an swipe it away after doing a half-swipe first
Change-Id: Iea2db4ff7efa2e84aa36cd13cfa8cfa1859d6892
Fixes: 64762751

6 years agoMerge "Exclude autogrouping from rate limiter" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 18:18:57 +0000 (18:18 +0000)]
Merge "Exclude autogrouping from rate limiter" into oc-mr1-dev

6 years agoAvoid potential reboot loop due to package cache
Makoto Onuki [Fri, 18 Aug 2017 18:00:19 +0000 (11:00 -0700)]
Avoid potential reboot loop due to package cache

Bug: 64295061

Test: Boot (write package cache) and reboot (read package cache)
Change-Id: I5de712c9666bac71ff6121001163ebc90c4b62d0

6 years agoMerge "Clean up binding list on error" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 17:55:46 +0000 (17:55 +0000)]
Merge "Clean up binding list on error" into oc-mr1-dev

6 years agoMerge "AOD: Fix LockIcon click handler" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 17:37:12 +0000 (17:37 +0000)]
Merge "AOD: Fix LockIcon click handler" into oc-mr1-dev

6 years agoBuilding IMSI encryption support.
pkanwar [Tue, 4 Jul 2017 23:04:44 +0000 (16:04 -0700)]
Building IMSI encryption support.

Added additional error checks while returning the key.
Create config parameter:
1. IMSI_KEY_AVAILABILITY_INT.
BUG: 35606429
Test: manual

Change-Id: Iaa5fed3b51719679051626081d82b85a04128896

6 years agoMerge "LockSettings: Enforce permission check on havePattern/havePassword/systemReady...
TreeHugger Robot [Fri, 18 Aug 2017 16:24:43 +0000 (16:24 +0000)]
Merge "LockSettings: Enforce permission check on havePattern/havePassword/systemReady" into oc-mr1-dev

6 years agoAdd tether offload traffic to interface stats as well.
Lorenzo Colitti [Thu, 17 Aug 2017 10:23:08 +0000 (19:23 +0900)]
Add tether offload traffic to interface stats as well.

Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I7a4d04ab47694d754874136179f8edad71099638

6 years agoExclude autogrouping from rate limiter
Julia Reynolds [Fri, 18 Aug 2017 13:22:40 +0000 (09:22 -0400)]
Exclude autogrouping from rate limiter

To prevent concurrent updates from the app from
being dropped

Test: cts, notificationmanagertest
Change-Id: Id5047b04644599a862f1b6d2a340bc79ad761f9f
Fixes: 64804822

6 years agoClean up binding list on error
Julia Reynolds [Fri, 18 Aug 2017 13:21:36 +0000 (09:21 -0400)]
Clean up binding list on error

So that we can try again

Test: manual
Change-Id: I6be1e8d0377930d52c599261a7381c1e377cbcfc
Fixes: 64458792

6 years agoReally allow NetworkAgent immutable updates to NetworkCapabilities
Hugo Benichi [Fri, 18 Aug 2017 05:41:22 +0000 (14:41 +0900)]
Really allow NetworkAgent immutable updates to NetworkCapabilities

This patch completes commit bae105a5ccd11430bab14721d1325e2303a673da to
really allow updates of immutable capabilities to NetworkCapabilities of
NetworkAgents by using satisfiedByImmutableNetworkCapabilities instead
satisfiedByNetworkCapabilities.

Bug: 64125969
Test: runtest frameworks-net
Merged-In: I9beeb623792f0ee31abcd4ba9d0ba2451304fb2e
Merged-In: Ifbdd005576b3f0fbf278ecec81ce3e4308c6276d
Merged-In: Id352fdb6da21a2150d3e8d062d7eba11878f6919
Merged-In: If3742ea0e2151b9b710eda2fed280c31f7960393
Merged-In: Icd8e328e3c810a644bfb83798bd42fed8dc70425

(cherry picked from commit a60c6eab42cd904faaf26c23100939d397b80c39)

Change-Id: I737494117d7f1e0198f0ad4d3c41019c9295fe09

6 years agoMerge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" into oc-mr1-dev
Hugo Benichi [Fri, 18 Aug 2017 11:46:22 +0000 (11:46 +0000)]
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" into oc-mr1-dev

6 years agoMerge "Add Audio effect session intent to config file" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 03:17:48 +0000 (03:17 +0000)]
Merge "Add Audio effect session intent to config file" into oc-mr1-dev

6 years agoMerge "Only update reported configuration when triggered from AM side." into oc-mr1-dev
Bryce Lee [Fri, 18 Aug 2017 02:04:17 +0000 (02:04 +0000)]
Merge "Only update reported configuration when triggered from AM side." into oc-mr1-dev

6 years agoMerge "Cleanup ServiceState.toString()" into oc-mr1-dev
Nathan Harold [Fri, 18 Aug 2017 01:59:06 +0000 (01:59 +0000)]
Merge "Cleanup ServiceState.toString()" into oc-mr1-dev

6 years agoMerge "If an Activity transitions to VR, then ensure it's in the main stack." into...
TreeHugger Robot [Fri, 18 Aug 2017 01:27:54 +0000 (01:27 +0000)]
Merge "If an Activity transitions to VR, then ensure it's in the main stack." into oc-mr1-dev

6 years agoMerge "Fix race condition of removing surface." into oc-dev am: 07a21754f4 -s ours
Seigo Nonaka [Fri, 18 Aug 2017 01:02:38 +0000 (01:02 +0000)]
Merge "Fix race condition of removing surface." into oc-dev am: 07a21754f4  -s ours
am: 688a98b415  -s ours

Change-Id: I50b69d1f061d62e8441816dc70a7bdcdf97d53d3

6 years agoMerge "Fix race condition of removing surface." into oc-dev
Seigo Nonaka [Fri, 18 Aug 2017 00:49:08 +0000 (00:49 +0000)]
Merge "Fix race condition of removing surface." into oc-dev
am: 07a21754f4  -s ours

Change-Id: Ic850275cc7f81629adcc5081ec9f137e531b9495

6 years agoMerge "Fix race condition of removing surface." into oc-dev
TreeHugger Robot [Fri, 18 Aug 2017 00:40:55 +0000 (00:40 +0000)]
Merge "Fix race condition of removing surface." into oc-dev

6 years agoMerge "Bluetooth: Fix startAdvertisingSet error handling" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 00:30:13 +0000 (00:30 +0000)]
Merge "Bluetooth: Fix startAdvertisingSet error handling" into oc-mr1-dev

6 years agoAdd Audio effect session intent to config file
Christopher Tate [Fri, 18 Aug 2017 00:24:09 +0000 (17:24 -0700)]
Add Audio effect session intent to config file

Currently audio effect panel can't receive session
intent if app targetSdkVersion is Android O or later.
Because the intent is limited on background.
However this kind of application needs to receive
the intent when application plays music.

Bug: 62777192
Test: manual

Cherrypick of partner CL 870245

Change-Id: Ibcebb938fa9177a9b0a7be079b1c7374ba9424ee

6 years agoMerge "Bluetooth: Don't throw exception when stopAdvertisingSet fails" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 00:16:46 +0000 (00:16 +0000)]
Merge "Bluetooth: Don't throw exception when stopAdvertisingSet fails" into oc-mr1-dev

6 years agoMerge "Add LOCATION_HARDWARE permission to Rtt API." into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 00:15:31 +0000 (00:15 +0000)]
Merge "Add LOCATION_HARDWARE permission to Rtt API." into oc-mr1-dev

6 years agoMerge "Make isAccessibilityButtonSupported public" into oc-mr1-dev
Casey Burkhardt [Thu, 17 Aug 2017 23:50:43 +0000 (23:50 +0000)]
Merge "Make isAccessibilityButtonSupported public" into oc-mr1-dev

6 years agoPlace focus on window when a11y performs an action
Phil Weaver [Wed, 16 Aug 2017 20:04:20 +0000 (13:04 -0700)]
Place focus on window when a11y performs an action

Bug: 62344706
Test: Now able to bring up keyboard in split-screen mode.
Also a11y CTS and unit tests pass.

Change-Id: Ic4340425680c89e8fc5e586aa1d363b01fd69763

6 years agoMerge "Fix error message strings" into oc-mr1-dev
TreeHugger Robot [Thu, 17 Aug 2017 23:45:05 +0000 (23:45 +0000)]
Merge "Fix error message strings" into oc-mr1-dev

6 years agoMerge "Fix email auto link when there are two chars in local part" into oc-mr1-dev
Siyamed Sinir [Thu, 17 Aug 2017 23:39:10 +0000 (23:39 +0000)]
Merge "Fix email auto link when there are two chars in local part" into oc-mr1-dev

6 years agoMerge "Modified the vibration of the notification panel" into oc-mr1-dev
TreeHugger Robot [Thu, 17 Aug 2017 23:37:56 +0000 (23:37 +0000)]
Merge "Modified the vibration of the notification panel" into oc-mr1-dev

6 years agoMerge "Add user selection to car status bar and animate." into oc-mr1-dev
Bryan Eyler [Thu, 17 Aug 2017 23:31:10 +0000 (23:31 +0000)]
Merge "Add user selection to car status bar and animate." into oc-mr1-dev

6 years agoMerge "Let the foreground service channel be blocked" into oc-dr1-dev
Julia Reynolds [Thu, 17 Aug 2017 23:13:29 +0000 (23:13 +0000)]
Merge "Let the foreground service channel be blocked" into oc-dr1-dev
am: 6614a2e5d0

Change-Id: Ic155670df78a6e779174cbd705f07260c8d305b6

6 years agoMerge "Let the foreground service channel be blocked" into oc-dr1-dev
TreeHugger Robot [Thu, 17 Aug 2017 23:03:35 +0000 (23:03 +0000)]
Merge "Let the foreground service channel be blocked" into oc-dr1-dev

6 years agoIf an Activity transitions to VR, then ensure it's in the main stack.
Santos Cordon [Fri, 21 Jul 2017 23:15:13 +0000 (16:15 -0700)]
If an Activity transitions to VR, then ensure it's in the main stack.

Bug: 62791734
Test: Manual. From VR, start an app that sets VR dynamically via
Activity.setVrModeEnabled. Ensure it transitions from virtual display
to main display via added logging and 'adb shell am stack list'.

Change-Id: I11c1aad09e41666b928a6c2d896f9f2e22bb1aa5

6 years agoDon't resume activity if user is locked and encryption is unsupported
Bryce Lee [Thu, 17 Aug 2017 22:37:26 +0000 (15:37 -0700)]
Don't resume activity if user is locked and encryption is unsupported

Previously we were not checking if to see if this condition was met
when determining the top running activity. As a result we could get
in a loop where we force stop the process since the app doesn't
support encryption yet try to start it again due to the
ActivityRecord being on top.

This changelist addresses the issue by checking this condition when
determining whether it is okay to show.

Change-Id: I868f97ce8b3ea4220019b8570407e33f27ea88bc
Fixes: 64259425
Test: go/wm-smoke

6 years agoMerge "Merge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev am...
Android Build Merger (Role) [Thu, 17 Aug 2017 22:35:10 +0000 (22:35 +0000)]
Merge "Merge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev am: 0c2b2d1f87  -s ours am: c9a9fcdcd3  -s ours am: 273bd3b67f  -s ours" into oc-mr1-dev

6 years agoBluetooth: Fix startAdvertisingSet error handling
Jakub Pawlowski [Thu, 17 Aug 2017 14:19:12 +0000 (07:19 -0700)]
Bluetooth: Fix startAdvertisingSet error handling

Calls to old advertising API (startAdvertising), should never throw
exceptions. Instead, it used to post failure callback. This behaviour
was accidentally modified when implementing new API. Right now, instead
of posting error callback, we throw IllegalArgumentException if we fail
to obtain BluetoothGatt object, or the call to startAdvertisingSet
fails.

This patch brings back the old behaviour to the API. It also makes new
API post callback instead of throwing exception in this error case.

Bug: 63819108
Test: manual
Change-Id: I897b99839f899ca3f3dc609918d665c8c327b777
Merged-In: I897b99839f899ca3f3dc609918d665c8c327b777
(cherry picked from commit f7bd6b26c73b7ea0bbfd00b75c23895eca281aff)

6 years agoBluetooth: Don't throw exception when stopAdvertisingSet fails
Jakub Pawlowski [Thu, 17 Aug 2017 13:15:43 +0000 (06:15 -0700)]
Bluetooth: Don't throw exception when stopAdvertisingSet fails

When advertising is stopped while Bluetooth is disabled, we should not
throw any exceptions, just log the failure.
This was the default behaviour before the AdvertisingSet was introduced.

Bug: 63819108
Test: manual
Change-Id: I518e071b77b127973aee6f24fa6ced4f28bc9531
Merged-In: I518e071b77b127973aee6f24fa6ced4f28bc9531
(cherry picked from commit f73863dc29c5adc70117649d24f9b65f6b3232be)

6 years agoMerge "Add convenience methods to IpPrefix and LinkAddress" into oc-mr1-dev
Hugo Benichi [Thu, 17 Aug 2017 22:31:59 +0000 (22:31 +0000)]
Merge "Add convenience methods to IpPrefix and LinkAddress" into oc-mr1-dev

6 years agoMerge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev am: 0c2b2d1f87...
Tony Mak [Thu, 17 Aug 2017 22:31:04 +0000 (22:31 +0000)]
Merge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev am: 0c2b2d1f87  -s ours am: c9a9fcdcd3  -s ours
am: 273bd3b67f  -s ours

Change-Id: Ib1734b1826e29143bdf7b4d0d9c8acfe9f259ad7

6 years agoMerge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev am: 0c2b2d1f87...
Tony Mak [Thu, 17 Aug 2017 22:23:15 +0000 (22:23 +0000)]
Merge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev am: 0c2b2d1f87  -s ours
am: c9a9fcdcd3  -s ours

Change-Id: I453d676952f885b1fc4afc21c0c11a17ae0bb90c

6 years agoMerge "Wifi connection hysteresis" into oc-mr1-dev
TreeHugger Robot [Thu, 17 Aug 2017 22:21:28 +0000 (22:21 +0000)]
Merge "Wifi connection hysteresis" into oc-mr1-dev

6 years agoMerge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev
Tony Mak [Thu, 17 Aug 2017 22:07:36 +0000 (22:07 +0000)]
Merge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev
am: 0c2b2d1f87  -s ours

Change-Id: Id0fe09b6f6ba687b6597ce2f97b6b8d83fbc4915

6 years agoMerge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev
TreeHugger Robot [Thu, 17 Aug 2017 21:56:52 +0000 (21:56 +0000)]
Merge "Enforce policy for camera gesture in keyguard" into nyc-mr2-dev

6 years agoAdd LOCATION_HARDWARE permission to Rtt API.
Wei Wang [Wed, 16 Aug 2017 18:54:27 +0000 (11:54 -0700)]
Add LOCATION_HARDWARE permission to Rtt API.

Test: Manual
Bug: 62264080
Bug: 62344058

Change-Id: I00744a046c0fdcccd2f10924a70d816372e49fa4

6 years agoModified the vibration of the notification panel
Selim Cinek [Wed, 16 Aug 2017 21:49:10 +0000 (14:49 -0700)]
Modified the vibration of the notification panel

The vibrations are now gated by "Vibrate on Tap"
This also moves the vibration on expansion to a
tick instead of a click.
Also improved the performance, such that vibrations
are now happening on the background thread instead
of the foreground.

Fixes: 64600716
Fixes: 64121575
Test: manual, observe vibrations when expanding / scrolling
Change-Id: I5099287adacc0f916941fd77e97948b9fa16ad09

6 years agoAdd user selection to car status bar and animate.
Bryan Eyler [Tue, 8 Aug 2017 23:53:33 +0000 (16:53 -0700)]
Add user selection to car status bar and animate.

Adds the UserGridView to the car status bar and adds an animation when
expanding/hiding.

Bug: 63593747
Tested on Mojave with the fullscreen user switcher and status bar.

Change-Id: If6ddbd4da896c5eb661393dcc35ab299361754e9

6 years agoMerge "Don't call surface.remove if surface is null." into oc-mr1-dev
TreeHugger Robot [Thu, 17 Aug 2017 18:38:04 +0000 (18:38 +0000)]
Merge "Don't call surface.remove if surface is null." into oc-mr1-dev

6 years agoMerge "AOD: Delay removing AOD scrim after pulse" into oc-mr1-dev
TreeHugger Robot [Thu, 17 Aug 2017 18:28:57 +0000 (18:28 +0000)]
Merge "AOD: Delay removing AOD scrim after pulse" into oc-mr1-dev

6 years agoLet the foreground service channel be blocked
Julia Reynolds [Thu, 17 Aug 2017 17:34:27 +0000 (13:34 -0400)]
Let the foreground service channel be blocked

And update the channel name

Change-Id: Ic4b909d31b38b9e1ee05f9b3e4e5c91efc6752b1
Fixes: 36891897
Test: manual

6 years agoFix error message strings
Jordan Liu [Tue, 8 Aug 2017 23:06:17 +0000 (16:06 -0700)]
Fix error message strings

mmcc_imsi_unknown_in_hlr and mmcc_illegal_ms are updated to reflect
newly supported requirements.

Fixes: 64194949
Test: manual
Change-Id: I358ba1d562d30e958580003336ace3941bd5e04f
Merged-In: I358ba1d562d30e958580003336ace3941bd5e04f

6 years agoOnly update reported configuration when triggered from AM side.
Bryce Lee [Thu, 17 Aug 2017 16:16:03 +0000 (09:16 -0700)]
Only update reported configuration when triggered from AM side.

Previously we were updating the last reported Configuration whenever
it was reported to WM. However, the original intention of last
reported Configuration was reporting from AM side to the
ActivityRecord, not AM to WM. Updating this value in the latter case
leads to scenarios where we may update the Configuration too soon,
compromising any logic relying on comparing against the truly last
reported value.

This changelist removes call points other than messaging from the AM
side which change this value. It also consolidates all changes to the
method ActivityRecord#setLastReportedConfiguration to better track
where the value is being set.

Change-Id: I958daf6cd2f2163637f8b7e567a0f3e2be540b7d
Fixes: 63813517
Test: go/wm-smoke
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests