470 Commits

Author SHA1 Message Date
Deepanshu Gupta
8ad4b8b1fe am 9932e589: am 9e2dadae: am bcbeaf83: Set default text style in layoutlib as NORMAL [DO NOT MERGE]
* commit '9932e589b0f604b1c553e043cd6a60adbc1b7055':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-05-02 19:31:56 +00:00
Deepanshu Gupta
826a215c8b am 320f1126: am cf3f108e: am 5be65fda: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit '320f1126a35fae6e5c2f72f75db5b38bdb207a76':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-05-02 19:31:53 +00:00
Deepanshu Gupta
0a37981cad am 1b28d8d4: am d642de58: am ec4623d0: Improve text rendering and measurement. [DO NOT MERGE]
* commit '1b28d8d4a0b4193b23ed4647a18c4242beb74038':
  Improve text rendering and measurement. [DO NOT MERGE]
2014-05-02 19:31:50 +00:00
Deepanshu Gupta
f4b35c6a83 am ef822b3f: am 62a4a1f9: am 2a82a48f: Fix the measurement of text bounds. [DO NOT MERGE]
* commit 'ef822b3f13204d084196c1124d22a153868b017f':
  Fix the measurement of text bounds. [DO NOT MERGE]
2014-05-02 19:31:48 +00:00
Deepanshu Gupta
e0537c1d49 am c7f8e64c: am 1830a58f: am 5bb3414d: Fix a bug in Nine Patch library. [DO NOT MERGE]
* commit 'c7f8e64cb9b6ff81b2188a31c3d804b763c63fe8':
  Fix a bug in Nine Patch library. [DO NOT MERGE]
2014-05-02 19:31:44 +00:00
Deepanshu Gupta
5e6a299080 am 4d887ec3: am bcd50a7c: am 5712b5fc: Optimize layout rendering in layoutlib [DO NOT MERGE]
* commit '4d887ec388da13c6b65455416a0b829d81e0160a':
  Optimize layout rendering in layoutlib [DO NOT MERGE]
2014-05-02 19:31:42 +00:00
Deepanshu Gupta
73f9e4675c am edd67cb1: am 7c02c6e2: am 02cde9ce: Add methods for Time_Delegate [DO NOT MERGE]
* commit 'edd67cb194b54bb7c6c25eb570d28614900446cf':
  Add methods for Time_Delegate [DO NOT MERGE]
2014-05-02 19:31:39 +00:00
Deepanshu Gupta
88a12f5744 am 43034b54: am 62591cff: am 689c0dfe: Fix NPE in layoutlib. [DO NOT MERGE]
* commit '43034b541cecd924b4b79a5caff850a53516ec26':
  Fix NPE in layoutlib. [DO NOT MERGE]
2014-05-02 19:31:18 +00:00
Deepanshu Gupta
43ed35da99 am ce205d0a: am 600539c7: am 083d1562: Fix text size in Fake Action Bar. [DO NOT MERGE]
* commit 'ce205d0a3b88e12127a8c717ff913fce2d59e36d':
  Fix text size in Fake Action Bar. [DO NOT MERGE]
2014-05-02 19:31:15 +00:00
Deepanshu Gupta
d15bbac631 am a2b530fb: am e39de9ae: am 6335590a: Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
* commit 'a2b530fb7a11e5d0490daf5e9fea56ead5181caa':
  Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
2014-05-02 19:31:08 +00:00
Deepanshu Gupta
3e9bc26210 am 9d209905: am 6f469e54: am 11ee746d: Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
* commit '9d2099052d207a4ca3bf3e4ef021feadf20c260f':
  Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
2014-05-02 19:31:05 +00:00
Deepanshu Gupta
2bb672a208 am 582bb0dc: am fbb1561a: am 44bcd64e: Fix CalendarView to show the right labels. [DO NOT MERGE]
* commit '582bb0dc7498997f441c5209b1558a4640b5a107':
  Fix CalendarView to show the right labels. [DO NOT MERGE]
2014-05-02 19:19:55 +00:00
Deepanshu Gupta
27f0cf0b13 am 10fd7f6b: am ca2c6307: am 87be67f9: Fix layoutlib [DO NOT MERGE]
* commit '10fd7f6b4192fdbd847106fb0d9ec87095092ee3':
  Fix layoutlib [DO NOT MERGE]
2014-05-02 19:19:52 +00:00
Deepanshu Gupta
5c7a844ca1 am 23726255: am 77d1eca7: am 7b5d54f0: Fix ClassCastException when rendering ListView [DO NOT MERGE]
* commit '237262558b818ce52ec53281f2270be3e4f1ee28':
  Fix ClassCastException when rendering ListView [DO NOT MERGE]
