Commit Graph

38300 Commits

Author SHA1 Message Date
TreeHugger Robot
10bafbd9f9 Merge "Immediately deliver new intent to paused activities." into nyc-mr1-dev 2016-09-22 19:26:36 +00:00
Vladislav Kuzkokov
dd6230d466 Merge "Add DevicePolicyManager.setBackupServiceEnabled as hidden API." into nyc-mr1-dev 2016-09-22 17:09:06 +00:00
TreeHugger Robot
03779f227a Merge "Add remote control of Instant Apps" into nyc-mr1-dev 2016-09-22 16:57:17 +00:00
Wale Ogunwale
03f7e9e944 Immediately deliver new intent to paused activities.
ag/1437028 tried to fix this problem, but limited intent
delivery to only paused activities in a minimized docked stack
to reduce the effect of the change since we are late in the
release cycle. However, it didn't completely solve the problem
for example when the ChooserActivity comes up in the fullscreen
stack un-minimizing the docked stack and then the user selects
the app in the docked stack from ChooserActivity.
We now immediately deliver intents to paused activities as they
are currently visible to the user and we want the user to see
the visual effects caused by the intent delivery now.

Bug: 31371093
Change-Id: I94f9717da66daa512071bb96e62b2f9811691a78
2016-09-22 09:04:09 -07:00
Stuart Scott
0845b025aa Continue if package is not in system
am: 434c8db80f

Change-Id: Ie2a9741583bb09ddcb27e28e18f29d63f371c8ff
2016-09-22 06:41:52 +00:00
TreeHugger Robot
3904e1bc34 Merge "Fix stopping activity when removed from waiting visible" into nyc-mr1-dev 2016-09-22 02:01:01 +00:00
Andrii Kulian
ee05681139 Fix stopping activity when removed from waiting visible
During refactoring in ag/613666 waitingVisible flag clearing
was mistakenly removed. It was added back in ag/1221328 but
only for activities that are finishing.
This caused activity not being stopped in some cases when
window visibility change was handled before receiving idle
callback from client. This is easily reproducible when there
is a scene transition animation specified.

Bug: 31078584
Change-Id: Ic09c5199ad4fceae0607e4bcce02be5335c8870b
2016-09-22 00:17:43 +00:00
Amith Yamasani
be2db1ef72 Merge "Don't inform usage stats of interaction for a toast" into nyc-mr1-dev 2016-09-21 21:38:22 +00:00
Stuart Scott
434c8db80f Continue if package is not in system
bug:29546655
Change-Id: Ieb17534d60db4643180b915f9b10b0c79a2224e2
2016-09-21 14:04:22 -07:00
Amith Yamasani
43caafa2b6 Don't inform usage stats of interaction for a toast
If the process is forced to the foreground due to a toast,
don't inform usage stats of an interaction. Otherwise app standby
will be defeated easily.

Bug: 31544592
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdle_toast
Change-Id: I100d839ef8cf361704fd5db4b26dcc878672a235
2016-09-21 18:53:50 +00:00
Lorenzo Colitti
caf1f0bf0e Rematch wifi networks when the avoid bad wifi setting changes.
am: 836d8788a8

Change-Id: I589cfdb8792997fe94d22c551c8a53e48e45db1a
2016-09-21 09:47:28 +00:00
Lorenzo Colitti
836d8788a8 Rematch wifi networks when the avoid bad wifi setting changes.
Currently, when the avoid bad wifi setting changes, we rematch
all networks and requests, but do not update any NetworkFactories
with new scores. This means that if a wifi network's score goes
down as a result of enabling bad wifi avoidance, we will not look
for another network (e.g., cell data) to satisfy its requests.

This makes it so that when the user enables avoiding bad wifi,
we will attempt to bring up cell data will if it is not already
connected.

Bug: 31075769
Change-Id: Ie5b685be8676999adea8c9ecbbc1abb92f81a74f
2016-09-21 15:10:14 +09:00
TreeHugger Robot
1bae4e3e17 Merge "Listen to ACTION_UID_REMOVED only. DO NOT MERGE." into nyc-mr1-dev 2016-09-21 02:46:08 +00:00
Felipe Leme
f1da90fe04 Listen to ACTION_UID_REMOVED only. DO NOT MERGE.
NMPS was listening to both ACTION_UID_REMOVED and
ACTION_PACKAGE_REMOVED, which not only was redundant but would also
cause problems when a package with shared UIDs was removed.

