1276 Commits

Author SHA1 Message Date
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
Deepanshu Gupta
151b68ddc2 Fix "@null" resource values in LayoutLib.
Bug: http://b.android.com/74072
Change-Id: Ib84906d86772ac3df2407e71ad2167797bec4542
2014-08-19 17:16:48 -07:00
Deepanshu Gupta
553a4e9138 Add time to status bar and fix wifi icon.
Add vector drawable for wifi icon. Also add time to the status bar.

Change-Id: I01da833087a607e9bb6ff085929e3844990179f8
2014-08-18 16:46:29 -07:00
Deepanshu Gupta
6e8a98c8b7 am a4ceb9e6: am 32faabbe: Layoutlib: Update wifi and battery icon for KK
* commit 'a4ceb9e64cd1ee6302e41c7799ebb6610af96d0e':
  Layoutlib: Update wifi and battery icon for KK
2014-08-18 18:06:07 +00:00
Deepanshu Gupta
a4ceb9e64c am 32faabbe: Layoutlib: Update wifi and battery icon for KK
* commit '32faabbe14252397b35516caa9c0d0245bfcc719':
  Layoutlib: Update wifi and battery icon for KK
2014-08-16 02:23:56 +00:00
Deepanshu Gupta
32faabbe14 Layoutlib: Update wifi and battery icon for KK
Change-Id: Ic5c80e83366bb7672049a6bf726d11cf6717f400
(cherry picked from commit 59eedf528ca29a32b6d7f358f5076929f8fbb164)
2014-08-16 01:11:26 +00:00
Jorim Jaggi
84a3e7aacf Use different unlock animation when going to full shade
Also fixes a bug that the notify flag was not reset, and fix the
transition for the phone/camera affordance (in these cases, no
animation is needed).

Bug: 15991916
Change-Id: Idbb4fa40f86bda597cd66cc38da838ef4f75514d
2014-08-14 12:29:25 +00:00
Deepanshu Gupta
a3a3775599 Merge "Update intelliJ copyright profile" into lmp-dev 2014-08-14 00:12:29 +00:00
Deepanshu Gupta
aabf346d44 Merge "Add KitKat wifi and battery icons." into lmp-dev 2014-08-14 00:12:29 +00:00
Deepanshu Gupta
84cc05cacd Add KitKat wifi and battery icons.
This adds wifi and battery icons for Gingerbread and KitKat. This also
improves the icon resolution code by extracting it out in its own class.
The resources are now organized such that each API level resource
directory is used as a backup for all API levels lower than itself.

Change-Id: I937c83638adcc9fa8cd407e0a3023c3abe95530d
2014-08-13 23:13:33 +00:00
Deepanshu Gupta
2e7a0355b4 Update intelliJ copyright profile
Change-Id: Ib9386b686cb24e1f187d0b636b59b4b13d59bbcd
2014-08-13 22:52:02 +00:00
Deepanshu Gupta
0e4be25409 Whitelist fonts instead of blacklist.
A list of all fonts bundled with the SDK is generated. Load this file to
know which fonts are missing from the SDK.

Change-Id: I1554f1baec842ccdde3b21a93008437e9bac9353
2014-08-12 15:00:58 -07:00
Deepanshu Gupta
14690b0aa3 Merge "Improve error reporting when renaming fonts." into lmp-dev 2014-08-12 16:54:46 +00:00
Deepanshu Gupta
556f941f55 Merge "Don't show warnings for fonts not bundled." into lmp-dev 2014-08-12 16:54:46 +00:00
Deepanshu Gupta
93b1483e57 Improve error reporting when renaming fonts.
Log a better error in case of invalid input.

Change-Id: Ifb122c1cc624111769e650439aa24290155dbbc4
2014-08-11 18:48:53 -07:00
Deepanshu Gupta
e644ff8d92 Don't show warnings for fonts not bundled.
The extended font set, used on Nexus 5, new Nexus 7 etc., uses OpenType
CFF fonts which don't work well with Java. These fonts are deliberately
excluded from the SDK build.

This change skips the warnings for the missing fonts. However, we still
show warnings for other fonts that failed to load. If the set of fonts
bundled with the SDK changes, we will need to update the list of missing
fonts in FontFamily_Delegate.java.

Change-Id: I3197b5350d048daa09512e8024188909179b1799
2014-08-11 18:11:37 -07:00
Deepanshu Gupta
99d90a6210 Resolve color xml attributes properly.
Color attributes were not being converted to int properly. The
conversion to int was a simple string to int using base 16. This change
resolves the colors as per #RGB, #ARGB, #RRGGBB or #AARRGGBB format
depending on the length of the attribute. All values that begin with '#'
are treated as colors.