2014-05-02 19:19:48 +00:00
Deepanshu Gupta
d60d0c1ce7 am f5512973: am fe675441: am ce22440d: Fix text rendering [DO NOT MERGE]
* commit 'f55129731005f6939d40d7c8a0c0f8c93b472f98':
  Fix text rendering [DO NOT MERGE]
2014-05-02 19:19:46 +00:00
Deepanshu Gupta
44cc867f7d am 9a1f13a4: am afc623e3: am bd9e181b: Fix layout rendering for RTL locales [DO NOT MERGE]
* commit '9a1f13a47bfe29e344efc05f0ecabbfcb5671e06':
  Fix layout rendering for RTL locales [DO NOT MERGE]
2014-05-02 19:19:42 +00:00
Deepanshu Gupta
1197605876 am b80247d3: am 811b331a: am d4875e19: Add orientation to configuration for layoutlib. [DO NOT MERGE]
* commit 'b80247d351b88f69192260a661dbf3d4d71e9527':
  Add orientation to configuration for layoutlib. [DO NOT MERGE]
2014-05-02 19:19:39 +00:00
Deepanshu Gupta
e821d0cc54 am b27d8814: am 21cf9843: am d1084cc0: Add missing native methods. [DO NOT MERGE]
* commit 'b27d881467869539a5c8ec2510e8415912abb617':
  Add missing native methods. [DO NOT MERGE]
2014-05-02 19:19:36 +00:00
Deepanshu Gupta
bcbeaf83ca Set default text style in layoutlib as NORMAL [DO NOT MERGE]
If a style doesn't specify text style (normal/bold/italic/bold-italic)
then default to normal instead of throwing an error.

Bug: http://b.android.com/61358
Change-Id: I0138c73807a5ff6e4d938a99ece3044333110aa1
(cherry-picked from c63e87d53deb24c4286036313db11719173419b3)
2014-05-02 11:46:42 -07:00
Deepanshu Gupta
5be65fda15 Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
For these font families, text was always rendered as italic. This
changeset fixes the issue.

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
(cherry-picked from 5fb41528a6192c41f7e2bb30161cc5af6061d5b8)
2014-05-02 11:46:42 -07:00
Deepanshu Gupta
ec4623d0d4 Improve text rendering and measurement. [DO NOT MERGE]
1. Fix a bug where baseline of the run was modified while rendering
resulting in crooked text in some cases.

2. Use GlyphVector.getLogicalBounds() for text measurement which is more
accurate than getVisualBounds().

3. This change also optimizes text rendering by not computing the advances
for individual glyphs when not needed.

Change-Id: I66792c4d8f50eaf29afa70bccca1e6c812a3fa28
(cherry-picked from 88301948c92fe1261cfa19383d4aaa5d5d0195ac)
2014-05-02 11:46:42 -07:00
Deepanshu Gupta
2a82a48fef Fix the measurement of text bounds. [DO NOT MERGE]
Bug: 12366230
Change-Id: I203b678363dc7b688c744503ee10216baca658a9
(cherry-picked from eb1fae940df0117deb0dc891f9f9bfeca35b1ac1)
2014-05-02 11:46:41 -07:00
Deepanshu Gupta
5bb3414d14 Fix a bug in Nine Patch library. [DO NOT MERGE]
The nine patches were not drawn correctly if they were not positioned at
the top left corner of the canvas.

Bug: http://b.android.com/29959
Change-Id: Icfed522ea07322a3ee9f3955067d3da26c4b0b5b
(cherry-picked from ee1187a94feb61adbfade2505b2f92418a1b1038)
2014-05-02 11:46:41 -07:00
Deepanshu Gupta
5712b5fc3f Optimize layout rendering in layoutlib [DO NOT MERGE]
The height of a layout should be zero if it is assigned a layout_weight.
This way, the layout is measured only once and prevents spurious errors.

Bug: https://code.google.com/p/android/issues/detail?id=58398
Change-Id: If49a7480e5eb82cb86780e00f2f5b65ee053fc2a
(cherry-picked from 9e5e993c7969ad60ff70cfdcf707247f38a705a1)
2014-05-02 11:46:41 -07:00
Deepanshu Gupta
02cde9ceeb Add methods for Time_Delegate [DO NOT MERGE]
Bug: http://b.android.com/65359
Change-Id: I7c2d09286d6bcd9899444aaa5a4a5a342e39d923
(cherry-picked from ddb7f3273c3c00e6520794dcaabdaad20fd98e26)
2014-05-02 11:46:40 -07:00
Deepanshu Gupta
689c0dfe72 Fix NPE in layoutlib. [DO NOT MERGE]
Change-Id: I36623304d83b344ea078044001577b8005a63c02
(cherry picked from commit 80c55109b6351049498df294234dc0a75e75ec44)
2014-05-02 11:46:40 -07:00
Deepanshu Gupta
083d1562e0 Fix text size in Fake Action Bar. [DO NOT MERGE]
The density multiplier was being applied twice to the title text in
the fake action bar.

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
(cherry-picked from 0b7d80765c21dbd9294a0245f92a655fdd61514e)
2014-05-02 11:46:39 -07:00
Deepanshu Gupta
6335590aa8 Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
Issue: https://code.google.com/p/android/issues/detail?id=59732

