313028 Commits

Author SHA1 Message Date
TreeHugger Robot
d275c9a65c Merge "Return to Home stack when a context of tasks launched from Home finished" into oc-dev 2017-04-07 22:31:03 +00:00
Wei Jia
ae3e7067ef MediaPlayer: add 2 more info notifications for playback error
Test: mediaplayer doesn't send error notify to client when only one track has error.
Bug: 24761723
Change-Id: I7221dfdbc6a256532186c654406bbe06de831798
2017-04-07 15:24:50 -07:00
Phil Weaver
2b6197f464 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.

(Manual merge from commit 687bb44b437f7bb24dd3dddf072c2f646308e2ca)

Change-Id: I7746c9175a2da28f75d4f4b169d7997abadf1852
2017-04-07 22:23:12 +00:00
TreeHugger Robot
5cd4797c7a Merge "Add RecommendationPlugin for Cloud Print" into oc-dev 2017-04-07 22:21:42 +00:00
Phil Weaver
1d8eb49073 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.

(Manual merge from commit 687bb44b437f7bb24dd3dddf072c2f646308e2ca)

Change-Id: I7746c9175a2da28f75d4f4b169d7997abadf1852
2017-04-07 15:21:39 -07:00
Bryce Lee
4b51b3232a Update decor LayoutParams when window is already added.
These values can change for themes that are dependent on the size,
such as the DialogWhenLarge theme. In this case, different layouts
are loaded that could depend on updated LayoutParams.

This CL identifies the case when the layoutparams change and informs
the activity.

Change-Id: Icde8d94cc089ca0c02a15120a860533ef540c850
Fixes: 31643268
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testDialogWhenLargeSplitSmall
2017-04-07 15:11:12 -07:00
Bryce Lee
fea79005bd Do not make strong reference to Resources.
This CL removes the strong reference added for mapping display ids
and Resources to Displays. Instead, the key pair is now the display
id and ResourcesKey, and the mapping is pruned when key is
invalidated.

Change-Id: If91368171212b28c40e03c15fb39c72412a44811
Fixes: 36625868
Test: make -j32 cts; cts-tradefed; run cts --module CtsAppTestCases --test android.app.cts.DisplayTest#testRotation
2017-04-07 22:06:52 +00:00
TreeHugger Robot
bc4bd823d9 Merge changes I5d41419a,I763be06c into oc-dev
* changes:
  Introduce android.anim thread in system_server
  Fix thread booster
2017-04-07 22:05:18 +00:00
TreeHugger Robot
e467be5e14 Merge "copy 'visbileToInstantApps' setting" into oc-dev 2017-04-07 22:04:09 +00:00
TreeHugger Robot
77d23337fb Merge "Don't show alert window notifications when in Vr mode." into oc-dev 2017-04-07 22:00:47 +00:00
TreeHugger Robot
7354ee76aa Merge "AAPT2: fixing the -c flag being ignored" into oc-dev 2017-04-07 21:56:36 +00:00
TreeHugger Robot
4c2a62edb6 Merge "MediaPlayer: hide BufferingParams API" into oc-dev 2017-04-07 21:46:40 +00:00
TreeHugger Robot
ca2622b860 Merge "ViewRootImpl: Fix child lifetime." into oc-dev 2017-04-07 21:44:48 +00:00
TreeHugger Robot
735a5e1438 Merge "Show recents at correct time when starting activity in docked stack" into oc-dev 2017-04-07 21:42:50 +00:00
Winson Chung
4790065086 Ensure that a PIP activity gets stopped before MW/PIP mode changes.
- Adds a workaround to ensure that onStop() is dispatched to the PIP
  activities when the PIP is dismissed
- Consolidating dismiss PIP behavior to call moveTaskToFullscreen().
  Now we are consistent, and when we expand the PIP, we call
  moveTaskToFullscreen(top), and when dismissing the PIP we call
  moveTaskToFullscreen(bottom)
- Fixing issue where we were dispatching extra MW/PIP mode changes when
  just expanding the PIP
- Fixing typo in last commit where PIP mode change was not getting
  scheduled correctly
- Fixing issue where move-to-fullscreen log was sent for each task

