OSDN Git Service

android-x86/frameworks-base.git
6 years agoGracefully handle integer overflows.
Jeff Sharkey [Fri, 1 Sep 2017 18:51:51 +0000 (12:51 -0600)]
Gracefully handle integer overflows.

Try sticking with integer-based math as much as possible for speed,
but switch to double-based math if we detect that we'd end up
causing an overflow.

New tests to verify.

Test: bit FrameworksNetTests:com.android.server.net.NetworkStatsCollectionTest
Bug: 65257769
Change-Id: I1ae35599be134f81850c0a3d86928b057fba1eff

6 years agoMerge "Remove config_tether_apndata for Telstra." into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 22:18:15 +0000 (22:18 +0000)]
Merge "Remove config_tether_apndata for Telstra." into oc-mr1-dev

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

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

Test: Manual
Bug: 31304557
Change-Id: I2a1869162e5a52aed986a99cc378a6c630af4a70

6 years agoClose idle connections to release RAM
Fyodor Kupolov [Fri, 1 Sep 2017 22:13:33 +0000 (15:13 -0700)]
Close idle connections to release RAM

Close idle connections after 30s of inactivity to release RAM.
Savings: ~0.4mb on marlin

Bug: 63398887
Test: reboot and dumpsys meminfo system
Change-Id: I39aa1fef9ae9850564a13891cb89c27cb805d683

6 years agoMerge "Properly clean up broadcast-receiver ANR" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 22:11:48 +0000 (22:11 +0000)]
Merge "Properly clean up broadcast-receiver ANR" into oc-mr1-dev

6 years agoAllow Instant Apps to access send_action_app_error
Chad Brubaker [Fri, 1 Sep 2017 21:48:46 +0000 (14:48 -0700)]
Allow Instant Apps to access send_action_app_error

Bug: 65294464
Test: Manual
Change-Id: I81964362b5109037315064ebc4610adb0edc151f

6 years agoAdd test for first draw blend behavior in HWUI pipeline
Chris Craik [Fri, 1 Sep 2017 21:39:18 +0000 (14:39 -0700)]
Add test for first draw blend behavior in HWUI pipeline

Bug: 65077146
Test: BakedOpRendererTests
Change-Id: Ia3139a01fe25344a19f2b947069bd686303b9fd5

6 years agoMerge "Don't over-acquire NPMS locks." into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 21:34:22 +0000 (21:34 +0000)]
Merge "Don't over-acquire NPMS locks." into oc-mr1-dev

6 years agoFix NPE in ActivityView on surface destruction
Andrii Kulian [Sat, 22 Jul 2017 21:59:51 +0000 (14:59 -0700)]
Fix NPE in ActivityView on surface destruction

Instance variable mSurface in ActivityView was not updated after surface
destroy/create cycle, which lead to NPE when we were trying to release
it again after second destroy callback.

Bug: 63338670
Test: Create app with activityView, cause activity restart.
Change-Id: I96447ebe77d175050565641ba94b748d2b633d99

6 years agoMerge "Change AccessPointPreference key generation to match AccessPoint." into oc...
TreeHugger Robot [Fri, 1 Sep 2017 21:29:41 +0000 (21:29 +0000)]
Merge "Change AccessPointPreference key generation to match AccessPoint." into oc-mr1-dev

6 years agoLow ram devices now use 60% reduction for task snap shots
Matthew Ng [Fri, 1 Sep 2017 21:20:24 +0000 (14:20 -0700)]
Low ram devices now use 60% reduction for task snap shots

On low ram devices, it will now use a reduce scale of 0.6f.

Test: manual - launch apps, launch recents see the bitmap on task
Change-Id: I016b896e9e43d4d0a549a47aa69e7b5541aa5dbc
Fixes: 65163822

6 years agoFix issue with PiP menu activity disallowing touches
Winson Chung [Fri, 1 Sep 2017 18:33:47 +0000 (11:33 -0700)]
Fix issue with PiP menu activity disallowing touches

- On devices where the expanded bounds are the same as the collapsed
  bounds, there is no task stack animation and no subsequent animation
  end callback, which means that touch state is not reset. Skip
  disallowing touches in this state.
- Also fix race causing the PiP menu to ignore touches due to the pinned
  animation end callback happening before the menu is first shown.

Bug: 65168767
Test: Tap menu on Ryu, rotate, and try and drag the PiP before the menu
      times out

Change-Id: I0b264678aa3300fd4d4e9da5ef3d48a590232ae1

6 years agouse simOperator name in the notification
fionaxu [Fri, 1 Sep 2017 20:39:55 +0000 (13:39 -0700)]
use simOperator name in the notification

today we are using getNetworkOperator for carrier's name in the
notification which might be misleading in cases users romaing on
different network.
as today there is no reliable way to get carrier's name, we will use
getSimOperator and if that returns empty string, fallback to
networkOperatorName. In the long term, we can use better wording if
simOperatorName is unknown.

Bug:65251050
Test: Manual
Change-Id: I6ffc37f8cc8e686d2e884283be2006cf704e8c64

