2581 Commits

Author SHA1 Message Date
Deepanshu Gupta
bc1944560c Merge "Build LayoutLib tests with Java 6" into lmp-dev 2014-09-16 18:16:21 +00:00
Deepanshu Gupta
0f6e5d2ab7 Build LayoutLib tests with Java 6
Build the layoutlib tests with Java 6, so that we can test LayoutLib on
Java 6 also.

Change-Id: I8ab344af29c880dafdc195d8b061a1d08e724e26
2014-09-16 11:11:36 -07:00
John Spurlock
8d4e6cb060 Saver: PowerManager call to set low power mode.
- Add an explicit power manager call to set the low power mode state,
  instead of trying manage everything around a single setting.
- When low-power mode is triggered by falling below the configured
  threshold, it does not update the setting.
- The "is-enabled" api returns setting || below configured trigger.
- Move the snooze management into the new api call.
- Callers (sysui + settings) updated to use the api instead of the
  setting.
- Handles the case where the level does an unpowered leap out of the
  low battery level. (Possible if powered in-between while the device
  is off)

Bug:17460535
Change-Id: Ic030504c9cad9868a7137abbe837b170da37852b
2014-09-14 14:07:23 -04:00
Marcin Kosiba
a0a9466476 Merge "Don't use reflection when generating the onResourcesLoaded callback." into lmp-dev 2014-09-11 18:34:33 +00:00
Marcin Kosiba
0f3a5a6559 Don't use reflection when generating the onResourcesLoaded callback.
BUG: 17466240
Change-Id: I74608f3d8b3617281639a9d387face97e15fb616
2014-09-11 16:02:13 +01:00
Deepanshu Gupta
820ce63cea Merge "LayoutLib: support font weights." into lmp-dev 2014-09-11 04:54:26 +00:00
Deepanshu Gupta
145bc2d067 LayoutLib: support font weights.
Also fixes a shader delegate method.

Change-Id: I86be80ab55d04760084d5bf39235f2ee4de7be23
2014-09-10 17:01:16 -07:00
Dianne Hackborn
d5adbec527 Merge "Fix build." into lmp-dev 2014-09-10 00:40:55 +00:00
Dianne Hackborn
f5cc3644f6 Fix build.
Change-Id: I92eabc35168acfe58641917179be0d90a14f2f11
2014-09-09 17:38:34 -07:00
Adam Lesinski
e7ad74f070 Merge "AAPT: Don't crash on illegal symbol name" into lmp-dev 2014-09-09 23:15:08 +00:00
Adam Lesinski
3fb8c9b50e AAPT: Don't crash on illegal symbol name
We never checked the return value when adding a nested
symbol, which would be NULL if the symbol name was invalid.

External bug: https://code.google.com/p/android/issues/detail?id=75876

Change-Id: I5211f4d4b87897d52f2b6e5907113d31930bb92d
2014-09-09 16:05:10 -07:00
Deepanshu Gupta
8f92d92a09 Build layoutlib create tests as part of sdk build.
LayoutLib Create tests are now built whenever LayoutLib create is built.

Change-Id: Id215e8690e435019579dba1734090a0d585f37e1
2014-09-08 18:38:57 -07:00
Deepanshu Gupta
8d29a06ad7 Merge "Update IntelliJ project file for IntelliJ 14" into lmp-dev 2014-09-09 00:31:03 +00:00
Deepanshu Gupta
93b828de58 Merge "Add layoutlib tests to DIST_DIR" into lmp-dev 2014-09-09 00:30:24 +00:00
Deepanshu Gupta
fa4e214814 Merge "Remove warning for null entries in resource array." into lmp-dev 2014-09-09 00:30:08 +00:00
Deepanshu Gupta
8c766fea93 Update IntelliJ project file for IntelliJ 14
IntelliJ keeps reordering the options this way each time the project is
opened.

Change-Id: I0e19b5b0a858b3fa9a1134b883ed5180c4ef146e
2014-09-08 14:49:49 -07:00
Winson Chung
2e7f3bdcc9 Removing unnecessary delays, ensuring transition thumbnail is the size of the header. (Bug. 16987565)
Change-Id: Ic104876c5fe16997eca00e0a2b3d8644c927120c
2014-09-07 20:08:40 +00:00
Deepanshu Gupta
a0904bf7aa Add layoutlib tests to DIST_DIR
Add the layoutlib and layoutlib-create tests to DIST_DIR for sdk
targets. These can be used for continuous testing on the build server.

Change-Id: I747dddcddfd8009937668bec4d75cb99bf63235f
2014-09-05 14:01:27 -07:00
Jeff Sharkey
8b9c97a4e2 Merge changes I10ab0b4a,Id32dcbd5 into lmp-dev
* changes:
  Catch incompatible API regressions.
  Add blame to API lint, some exemptions.
2014-09-04 22:49:22 +00:00
Jeff Sharkey
037458a5ba Catch incompatible API regressions.
Ignore deprecation, synchronized, and throws definitions.  Look
through full inheritance hierarchy to catch refactored classes like
BaseBundle.

