Commit Graph

8769 Commits

Author SHA1 Message Date
Ned Burns
be92fca27c Merge "Add ViewConfiguration.getScaledScrollFactor()" 2016-08-18 21:16:49 +00:00
Ned Burns
69af432039 Add ViewConfiguration.getScaledScrollFactor()
This value is used to convert ACTION_SCROLL axis values into raw
pixel distances.

Change-Id: I537af010610bb374ab29a41aff4fae5b07bece6e
2016-08-18 15:07:05 -04:00
Yohei Yukawa
64ea28e4f0 Make View#isTemporarilyDetached() less confusing am: ed841cbdd7 am: 6bc17c7320
am: 8c8477d036

Change-Id: I5a4a16d4a1922a71def989b3bdf44810d6334100
2016-08-18 00:23:39 +00:00
Chong Zhang
921f8e35d8 resolve merge conflicts of 9391bc5 to master
Change-Id: I6de231781233826b399688dc8ead70ba515b1ccb
2016-08-17 14:38:12 -07:00
Yohei Yukawa
8c8477d036 Make View#isTemporarilyDetached() less confusing am: ed841cbdd7
am: 6bc17c7320

Change-Id: Iec61193cd1d1902aa9aad1ad9ac1d6f4944c748b
2016-08-17 19:55:47 +00:00
Yohei Yukawa
6bc17c7320 Make View#isTemporarilyDetached() less confusing
am: ed841cbdd7

Change-Id: I2df97c1babb9fc515295c527a18d9f88546dfad7
2016-08-17 19:49:01 +00:00
John Reck
5ab0541052 Fix maps resume being blank am: 03df0834e6 am: 08669fff33
am: 28f4ee5f7b

Change-Id: I5d6ea69cb13a43401a6cdc7039eafc1186a2fa85
2016-08-17 18:28:51 +00:00
Chong Zhang
9391bc557c Add new window type TYPE_DRAWN_APPLICATION am: fea963edee
am: 5e09ceb641

Change-Id: I955b985c47ca10a17dec6921af0277d1d6a7431d
2016-08-17 18:22:10 +00:00
John Reck
28f4ee5f7b Fix maps resume being blank am: 03df0834e6
am: 08669fff33

Change-Id: If87b076b6c03b7018485ddd4438aeaac7abd1562
2016-08-17 18:04:21 +00:00
Chong Zhang
5e09ceb641 Add new window type TYPE_DRAWN_APPLICATION
am: fea963edee

Change-Id: If7acf1349b87d4be88a9b4f9fbd984bbd4aca8ad
2016-08-17 17:16:18 +00:00
John Reck
08669fff33 Fix maps resume being blank
am: 03df0834e6

Change-Id: Iad93e1b11e74acf2356d59c271892d6741b53fef
2016-08-17 17:14:23 +00:00
John Reck
03df0834e6 Fix maps resume being blank
Bug: 30889568

Fixes an issue where mLayer didn't have
the mSurface set on it in certain resume
scenarios.

Change-Id: Ib75065d3d75e6141d6cd8f306584f6a569b9907c
2016-08-16 09:44:23 -07:00
Robert Carr
9d9ee4e5a3 Introduce new constant for double tap gesture rotation hint. am: 57d9fbd17f am: 5f684d92b6
am: bdbc23bebe

Change-Id: I6a9b2a55148a1c2428e871337bb300a84887adc7
2016-08-16 01:54:11 +00:00
Robert Carr
bdbc23bebe Introduce new constant for double tap gesture rotation hint. am: 57d9fbd17f
am: 5f684d92b6

Change-Id: Idf2bb8511e24732018ff59ffbf30f440cb7f9779
2016-08-16 01:44:07 +00:00
Robert Carr
5f684d92b6 Introduce new constant for double tap gesture rotation hint.
am: 57d9fbd17f

Change-Id: I994c15c692ec52160deb3d29b46396802562588a
2016-08-16 01:35:59 +00:00
TreeHugger Robot
b14543d9d8 Merge "Introduce new constant for double tap gesture rotation hint." into nyc-mr1-dev 2016-08-16 01:21:57 +00:00
Chong Zhang
fea963edee Add new window type TYPE_DRAWN_APPLICATION
This type behaves like a normal TYPE_APPLICATION, except that WM
will always wait for it to be drawn before starting a transition.

WM always waits for TYPE_BASE_APPLICATION (main window), but for
TYPE_APPLICATION, it only waits if the window relayouts to visible
and gets a surface before the main window is drawn. If main window
itself is ready very fast, transition could start without the other
window.

