Commit Graph

71407 Commits

Author SHA1 Message Date
Winson Chung
552bdceeaf Merge changes I20bdab1b,Id82f9081 into oc-dev
am: 64b044680c

Change-Id: I6bf7127bd9f46855e186e13fc4e06f27535c4916
2017-06-16 21:41:43 +00:00
Winson Chung
64b044680c Merge changes I20bdab1b,Id82f9081 into oc-dev
* changes:
  Fix backwards flag causing crash.
  Fixing issue with PiP aspect ratio being clobbered.
2017-06-16 21:32:50 +00:00
Rob Carr
c52b16c97d Merge "ViewRootImpl: More null checks for performTraversals." into oc-dev
am: 6f87503ed8

Change-Id: I8685f019f33861bffb3b82ef0f494a80a8067d88
2017-06-16 20:08:28 +00:00
Rob Carr
6f87503ed8 Merge "ViewRootImpl: More null checks for performTraversals." into oc-dev 2017-06-16 19:55:12 +00:00
Felipe Leme
a0a799f8ed Merge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev
am: 6cde68752c

Change-Id: Ia67129efce12d99e566c1987d653fa3956a926db
2017-06-16 19:36:07 +00:00
TreeHugger Robot
6cde68752c Merge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev 2017-06-16 19:23:45 +00:00
Todd Kennedy
3586115ae5 Merge "enable/disable dexopt for instant apps remotely" into oc-dev
am: 5d969b9862

Change-Id: Ica29f01779c2bb504d682a2b457f861264cc00b0
2017-06-16 18:19:45 +00:00
TreeHugger Robot
5d969b9862 Merge "enable/disable dexopt for instant apps remotely" into oc-dev 2017-06-16 18:07:53 +00:00
Winson Chung
06b50ab4b9 Fix backwards flag causing crash.
Bug: 62692677
Test: Use an activity options that requires the bitmap copy, ensure
      that it does not crash.