6 years agoSet flags on the correct Intent, please
Christopher Tate [Fri, 1 Sep 2017 20:37:22 +0000 (13:37 -0700)]
Set flags on the correct Intent, please

Bug: 65115426
Test: passes CTS backup suite
Change-Id: I497d077f563fef7b0800df626d15651c721d4ca7

6 years agoMerge "Adds PnoScanMetrics to wifi.proto" into oc-mr1-dev
Mehdi Alizadeh [Fri, 1 Sep 2017 20:14:55 +0000 (20:14 +0000)]
Merge "Adds PnoScanMetrics to wifi.proto" into oc-mr1-dev

6 years agoMerge "Add ability to include messages in oom reports." into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 20:07:59 +0000 (20:07 +0000)]
Merge "Add ability to include messages in oom reports." into oc-mr1-dev

6 years agoDO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result am: 02d802e...
Michael Plass [Fri, 1 Sep 2017 19:04:25 +0000 (19:04 +0000)]
DO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result am: 02d802e71e  -s ours am: b5ee561702  -s ours am: 7391bedf87  -s ours
am: 8597268bc2  -s ours

Change-Id: I57d0fa2972f5f93ca0c12455873ce05356d6ebf4

6 years agoMerge "reloading the current page on Network lost->avail" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 18:54:49 +0000 (18:54 +0000)]
Merge "reloading the current page on Network lost->avail" into oc-mr1-dev

6 years agoDO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result am: 02d802e...
Michael Plass [Fri, 1 Sep 2017 18:50:10 +0000 (18:50 +0000)]
DO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result am: 02d802e71e  -s ours am: b5ee561702  -s ours
am: 7391bedf87  -s ours

Change-Id: Ia4ed82872d97187158a8f958b44e68814b2c5356

6 years agoProperly clean up broadcast-receiver ANR
Christopher Tate [Fri, 1 Sep 2017 18:41:39 +0000 (11:41 -0700)]
Properly clean up broadcast-receiver ANR

Specifically, if the only receiver component was disabled while the
broadcast was in flight *and* the app ANRed, we were failing to properly
abandon the broadcast and wound up stuck waiting for delivery completion
that would never happen.

Bug: 64854337
Test: manual
Change-Id: I9181830eca17981bf1ca403ac36f88c84c548360

6 years agoDon't over-acquire NPMS locks.
Jeff Sharkey [Fri, 1 Sep 2017 17:27:13 +0000 (11:27 -0600)]
Don't over-acquire NPMS locks.

We only need to hold mNetworkPoliciesSecondLock when working with
subscription plans; before this CL we could end up acquiring the two
NPMS locks out of order, resulting in a deadlock.

Also annotate objects in NSS that require mStatsLock to be held.

Test: builds, boots
Bug: 65268076
Change-Id: I06497564424316ef895dc8dceba72ae784781dc3

6 years agoDO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result am: 02d802e...
Michael Plass [Fri, 1 Sep 2017 18:35:54 +0000 (18:35 +0000)]
DO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result am: 02d802e71e  -s ours
am: b5ee561702  -s ours

Change-Id: I64e924948b9cd7934d41e2261af73e2232bbaf80

6 years agoDO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result
Michael Plass [Fri, 1 Sep 2017 18:11:19 +0000 (18:11 +0000)]
DO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result
am: 02d802e71e  -s ours

Change-Id: If1a7766ec46207280183c7eb08e036e526a12a34

6 years agoMediaBrowserService: Clean up ConnectionRecord when browser is dead
kai [Tue, 29 Aug 2017 22:13:03 +0000 (15:13 -0700)]
MediaBrowserService: Clean up ConnectionRecord when browser is dead

This CL cleans up connectionRecords when binder dead and the connection
is lost.

Bug: 65132577
Test: check the number of ConnectionRecord, kill the media app, check
      the number again.
Change-Id: I8b31745bcee220b9e70c3f43d7fc9d8dc3f6b83a

6 years agoAdd a photos app filter and a metric for using it.
Daniel Nishi [Wed, 23 Aug 2017 17:27:08 +0000 (10:27 -0700)]
Add a photos app filter and a metric for using it.

Bug: 64147318
Test: SettingsLib integ tests

Change-Id: Id165a514aa65d2efdd4e6753c3e73762293e892e
Merged-In: I4cae384fa565ac0928177bd85804d7904cd6156c

6 years agoMerge "Do not close idle connections by default" into oc-mr1-dev
Fyodor Kupolov [Fri, 1 Sep 2017 17:34:41 +0000 (17:34 +0000)]
Merge "Do not close idle connections by default" into oc-mr1-dev

6 years agoMerge "Fix home button size" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 17:09:37 +0000 (17:09 +0000)]
Merge "Fix home button size" into oc-mr1-dev

6 years agoDO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result
Michael Plass [Thu, 13 Jul 2017 17:09:07 +0000 (10:09 -0700)]
DO NOT MERGE ANYWHERE: [AsyncChannel] Fix race in handling of sync result

Bug: 62866191
Bug: 63074860
Bug: 65267749
Test: wifi unit tests
Change-Id: I1d59eb8d599de9d9041e0b9b7d731363675a40c9
(cherry picked from commit 56e46134d364f7f293158979765336721a6c752c)
(cherry picked from commit 9c1d56576e01060f40de74a4c0e35e95064351be)