Change-Id: I10ab0b4a0ef64e7508f38d0c223f08711293d643
2014-09-04 15:46:23 -07:00
Deepanshu Gupta
cd0bb17d30 Remove warning for null entries in resource array.
Change-Id: I32e0b8129e29f3e1e5a472b26e16f3fd06d4b91b
2014-09-04 12:54:26 -07:00
Jeff Sharkey
1498f9c615 Add blame to API lint, some exemptions.
Now offers to parse the output of git blame, and includes the last
person to modify that API for each reported failure.

Add more exemptions, and check for boolean setFoo() method inside a
separate Builder inner class.

Change-Id: Id32dcbd5edf17d2360e4f782110bc1c445f7936e
2014-09-04 12:45:36 -07:00
Deepanshu Gupta
708df7bc45 Merge "Remove ANDROID_BUILD_TOP from intelliJ path variables." into lmp-dev 2014-09-04 01:51:55 +00:00
Deepanshu Gupta
db0b8a1997 Merge "enums in dimension attributes." into lmp-dev 2014-09-04 01:48:24 +00:00
Deepanshu Gupta
351ed32961 Merge "Null out "@null" attributes." into lmp-dev 2014-09-04 01:48:14 +00:00
Deepanshu Gupta
bcbe8fcdb1 Merge "LayoutLib: Fix warnings in ResourceHelper." into lmp-dev 2014-09-04 01:46:58 +00:00
Deepanshu Gupta
a7c2419ec9 Merge "LayoutLib: Allow '+' in float attributes." into lmp-dev 2014-09-04 01:46:42 +00:00
Deepanshu Gupta
d75edc41a6 Merge "Fix invalid conditional check." into lmp-dev 2014-09-04 01:46:14 +00:00
Deepanshu Gupta
8a2ff1ecd9 Merge "Build layoutlib_create tests." into lmp-dev 2014-09-04 01:45:36 +00:00
Deepanshu Gupta
b988c8fa66 Build layoutlib_create tests.
Change-Id: Ia13a090f8ec29b2b2a107825b6a13d7db77e6d61
2014-09-03 12:57:12 -07:00
Deepanshu Gupta
1a12b80569 LayoutLib: Fix warnings in ResourceHelper.
Fix intelliJ warnings in ResourceHelper. Most of them just change
boolean checks "x == false" with "!x".

Change-Id: I278645e2807affd8b3183a4a6f5e4fa2ab7b3d21
2014-09-03 11:59:33 -07:00
Deepanshu Gupta
458f2a7bbb LayoutLib: Allow '+' in float attributes.
Earlier change to fix the invalid conditional check inadvertedly
disallowed '+'.

Change-Id: I75a37926681fe3a496482d6fb75161ac75326109
2014-09-03 11:59:22 -07:00
Jeff Sharkey
294f0de15b More API lint checks.
When offering a helper Service, etc, all platform provided methods
should be marked final.  Otherwise, if available for developer to
override, they should follow onFoo() style naming.

Catch anyone returning concrete collections types, and look for
overlapping flags.

Change-Id: I29d95f3dff78a4da968a46f10be89eada509648c
2014-08-29 17:41:49 -07:00
Adam Lesinski
5283faba4a Change platformBuildVersionCode to name in aapt dump badging
Change-Id: Ie3972105b3f6a727682f91851f7a99b05bb28e1a
2014-08-29 11:27:00 -07:00
Adam Lesinski
b32063822b Merge "Stamp platform version code into app Apks" into lmp-dev 2014-08-29 01:54:15 +00:00
Jeff Sharkey
932a07cefe Teach API lint about package layering!
Now it can identify layering violations, like when something deep in
android.os depends on android.app.

Change-Id: I94606c642195b3ed7558ff6979ed4a181cd85fa2
2014-08-28 16:16:07 -07:00
Jeff Sharkey
8190f4885b Lint tool for current.txt.
Detects common public API mistakes, making it easy to quickly scan
across all changes in a new API level.

Builds in-memory representation of the current API, then runs various
detectors over the classes.  It collects failures, and can ignore
known failures from a previous API level.

Example usage:

$ python frameworks/base/tools/apilint/apilint.py \
    frameworks/base/api/current.txt \
    prebuilts/sdk/api/21.txt

Change-Id: Ie1f88894baf9f79e4b11e78c47f848ea5e25fc25
2014-08-28 15:31:35 -07:00
Adam Lesinski
ad2d07d2d9 Stamp platform version code into app Apks
The versionCode of theframework resources that an app is built against
gets stamped inside an app's AndroidManifest.xml in the <manifest>
tag as "platformBuildVersionCode" and "platformBuildVersionName"
attributes.

Bug:17207635
Change-Id: Id573c3dffcbca38eec9c0eb3e89f4a547e3361d3
2014-08-27 18:28:49 -07:00
Deepanshu Gupta
ca22ba9eaf Fix invalid conditional check.
The check was always false. This wasn't really a problem since the regex
check later took care of it. But it's just wrong to leave such mistakes
in the code once they are noticed.