Bug: http://b.android.com/73845
Change-Id: I8ad089b821af1e290b9b95771b50213fe2fdd784
2014-08-12 09:57:27 -07:00
Deepanshu Gupta
c8f2d5e6dc Add font rename script to rename one font only.
This change adds a script that renames only font at a time. This helps
in writing better Makefile rules and passes the job for parallelization
to the make rather than doing it in python which doesn't support ctrl-c
properly.

Change-Id: Icd380e3cc5d744260d6a9f497aa65a1a6c829c2e
2014-08-07 21:41:11 +00:00
Deepanshu Gupta
7ec9d001a9 Create a copy of the build_font.py
The copy will be modified to support renaming only one font at a time.
This is done in two steps to improve the diffs.

Change-Id: I47283745c25882283f0464c17e603396a8c9141e
2014-08-07 21:40:34 +00:00
Deepanshu Gupta
4e01c59e6c am 6ebeefa0: am 904d7711: am 7b561be3: am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '6ebeefa04cb3c360d8028eb77e60bacf8a800cb1':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:59:08 +00:00
Deepanshu Gupta
6ebeefa04c am 904d7711: am 7b561be3: am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '904d77118bab63139174470ef728ca9a53e75a15':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:51:47 +00:00
Deepanshu Gupta
7b561be3a6 am 09c3c2ed: am ba31d628: am db94ea9e: am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '09c3c2edb2391d3ffed9a07ec360b9f75b9f7637':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:37:10 +00:00
Deepanshu Gupta
db94ea9ed0 am f970d2c2: am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit 'f970d2c201649843b8d51d094b865f16b15bc0bc':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:21:54 +00:00
Deepanshu Gupta
f970d2c201 am 79c3f678: am 206c691b: am 72cf03a2: am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '79c3f678d21f6b3c058623217cbe5dd57a553fe8':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:18:04 +00:00
Deepanshu Gupta
72cf03a27a am 3a544a81: resolved conflicts for merge of a232a68d to jb-mr1.1-docs
* commit '3a544a81b3d2d529b2995f4b5db2077760d440b5':
  Fix SystemProperties in LayoutLib.
2014-08-06 22:05:38 +00:00
Deepanshu Gupta
3a544a81b3 resolved conflicts for merge of a232a68d to jb-mr1.1-docs
Change-Id: I1ea220e3e0a81880db68abab87beab56dc4a336c
2014-08-06 15:00:14 -07:00
Deepanshu Gupta
a232a68d4c resolved conflicts for merge of 5476cfee to jb-mr1-dev
Change-Id: I5197271e6fdd36fed9ca9f9b7221d9a99141a4b4
2014-08-06 14:41:02 -07:00
Deepanshu Gupta
5476cfee6b am 505c675c: Fix SystemProperties in LayoutLib.
* commit '505c675c3a536ac7c6ad264eb62542537532119c':
  Fix SystemProperties in LayoutLib.
2014-08-06 21:28:24 +00:00
Deepanshu Gupta
505c675c3a Fix SystemProperties in LayoutLib.
Not all System Properties were used via Build class. Also, properties
like SDK_INT which called SystemProperties directly were not initialized
properly.

This change is essentially cherry picking of the relevant parts from the
following commits:
984749bf75c9ce9d3401b8410ea7d6276544b6ee
167bc25bceea9280bbe4858db4cb8233f86ce325

Bug: http://b.android.com/73046
Change-Id: Ia0fb467ee6d5fdedda500d57d02be20006f115df
2014-08-05 17:47:30 -07:00
Svetoslav
4f6a6c48a4 Fix build
Change-Id: I96eec52472bec122074b0ec2ee051c1b55eaa8f4
2014-08-05 15:17:49 -07:00
Deepanshu Gupta
70d1574db9 Get filename from File faster
Use the direct call from a File object to get the filename instead of
going through Path which depends on Java 7 making the LayoutLib tests
incompatible with Java 6.

Change-Id: I815895eedbc10245ee09bdb53b11e5548b076aad
2014-08-05 14:34:56 -07:00
Deepanshu Gupta
b0d767dcf1 Skip loading otf fonts on Java 6
Change-Id: I9668b84812e9be333d10603657dd911024fc292d
2014-08-05 14:19:27 -07:00
Deepanshu Gupta
0c5cd96522 Add SystemProperties native method implementations.
Bug: http://b.android.com/73046
Change-Id: Ia695e7beb81f426509b646cfd929201f7e0a4ade
2014-08-05 21:13:00 +00:00
Deepanshu Gupta
45aab0eb8f LayoutLib: Use ICU's line break algo.
Change-Id: I7e5b0ab7423a72f5a4b0e1163d0a537f0b03ba07
2014-08-05 21:12:16 +00:00
Deepanshu Gupta
b80e42f93f Replace more Locale methods.
This change replaces some methods of java.util.Locale. Some of them were
added in 1.7 and some are not present in the Desktop VM.