Fixes: 31375684

Change-Id: Iec006dbbec0e6298f1e568cbf81ed3672f61b7d2
(cherry picked from commit fdebbea401)
2016-09-21 01:11:26 +00:00
Jeff Sharkey
7da2a0c571 Merge "Check if anyone could possibly provide service." into nyc-mr1-dev 2016-09-21 01:08:18 +00:00
Erik Kline
9ed777d03d Merge "Handle more commands in StoppingState" into nyc-mr1-dev 2016-09-21 01:05:33 +00:00
Jaewan Kim
c78afedc91 Merge "Check caller for sending media key to global priority session" into nyc-mr1-dev 2016-09-21 00:36:14 +00:00
Jaewan Kim
d409d18686 Check caller for sending media key to global priority session
Prevent sending media key events from the non-system app to the global
priority session through the MediaSessionManager.dispatchMediaKeyEvent().
Note that any app can use the API indirectly with
the public API AudioManager.dispatchMediaKeyEvent().

Bug: 29833954
Tested: Installed malicious apps and confirmed that they don't work.
Tested: Run CtsTelecomTestCases and CtsMediaTestCases
Change-Id: I2a9e78196ba7455324e485f098f095d03b47ee15
2016-09-21 09:12:47 +09:00
Jeff Sharkey
f6e9b95127 Check if anyone could possibly provide service.
If no service is present that could satisfy a given ServiceWatcher,
then return false.  For example, on devices were there is no Geocoder
service implementation, we need to avoid claiming that the API is
supported.

Test: booted
Bug: 30837973
Change-Id: Ib0834cf1a12623733f8b472dc3da7b3e2adc4515
2016-09-20 23:31:06 +00:00
TreeHugger Robot
07d798b902 Merge "Removing private system ui flags from status bar flags logic." into nyc-mr1-dev 2016-09-20 23:00:37 +00:00
Adrian Roos
56a70e3865 Merge "Fix black wallpaper after repeated crashes" into nyc-mr1-dev 2016-09-20 22:42:49 +00:00
Yohei Yukawa
786cec2f00 Merge "Fix another deadlock between IMMS and TSMS" into nyc-mr1-dev 2016-09-20 17:53:29 +00:00
Lorenzo Colitti
cac09035f2 Add debug output for bad wifi avoidance restrictions.
am: 29bd384f2c

Change-Id: I17e42fb80763a9d48049db9d0785b54bd5005797
2016-09-20 17:15:50 +00:00
Lorenzo Colitti
aab02df195 Support "don't ask again" in the avoid bad wifi dialog.
am: 165c51c0eb

Change-Id: Ic6a1917a83e2d847bd673790e2c36f7316ca7acd
2016-09-20 17:14:50 +00:00
Lorenzo Colitti
59266eec4e Merge changes from topic 'bad_wifi_checkbox' into nyc-dr1-dev
* changes:
  Add debug output for bad wifi avoidance restrictions.
  Support "don't ask again" in the avoid bad wifi dialog.
2016-09-20 17:04:40 +00:00
Yohei Yukawa
e3e31a8801 Fix another deadlock between IMMS and TSMS
Bug 31247871 and Bug 31273203 are the same in terms of that both can be
triggered by calling TSM##getCurrentSpellCheckerSubtype() but different
in terms of what lock objects are involved.

To summarize

 Bug 31273203: between IMMS#mMethodMap and IMM#H
  A. OnClickListener.onClick() running in the IMMS locks IMMS#mMethodMap
     then does some View operations, which can be blocked until
     IMM#H is unlocked (e.g. IMM#onViewDetachedFromWindow()).
  B. TSMS#getCurrentSpellCheckerSubtype() internally calls
     IMM#getCurrentInputMethodSubtype(), which locks IMM#H then can be
     blocked until IMMS#mMethodMap is unlocked.
  The tricky point here is that IMMS and TSMS are running in the same
  process hence IMM#H are actually shared between them.

 Bug 31247871: between IMMS#mMethodMap and TSMS#mSpellCheckerMap
  C. IMMS locks IMMS#mMethodMap then calls
     InputMethodUtils#setNonSelectedSystemImesDisabledUntilUsed(), which
     can be blocked until TSMS#mSpellCheckerMap is unlocked.
  D. TSMS#getCurrentSpellCheckerSubtype() locks TSMS#mSpellCheckerMap
     then may call IMM#getCurrentInputMethodSubtype(), which can be
     blocked until IMMS#mMethodMap is released.