Change-Id: I281b3fdad88c591281a3645592c84f3e2cb61d09
(cherry picked from commit 81f74f4bc96ea4266cebe1b785d095558f540800)
2014-05-02 11:46:38 -07:00
Deepanshu Gupta
11ee746dc5 Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
Issue: https://code.google.com/p/android/issues/detail?id=60993

Change-Id: Ia43ed40b42c79f67dcd5809b827d4fecbc823c25
(cherry picked from commit 9cb5f5b5233f2331748d108d71f4b685762f32a7)
2014-05-02 11:46:38 -07:00
Deepanshu Gupta
44bcd64e5b Fix CalendarView to show the right labels. [DO NOT MERGE]
Change-Id: I95431f1054678d4192bd1621c1f69b29268f55e9
(cherry picked from commit 083e3caf66c21f7cc9511db479726c38d90e2d2f)
2014-05-02 11:46:37 -07:00
Deepanshu Gupta
87be67f917 Fix layoutlib [DO NOT MERGE]
Fix a NPE.

The cherry-pick differs slightly from the original to remove changes not
relevant to the current branch.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
(cherry-picked from 28873c1f008f4fe24441923e14f30e55d6f0967a)
2014-05-02 11:46:37 -07:00
Deepanshu Gupta
7b5d54f05b Fix ClassCastException when rendering ListView [DO NOT MERGE]
Bug: b.android.com/59300
Change-Id: Ia350adb3308daa8170bff755302760790163c811
(cherry picked from commit 54d88f7678387a6eb871ec2dccd36af4ff35b1fe)
2014-05-02 11:46:37 -07:00
Deepanshu Gupta
ce22440d4c Fix text rendering [DO NOT MERGE]
There are still some errors
1. Little vertical clippping for extra tall glyphs.
2. Breaking into scripts isn't perfect which results in incorrect layout
of text.

Change-Id: I54de3c05eca5e8affb1135c120eea24c3afe8a47
(cherry picked from commit 92a169fa2e1bab7d93089196c33c2de12f9eae82)
2014-05-02 11:46:05 -07:00
Deepanshu Gupta
bd9e181b29 Fix layout rendering for RTL locales [DO NOT MERGE]
This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.

Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: I1ed0d516ab64120a0abca413ba678036661508f8
(cherry picked from commit eee0ea7a0b85ea6345eb7b8da5dbf17306c7339c)
2014-05-02 11:45:37 -07:00
Deepanshu Gupta
d4875e19f5 Add orientation to configuration for layoutlib. [DO NOT MERGE]
Update the configuration with the device orientation before rendering.

Change-Id: Icd40901204fd13f90b18353e53a15e25e5b2176c
(cherry picked from commit d97d60c0fa4613a47d591d45736299702be1cc7a)
2014-05-02 11:45:00 -07:00
Deepanshu Gupta
d1084cc025 Add missing native methods. [DO NOT MERGE]
Also contains fixes for native methods specific to the branch.

Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1
(cherry-picked from commit: 279c00e8e0abb20f7e10577c77937c058da080bf)
2014-04-28 15:18:05 -07:00
Xavier Ducrohet
36ee5485b8 am 5d5c05de: am b7a4aed9: am f70b8c1c: Merge "Fix DateFormat for layoutlib." into jb-mr1.1-dev
# Via Android Git Automerger (2) and others
* commit '5d5c05dee9911eaf8add2d4298641e60f2a113d5':
  Fix DateFormat for layoutlib.
2013-02-12 15:52:46 -08:00
Xavier Ducrohet
47a021f764 Fix DateFormat for layoutlib.
Change-Id: I389c9d106b93b9f81dd3614398a5b66ba2b39a70
2013-02-12 14:05:32 -08:00
Dianne Hackborn
f9ae5f75af am 23307cbb: am e0a676a3: Merge "Fix issue #7649590: Background windows sometimes not being hidden for secondary users" into jb-mr1.1-dev
* commit '23307cbb6b432b658b0fd7437dacfedd6298af94':
  Fix issue #7649590: Background windows sometimes not being hidden for secondary users