Change-Id: I84270a96141428bf15949ce8c881d2e4a2aa95f6
2014-08-26 16:33:14 -07:00
Deepanshu Gupta
bc34eb11f6 enums in dimension attributes.
enums in resources were only read for integer attributes. This change
parses the enums for dimension resources also. This also means that we
don't have to hardcode the resolution for match_parent and wrap_content.

TODO: Fix this for all resource types.

Bug: http://b.android.com/75285
Change-Id: I86752b2322ea017499942a87568ba5c54b8654e4
2014-08-26 14:02:25 -07:00
Adam Lesinski
3aa6076083 Merge "Have R classes generate their own reference rewrite logic" into lmp-dev 2014-08-26 18:23:57 +00:00
Winson Chung
5c1b42e4f5 Merge "Multiple performance changes to speed recents invocation/app launching time. (Bug 16987565)" into lmp-dev 2014-08-26 18:23:10 +00:00
Deepanshu Gupta
d4cf391c61 Null out "@null" attributes.
Remove references to the  resourceValue for "@null". This saves needless
checking for "@null" every time an attribute is requested.

Change-Id: I816e78619fa0b1ddcacd1ef5ac90765e30a9a44c
2014-08-25 21:04:10 -07:00
Adam Lesinski
1e466385d4 Have R classes generate their own reference rewrite logic
Change-Id: I0e5b8311fc3479d966a49f9acf0d4c32a6a024d3
2014-08-25 20:04:07 -07:00
Winson Chung
a4ccb86ddc Multiple performance changes to speed recents invocation/app launching time. (Bug 16987565)
- Reverting changes to the existing thumbnail transition to prevent breaking applications
  that currently depend on that transition.  As a result, we need to create a new, hidden,
  aspect-scaled thumbnail transition, and instead use that thumbnail to animate the
  recents header so that we don't have to wait to do that inside the Recents activity.

  In order for this to work, we also have to ensure that the thumbnail surface destruction
  is synchronized with the application that is currently closing (when going down to
  recents) or opening (when coming back up).  The current thumbnail is destroyed when the
  animation ends, but that can be at least 1 frame before the surface for the animating
  window is destroyed.  We change this by deferring destruction of this thumbnail window
  to the animation that is being closed.

  Especially on the way up, not having to wait for us to hide the header before doing the
  transition up can save us the duration of that first animation (> 100ms).

- Other optimizations:
  * No longer creating a new stack view on each transition to calculate the target rect
  * Removing unnecessary call to get the thumbnail when transitioning up/down (the actual
    window does its own animation.
  * We reduced numerous system calls per task by adding a flag to ignore home-stack tasks
    and caching the activity label and icon (and task description icon).  These caches
    follow the same eviction schemes as the thumbnail and icon cache.

- Also tweaked the touch slop for the nav bar swiping gesture to prevent conflicting with
  tapping on home (Bug 17109581)

Change-Id: Ica697aad788051a9203edd9351c583e1cb038a71
2014-08-25 18:52:32 -07:00
Adam Lesinski
31245b4f06 Introduce anydpi density resource qualifier
This is meant to be used with scaleable vector
drawables, and are chosen as the best match unless
there is a configuration that matches the density
requested exactly.

Bug:17007265
Change-Id: Ic3288d0236fe0bff20bb1599aba2582c25b0db32
2014-08-25 17:47:30 -07:00
Deepanshu Gupta
0774bc4605 Remove ANDROID_BUILD_TOP from intelliJ path variables.
The variable is not actually needed and it makes working with different
API levels a lot easier since everything now depends on $PROJECT_DIR$.

This change also makes the tests more robust by improving the way it
tries to find the SDK.

Change-Id: I3502ad4a0ba85fd88b497e47964fddb2a89e520c
2014-08-25 15:47:28 -07:00
Adam Lesinski
a5cc002bfe AAPT: Filtering resource fix
Previously, when filtering resources from an APK using
-c option, if one qualifier matched, we would keep the resource.
However, in the case of something like

-c fr-FR,sw360dp

and with a resource in the APK like so

drawable-fr-FR-sw600dp-v13

we would want this resource to be excluded, as it does not
match the sw360dp qualifier (must be less than or equal to it).

This CL fixed the behavior of the filter to require that all
defined qualifier axis be matched.

Bug:17142358
Change-Id: Ie48f3d516a0e610abc7ba8a7ced4eb3ab52534d4
2014-08-22 16:09:54 -07:00
Adam Lesinski
caf797c84a AAPT: Dump installLocation in badging
Bug:17033144
Change-Id: I87dea9af47eef8bcba1465df9b49e355ac6346ec
2014-08-22 13:01:11 -07:00
Adam Lesinski
d255aba093 Merge "Add better error message for AAPT file conflicts" into lmp-dev 2014-08-21 22:00:25 +00:00