Commit Graph

70080 Commits

Author SHA1 Message Date
Winson Chung
4e73123c52 Merge changes from topic 'hw_bitmap' into oc-dev
* changes:
  DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
  Update code to draw into hardware bitmaps.
2017-05-31 18:46:59 +00:00
Winson Chung
aa7fa01353 DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
- This reduces the copy of the hardware bitmap when it is
  parceled/unparceled.

Bug: 38507414
Bug: 62021436
Test: Launch Overview to/from app, ensure that the header bar shows
Test: go/wm-smoke

Change-Id: I85a9a59a0a3699d1642158061d10fddef34393c3
Signed-off-by: Winson Chung <winsonc@google.com>
2017-05-31 16:23:24 +00:00
TreeHugger Robot
69bf3ea86d Merge "Fix Error Prone ArrayEquals/ArrayHashCode bugs" into oc-dev 2017-05-31 15:37:48 +00:00
Jeff Sharkey
06951ac74d Merge "Consistent "low storage" behavior." into oc-dev 2017-05-31 14:18:32 +00:00
TreeHugger Robot
163ec051d1 Merge "Fix infinite loop problem in AnimationHandler" into oc-dev 2017-05-31 13:53:15 +00:00
Jeff Sharkey
ddff807b76 Consistent "low storage" behavior.
When answering the question "how much space is free", use the same
logic for Settings UI and StorageManager.getAllocatableBytes().  That
is, the reported free space is usable bytes plus any cached data the
system is willing to delete automatically.

This does *not* include any reserved cache space, since we don't want
abusive apps to penalize other well-behaved apps that are storing
their data in cache locations.  Callers freeing cached data need to
now explicitly request defiance of the reserved cache space.  (Most
callers are already doing this by using FLAG_ALLOCATE_AGGRESSIVE.)

Rewrite the core logic of DeviceStorageMonitorService to understand
this new "reserved" cache space, and to be easier to understand.  It
also now handles cached data on adopted storage volumes, which had
been ignored until now.  Also fix bug where we had skipped "low"
broadcasts when the device skipped directly from/to "full" state.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Icbdcf3b52775f7ada1ceaeff2f96094c8d8052f9
2017-05-30 22:17:23 -06:00
TreeHugger Robot
c6700cac67 Merge "Fix unnecessary relaunches when unlocking with fingerprint sensor." into oc-dev 2017-05-31 03:54:58 +00:00
Svet Ganov
f36d53cbfc Prune unused static libs and instant apps if space needed
We are caching unused static shared libs and instant apps
(installed and uninstalled) opportunistically. If space is
needed we delete these to free up space.

Test: manual

bug:62045000

Change-Id: Id992dee5c7c6e36b8e8b81050602dbc4eeafb0f9
2017-05-31 02:30:41 +00:00
Wale Ogunwale
bfa81adfbe Fix unnecessary relaunches when unlocking with fingerprint sensor.
When the device is unlocked using the fingerprint sensor in an
orientation opposite to the lockscreen orientation, the app that
will be visible is first relaunched in the current lockscreen
orientation and then later relaunched in the correct orientation.
If the keygaurd is going away then:
- Don't let keyguard affect device orientation. We want to use the
orientation of the app that will be visible.
- Allow the rotation sensor to be enabled even though draw isn't
complete so window manager can get the updated or last rotation
reading.
- Don't clear the previous proposed sensor reading to allow
window manager to use the information to update the orientation as
needed vs. falling back to the previous orientation.

Change-Id: I8369723d6a77f2c602f1ef080371fa7cd9ee094e
Fixes: 38494778
Test: Launch an app that doesn't fix orientation like clock, hold
the device in landscape, press the power button, unlock the device
using the fingerprint sensor, and verify the the app isn't
relaunched.
2017-05-30 18:35:36 -07:00
TreeHugger Robot
a9873bc8f6 Merge changes I4b58610f,Ib758756a into oc-dev
* changes:
  Turn off the check in the test because the assertion is off in the implementation.
  Fix typos that cause infinite recursion and CTS test failure.