This CL aims to remove the layered lock in D to close Bug 31247871,
while the previous CL [1] took care of B to close Bug 31273203.

Note that A and C are still concerning and should also be taken care of
as a part of Bug 31273203.

 [1]: I20cf2c20f49b1b02c0f7a18257b49d4bcc081b5d
      fa1886feea

Bug: 31247871
Bug: 31273203
Change-Id: I26479e7aa306e0df91d9911891d5625dd5f99678
2016-09-20 06:43:03 -07:00
Lorenzo Colitti
29bd384f2c Add debug output for bad wifi avoidance restrictions.
Bug: 31075769
Change-Id: Ibd97f40917c946aa164c13c7e06c4696d21dc203
2016-09-20 22:01:39 +09:00
Erik Kline
8ec1dc8117 Handle more commands in StoppingState
Also, expand the logging of states in which messages are
received and handled.

Bug: 31264287
Change-Id: If633984cb54128716fc9b3fcb27925906d0bd826
2016-09-20 17:20:57 +09:00
Lorenzo Colitti
165c51c0eb Support "don't ask again" in the avoid bad wifi dialog.
This contains the following changes:

1. Make NETWORK_AVOID_BAD_WIFI a tristate: 0 means never avoid
   bad wifi, unset means prompt the user, 1 means always avoid.
2. Look at NETWORK_AVOID_BAD_WIFI only if the carrier restricts
   avoiding bad wifi (previously, we relied on the setting being
   null and defaulting to the value of the config variable).
3. Add an avoidUnvalidated bit to NetworkAgentInfo to track
   whether the user has requested switching away from this
   unvalidated network even though avoiding bad wifi is generally
   disabled. This is set to true when the user selects "switch"
   in the dialog without setting the "Don't ask again" checkbox.
4. Add a hidden setAvoidUnvalidated API to ConnectivityManager to
   set the avoidUnvalidated bit.
5. Additional unit test coverage.

Bug: 31075769
Change-Id: I1be60c3016c8095df3c4752330149ce638bd0ce1
2016-09-20 16:03:53 +09:00
Winson
ab216609f1 Removing private system ui flags from status bar flags logic.
- Prevent third party apps from inadvertently changing internal SystemUI
  flags through a call to setSystemUiVisibility().  These flags are only
  set in the individual SystemUI components and can be updated in WMS
  directly.

Bug: 29875297
Change-Id: I5ea238c8fb16a0eccd6e993d95a912acb359cee6
2016-09-19 18:39:25 -07:00
TreeHugger Robot
0b85c6ee78 Merge "Allow dismissing ImmersiveModeCling without touch" into nyc-mr1-dev 2016-09-20 00:23:43 +00:00
TreeHugger Robot
99fcdd96da Merge "OtaDexopt: Fix after-ota space measure" into nyc-mr1-dev 2016-09-20 00:22:42 +00:00
Adrian Roos
f940aa3ea1 Merge "Hold WakeLock while DreamService starts" into nyc-mr1-dev 2016-09-19 22:47:30 +00:00
Andreas Gampe
8d1d2ab5b9 OtaDexopt: Fix after-ota space measure
Actually measure the available space.