Bug: 36567036
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testStopBeforeMultiWindowCallbacksOnDismiss

Change-Id: I303b88d75e9f136da0c238ef5987804e0684c78e
Signed-off-by: Winson Chung <winsonc@google.com>
2017-04-07 14:03:57 -07:00
TreeHugger Robot
1a199ba7e1 Merge "renaming/removing fingerprints should be reflected in UI immediately" into oc-dev 2017-04-07 20:55:15 +00:00
Wale Ogunwale
cd501ecd91 Show recents at correct time when starting activity in docked stack
Previous logic relied on the returnTo type of the task of the activity
we are launching which can get the wrong signal at times because the
original task might have been started from home, but since we are
already in docked mode it shouldn't cause recents activity to be
launched.
We now decide if recents ability should be shown based on if the home
stack is currently visible at the time we started the new activity.
Also, renamed ActivityStack.getStackVisibilityLocked() to
ActivityStack.shouldBeVisible() since it is used to determine if the
stack should be visible and also so it isn't confused with the new
method ActivityStack.isVisible() which returns true if the stack is
currently visible.

Test: manual
Change-Id: I051e72ce93c886d25526af2afef851c95812ab3e
Fixes: 37005549
2017-04-07 13:52:29 -07:00
Andrii Kulian
4eab3cb11a Merge "Add hidden API to check support of Multi-Display" into oc-dev 2017-04-07 20:22:58 +00:00
Shunta Sato
63b8ee365d Return to Home stack when a context of tasks launched from Home finished
When the following conditions happen together, another context in
Application stack was launched unexpectedly:
- There is a context of tasks in Application stack, which is launched
  from a task on Home stack.
- All tasks/activities in the context are finishing.

Solution:
Add a condition check to see if the task is NOT one of the task
finishing on-top of the top running task.

Bug: 30883775
Test: manual
Author: Ichitaro Kohara <ichitaro.kohara@sonymobile.com>
Change-Id: I5d6097a7c8dc2733ff684957370c987dd158e329
2017-04-07 13:22:16 -07:00
Jorim Jaggi
ed7993b5d1 Introduce android.anim thread in system_server
We create a new thread on which everything is running that
directly impacts window animations, i.e. layout, anim tick and
starting window creation. This is such that any work on
android.display can not lead to jank in the window animation,
specifically lock contention on activity manager lock that blocks
callbacks from android.display into AM can not lead to window
animation jank.

Test: Run animation, take systrace, make sure animation is on
android.anim
Test: AppWindowContainerControllerTestTest: AppWindowContainerControllerTestss
Fixes: 36792959