6 years agoRemove config_tether_apndata for Telstra.
Amit Mahajan [Thu, 31 Aug 2017 20:49:28 +0000 (13:49 -0700)]
Remove config_tether_apndata for Telstra.

Test: manual
Bug: 63564491
Change-Id: Iaca29bfd474b7df6489b1daeaeea182ebf8d81ae

6 years agoAOD: Keep brightness sensor registered while covered
Adrian Roos [Thu, 31 Aug 2017 13:17:17 +0000 (15:17 +0200)]
AOD: Keep brightness sensor registered while covered

Keeps the brightness sensor registered even if proximity is near.

This allows the brightness sensor to react faster after coming out
of a pocket.

Also wait with unpausing AOD until the brightness sensor reports
a valid brightness again.

Bug: 65010918
Test: Cover prox sensor for 10s, verify with 'adb shell dumpsys sensorservice' that the binned brightness sensor is still registered.
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
Change-Id: Ife1bb7399a7ad8a15b1f4d210bb38044cbe9d3ae

6 years agoMerge "Print correct timeout messages in JobServiceContext" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 07:48:56 +0000 (07:48 +0000)]
Merge "Print correct timeout messages in JobServiceContext" into oc-mr1-dev

6 years agoMerge "Fix blending behavior with first draw op" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 04:05:02 +0000 (04:05 +0000)]
Merge "Fix blending behavior with first draw op" into oc-mr1-dev

6 years agoMerge "Revert "Nat464Xlat: interface notification handler on ConnectivityService...
Hugo Benichi [Fri, 1 Sep 2017 02:49:17 +0000 (02:49 +0000)]
Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService"" into oc-mr1-dev

6 years agoMerge "Don't vibrate on un-tuned devices when opening notification shade." into oc...
TreeHugger Robot [Fri, 1 Sep 2017 02:29:53 +0000 (02:29 +0000)]
Merge "Don't vibrate on un-tuned devices when opening notification shade." into oc-mr1-dev

6 years agoMerge "Darken car status bar." into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 02:18:10 +0000 (02:18 +0000)]
Merge "Darken car status bar." into oc-mr1-dev

6 years agoMerge "Track the global setting of BT A2DP on/off" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 01:53:14 +0000 (01:53 +0000)]
Merge "Track the global setting of BT A2DP on/off" into oc-mr1-dev

6 years agoMerge "Fixes TaskStackLayoutAlgorithm log errors when window rect is empty" into...
TreeHugger Robot [Fri, 1 Sep 2017 01:34:48 +0000 (01:34 +0000)]
Merge "Fixes TaskStackLayoutAlgorithm log errors when window rect is empty" into oc-mr1-dev

6 years agoMerge "Hook up AOD knobs to Settings.Global" into oc-mr1-dev
Lei Yu [Fri, 1 Sep 2017 00:54:01 +0000 (00:54 +0000)]
Merge "Hook up AOD knobs to Settings.Global" into oc-mr1-dev

6 years agoFix blending behavior with first draw op
Chris Craik [Fri, 1 Sep 2017 00:28:20 +0000 (17:28 -0700)]
Fix blending behavior with first draw op

Bug: 65077146
Test: Manual - uirendering tests don't allow test draw content
to be displayed first.

It's not always valid to disable blending on the first draw to the framebuffer,
since some blend modes affect the framebuffer in different ways. We now only
disable blending if the op is SRC_OVER to be safe.

For example:

    canvas.drawColor(0xfeff0000, PorterDuff.Mode.CLEAR);
    canvas.drawColor(Color.BLUE, PorterDuff.Mode.DST_OVER);

The BLUE should always be seen - the other draw should just clear the buffer.
Prior to this fix, the above code (put in a window background) would draw black.

In addition, this removes the disable behavior in drawRects(), since that should
never benefit from the optimization - that decoration is always drawn at the end
of a frame.

Change-Id: I34e8d9d62d6e1dfa00e9301f44c277475f2940a8

6 years agoMerge "Hide battery percentage from accessibility." into oc-mr1-dev
Jason Monk [Fri, 1 Sep 2017 00:13:36 +0000 (00:13 +0000)]
Merge "Hide battery percentage from accessibility." into oc-mr1-dev

6 years agoMerge "Fix issue #63971747: Audio is not heard first time when played after a long...
TreeHugger Robot [Thu, 31 Aug 2017 23:56:42 +0000 (23:56 +0000)]
Merge "Fix issue #63971747: Audio is not heard first time when played after a long pause" into oc-mr1-dev

6 years agoAdd ability to include messages in oom reports.
Dianne Hackborn [Tue, 8 Aug 2017 00:13:52 +0000 (17:13 -0700)]
Add ability to include messages in oom reports.

Test: manual
Bug: 65248777
Merged-In: I1a6b3c02912224b830dbe5573f3b1edebe24c2b3

Change-Id: Ifef2c16f44925c1b7d4ace8435daea48890b238b