2017-05-31 01:07:27 +00:00
TreeHugger Robot
1573489991 Merge "Make NFC AIDL callbacks oneway" into oc-dev 2017-05-31 00:26:37 +00:00
TreeHugger Robot
9c1b222fc1 Merge "Fix issue with aspect ratio not applying correctly when PIP is expanded" into oc-dev 2017-05-31 00:01:00 +00:00
TreeHugger Robot
c56b1d3c98 Merge changes I5762a98d,I39f4e015 into oc-dev
* changes:
  ViewRootImpl: More careful draw accounting.
  SurfaceView: Avoid over-reporting DRAW_FINISHED.
2017-05-30 21:33:31 +00:00
Dianne Hackborn
1399d3abf5 Merge "Work on issue #62095840: NPE in JobParamteres in the background" into oc-dev 2017-05-30 20:21:17 +00:00
TreeHugger Robot
4bd47fce86 Merge changes from topic 'hide_passpoint_r2' into oc-dev
* changes:
  hotspot2: hide Release 2 APIs
  Voice Messaging Intent API.
2017-05-30 18:47:12 +00:00
Dianne Hackborn
ccc63ec80f Work on issue #62095840: NPE in JobParamteres in the background
Crash early if an app calls jobFinished() with null params.

Test: manual

Change-Id: Icc2cf241edaad00bc5bd49d07a431627bbd76524
2017-05-30 11:04:53 -07:00
Renat Aksitov
931983d607 Voice Messaging Intent API.
Removing EXTRA_SENDER_ACCOUNT_HASH, needs more work.

Bug 37747843

Test: make -j11 docs

Change-Id: I3046611510f85cf69ceff7c2274cda3b692581b9
(cherry picked from commit 2c4201448e)
2017-05-30 09:47:42 -07:00
Julia Reynolds
8bc45cb78f Merge "Suppress HUNs according to group alert behavior" into oc-dev 2017-05-30 16:43:39 +00:00
Winson Chung
a71febe2aa Fix issue with aspect ratio not applying correctly when PIP is expanded
- The current code always used the default min edge size to calculate the
  PIP bounds when the aspect ratio changes, so if a PIP app sets the aspect
  ratio in response to the an action, the bounds would be resized down
  incorrectly.
- This CL fixes the issue with current aspect ratio not being initialized
  correctly, and also ensures that SystemUI always updates the min edge
  size when expanding the PIP.

Bug: 38324839
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: go/wm-smoke

Change-Id: Ida0f68b2f8f93f9bf1915dda8762a156704d4709
2017-05-30 16:36:48 +00:00
Robert Carr
49cd9f882c ViewRootImpl: More careful draw accounting.
The strategy of beginning the count at 1 isn't enough
and we need to explicitly debt each request to report
draw. Imagine the case where a ViewRootImpl reports draw
multiple times, while we are waiting for a SurfaceView draw
completion callback. Without the explicit draw debt, the ViewRoot
would be counted as drawing for the SurfaceView and we could
notify the WM too early.

Test: Open Chrome a few hundred times. go/wm-smoke.
Bug: 38324871
Change-Id: I5762a98d1cc808125033ba3d1db8a3ea39a9e071
2017-05-30 09:27:44 -07:00
Robert Carr
b53670aecf SurfaceView: Avoid over-reporting DRAW_FINISHED.
To some extent we rely on the app to call the draw callback
if they want the app to work properly, but this case is fairly easy
to detect, so why not prevent it and provide a helpful log.

Bug: 62051758
Test: Warm start camera a few times. go/wm-smoke.
Change-Id: I39f4e015bfa15a1e0c37dba70b4a700803a6a274
2017-05-30 09:27:44 -07:00
Rob Carr
5366cfbef3 Merge "Fix SurfaceView handler." into oc-dev 2017-05-30 16:17:32 +00:00
Paul Duffin
c67663cbc8 Fix Error Prone ArrayEquals/ArrayHashCode bugs
This will change behavior so it could break tests but
if it does it is because they relied on broken behavior.