Bug: 31458900
Change-Id: I16ecee6c275229bc21e908b88b24152484025bc8
2016-09-19 15:18:46 -07:00
Svetoslav Ganov
85a93a0cc9 Merge "Add access tracker to renamed accounts" into nyc-mr1-dev 2016-09-19 22:15:18 +00:00
Chao Chen
944dc5a40e Merge "In AccessibilityGestureDetector.clear(), dispatch a MotionEvent.ACTION_CLEAR event to mGestureDetector to cancel the ongoing gesture." into nyc-mr1-dev 2016-09-19 21:52:08 +00:00
Android Build Merger (Role)
8402a17417 Merge "Fix deadlock in AcitivityManagerService. am: 67e05b4d28 am: 44c9e2f4bf" into nyc-mr1-dev 2016-09-19 21:03:55 +00:00
Sudheer Shanka
b4ecfb9df1 Fix deadlock in AcitivityManagerService. am: 67e05b4d28
am: 44c9e2f4bf

Change-Id: I22ce07b7b273cef869ddcebee029c15316ec9c1c
2016-09-19 21:03:18 +00:00
Sudheer Shanka
44c9e2f4bf Fix deadlock in AcitivityManagerService.
am: 67e05b4d28

Change-Id: I3dd3a1eb43bb3da17ff13a41c1b847b51f6701d6
2016-09-19 20:45:49 +00:00
Amith Yamasani
0938f2fa98 Fix reporting of network connectivity when parole changes
When parole state changes, compute the uids that have been
impacted by the change of idle state and inform listeners.

Bug: 31399882
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdleNonMetered_whenCharging
Test: cts-tradefed run commandAndExit cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testAppIdleMetered_whenCharging
Change-Id: I5cc49464a2d359890b5c48033149e569a5b021ca
2016-09-19 11:49:52 -07:00
Paul Jensen
eb7e711571 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f am: d6a5f68f52 am: a81dd677d3 am: ad004292e1 am: cc3287ef42 am: f8d3ded044 am: 8279621b82
am: 57f76df8d7

Change-Id: Id97dd0e8e943144292e426f772997d791b2d5a3f
2016-09-19 15:28:35 +00:00
Paul Jensen
57f76df8d7 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f am: d6a5f68f52 am: a81dd677d3 am: ad004292e1 am: cc3287ef42 am: f8d3ded044
am: 8279621b82

Change-Id: I42b92758c25af3b56ea7e5150594f43e9ba245e7
2016-09-19 15:21:41 +00:00
Paul Jensen
8279621b82 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f am: d6a5f68f52 am: a81dd677d3 am: ad004292e1 am: cc3287ef42
am: f8d3ded044

Change-Id: Id7ca0a8a930e3abfd7edd3a5f192ca478de51a34
2016-09-19 15:15:52 +00:00
Paul Jensen
f8d3ded044 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f am: d6a5f68f52 am: a81dd677d3 am: ad004292e1
am: cc3287ef42

Change-Id: Ie67919fe79a9102b7bb5b0dd10f66816fdf03e81
2016-09-19 15:08:59 +00:00
Paul Jensen
cc3287ef42 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f am: d6a5f68f52 am: a81dd677d3
am: ad004292e1

Change-Id: I3c5ac16e2a7cad533c7d8c8b0e611bd26743e875
2016-09-19 15:02:28 +00:00
Paul Jensen
ad004292e1 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f am: d6a5f68f52
am: a81dd677d3

Change-Id: Id2da47a2300b6fd211da08daddc1873bdc519e14
2016-09-19 14:55:54 +00:00
Paul Jensen
a81dd677d3 Fix build break due to automerge of 7d2198b5 am: baae57ab24 am: 009e08116f
am: d6a5f68f52

Change-Id: I55e5c90dd0b2c52a1cbee5d6be14a339157d6a75
2016-09-19 14:50:48 +00:00
Paul Jensen
d6a5f68f52 Fix build break due to automerge of 7d2198b5 am: baae57ab24
am: 009e08116f

Change-Id: Ied1bf21ec09d9774bd0f12d2688244fe7dc2bd80
2016-09-19 14:43:28 +00:00
Paul Jensen
009e08116f Fix build break due to automerge of 7d2198b5
am: baae57ab24

Change-Id: Iafcc207308b94d37a04d196def0e7c7a5ce037d9
2016-09-19 14:37:29 +00:00
Paul Jensen
baae57ab24 Fix build break due to automerge of 7d2198b5
Bug: 30100884

Change-Id: I8fa379a74b5d9467b5b9498bd18de2a043963c6f
2016-09-19 13:27:41 +00:00