6 years agoMerge "Fix transition between two occluding activities" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 23:25:34 +0000 (23:25 +0000)]
Merge "Fix transition between two occluding activities" into oc-mr1-dev

6 years agoMerge "Fix stuck activity" into oc-mr1-dev
Jorim Jaggi [Thu, 31 Aug 2017 23:17:06 +0000 (23:17 +0000)]
Merge "Fix stuck activity" into oc-mr1-dev

6 years agoAdd internal implementation for notifyPackageUse
Todd Kennedy [Thu, 31 Aug 2017 23:10:29 +0000 (16:10 -0700)]
Add internal implementation for notifyPackageUse

We have checks that prevent applications from modifying the usage
times of instant apps [and vice versa]. However, it's critical for
internal components such as the ActivityManager to be able to upate
this for all packages. Add an internal implementation of this
method that skips the checks.

Change-Id: Ib890296065024104cdaf7c8d64a5a7583d9062c1
Fixes: 65228752
Test: Manual. Run an application installed as an "instant app" and notice the usage time goes up

6 years agoAdds PnoScanMetrics to wifi.proto
Mehdi Alizadeh [Fri, 11 Aug 2017 01:20:25 +0000 (18:20 -0700)]
Adds PnoScanMetrics to wifi.proto

Bug: 32842314
Test: verify builds and runtests.sh
Change-Id: Ia97dfe1c36c95701dd8a4f88707f757cdb7d6bb2

6 years agoMerge "Don't cancel by UID when an app is disabled or uninstalled" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 23:05:38 +0000 (23:05 +0000)]
Merge "Don't cancel by UID when an app is disabled or uninstalled" into oc-mr1-dev

6 years agoMerge "Ensure that PiP mode changed callback if animation is interrupted" into oc...
Winson Chung [Thu, 31 Aug 2017 23:01:48 +0000 (23:01 +0000)]
Merge "Ensure that PiP mode changed callback if animation is interrupted" into oc-mr1-dev

6 years agoPrint correct timeout messages in JobServiceContext
Yohei Yukawa [Thu, 31 Aug 2017 22:49:15 +0000 (15:49 -0700)]
Print correct timeout messages in JobServiceContext

This is a follow up CL to a previous CL [1] that added some useful
debug messages to diagnose issues like Bug 62390590 and another
follow up CL [2] that aimed to address Bug 62787070.

What went wrong is that

  "x" + y != null ? y.toShortString() : "<null>" + "z"

is interpretted as

  ("x" + y) != null ? y.toShortString() : ("<null>" + "z")

while what we wanted to see was

  "x" + (y != null ? y.toShortString() : "<null>") + "z"

This CL addresses the above unexpected string concatenation by
explicitly having a private utility method
JobServiceContext#getRunningJobNameLocked().

 [1]: Ia7155248b4b4f032cbf8e8754c5437f658ed192c
      729a328aca436d71b80f3d72f5d54e38d4d2c12e
 [2]: I7bc55f55da645a9e116d3f0ee02f2ee115383ea9
      62292daa208d007a8c57b073303e8bb6169a2016

Bug: 62787070
Bug: 64569041
Bug: 65188019
Test: Manually verified by explicitly causing timeout.
Change-Id: I3e51f40d3fcf0e2ddd200da2812aba109d89794e

6 years agoreloading the current page on Network lost->avail
fionaxu [Thu, 31 Aug 2017 21:40:41 +0000 (14:40 -0700)]
reloading the current page on Network lost->avail

if suddenly lost network on captiveportal page, we didnt recover
gracefully when network become available. we should reload the current
page on network available.

Bug: 65041224
Test: Manaul
Change-Id: I356dbf73ef3ce9788883bf6561929d961c3a6888

6 years agoDon't vibrate on un-tuned devices when opening notification shade.
Michael Wright [Thu, 31 Aug 2017 21:54:04 +0000 (14:54 -0700)]
Don't vibrate on un-tuned devices when opening notification shade.

Bug: 65219268
Test: Manual
Change-Id: Ia661608931071102083cdecb56c7be6a123292e5

6 years agoDarken car status bar.
Bryan Eyler [Wed, 30 Aug 2017 17:13:20 +0000 (10:13 -0700)]
Darken car status bar.

Darkens the car status bar header, footer, and user switcher.

Bug: 63593747
Tested on Mojave

Change-Id: I7e1973d75936739f16e43c278337dd9771499488

6 years agoMerge "Don't always fallback to clockTick for EFFECT_TICK." into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 21:44:01 +0000 (21:44 +0000)]
Merge "Don't always fallback to clockTick for EFFECT_TICK." into oc-mr1-dev

6 years agoMerge "Better guarantee a11y service initial state" into oc-mr1-dev
Phil Weaver [Thu, 31 Aug 2017 21:20:31 +0000 (21:20 +0000)]
Merge "Better guarantee a11y service initial state" into oc-mr1-dev

6 years agoFix transition between two occluding activities
Jorim Jaggi [Mon, 28 Aug 2017 13:44:43 +0000 (15:44 +0200)]
Fix transition between two occluding activities

