Commit Graph

4324 Commits

Author SHA1 Message Date
Wale Ogunwale
439381fdbc Clear app token mAppStopped when app resumes.
am: 8d5a542f66

* commit '8d5a542f66beae774354038f15dd1afe7fcf754b':
  Clear app token mAppStopped when app resumes.
2016-03-04 03:08:16 +00:00
Wale Ogunwale
8d5a542f66 Clear app token mAppStopped when app resumes.
It is possible for an activity to be in the stopped state without
setting it's visiblility to false in window manager.
For example, the home acitivty behind the lock screen. Since the
lock screen isn't an activity it doesn't affect the visiblity set
of the home activity, so AM doesn't tell WM to hide the app token.
However, AM uses another channel to detect that the device is locked
and moves the activity into stopped state. WM on the other hand also
detects that the device is locked and hides the window surfaces of
all windows behind the lock screen. So, at this point AM has also
told WM that the activity is stopped. Once you unlock the screen
AM resumes the activity but doesn't report any visiblility changes to WM
since it's internal state didn't change. So, if you go from the home
activity to another app the home activity window will be destroyed
before the activity is stopped because mAppStopped is set to true.
We now set mAppStopped to false when the activity is resumed.

Bug: 27286867
Change-Id: Ic75456d30abd582fa44f932f5aeeb449950157ee
2016-03-03 18:59:26 -08:00
Roozbeh Pournader
886f9c301d Merge "Fix script-related parts of locale resource matching" into nyc-dev
am: 950c9f2a95

* commit '950c9f2a95eabe3d9e50a58b11cdecb7ff857555':
  Fix script-related parts of locale resource matching
2016-03-03 23:52:55 +00:00
Roozbeh Pournader
7960898f6f Fix script-related parts of locale resource matching
Previously, a bit was kept to find if the script of a locale was
explicitly "provided" in a resource. This was not backward
compatible, and failed in some edge cases when the package was
created with older versions of AAPT that did not set the bit.

The cases would happen when the old resource had an explicit script
specified in its locale, but since the "provided" bit was not set in
the package, we would assume that the script was computed by us.

This CL replaces the "provided" bit with a "computed" bit, so the
default value of the bit (set to "false" for old packages) would be
correct.

Bug: 27156990
Change-Id: I99e7f1ad8f70c90e25ab3640ed34cc1a6f8d1d64
2016-03-03 15:19:37 -08:00
Diego Perez
c9a98fa219 Merge "Add missing translate if the drawable top is not 0,0" into nyc-dev
am: 9aa2362fe8

* commit '9aa2362fe8791751a696f67895de46da45fbb8c1':
  Add missing translate if the drawable top is not 0,0
2016-03-03 15:16:32 +00:00
Diego Perez
1b338cda4e Add missing translate if the drawable top is not 0,0
If the vector drawable coordinates are not 0,0 we need to translate the
canvas to that position.

Change-Id: I3a829c427ec98061da3295e3cba8655f693d390c
2016-03-03 15:06:46 +00:00
Diego Perez
11c031ff0b Merge "Implement native methods in VectorDrawable" into nyc-dev
am: a38b7c180d

* commit 'a38b7c180df47f88904ad6a11fda605235f6c91c':
  Implement native methods in VectorDrawable
2016-03-03 09:57:15 +00:00
Diego Perez
a38b7c180d Merge "Implement native methods in VectorDrawable" into nyc-dev 2016-03-03 09:55:05 +00:00
Neil Fuller
6f5df889ac Merge "Change libraries needed by layoutlib to "host" libs" into nyc-dev
am: 44be5f0ed7

* commit '44be5f0ed70eb1643b49a492a78dd652613e2a95':
  Change libraries needed by layoutlib to "host" libs
2016-03-03 09:15:19 +00:00
Neil Fuller
44be5f0ed7 Merge "Change libraries needed by layoutlib to "host" libs" into nyc-dev 2016-03-03 09:11:09 +00:00
Vadim Tryshev
dfe2f7ce30 Merge "Adding getManagedUserBadgedDrawableForDensity() to PackageManager." into nyc-dev
am: c9f0a1103e

* commit 'c9f0a1103ea307e5e157e63e7915b38f83d27ca3':
  Adding getManagedUserBadgedDrawableForDensity() to PackageManager.
2016-03-03 01:31:18 +00:00
Vadim Tryshev
c9f0a1103e Merge "Adding getManagedUserBadgedDrawableForDensity() to PackageManager." into nyc-dev 2016-03-03 00:28:17 +00:00
Vadim Tryshev
66ae66a7f7 Adding getManagedUserBadgedDrawableForDensity() to PackageManager.
It allows badging an image regardless of of the user (no
user id parameter). The styling for managed users is applied.

This is useful for new cases where the existing functions
wouldn't badge the icon, but we need it.

Bug: 25192539
Change-Id: I2fd2f226f626fb2e6cda1cfe072013350e12b41c
2016-03-02 14:55:04 -08:00
Deepanshu Gupta
71281b53c8 Merge "Add StubMethodAdapterTest" into nyc-dev
am: 1aeb31bdbb