2012-12-03 16:08:35 -08:00
Dianne Hackborn
bb4ca5271a Fix issue #7649590: Background windows sometimes not being hidden for secondary users
There are two things going on here:

(1) In secondary users, some times theme information such as whether
the window is full screen opaque was not being retrieved, so the window
manager didn't know that it could hide the windows behind the app.
This would just be a performance problem, except that:

(2) There appear to be a number of applications that declare that they
are full screen opaque, when in fact they are not.  Instead they are
using window surfaces with an alpha channel, and setting some pixels
in their window to a non-opaque alpha level.  This will allow you to
see whatever is behind the app.  If the system happens to completely
remove the windows behind the app, and somebody is filling the frame
buffer with black, then you will see what the app intends -- those
parts of its UI blended with black.  If one of those cases doesn't
hold (and though we have never guaranteed they would, in practice this
is generally what happens), then you will see something else.

At any rate, if nothing else than for performance reasons, we need to
fix issue #1.

It turns out what is happening here is that the AttributeCache used
by the activity manager and window manager to retreive theme and other
information about applications has not yet been updated for multi-user.

One of the things we retrieve from this is the theme information telling
the window manager whether an application's window should be treated
as full screen opaque, allowing it to hide any windows behind it.  In
the current implementation, the AttributeCache always retrieves this
information about the application as the primary user (user 0).

So, if you have an application that is installed on a secondary user but
not installed on the primary user, when the AttributeCache tries to retrieve
the requested information for it, then from the perspective of the primary user
it considers the application not installed, and is not able to retrieve that
info.

The change here makes AttributeCache multi-user aware, keeping all of its
data separately per-user, and requiring that callers now provide the user
they want to retrieve information for.  Activity manager and window manager
are updated to be able to pass in the user when needed.  This required some
fiddling of the window manager to have that information available -- in
particular it needs to be associated with the AppWindowToken.

Change-Id: I4b50b4b3a41bab9d4689e61f3584778e451343c8
2012-12-03 14:09:06 -08:00
Jim Miller
061b4fae3d am a2bf6181: am 2c29deaa: am 6be441c5: Merge "Add mechanism to kick keyguard to show the assistant" into jb-mr1-lockscreen-dev
* commit 'a2bf6181dfca0f93461fc041f2bd2444551a4515':
  Add mechanism to kick keyguard to show the assistant
2012-11-08 15:47:04 -08:00
Jim Miller
bef827572c am c7dc250d: am fe7e94a0: am 088fb915: Merge "Add isSafeModeEnabled() API to WindowManagerService" into jb-mr1-lockscreen-dev
* commit 'c7dc250d5a3dab93ff87e9986a71ae58ff124399':
  Add isSafeModeEnabled() API to WindowManagerService
2012-11-08 15:32:09 -08:00
Jim Miller
4eeb4f664a Add mechanism to kick keyguard to show the assistant
Fixes bug 7499778

Change-Id: Ic9ea514feb489feeee6716f40bdb9792842f9515
2012-11-08 00:39:04 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 Correct executable bit for source files
Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
2012-11-07 10:27:31 -08:00
Jim Miller
bfec0a8616 Add isSafeModeEnabled() API to WindowManagerService
This adds a means of determining when the device is in safe mode,
as required by keyguard to disabled some features.

Change-Id: I31d357e6738c92e1837f9e0263e5f3f4de66315a
2012-11-05 20:27:38 -08:00
Xavier Ducrohet
c48b0b940d Layoutlib: Read and close XML files as soon as possible.
Because passing an InputStream to KXML does not close the
stream after the file has been parsed, the files are staying
locked on windows until the gc and finalizers are run.

This change preload the XML files and close their stream,
and then pass the content in a stream to the parser.

Change-Id: Iabe27989dc616ec9e7de88e52b1ec3af9f007f7c
2012-10-18 13:59:51 -07:00
Xavier Ducrohet
891b703f7b Update layoutlib for jb mr1.
Status bar displayed on all devices.
Update logic for displaying nav bar to whether or not
device has soft button.

Update navigation buttons to new look.
Remove battery and signal from navigation bar.

Change-Id: I8241d71269a17126218a3062ba727e379a8e6c25
2012-10-17 17:15:31 -07:00
Xavier Ducrohet
6dfd0b39a6 Fix SDK layout rendering in Eclipse.
Change-Id: I0e9e85632012c0929b987ee9d0ccf7c25eece322
2012-10-15 15:14:44 -07:00
Craig Mautner
33877e15b8 Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev 2012-10-07 11:48:50 -07:00