This fixes an issue when starting an activity that occldues
Keyguard with the window flag from an activity that is already
occluding Keyguard. Normally we wait until the transition starts
until the next activity had a chance to set its layout flag
(FLAG_SHOW_WHEN_LOCKED) with the UnknownVisibilityController.

Now, since setAppVisibility(false) was called after immediately
starting the activity, we removed the activity immediately from
the UnknownVisibilityController waiting list and then unoccluded
Keyguard.

We fix this by only adding an activity to the unknown visibility
list if it's a not a noDisplay activity as it will never add
a window in this case, so a relayout will never happen.

This regressed from I745e985766a1af97203e1d22b6443dabdd0c0363
because calling setVisible(true) was setting the token's visible
to true. Then, setVisible(false) was NOT ignored anymore.
Previously it was just ignored because the app wasn't made visible
yet from WM perspective.

Test: go/wm-smoke
Test: android.server.cts.KeyguardTransitionTests#testNewActivityDuringOccluded
Test: Launch camera from unlocked Keyguard by swiping from the
icon with animation transition scale set to 0.5. (regression test)

Change-Id: Idc2a5523f4653ae9788ba145c2d980343ae459f4
Merged-In: Idc2a5523f4653ae9788ba145c2d980343ae459f4
Fixes: 65061212
Bug: 37677242

6 years agoRemove config_tether_apndata for Telstra.
Amit Mahajan [Thu, 31 Aug 2017 20:49:28 +0000 (13:49 -0700)]
Remove config_tether_apndata for Telstra.

Test: manual
Bug: 63564491
Change-Id: Iaca29bfd474b7df6489b1daeaeea182ebf8d81ae

6 years agoMerge "Add multi-display support to FloatingToolbar." into oc-mr1-dev
Tarandeep Singh [Thu, 31 Aug 2017 20:45:48 +0000 (20:45 +0000)]
Merge "Add multi-display support to FloatingToolbar." into oc-mr1-dev

6 years agoRemove PDF Thumbnail functionality
Julian Mancini [Tue, 1 Aug 2017 20:23:08 +0000 (13:23 -0700)]
Remove PDF Thumbnail functionality

Bug: 64225798
Test: Removing Functionality
Change-Id: Id02f1b50d161c6f2779c9f65c579383c18028b65

6 years agoHook up AOD knobs to Settings.Global
jackqdyulei [Thu, 24 Aug 2017 23:14:34 +0000 (16:14 -0700)]
Hook up AOD knobs to Settings.Global

This cl creates AlwaysOnDisplayPolicy, which get values for the
following knobs(go/aod-experiments) from Settings.Global:
1. screen_brightness_array
2. dimming_scrim_array
3. prox_screen_off_delay
4. prox_cooldown_trigger
5. prox_cooldown_period

Also update code to make sure AlwaysOnDisplayPolicy is used
everywhere.

Bug: 64899561
Test: runtest -x AlwaysOnDisplayPolicyTest

Change-Id: I2e83ff980771e67177e4964bd83aa68b2bdca65f

6 years agoFix stuck activity
Jorim Jaggi [Thu, 31 Aug 2017 15:28:27 +0000 (17:28 +0200)]
Fix stuck activity

Assume the following sequence of events:

- prepareAppTransition
- setVisibility(app)
- okToAnimate -> false
- setVisibility(app)

In this case, the first setVisibility call sets a dummy animation
but the second setVisibility call removes the app from
mOpeningApps but does not clear out the animation. In that case,
the app is stuck with the dummy animation set that will get never
cleared.

To fix this, we always reset the animation if a dummy animation is
set when changing the visibility, no matter we use a transit or
not.

Test: Unlock with fingerprint from AOD to homescreen
Change-Id: I0dbe2d9836238aba7f16d3e45649fd4b82ff52f6
Fixes: 65067824

6 years agoMerge "Do not call setAlwaysButtonEnabled if the activity doesn't support defaults...
TreeHugger Robot [Thu, 31 Aug 2017 19:47:42 +0000 (19:47 +0000)]
Merge "Do not call setAlwaysButtonEnabled if the activity doesn't support defaults." into oc-mr1-dev

6 years agoMerge "Fixed FillResponse.toString() to display list of datasets." into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 19:43:01 +0000 (19:43 +0000)]
Merge "Fixed FillResponse.toString() to display list of datasets." into oc-mr1-dev

6 years agoFix shift in share sheet
Jason Monk [Thu, 31 Aug 2017 19:42:51 +0000 (15:42 -0400)]
Fix shift in share sheet

Was counting the padding twice, its included in height already.

Test: visual
Change-Id: I012c6db585eb5fac0d5cee87971d94740c520f07
Fixes: 63647502

6 years agoHide battery percentage from accessibility.
Jason Monk [Thu, 31 Aug 2017 19:23:32 +0000 (15:23 -0400)]
Hide battery percentage from accessibility.

It's parent already has a content description containing the percentage.
Its duplicative to have both.

Test: manual
Change-Id: I5119a1b4fa101726b26da9e226a51891f6b39892
Fixes: 65124571

6 years agoMerge "Wrap all exceptions/crashes while plugins are active" into oc-mr1-dev
Jason Monk [Thu, 31 Aug 2017 18:50:13 +0000 (18:50 +0000)]
Merge "Wrap all exceptions/crashes while plugins are active" into oc-mr1-dev