Someone on the frameworks team will need to verify the
correctness of these changes and fix any knock on effects.

See the following for a description of the bugs:
* http://errorprone.info/bugpattern/ArrayEquals
* http://errorprone.info/bugpattern/ArrayHashCode

Fixed automatically by Error Prone apart from manual
changes to fix up the formatting (Error Prone expects
google-java-format) and to change Object.deepEquals to
Arrays.equals for consistency with Arrays.hashCode.

Test: make checkbuild
Change-Id: I1528b795b77a4f1e0c4e7e66ad4f924b7a7606f6
2017-05-30 10:53:52 +01:00
Joe Onorato
416723dccd Fix typos that cause infinite recursion and CTS test failure.
Bug: 37171450
Test: bit CtsProtoTestCases:*
Change-Id: Ib758756a64fa19eb976dc0a2b1bb1cd6e42fd6f2
2017-05-26 19:52:12 -07:00
TreeHugger Robot
0b1b1c4346 Merge "Improved autofillHints documentation." into oc-dev 2017-05-27 02:25:08 +00:00
TreeHugger Robot
e2b92e904c Merge "Add 32 and 128 bit Service Data parsing." into oc-dev 2017-05-27 01:28:03 +00:00
Siyamed Sinir
42b2760525 Merge "Don’t try to autoSize if TextView is not measured" into oc-dev 2017-05-27 00:13:39 +00:00
TreeHugger Robot
759669988b Merge changes from topic 'highlight_fixed' into oc-dev
* changes:
  Check default focus highlight for ImageView.
  Check state_focus in foreground.
2017-05-27 00:11:10 +00:00
Chet Haase
da9374211f Fix infinite loop problem in AnimationHandler
AnimationHandler.doAnimationFrame() iterates on a list that may be changed
during the course of the lopp, especially when Battery Saver is enabled, or
animators have zero duration, coupled with user code launching new animators
when old ones end.

The fix is to iterate through the old size of the list, and avoid processing
new animators in the current frame.

Bug: 37376806  Keyboard doesn't come up when battery saver is turned on on Android O
Test: manual
Change-Id: I40ca1d849e6f337779c23edbab22d80760c22f9b
2017-05-26 16:56:12 -07:00
Jakub Pawlowski
50f8f3db27 Add 32 and 128 bit Service Data parsing.
Bug: 62078132
Change-Id: I79ff75cd5ccbe346dca79693b074ff3cd09112dd
(cherry picked from commit 45033a7e57)
2017-05-26 16:24:40 -07:00
TreeHugger Robot
bb63b4a376 Merge "Add ID_LENGTH field for Empty type record" into oc-dev 2017-05-26 22:52:04 +00:00
Sergey Vasilinets
bacaffa497 Merge "Don't show ripple effect on the element replacing "See All"" into oc-dev 2017-05-26 22:11:27 +00:00
TreeHugger Robot
2c324042df Merge "Properly read vibration setting on boot." into oc-dev 2017-05-26 21:43:29 +00:00
Jiaquan He
1dd48d0b8f Check default focus highlight for ImageView.
This commit specially checks isDefaultFocusHighlightNeeded for
ImageView. We should also check with the content drawable of the
ImageView besides its foreground or background.

Bug: 62141891
Test: cts-tradefed run singleCommand cts --skip-device-info
--skip-preconditions --abi armeabi-v7a -m CtsViewTestCases -t
android.view.cts.View_DefaultFocusHighlightTest#testIsDefaultFocusHighlightNeeded

Change-Id: Iaf12a5863d7760d9361d0196a46de07a9ccda74e
2017-05-26 14:31:29 -07:00
John Reck
7992500d54 Fix SurfaceView handler.
The UI Thread is whatever we happen to be attached to, or the current thread if we are unattached.