Change-Id: Ifdf8451bb2acf55e01dce8b5e15c40c8160107cc
2014-08-04 23:02:02 +00:00
Deepanshu Gupta
1840e8f2c7 Fix Delegates
Change-Id: I2b6a6b679b7a5b2532b76b723155bc2763b70768
2014-08-04 23:00:43 +00:00
Deepanshu Gupta
d2a411840c Fix LayoutLib Create tests.
Change-Id: Ica3efe417d54da7dc74b21d28215199d37600744
2014-08-04 22:59:38 +00:00
Deepanshu Gupta
86eb8b4e29 Add testing framework to LayoutLib.
This change adds an end to end test which loads the framework resources
and a test app and ensures that no exceptions or warnings are thrown.

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
2014-08-04 22:58:39 +00:00
Sander Alewijnse
a87863a8bd Fix deadlock window manager and device policy manager.
Removed all communication from wm to device policy manager.
Added initialization of cache in wm by dpms.

Change-Id: Ifa0b8bfcd625464b156d5cc0fb66d342deda1c27
2014-07-31 09:16:46 +00:00
Deepanshu Gupta
72c60ab7d4 Fix classpath for AndroidLocale
Change-Id: I9af9ac05ec26f12529d51e566bf38789a2579390
2014-07-31 05:10:03 +00:00
Sander Alewijnse
549d39e549 am f3c523e0: am ce1088a6: am fcb490a2: Merge "Add Device Policy API to disable screen capture." into lmp-dev
* commit 'f3c523e06217b19ae8389f9ca8be71ed2cd9fe7b':
  Add Device Policy API to disable screen capture.
2014-07-23 17:18:27 +00:00
Sander Alewijnse
d2a1eec400 Add Device Policy API to disable screen capture.
WindowManager will set secure flag on SurfaceControl for
all windows of a flagged user to prevent screen capture.
API is consistent with the camera disable API.

Change-Id: Ib180f67f1ad827b6f4aca2af615274256cce58f4
2014-07-23 13:44:28 +00:00
Deepanshu Gupta
aa474ff0f3 am 9a61270d: Merge "LayoutLib: Fix EditText rendering [DO NOT MERGE]" into klp-modular-dev
* commit '9a61270d67f654f3558b29f6b3e78c0b2fbe0178':
  LayoutLib: Fix EditText rendering [DO NOT MERGE]
2014-07-22 01:04:00 +00:00
Deepanshu Gupta
b51750fda6 am 0ca0853c: Merge "Update layoutlib create README [DO NOT MERGE]" into klp-modular-dev
* commit '0ca0853c52a81b317996b2997373f5882b369c80':
  Update layoutlib create README [DO NOT MERGE]
2014-07-22 01:03:55 +00:00
Deepanshu Gupta
c54100d449 Update layoutlib create README [DO NOT MERGE]
Update the doc to reflect the current state of the tool and use a
consistent 100 char column limit.

Change-Id: I64fb58cc46abbc2f3759cb1f99d42b5090c1409f
(cherry picked from commit 88585f404cb493129847e4487b628062674a4ede)
2014-07-21 17:37:20 -07:00
Deepanshu Gupta
f5fbff9b1a LayoutLib: Fix EditText rendering [DO NOT MERGE]
Framework has overloaded java.lang.System.arraycopy() for char[]. The
method is not present on the Desktop VMs. This change replaces the calls
to this method by its more general alternative - the one using Objects.

TODO: Make it more configurable and flexible to allow rewrite of any
such methods in the future.

Change-Id: I6823b13e52b1c555eb257d02b79707d84e73236f
(cherry picked from commit fc3e93300733b4a161adb9cceebea6cda353d085)
2014-07-21 17:38:00 -07:00
Deepanshu Gupta
0804e0aded am a9e488a6: am d8d3e87c: am 4627c98d: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into klp-dev
* commit 'a9e488a6d2b20ecc91412072a5f39022d7fe6926':
  Fix style resolution for styles with '.' [DO NOT MERGE]
2014-07-18 21:53:37 +00:00
Deepanshu Gupta
87234e8544 am 9c48ab82: am ccf7b2aa: am 5af7324a: Fix style resolution for styles with \'.\' [DO NOT MERGE]
* commit '9c48ab82084828087c47086f2379b4927ec057e2':
  Fix style resolution for styles with '.' [DO NOT MERGE]
2014-07-18 21:50:15 +00:00
Deepanshu Gupta
a9e488a6d2 am d8d3e87c: am 4627c98d: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into klp-dev
* commit 'd8d3e87cf339deaf890e4b083d09b074065cd35f':
  Fix style resolution for styles with '.' [DO NOT MERGE]
2014-07-18 21:48:05 +00:00
Deepanshu Gupta
d7f2bf067f am f75489f2: am c425c438: am 710a55b4: Fix default level flags for bidi. [DO NOT MERGE]
* commit 'f75489f2f1f2dc4f75205f4b242800777bf7d5ec':
  Fix default level flags for bidi. [DO NOT MERGE]
2014-07-18 21:45:47 +00:00