6 years agoEnsure that PiP mode changed callback if animation is interrupted
Winson Chung [Mon, 14 Aug 2017 20:33:51 +0000 (13:33 -0700)]
Ensure that PiP mode changed callback if animation is interrupted

- If a PiP enter animation callback is interrupted, the activity is never
  actually put into PiP mode, and will never receive
  onPictureInPictureModeChanged(false) even if enterPictureInPictureMode()
  returns true due to the change being deduped (it was never in that mode).
  In this specific case, force a callback to be made to the app so that it
  has a signal that it is no longer in PiP mode.

Bug: 63749396
Test: bit FrameworksServicesTests:com.android.server.wm.BoundsAnimationControllerTests
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipInterruptedCallbacks

Change-Id: I301c70e4fb0f2175dd6d7b5feae065b41df2878d

6 years agoDon't cancel by UID when an app is disabled or uninstalled
Makoto Onuki [Wed, 30 Aug 2017 21:53:16 +0000 (14:53 -0700)]
Don't cancel by UID when an app is disabled or uninstalled

Instead, cancel by UID/package.

Bug: 64536115
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsJobSchedulerTestCases
Test: adb shell pm disable com.google.android.hiddenmenu and
    adb shell pm enable com.google.android.hiddenmenu and check logcat
Change-Id: I8f50c459cf321ac43fd2a6696cb8d4c593accd67

6 years agoFix issue #63971747: Audio is not heard first time when played after a long pause
Dianne Hackborn [Thu, 31 Aug 2017 18:15:26 +0000 (11:15 -0700)]
Fix issue #63971747: Audio is not heard first time when played after a long pause

Audio banning is broken due to a race it has with the app.  See
comment in the change for more details.

Test: manual
Bug: 63971747
Change-Id: I2a384a5b96c95ebf7e9476392fdc5a2d4f623061

6 years agoAdd multi-display support to FloatingToolbar.
Tarandeep Singh [Tue, 29 Aug 2017 21:39:22 +0000 (14:39 -0700)]
Add multi-display support to FloatingToolbar.

DecorView has no support for multi-display (bug 65172902).
Until that is done, the easy fix for displaying cut, copy, paste
on non-default display is to modify FloatingToolbar.
FloatingToolbar uses context of Default display. Changed it
to use context of the window (which makes it multi-display
compatible).

Fixes: 64837794
Test: Manual using AAe's KitchenSink test app
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I513f1aac1c0d22355c996247e3bf56c6d812348f

6 years agoMerge changes I30e39943,I4b5fb782,I8fe0ddbd into cw-f-dev am: 1c0dba5014 am: 80a0f290...
Zheng Zhang [Thu, 31 Aug 2017 17:48:29 +0000 (17:48 +0000)]
Merge changes I30e39943,I4b5fb782,I8fe0ddbd into cw-f-dev am: 1c0dba5014 am: 80a0f290f6 am: e274cd7ae9
am: a8441ebf84

Change-Id: I4af0cf2638717eb91d82e804dddb69e647e713f0

6 years agoDO NOT MERGE ANYWHERE: Listen TRANSPORT_BLUETOOTH network change in GnssLocationProvi...
Zheng Zhang [Thu, 31 Aug 2017 17:47:16 +0000 (17:47 +0000)]
DO NOT MERGE ANYWHERE: Listen TRANSPORT_BLUETOOTH network change in GnssLocationProvider am: 03c0f16f37  -s ours am: d877297ad4  -s ours am: 6f94a3740a  -s ours
am: 2a540e9970  -s ours

Change-Id: Iea7e5e533da23bc64fcafe03d59297ae8d5d87da

6 years agoMerge changes I30e39943,I4b5fb782,I8fe0ddbd into cw-f-dev am: 1c0dba5014 am: 80a0f290f6
Zheng Zhang [Thu, 31 Aug 2017 17:37:44 +0000 (17:37 +0000)]
Merge changes I30e39943,I4b5fb782,I8fe0ddbd into cw-f-dev am: 1c0dba5014 am: 80a0f290f6
am: e274cd7ae9

Change-Id: Ibc2a01cbfbc33c1ee07486b5556a91b9ebeaa532

6 years agoDO NOT MERGE ANYWHERE: Listen TRANSPORT_BLUETOOTH network change in GnssLocationProvi...
Zheng Zhang [Thu, 31 Aug 2017 17:36:50 +0000 (17:36 +0000)]
DO NOT MERGE ANYWHERE: Listen TRANSPORT_BLUETOOTH network change in GnssLocationProvider am: 03c0f16f37  -s ours am: d877297ad4  -s ours
am: 6f94a3740a  -s ours

Change-Id: I12d33400af3e2f3c358839380ddee7fb8791e839

6 years agoMerge "Fix issue #65055576: VoiceInteractionManagerService sets..." into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 17:23:26 +0000 (17:23 +0000)]
Merge "Fix issue #65055576: VoiceInteractionManagerService sets..." into oc-mr1-dev