* commit '1aeb31bdbb86faef361567e37a71fe500a8f19ac':
  Add StubMethodAdapterTest
2016-03-02 13:55:32 +00:00
Deepanshu Gupta
e34ec294a0 LayoutLib: Reference android\'s junit in intellij project.
am: dbe8a0fe3b

* commit 'dbe8a0fe3b4f01f7457aafc30783e50b77c33ff3':
  LayoutLib: Reference android's junit in intellij project.
2016-03-02 13:52:22 +00:00
Deepanshu Gupta
1aeb31bdbb Merge "Add StubMethodAdapterTest" into nyc-dev 2016-03-02 13:32:18 +00:00
Deepanshu Gupta
a9de835c17 Add StubMethodAdapterTest
This tests the bugfix in StubMethodAdapter made in the change with id
I098996e43e330e995d33f12df1c16355bbc02f0f (commit 491523d)

Change-Id: I1ac897a49071dd9558bdc6b8abec29df913a6047
2016-03-02 13:30:31 +00:00
Deepanshu Gupta
dbe8a0fe3b LayoutLib: Reference android's junit in intellij project.
Prevents errors due to mismatch in junit version.

Change-Id: I2adf32efb16472aa5f5e51025b6bb75afc76a8b4
2016-03-02 13:26:18 +00:00
Neil Fuller
d34e33bc83 Change libraries needed by layoutlib to "host" libs
They are only used on host and are one of the few places
in the build that use LOCAL_JACK_ENABLED := disabled.

Bug: 27218410
Change-Id: Ida6e649ad33decc743e8190a86486e7c4f8e5c88
2016-03-02 11:40:44 +00:00
Diego Perez
151df69f5f Merge "Fix layoutlib expand unit test" into nyc-dev
am: e6423ee0ed

* commit 'e6423ee0eda00466172d86917d6d66112974f342':
  Fix layoutlib expand unit test
2016-03-02 09:15:36 +00:00
Diego Perez
5d1013cf13 Implement native methods in VectorDrawable
Most of the VectorDrawable implementation has been moved to native code.
This CL implements most of the required functionality that existed in
Marshmallow.

Change-Id: I009bcd5c166f2bfa0795d2718fabab4a549eba9f
2016-03-02 09:03:03 +00:00
Diego Perez
e6423ee0ed Merge "Fix layoutlib expand unit test" into nyc-dev 2016-03-02 08:57:26 +00:00
Todd Kennedy
d509acbf45 Merge "Revert "Revert "Remove deprecated methods / classes""" into nyc-dev
am: 4f858aaa5a

* commit '4f858aaa5a7ef493e79e6d35a8d526f5d8de97e9':
  Revert "Revert "Remove deprecated methods / classes""
2016-03-01 22:41:14 +00:00
Todd Kennedy
4f858aaa5a Merge "Revert "Revert "Remove deprecated methods / classes""" into nyc-dev 2016-03-01 20:39:59 +00:00
Adam Lesinski
0823cec3d2 Merge "AAPT2: Fix segfault when showing error in 9-patch" into nyc-dev
am: b7a3827ea8

* commit 'b7a3827ea8c9c558936d9ce61c6b0446e5c6735d':
  AAPT2: Fix segfault when showing error in 9-patch
2016-03-01 17:12:30 +00:00
Adam Lesinski
b7a3827ea8 Merge "AAPT2: Fix segfault when showing error in 9-patch" into nyc-dev 2016-03-01 17:07:15 +00:00
Adam Lesinski
144c5eabe5 AAPT2: Fix segfault when showing error in 9-patch
Change-Id: I8f457212efc27480758a7157455d98b5e316f772
2016-03-01 09:05:11 -08:00
Todd Kennedy
a67932374d Revert "Revert "Remove deprecated methods / classes""
This reverts commit 5cbeb59026.

Change-Id: Id96010364d65e6131221ebbcc8ce5889a2da256c
2016-03-01 07:19:33 -08:00
Diego Perez
52c2030f42 Fix layoutlib expand unit test
Changing the theme used to "Light" since currently the "Dark" theme
seems to be missing at least one value. This test doesn't visually
depend on the theme so just changing it to "Light" to make it pass.

Change-Id: Ibb885bf3948dcf587de08896540dda622f86e8b3
2016-03-01 11:29:49 +00:00
Jeff Sharkey
f11d26a51f Merge "More lint checks." into nyc-dev
am: 74db59042c

* commit '74db59042c7930ff79f3b848a4d216c979250cad':
  More lint checks.
2016-02-29 23:26:39 +00:00
Jeff Sharkey
74db59042c Merge "More lint checks." into nyc-dev 2016-02-29 23:21:31 +00:00
Jeff Sharkey
331279b239 More lint checks.
-- Error if Parcelable classes aren't final.
-- Warn that MIN_/MAX_ constants that should be dynamic.
-- Error if throwing raw RemoteException.
-- Warn if methods accept File without stream variants.
-- Ignore upstream ICU project.