Bug: 38180075
Test: Repro from bug. go/wm-smoke.
Change-Id: I3f75882aa13de2b781c71ebbc7b09888981521b3
2017-05-26 21:15:33 +00:00
Ruchi Kandoi
03f9e978c1 Make NFC AIDL callbacks oneway
Test: Read NFC tags, Android Beam
Bug: 32288773
Change-Id: I6294ec29be2af8feb578e9bfd5e0770ad9c09cc0
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
(cherry picked from commit 5dc487d588)
2017-05-26 14:11:28 -07:00
TreeHugger Robot
bd8fb0e71d Merge "Resolve inflate attr against default package" into oc-dev 2017-05-26 20:54:57 +00:00
Yuka Anami
c03eaa6853 Add ID_LENGTH field for Empty type record
If ID_LENGTH field is omitted from Empty Type record, it cannot be
detected as Ndef since the data is strictly checked by e3fc7d9954.
But it is not possible to create raw bytes of Empty Type record
which can meet this condition by using NdefRecord/NdefMessage.
To fix this issue, added ID_LENGTH field to Empty type record.

Bug: 38299566
Test: Write and read NDEF tag with empty type record
Change-Id: Idb58c80cf8562a8b314f4ddeccdc627dc0c6f5b4
(cherry picked from commit ef9d0a480ef72a4ff0de5b5afa3661cff81fd8b5)
2017-05-26 20:53:59 +00:00
Julia Reynolds
745c15477b Properly read vibration setting on boot.
Test: runtest systemui-notification
Change-Id: I400bc3df441524abe4973d4d6bccc7ef30a2e1c7
Fixes: 37865035
2017-05-26 20:35:16 +00:00
Julia Reynolds
30203159f9 Suppress HUNs according to group alert behavior
Test: runtest systemui, systemui-notification
Change-Id: I9f987bc0ba22f2d48b02585fd722880bb5c2a9b5
Fixes: 62126386
2017-05-26 20:35:07 +00:00
Siyamed Sinir
cfc79a9e5f Don’t try to autoSize if TextView is not measured
This CL early returns from auto sizing text if the view is not measured
yet.

Test: run cts --test android.widget.cts.TextViewTest -m CtsWidgetTestCases
Test: Added cts.TextViewTest#testAutosizeWithMaxLines_shouldNotThrowException
Test: Manual test with sample app for the failing case.

Bug: 38440435
Change-Id: Ic03c991f33a2b7701623f00f44cba7fb6cdfce46
2017-05-26 12:00:51 -07:00
Alan Viverette
a7cec30f98 Resolve inflate attr against default package
Change-Id: I2de0f79fb4918770c9f816934b1fc4953073a4f1
Fixes: 38456890
Test: LayoutInflaterTest#testInclude
2017-05-26 14:55:49 -04:00
TreeHugger Robot
7990306b8b Merge "Moar Autofill Framework javadoc improvements:" into oc-dev 2017-05-26 18:55:38 +00:00
Adam Lesinski
24c18af14a Merge "Add ResourceId validation helper method" into oc-dev 2017-05-26 18:45:28 +00:00
Tenghui Zhu
36d6a985cd Merge "Create a new drawable after caching the DrawableContainer" into oc-dev 2017-05-26 16:10:25 +00:00
TreeHugger Robot
25ae29dfd5 Merge "Removed deprecated setAutofill() method for virtual children." into oc-dev 2017-05-26 15:08:20 +00:00
Julia Reynolds
3a2ac3e11b Merge "Allow some system notifications to be blocked." into oc-dev 2017-05-26 14:39:30 +00:00
TreeHugger Robot
8d902a9e28 Merge "Remove the old version of setAffiliationIds" into oc-dev 2017-05-26 13:00:40 +00:00
TreeHugger Robot
58f6f428fc Merge "SelectionActionModeHelper should use target view's thread" into oc-dev 2017-05-26 00:45:42 +00:00
Felipe Leme
6dcec87ea2 Moar Autofill Framework javadoc improvements:
- Fixed WebView < > and API calls.
- Improved description of virtual views.
- Described how to set boundaries of virtual views.
- Improved AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS doc.

Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: Ic0d1e9ff2703c87d4007f0092a2f8dfe0efca6db
2017-05-25 16:10:08 -07:00