6 years agoFix issue #65055576: VoiceInteractionManagerService sets...
Dianne Hackborn [Wed, 30 Aug 2017 23:21:28 +0000 (16:21 -0700)]
Fix issue #65055576: VoiceInteractionManagerService sets...

...VOICE_RECOGNITION_SERVICE that is needed for SearchSpeechServices

System setup was incorrectly completely runing off
VoiceInteractionManagerService if the associated feature is not set,
but the service needs to always be running, and instead rely on
the existing logic of reducing functionality if it should not be
running full voice interaction services.

Test: manually booted and ran
Bug: 65055576

Change-Id: I9a83216d45689440c71d657ba2721faf0662b0ff

6 years agoMerge "Update the work icon." into oc-mr1-dev
Daniel Nishi [Thu, 31 Aug 2017 17:20:14 +0000 (17:20 +0000)]
Merge "Update the work icon." into oc-mr1-dev

6 years agoMerge "Fix fingerprint error messages on Keyguard / AOD" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 17:04:10 +0000 (17:04 +0000)]
Merge "Fix fingerprint error messages on Keyguard / AOD" into oc-mr1-dev

6 years agoWrap all exceptions/crashes while plugins are active
Jason Monk [Wed, 30 Aug 2017 23:39:09 +0000 (19:39 -0400)]
Wrap all exceptions/crashes while plugins are active

To help differentiate them from real crashes.

Test: install crashing plugin
Change-Id: I88d991ab8d86f71bcc7042012d4d84d8a9af19f3
Fixes: 64527191

6 years agoMerge "Fix meteredness bugs in updateNetworkRulesNL()." into oc-mr1-dev
Jeff Sharkey [Thu, 31 Aug 2017 16:38:02 +0000 (16:38 +0000)]
Merge "Fix meteredness bugs in updateNetworkRulesNL()." into oc-mr1-dev

6 years agoMerge "Update DisplayContent tap exclude region on window resize" into oc-mr1-dev
David Stevens [Thu, 31 Aug 2017 16:37:12 +0000 (16:37 +0000)]
Merge "Update DisplayContent tap exclude region on window resize" into oc-mr1-dev

6 years agoMerge "Add bt battery level to QS icons" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 16:36:57 +0000 (16:36 +0000)]
Merge "Add bt battery level to QS icons" into oc-mr1-dev

6 years agoMerge "Reduce paddings on 320dp screens, we don't have much space" into oc-mr1-dev
Jason Monk [Thu, 31 Aug 2017 16:35:37 +0000 (16:35 +0000)]
Merge "Reduce paddings on 320dp screens, we don't have much space" into oc-mr1-dev

6 years agoMerge "Don't auto-expand QS from detail panels" into oc-mr1-dev
Jason Monk [Thu, 31 Aug 2017 16:31:26 +0000 (16:31 +0000)]
Merge "Don't auto-expand QS from detail panels" into oc-mr1-dev

6 years agoMerge "Fix carrier text rtl alignment" into oc-mr1-dev
Jason Monk [Thu, 31 Aug 2017 16:31:10 +0000 (16:31 +0000)]
Merge "Fix carrier text rtl alignment" into oc-mr1-dev

6 years agoMerge "Fix multi user battery percentage" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 15:38:57 +0000 (15:38 +0000)]
Merge "Fix multi user battery percentage" into oc-mr1-dev

6 years agoMerge "Unlock managed profile keystore when user is unlocked." into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 15:33:54 +0000 (15:33 +0000)]
Merge "Unlock managed profile keystore when user is unlocked." into oc-mr1-dev

6 years agoMerge "Fix tuner DND UI" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 15:28:56 +0000 (15:28 +0000)]
Merge "Fix tuner DND UI" into oc-mr1-dev

6 years agoMerge "Fix wrong dump output of *Info#flags" into oc-mr1-dev
Yohei Yukawa [Thu, 31 Aug 2017 15:26:07 +0000 (15:26 +0000)]
Merge "Fix wrong dump output of *Info#flags" into oc-mr1-dev

6 years agoFix wrong dump output of *Info#flags
Yohei Yukawa [Thu, 31 Aug 2017 07:26:01 +0000 (00:26 -0700)]
Fix wrong dump output of *Info#flags

This CL follows up to a previous CL [1] that introduced an ability to
control filtering level of
 - ActivityInfo#dump()
 - ApplicationInfo#dump()
 - ComponentInfo#dump()
 - ProviderInfo#dump()
 - ResolveInfo#dump()
 - ServiceInfo#dump()
but also masked following outputs as an unexpected side effect.
 - ActivityInfo#flags
 - ApplicationInfo#flags
 - ProviderInfo#flags
 - ServiceInfo#flags

With this CL, above *Info#flags are correctly dumped again.

 [1]: I0d01565babb87e68b840c9756a2ea730d699efc7
      6ac42aeed905181b484f97a53db57a17134ef7a8