Bug: 27410989
Change-Id: I12d843e63078dc696c1798a20e088608f1ba9ed1
2016-02-29 16:19:46 -07:00
Diego Perez
10a145b1c6 Merge "Fix StackMap renaming in Java 8" into nyc-dev
am: 1db8850b79

* commit '1db8850b793109da0fc4a65ec837b1a329072b07':
  Fix StackMap renaming in Java 8
2016-02-29 19:08:14 +00:00
Diego Perez
1db8850b79 Merge "Fix StackMap renaming in Java 8" into nyc-dev 2016-02-29 19:01:56 +00:00
Diego Perez
70f97ba54a Fix StackMap renaming in Java 8
With the move to Java 8 of layoutlib, we now need to make sure that the
method stackmaps are kept up to date or the class verification step will
fail. Up until now, we were ignoring them but this caused TestDelegates
to start failing.
This updates the code to make sure that when we modify a class name, we
also update the stackmap in the calls.

Change-Id: Iddbde7454f065ddb8da5bb1ab499ec0616f9b4fe
2016-02-29 10:24:52 +00:00
Adam Lesinski
d53241d692 Merge "AAPT: Allow duplicate attribute definitions if identical" into nyc-dev
am: 526a08f24a

* commit '526a08f24a888e84779dada7902b089f55874cc7':
  AAPT: Allow duplicate attribute definitions if identical
2016-02-27 01:22:42 +00:00
Adam Lesinski
afc79be228 AAPT: Allow duplicate attribute definitions if identical
This allows libraries to coexist a bit easier, since a lot of them
declare the same attribute. When used together they cause errors.
Bug:27101533

Change-Id: I649cf17bc587c4814f849d5ac522daf74495adcf
2016-02-26 15:57:59 -08:00
Muyuan Li
1673ab1ead Merge "Allows components to register shortcut key." into nyc-dev
am: 187b9b9e5b

* commit '187b9b9e5bb3c6a83a26f2ece23a6cfa16614d03':
  Allows components to register shortcut key.
2016-02-26 22:50:25 +00:00
Muyuan Li
94ce94e960 Allows components to register shortcut key.
The registered shortcut will be called from PhoneWindowManager,
before dispatching

Change-Id: If26128939b45a639c8895719a7a23ca433f39fd9
(cherry picked from commit 4da863c5a8872dcabb179a978a2b2157d9081679)
2016-02-26 22:30:34 +00:00
Adam Lesinski
b0767441fc Merge "Revert "AAPT: Allow duplicate attribute definitions if identical"" into nyc-dev
am: 913a2fdb06

* commit '913a2fdb064c479dd5d7c4e47a0844bdd5895414':
  Revert "AAPT: Allow duplicate attribute definitions if identical"
2016-02-25 23:19:22 +00:00
Adam Lesinski
913a2fdb06 Merge "Revert "AAPT: Allow duplicate attribute definitions if identical"" into nyc-dev 2016-02-25 23:13:24 +00:00
Adam Lesinski
525db2489d Revert "AAPT: Allow duplicate attribute definitions if identical"
This reverts commit c25283b5e2.

Change-Id: I2f42a4360fa53c4333494afe0178dcec56d62d8e
2016-02-25 23:13:08 +00:00
Adam Lesinski
3e5a512248 Merge "AAPT: Allow duplicate attribute definitions if identical" into nyc-dev
am: ddbad32341

* commit 'ddbad32341c9dab0bdec11aee88c68a48ec5cd22':
  AAPT: Allow duplicate attribute definitions if identical
2016-02-25 21:07:19 +00:00
Adam Lesinski
ddbad32341 Merge "AAPT: Allow duplicate attribute definitions if identical" into nyc-dev 2016-02-25 21:00:22 +00:00
Todd Kennedy
acbcf9d9ab Merge "Revert "Remove deprecated methods / classes"" into nyc-dev
am: fe01ea05dd

* commit 'fe01ea05dd196acaf95a61e169f6b75654ae0875':
  Revert "Remove deprecated methods / classes"
2016-02-24 22:54:13 +00:00
Todd Kennedy
fe01ea05dd Merge "Revert "Remove deprecated methods / classes"" into nyc-dev 2016-02-24 22:45:50 +00:00
Todd Kennedy
5cbeb59026 Revert "Remove deprecated methods / classes"
This reverts commit 9706c01f9b.

Change-Id: I14c53ab140220e48f6728b1173ea58760bbeb7f9
2016-02-24 22:45:00 +00:00
Todd Kennedy
07e794ad14 Merge "Remove deprecated methods / classes" into nyc-dev
am: ca67844e0c

* commit 'ca67844e0c6b564970b8d329009c0d110888a3fc':
  Remove deprecated methods / classes
2016-02-24 21:11:47 +00:00
Todd Kennedy
ca67844e0c Merge "Remove deprecated methods / classes" into nyc-dev 2016-02-24 21:02:58 +00:00
Jorim Jaggi
3902aac928 Fix build
am: c87e2b46fb

* commit 'c87e2b46fb949f1ba5d72b842bad443b36fd9abc':
  Fix build
2016-02-24 18:54:36 +00:00