Change-Id: I20bdab1b91dfe47f7fe134fd17fe104eb4b27ec1
2017-06-16 11:07:29 -07:00
Felipe Leme
18d0ef70b0 Throw IAE when service add null AutofillIds on SaveInfo methods.
Test: existing CtsAutoFillServiceTestCases pass
Test: manual verification using Contacts app
Test: manual verification adding a CTS test case that crashes the app, but such
      test cannot be commit because once the issue is fixed, it crashes the
      service (the right way to test this fix is through unit tests against
      exceptional conditions, but we don't support those on Autofill yet).

Fixes: 62649290

Change-Id: I8fc01fa929270219cd40035ff02eaf0dda5ecbfa
2017-06-15 16:33:52 -07:00
Robert Carr
32f37ab023 ViewRootImpl: More null checks for performTraversals.
Let's first understand how mView could become null. Notice
at the beginning of performTraversals, there is a check that
mView != null, and so it is nulled while we are in the function.
mView is package private and there are only two places which assign
to it, ViewRootImpl#setView and ViewRootImpl#doDie. setView is guarded
by mView == null. But mView was not null (per the check at the beginning
of performTraversals) and so mView is being nulled by doDie().

doDie() only has 3 callpoints:
        1. ViewRootImpl#die(). Here though, calling it is guarded by
        !mIsInTraversal. !mIsInTraversal is unconditionally set at the
        beginning of performTraversals, and so this isn't our caller.
        2. ViewRootHandler, handling MSG_DIE. This runs on the same thread
        as performTraversal, and so it can't be our nuller.
        3. WindowManagerGlobal#addView. This must be our nuller.

We see WindowManagerGlobal#addView will call doDie in the case that
we attempt to add a view which we had previously set to be removed
but deferred removal of. Now we can construct a reasonable sequence
for getting here:
    1. requestLayout(). Perform traversals ends up on handler.
    2. removeView(). MSG_DIE ends up on handler, View ends up in mDyingViews
    3. performTraversals is executed by the handler
    4. From a callback initiated by performTraversals (e.g. measure)
       the client calls WindowManagerGlobal#addView on the view which
       was just removed.
    5. We are still in performTraversals so MSG_DIE hasn't been processed
       yet. This means that WindowManagerGlobal will perform the doDie
       immediately nulling mView.
    6. We return to performTraversals and crash.

We can see shortly after the offending call to doDie, a new ViewRoot will be
constructed and so whatever traversal we are doing on the old one doesn't
seem particularly important. It doesn't seem that we can do any better
than letting it fall through without crashing.

Bug: 38421184
Test: go/wm-smoke. Feed to the monkeys.
Change-Id: I55f310a3533175c9df4a82878be5a60fd01b80c1
2017-06-15 12:52:53 -07:00
Sudheer Shanka
5618d79349 Merge "Use correct timestamps of events for logging." into oc-dev
am: 2ca51820f0

Change-Id: I863f048dd4b95c0f9278fe8aefc432f852b82eae
2017-06-15 19:34:11 +00:00
Sudheer Shanka
2ca51820f0 Merge "Use correct timestamps of events for logging." into oc-dev 2017-06-15 19:25:08 +00:00
Dianne Hackborn
84795f778b Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev
am: ef0554438f

Change-Id: I39ad3ffce83c1817bdc8aa7ab9f623d1b683d983
2017-06-15 18:52:07 +00:00
Dianne Hackborn
ef0554438f Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev 2017-06-15 18:45:35 +00:00
Todd Kennedy
133c5da0d9 enable/disable dexopt for instant apps remotely
Change-Id: I997b8ae515f7bf2570edca4ed7ab4b46198148a5
Fixes: 62591398
Test: Manual; install instant app and see that it doesn't dexopt
Test: Manua; update gservices flag, install instant app and see that it does dexopt
2017-06-15 09:44:34 -07:00
Dianne Hackborn
cb01563d7e Work on issue #36891897: Need to ensure foreground services...
...can't hide themselves

Tune the policies for when we tell about apps running in the
background after their services have stopped.

- If it ran while the screen was on, the time we require for it
to be running is much shorter (a couple seconds) as well as the
time we tell about it having run (with another tunable for the
minimum time we tell about this).

- If it has only run while the screen is off and stops a sufficient
amount of time before the screen goes on (currently a second) then
we will not show anything when the screen goes on.

- If it stops when the screen turns on, we will make sure the user
sees about it for a short period of time (currently 5 seconds).

Also includes some improved debug output about handler message
queues.

Test: manual

Change-Id: Iab438410d7182b2dfe4f9c1cce7069b26b34834c
2017-06-14 17:33:41 -07:00
John Reck
f0d3971021 Merge "Add a workaround for simulate secondary display" into oc-dev
am: 31443a17e8

Change-Id: Ic63e4f48ec55bce9f51089bc41481ab8805ae8c7
2017-06-14 20:25:03 +00:00
Daniel Sandler
321163990e Merge "Revert accidental API change to RemoteViews." into oc-dev
am: 0e6a5f8d7e

Change-Id: I7e00e745c8aa2ddb6232747d4371dc3194be28ef
2017-06-14 20:18:56 +00:00
TreeHugger Robot
31443a17e8 Merge "Add a workaround for simulate secondary display" into oc-dev 2017-06-14 20:14:05 +00:00
Daniel Sandler
0e6a5f8d7e Merge "Revert accidental API change to RemoteViews." into oc-dev 2017-06-14 20:12:38 +00:00
Daniel Sandler
23bb5bf262 Revert accidental API change to RemoteViews.
This reverts commit 7f09ce1a23 (but 
retains the bug fix)

Change-Id: Ib4700ada5aa0b5dab7e43f895b48eb7058308869
Fixes: 62543637
Bug: 62181033
2017-06-14 20:10:18 +00:00
John Reck
a896306c38 Add a workaround for simulate secondary display
To workaround a deadlock caused by bufferqueue locks
we force RenderThread over to use async mode which
we enable via eglSwapInterval(0)

Bug: 38372997
Test: steps in the bug
Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce
2017-06-14 10:50:14 -07:00
Andrei Stingaceanu
c63475e5de Merge "DayPickerView - clamp date to min/max" into oc-dev
am: 511c95a022

Change-Id: I57eafe97328ee10bd0ccee296586307baa02cc6d
2017-06-14 17:46:59 +00:00
TreeHugger Robot
511c95a022 Merge "DayPickerView - clamp date to min/max" into oc-dev 2017-06-14 17:38:48 +00:00
Eugene Susla
c26f789ae2 Merge "Support associating with an already-paired device" into oc-dev
am: c041c7a34e

Change-Id: I31ab12934cd18aace7aece30fd5551e20e02216e
2017-06-14 00:17:25 +00:00
TreeHugger Robot
c041c7a34e Merge "Support associating with an already-paired device" into oc-dev 2017-06-14 00:03:53 +00:00
Todd Kennedy
80b761b6db Merge "Save overlay paths as user state" into oc-dev
am: 508a5bade6

Change-Id: Icba76fbeef9f4cd2a067fafd65c750f1f95a4ed0
2017-06-13 22:39:56 +00:00
Todd Kennedy
b274947dfb Save overlay paths as user state
Instead of maintaining a separate structure just for overlay
paths, store them as user state in the package setting. Also
centralize updating the overlay paths to avoid issues with
inconsistent updates.

Fixes: 36561125
Test: Manual
Change-Id: Iac1c987e8650074dbc564e332d5da1950fad6ac5
2017-06-13 12:05:44 -07:00
Sudheer Shanka
c766db0a54 Use correct timestamps of events for logging.
Currently when WM detects certain events, it will notify the logger
of these events asynchronously and logger uses the timestamp at which it
gets notified to log these events. It's possible that the delay between
when the event actually occurs and when the logger gets notified could be
large. So for better accuracy, WM should also pass on the event timestamp
to the logger.

Bug: 62375480
Test: Triggered sysui_multi_action event logs and verified that
      APP_TRANSITION_DELAY_MS is less than APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS.
Test: When the system is not busy, the timestamps we used to log earlier
      and timestamps we log with this change are almost same.
Change-Id: I5f62654a6b7f179d821c0082b180246c8a569df1
2017-06-13 10:29:03 -07:00
Andrei Stingaceanu
e565e525fa DayPickerView - clamp date to min/max
Besides clamping @ setMinDate() and setMaxDate() also
clamp @ setDate().

Bug: 36636681
Bug: 62485314
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t
      android.widget.cts.CalendarViewTest#testMinMaxRangeClampingMaterial

Change-Id: I455cd43e7228e10d58b5f886dcab8332bca72de7
2017-06-13 18:23:22 +01:00
Wale Ogunwale
90159a2492 Merge "Ensure that we use SF Vsync Choreographer for the PiP transition." into oc-dev
am: e1e0db8ca9

Change-Id: Ie70addce27b9551323d7c9d8f9576aa118b98114
2017-06-13 00:02:11 +00:00
Wale Ogunwale
e1e0db8ca9 Merge "Ensure that we use SF Vsync Choreographer for the PiP transition." into oc-dev 2017-06-12 23:51:19 +00:00
Robert Carr
2fa5800da9 Merge "SurfaceView: Fix missing override for SurfaceControl proxy" into oc-dev
am: 42b3610adc

Change-Id: Ib1001156c0a68f695d755da51af5f0548ccbacba
2017-06-12 23:45:37 +00:00
TreeHugger Robot
42b3610adc Merge "SurfaceView: Fix missing override for SurfaceControl proxy" into oc-dev 2017-06-12 23:38:19 +00:00
Eugene Susla
0c4a926626 Support associating with an already-paired device
This is required for migration scenario, where device(s) are already
paired(and thus no longer discoverable) but didn't go through companion
flow.
This also fixes a bug with filtering by mac address, which is also relevant to
the use-case of associating a specific device

Test: Pair with a device first, and call associate with a filter with its MAC
address and single device requested. Ensure the device is found.
Ensure only that device is ever returned when filtering by MAC address.
Bug: 62487084
Change-Id: Ic7cc6affc0648ad85b15620e8c3aba4b9fc91aa1
2017-06-12 16:21:51 -07:00
Jeff Sharkey
f96c9a0fa2 Merge "Improve developer docs for storage APIs." into oc-dev
am: 05b52d8ba5

Change-Id: I36dbac981e7a11819bd120c604f491eca11018a4
2017-06-12 22:45:22 +00:00
Jeff Sharkey
05b52d8ba5 Merge "Improve developer docs for storage APIs." into oc-dev 2017-06-12 22:39:26 +00:00
Will Brazil
5884f6ce0d Merge "Camera2: Cache method list in MethodNameInvoker." into oc-dev
am: 71029bf631

Change-Id: I24120e653feef23b155111cbc69f6b3033b2427c
2017-06-12 20:49:49 +00:00
Jeff Sharkey
b31afd2273 Improve developer docs for storage APIs.
No code changes; only docs.

Test: builds
Bug: 38508833, 37987197, 37978296
Change-Id: Idfeb680480b2f818d18f787cbf20ceab896763a2
2017-06-12 20:19:53 +00:00
Felipe Leme
2f8647c4d1 Merge "Removed deprecated setExtras() method." into oc-dev
am: 7c41ddb975

Change-Id: I5453d54e45385a03bae56a4742bcd680aff47356
2017-06-12 19:05:34 +00:00
Will Brazil
cd92f92fa4 Camera2: Cache method list in MethodNameInvoker.
Retrieving list of methods in every invoke() call is very expensive.
Caching the list inside the constructor prevents several unnecessary
calls to Class.getMethods().

Test: Run camera2 CTS
Bug: 62490715

Change-Id: Ib2a93af0f364b055df2eab9bd7870730428429ad
2017-06-12 19:02:52 +00:00
TreeHugger Robot
7c41ddb975 Merge "Removed deprecated setExtras() method." into oc-dev 2017-06-12 18:58:10 +00:00
Robert Carr
552da0e0cd SurfaceView: Fix missing override for SurfaceControl proxy
I will not pretend classes are interfaces...I will not pretend
classes are interfaces...

Bug: 62444724
Test: cts-tradefed run singleCommand cts -d -o --module CtsViewTestCases --test android.view.cts.SurfaceViewSyncTest#testSurfaceViewBigScale
      go/wm-smoke

Change-Id: Iccca46edcd669430c32f31e9c7d8aba1db254f2d
2017-06-12 11:43:51 -07:00
Winson Chung
4a526c1245 Ensure that we use SF Vsync Choreographer for the PiP transition.
- Move the bounds animation onto the animation thread
- Remove existing code referencing the old sf-vsync choreographer
- Add ability for ValueAnimator subclasses to reference a different
  AnimationHandler, which uses a different FrameCallbackProvider with the
  sf-vsync choreographer in the animations that require it
- Ensure that PiP touch events are batched and sent aligned with the
  sf-vsync
- Move GC onto its own thread to not block other BackgroundThread calls

Bug: 36371375
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: bit FrameworksServicesTests:com.android.server.wm.BoundsAnimationControllerTests
Test: go/wm-smoke

Change-Id: I6a41b35a4e4d4d6dbea82c2673452825fe3ffa58
2017-06-12 10:08:58 -07:00
Wale Ogunwale
ba16911723 Merge "Added 'dumpsys activity lastanr'" into oc-dev
am: b32fecd6e0

Change-Id: I599924b33fbb137ba03607308011a8a76b524c72
2017-06-10 16:07:56 +00:00
Wale Ogunwale
b32fecd6e0 Merge "Added 'dumpsys activity lastanr'" into oc-dev 2017-06-10 15:58:14 +00:00
Wale Ogunwale
f1285916c3 Added 'dumpsys activity lastanr'
Allows for dumping the activity state during the last anr. This will
also be included in collected bug reports.

Bug: 38121026
Test: Cause an anr to occur and run 'adb shell dumpsys activity lastanr'
Change-Id: I1e4200f9e5cc16bfab98e5af31fc599cdd54cd11
2017-06-09 17:17:07 -07:00
George Mount
4e76728dea Merge "Add target sdk check for behavior change." into oc-dev
am: e5e246ce5c

Change-Id: Ia06fe694f2afe55cd9560c2d6ae9112a6735cf93
2017-06-09 23:51:06 +00:00
George Mount
e5e246ce5c Merge "Add target sdk check for behavior change." into oc-dev 2017-06-09 23:41:47 +00:00