Test: Manually tested as follows.
 1. make -j SoftKeyboard
 2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
 3. adb shell dumpsys input_method
    -> Check 'com.example.android.softkeyboard' section
      -> make sure ServiceInfo#flags=0x0
      -> make sure ApplicationInfo#flags=0x38a8be44
           FLAG_HAS_CODE (1<<2)
           FLAG_ALLOW_CLEAR_USER_DATA (1<<6)
           FLAG_SUPPORTS_SMALL_SCREENS (1<<9)
           FLAG_SUPPORTS_NORMAL_SCREENS (1<<10)
           FLAG_SUPPORTS_LARGE_SCREENS (1<<11)
           FLAG_RESIZEABLE_FOR_SCREENS (1<<12)
           FLAG_SUPPORTS_SCREEN_DENSITIES (1<<13)
           FLAG_ALLOW_BACKUP (1<<15)
           FLAG_SUPPORTS_XLARGE_SCREENS (1<<19)
           FLAG_STOPPED (1<<21)
           FLAG_SUPPORTS_RTL (1<<22)
           FLAG_INSTALLED (1<<23)
           FLAG_FULL_BACKUP_ONLY (1<<26)
           FLAG_EXTRACT_NATIVE_LIBS (1<<28)
           FLAG_HARDWARE_ACCELERATED (1<<29)
Fixes: 65057767
Change-Id: Icd1e18237e873844791ccdea7f424b6fe76137c0

6 years agoMerge "De-couple data enabled from VT settings." into oc-mr1-dev
Tyler Gunn [Thu, 31 Aug 2017 15:13:08 +0000 (15:13 +0000)]
Merge "De-couple data enabled from VT settings." into oc-mr1-dev

6 years agoFix home button size
Jason Monk [Thu, 31 Aug 2017 14:50:05 +0000 (10:50 -0400)]
Fix home button size

Test: visual
Bug: 37115488
Change-Id: Ibfaa569cf001f25b0beb65927acbdf606ac59d54

6 years agoMerge "Clear pending activity options when retrieved in ActivityManagerService."...
Bryce Lee [Thu, 31 Aug 2017 14:43:02 +0000 (14:43 +0000)]
Merge "Clear pending activity options when retrieved in ActivityManagerService." into oc-mr1-dev

6 years agoRevert "Nat464Xlat: interface notification handler on ConnectivityService"
Hugo Benichi [Thu, 31 Aug 2017 14:32:54 +0000 (14:32 +0000)]
Revert "Nat464Xlat: interface notification handler on ConnectivityService"

This reverts commit 72479c0373c7be75fb6bf752949a8f728911542f.

Bug: 65225023
Change-Id: Id6c21682cafa86d87f66480237dd731b21f917c5

6 years agoUpdate UnlockMethodCache when screen turns off
Kevin Chyn [Thu, 31 Aug 2017 12:59:00 +0000 (12:59 +0000)]
Update UnlockMethodCache when screen turns off
am: 08ae664365

Change-Id: I132358dc66f04cb2531e6d57ed8d2dd14947b62d

6 years agoUnlock managed profile keystore when user is unlocked.
Pavel Grafov [Wed, 23 Aug 2017 11:20:54 +0000 (12:20 +0100)]
Unlock managed profile keystore when user is unlocked.

With file based encryption when the user unlock the phone,
managed profile is already running (in a locked state). But
on full disk encryption devices, LSS attempts to unlock child
profile straight after unlocking user 0, which fails because
the profile is not yet running.

With this change once the profile gets unlocked (happens after
ActivityManagerService processes START_PROFILES_MSG message)
LSS will attempt to unlock its keystore.

Bug: 64722589
Test: manual, tried FDE and FBE devices with unified challenge.
Change-Id: Ic614cc3c6732a3db6aaf56fef1822e358d742510

6 years agoTrack the global setting of BT A2DP on/off
Sungsoo Lim [Thu, 24 Aug 2017 01:25:06 +0000 (10:25 +0900)]
Track the global setting of BT A2DP on/off

The default phone speaker, bluetooth audio devices, and wired audio
devices are handled as system audio routes. When an app starts to
make sound to a system audio route, the system audio route will be
selected with the following order.

1. The slected route by the app after the latest connection of
   an audio device.
2. The lastly connected audio device.
3. The default phone speaker if not connected.

Bug: 64811580
Test: Passed MediaRouterTest, manual
Change-Id: I77badb14596bc661c44237957504164f5476e595

6 years agoMerge "Skip handling recents toggle if a task is locked." into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 04:34:43 +0000 (04:34 +0000)]
Merge "Skip handling recents toggle if a task is locked." into oc-mr1-dev

6 years agoMerge "Use isolated uid to set oom_score_adj" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 03:52:51 +0000 (03:52 +0000)]
Merge "Use isolated uid to set oom_score_adj" into oc-mr1-dev

6 years agoMerge "Update icons to have rounded corner" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 03:12:24 +0000 (03:12 +0000)]
Merge "Update icons to have rounded corner" into oc-mr1-dev

6 years agoMerge "At STARTED_AS_NEXT, offload MediaPlayer.start() to a separate thread" into...
TreeHugger Robot [Thu, 31 Aug 2017 02:50:04 +0000 (02:50 +0000)]
Merge "At STARTED_AS_NEXT, offload MediaPlayer.start() to a separate thread" into oc-mr1-dev