bug: 30830849
Change-Id: Ife71a9812db7c8eba6ee4ead10ce4f31d9e93b40
2016-08-15 17:36:40 -07:00
Robert Carr
57d9fbd17f Introduce new constant for double tap gesture rotation hint.
As discussed in ag/1192965/ we have a special case for rotation
animation selection in launch from double tap. This was set to
ROTATION_ANIMATION_CROSSFADE as the goal was just to avoid
ROTATION_ANIMATION_ROTATE on the viewfinder surface and
seamless rotation in launch scenarios was initially descoped. Now we
are aiming at fixing this though, and ROTATION_ANIMATION_CROSSFADE
does not quality for seamless rotation. ROTATION_ANIMATION_JUMPCUT
also would not be a good choice because in the situation that the
rotation occurs before the app starting window appears, then we would
jump cut from unrotated wallpaper to rotated app, I think we want
a crossfade in this scenario. To this end introduce and use a new @hide constant
ROTATION_ANIMATION_SEAMLESS which qualifies for seamless but falls back
to CROSSFADE if seamless can't occur.

Bug: 30171992
Change-Id: If1945b17b5159be4cd5ba0b139d6bea9f7fcca33
2016-08-15 12:25:37 -07:00
Hui Shu
1fa574c3c5 Fix documentation. am: bd042e666a am: 440d84f99a
am: 68cee7e245

Change-Id: I33cc61c64c85a8b0bee7338feb55d5551cc2fd26
2016-08-14 00:41:33 +00:00
Colin Cross
2c5439972f resolve merge conflicts of f95418e to master
Change-Id: If2b4d34b3ba64f61214b72fd71f8767500e68a53
2016-08-13 11:20:37 -07:00
Hui Shu
68cee7e245 Fix documentation. am: bd042e666a
am: 440d84f99a

Change-Id: I1d0c75c6692557e1d66ca66036bceda6ca62c702
2016-08-12 23:19:41 +00:00
Hui Shu
440d84f99a Fix documentation.
am: bd042e666a

Change-Id: Ib749bd51c24a2012cd2b0d87ed70c034f410bc58
2016-08-12 21:29:47 +00:00
Hui Shu
caef4afe42 Merge "Fix documentation." into nyc-mr1-dev 2016-08-12 21:24:44 +00:00
Alison Cichowlas
f95418e0cb Add restart to GlobalActions. am: f8eca405c1
am: 091fc718d4

Change-Id: Ib0cc25ec7887366ee65a27aed7497cdbbac861b1
2016-08-12 20:35:27 +00:00
Alison Cichowlas
091fc718d4 Add restart to GlobalActions.
am: f8eca405c1

Change-Id: Ib9664d086e2ac57db905fbfa03329c1a990051fc
2016-08-12 20:18:41 +00:00
Alison Cichowlas
c7d6af6cd0 Merge "Add restart to GlobalActions." into nyc-mr1-dev 2016-08-12 20:12:38 +00:00
Kirill Grouchnikov
9cce5d04ca Merge "Document exception thrown in SoundEffectConstants" 2016-08-12 19:02:56 +00:00
Aga Madurska
e27c677f33 Avoid an NPE while checking view location on screen. am: a56454645f
am: a78e8d6219

Change-Id: I70f2333d6f09d7d608a5c201ac3d5be7780bda9e
2016-08-12 18:24:42 +00:00
Aga Madurska
a78e8d6219 Avoid an NPE while checking view location on screen.
am: a56454645f

Change-Id: I052e1e3f18a1df3a4ef43b87a1709d14eef21df1
2016-08-12 18:18:01 +00:00
Agnieszka Madurska
5e933c1e43 Merge "Avoid an NPE while checking view location on screen." into cw-f-dev 2016-08-12 18:08:25 +00:00
TreeHugger Robot
9d911ea5c2 Merge "Enable StrictMode.detectFileUriExposure() for drag and drop" 2016-08-12 17:53:33 +00:00
Alison Cichowlas
f8eca405c1 Add restart to GlobalActions.
Update power icon in GlobalActions for consistency
with new restart icon.

Bug: 30395806
Change-Id: I5ab20c15c889384fb685fc678fbf9ed912fcde5d
2016-08-12 13:41:00 -04:00
Kirill Grouchnikov
35d5b0fdea Document exception thrown in SoundEffectConstants
Change-Id: Id4ecf66c8c2ac6ead2a79438e4db702fd6dd196e
2016-08-12 13:12:23 -04:00
Aga Madurska
a56454645f Avoid an NPE while checking view location on screen.
Bug:30483148

Change-Id: I115da4fefff5fecc04135e2b150e1e77445cb86e
2016-08-12 18:00:25 +01:00
John Reck
e886ad2c95 resolve merge conflicts of cdbdd46 to master
Change-Id: I18a60477799865973fc9d6c876d95e3cee6e5031
2016-08-12 08:24:33 -07:00
John Reck
cdbdd46fb3 Fix NPE in TextureView am: 7e237189c2
am: ed1f1399d4