Change-Id: I5d41419a709b7984724e7053a3afdcc1ffe1aaa2
2017-04-07 22:10:34 +02:00
Charles He
23a7c1e870 Merge "FingerprintService: check current user correctly" into oc-dev 2017-04-07 20:06:21 +00:00
Todd Kennedy
66b5c042c2 copy 'visbileToInstantApps' setting
Change-Id: I342a133ae8d7f38008cb03706d160e6f2e2cca97
Fixes: 37002720
Test: Start instant app [adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d http://www.realestate.com.au/property-apartment-nsw-pyrmont-124879602] and see that hitting the 'share' icon works
2017-04-07 12:48:13 -07:00
puma_hsu
6040887f78 Just broadcast intent to bring up MTP/PTP as soon as switching function
Bug: 36113457
Bug: 34451451
Test: Turn on tethering
Change-Id: I3a7ab6fdcd157740b8e55ded67b3d5dddf15b0e0
Signed-off-by: puma_hsu <puma_hsu@htc.com>
(cherry picked from commit 4b3e46c7878f28abe2f3c26c05d55c41eba41227)
2017-04-07 12:35:21 -07:00
Robert Carr
ba29dbc3b3 ViewRootImpl: Fix child lifetime.
As far as I can tell this has always been broken. We've always had
intermittent reports of buffer-queue-abandoned as well (a recent bug
came with some reports from N). During onStop SurfaceView relies on
onWindowVisibilityChanged, to trigger a visibility change. At this
point SurfaceView will emit the SurfaceDestroyed callback in order to
stop the client from further use of the Surface. The contract we've
been using with ViewRootImpl is at any point following
Activity.performStop returning the WindowManager was free to destroy
the Surfaces. This is why in setWindowsStopped we destroy the hardware
resources for the ViewRoot. However we aren't dispatching anything to
the SurfaceView. The WindowManager will send an app visibility
notification, but that would go through the handler. This means by the
time we return from Stop, there is no guarantee that the
onWindowVisibilityChanged callbacks have been invoked at all. It
seemed most sensible to dispatch the visibility callbacks directly. We
also ensure that getHostVisibility will return false after this point,
so that performTraversals will not reverse our visibility request if
it occurs again prior to the window visibility notification from the
WindowManager. We also guard against emitting a second window
visibility changed callback in the traversals. I don't know at this
point what value the window visibility notification provides but I
don't feel excited about removing it in this CL at this point in
the development cycle.

Test: Put Chrome in PiP. Turn screen off. No Crash!
Bug: 36561071
Change-Id: Id1673561b2299d477b2761b3ac6afa14eabbf7fb
2017-04-07 12:24:43 -07:00
TreeHugger Robot
91d289903c Merge "Special-case English for DateTime and Time key listeners" into oc-dev 2017-04-07 19:21:56 +00:00
Wale Ogunwale
2f2e3f8ad5 Merge "Revert "Do not make strong reference to Resources."" into oc-dev 2017-04-07 19:06:55 +00:00
Phil Weaver
d0e54c1c09 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.
Change-Id: I10f24747e3ab87d77cd1deba56db4526e3aa5441
(cherry picked from commit 687bb44b437f7bb24dd3dddf072c2f646308e2ca)
2017-04-07 18:53:26 +00:00
Ying Xu
98852767b3 Merge "Add a carrier option to hide the option of "Enhanced 4G LTE Mode"" into oc-dev 2017-04-07 18:47:58 +00:00
Phil Weaver
487d869733 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.
Change-Id: I10f24747e3ab87d77cd1deba56db4526e3aa5441
(cherry picked from commit 687bb44b437f7bb24dd3dddf072c2f646308e2ca)
2017-04-07 18:45:38 +00:00
Bryce Lee
4eb4f05ea9 Revert "Do not make strong reference to Resources."
This reverts commit 2d2315a66d81d29896e6a0ffedbfbbed3981b9ed.

Reason for revert: possible cause for b/37156733

Change-Id: I02d468449f0632d1281ab5ad2a381e7e36a5b0ea
2017-04-07 18:44:26 +00:00
Phil Weaver
475719d03d Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.
Change-Id: I10f24747e3ab87d77cd1deba56db4526e3aa5441
(cherry picked from commit 687bb44b437f7bb24dd3dddf072c2f646308e2ca)
2017-04-07 18:43:53 +00:00
Phil Weaver
1b6beed271 Make a11y node info parceling more robust
Fix a bug where a malformed Parceled representation
of an AccessibilityNodeInfo could be used to mess with
Bundles as they get reparceled.

Bug: 36491278
Test: Verified that POC no longer works, a11y cts still passes.
Change-Id: I10f24747e3ab87d77cd1deba56db4526e3aa5441
(cherry picked from commit 687bb44b437f7bb24dd3dddf072c2f646308e2ca)
2017-04-07 18:42:52 +00:00
TreeHugger Robot
7dfa16c2ef Merge "Color management, the missing pieces" into oc-dev 2017-04-07 18:34:40 +00:00
Geoffrey Pitsch
9394a8fc62 Merge "Don't delete new notification channels not present in backup" into oc-dev 2017-04-07 18:16:35 +00:00
TreeHugger Robot
fc33499c64 Merge "Remove WebView-fallback code for handling the non-functional stub." into oc-dev 2017-04-07 18:13:26 +00:00
Bookatz
ceebafe41a Fix counting problems in StopwatchTimer.
Changed StopwatchTimer so that its count only increases if the timer is
started when its time base is running. Previously, if the time base was
off, the timer was started, the time base was turned on, and then the
timer was stopped, the count would be increased; now, it will not
(because the time base was off when the timer started). Moreover, this
likely fixes the count==-1 bug that previously could occur, since the
count will no longer be decremented if the timer is stopped after a reset.

Fixes: 36730213
Bug: 30099724
Test: runtest -x
frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java

Change-Id: Iad195e431618629ce432074e0c1bd217f9818cb1
2017-04-07 11:12:54 -07:00
Andrii Kulian
597f390681 Add hidden API to check support of Multi-Display
Added ActivityManager#supportsMultiDisplay() to check if system
supports running activities on secondary displays.

Bug: 36776777
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testMultiDisplayDisabled
Change-Id: I18f98f2f6a9e865ad8dc63a470210190536d3271
2017-04-07 11:08:55 -07:00
Eugene Susla
adce09b9a4 Add ICompanionDeviceManager.getAssociation overload with explicit userId
Bug: 30932767
Test: ensure getAssociations works as before
Change-Id: I58dc4dac5bf7aae83fe3611890116a928e290a43
(cherry picked from commit 544d714626db38714f826a31a5483c647510a743)
2017-04-07 17:51:52 +00:00
Dmitry Dementyev
d6f0672e88 Make visible only accounts for which authenticator supports contacts operations
for callers with READ_CONTACTS permission.

Test: manual
Bug: 36983643
Change-Id: I1239a30a71cb13ce9ffff6f38b8506e9686abe4d
(cherry picked from commit d7e7a74179c51a36845c35614ac3247c13474fca)
2017-04-07 17:50:00 +00:00
TreeHugger Robot
3d82322c7c Merge "Fix theming on brightness dialog" into oc-dev 2017-04-07 17:37:50 +00:00
Adrian Roos
2d691791e7 Merge "Revert "Ignore a broken test until it can be fixed."" into oc-dev 2017-04-07 17:35:48 +00:00
Emilian Peev
7ca1371987 DngCreator: Populate baseline exposure tag
"postRawSensitivityBoost" contains the gain value applied after
RAW. Take this value in to account and populate the baseline
exposure accordingly.

Bug: 33623101
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java

Change-Id: Ib90a5c1791c422fd36ec44fb6ef695ba8a1dc475
2017-04-07 18:26:47 +01:00
TreeHugger Robot
157017c8a8 Merge "Make sure to synchronize on references to plugin dependencies" into oc-dev 2017-04-07 17:25:01 +00:00
TreeHugger Robot
ed8051b528 Merge "Synchronize on sysui dependency references" into oc-dev 2017-04-07 17:23:37 +00:00
Eric Sandness
a9b8253b38 Fix mock of setApplicationRestrictions()
If any(Bundle.class) is used in the mock's when() clause instead of
nullable(Bundle.class), the mock is not called when the bundle argument
is null.

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest
frameworks-services

Bug: 36808416
Change-Id: Iab96fe88837e8f27a1da5775494b4611a547f13a
2017-04-07 18:17:24 +01:00
Philip P. Moltmann
b2565935d1 Add RecommendationPlugin for Cloud Print
Reuses already existing infrastructure. The mMDNSFilteredDiscovery lambda
is called for every network service that supports #PRIVET_SERVICE. Then
the plugin checks the txt fields to make sure the printer is valid. The
check is not complete but good enough to make sure this is either a
cloud print capable printer or something that tries really hard.

Test: Connected to network with three printers, 2 GCP capable. Found the
      two printers
Fixes: 35766193
Change-Id: I7c9180c8c154fa092fec5b943a94bad77da74c86
2017-04-07 09:52:54 -07:00
Mihai Nita
f4dacf29cc AAPT2: fixing the -c flag being ignored
Bug: 36999175
Test: manual

Change-Id: Id9a4a00a3b37bc088d86df7c75bbe711536b980f
2017-04-07 09:27:03 -07:00
TreeHugger Robot
67ee79e84f Merge "AOD: More VisD updates" into oc-dev 2017-04-07 16:03:33 +00:00
TreeHugger Robot
5393a0e2d9 Merge changes If96c0146,I0d68ad60 into oc-dev
* changes:
  Improved accessibility behavior of the notification shelf
  Fixed a bug where the indeterminate progressbar janky
2017-04-07 15:59:17 +00:00
Chen Xu
31fcda576f Merge "remove deprecated API sendDialerCode" into oc-dev 2017-04-07 15:53:11 +00:00