Change-Id: I1166edf4590e2846e6c115cbe9c9455ee46b64b5
2016-08-12 14:39:36 +00:00
John Reck
ed1f1399d4 Fix NPE in TextureView
am: 7e237189c2

Change-Id: I16d37e5c8ab6b81b57f510be5cdea09047cdbd79
2016-08-12 14:31:49 +00:00
Hui Shu
bd042e666a Fix documentation.
Remove spurious duplicate line in JavaDoc.

Change-Id: I7ee7339d2ef21241ff21e66683e37e8ea0bbfaa4
2016-08-12 00:27:39 +00:00
TreeHugger Robot
e74f34b6cf Merge "Bring back old constructor for layoutlib." 2016-08-12 00:26:36 +00:00
Jeff Sharkey
a4603d3c37 Bring back old constructor for layoutlib.
Bug: 28634953
Change-Id: I72edcdc498b4d85d68e85768dcf839ecb1ab5db7
2016-08-11 16:54:15 -06:00
Jeff Sharkey
e2fc1055c5 Merge "Avoid caching services with missing binders." 2016-08-11 18:52:03 +00:00
Yohei Yukawa
ed841cbdd7 Make View#isTemporarilyDetached() less confusing
In Android N, View#isTemporarilyDetached() returns true if it is called
when the same View instance is handling View#onFinishTemporaryDetach().

Returning true there is, however, sometimes confusing, especially
scenarios like the following case:

    @Override
    public void onFinishTemporaryDetach() {
        doSomeRestoringWorks();
    }

    private void doSomeRestoringWorks() {
        doSomething();
    }

    private doSomething() {
        if (isTemporarilyDetached()) {
            // As of N, we hit here if this is called as a result of
            // View#onFinishTemporaryDetach().
        } else {
            // but is the logic here is more likely to be appropriate
            // when handling View#onFinishTemporaryDetach()?
        }
    }

What this CL aims to do is to let View#isTemporarilyDetached() return
false when it is called while handling View#onFinishTemporaryDetach(),
because it should make View#onFinishTemporaryDetach() more useful.

Regarding the app compatibility, View#isTemporarilyDetached() was added
in API 24 hence the impact on this change is still limited.

Bug: 30791718
Change-Id: If384da9f9e6ff849598896901626fd021bae5cda
2016-08-11 11:00:23 -07:00
John Reck
7e237189c2 Fix NPE in TextureView
Bug: 30779663
Change-Id: Ib3d40b60674ab3de8bfcfdd8489b89cf07b8d8b3
2016-08-11 10:43:14 -07:00
Vladislav Kaznacheev
854d3f2ec2 Enable StrictMode.detectFileUriExposure() for drag and drop
Call ClipData.prepareToLeaveProcess/prepareToEnterProcess
at appropriate moments to check for StrictMode violations.

Bug: 30772435
Change-Id: I5c84c6c7b3d04094563623156616390d3df6879e
2016-08-11 10:19:36 -07:00
Jeff Sharkey
49ca529a85 Avoid caching services with missing binders.
When fetching system services early during boot, if the underlying
binder interface hasn't been published yet, we end up caching a
manager class that is broken for the remainder of the process
lifetime, and innocent downstream callers end up using the broken
cached manager.

Fix this by using an explicit exception to quickly abort manager
creation when the underlying binder is missing.  The exception is
only used to skip the remainder of the manager creation, and it
doesn't actually crash the process.

Bug: 28634953
Change-Id: I0cb62261e6d6833660704b93a11185aa11a2ac97
2016-08-11 09:44:30 -06:00
John Reck
712765ff34 resolve merge conflicts of 1d7ee6b to master
Change-Id: I2ed0f2c3233151e890bd8bde825d306ec8f0d8fd
2016-08-10 11:04:39 -07:00
John Reck
1d7ee6b5a3 Make updateSurface non-blocking am: cd68212f08
am: 9dd91dec3f

Change-Id: I8a27b5bcff0781e90c9d061da0c1fe03eb6d8176
2016-08-10 17:44:40 +00:00
John Reck
9dd91dec3f Make updateSurface non-blocking
am: cd68212f08

Change-Id: I691e5a2979e92572440ad7c410e8f0cec6169beb
2016-08-10 17:33:06 +00:00
John Reck
8d521bb9b3 Merge "Make updateSurface non-blocking" into nyc-mr1-dev 2016-08-10 17:22:48 +00:00
Kirill Grouchnikov
fc00de5001 Merge "Document exceptions thrown by KeyCharacterMap APIs" 2016-08-10 12:27:51 +00:00