911 Commits

Author SHA1 Message Date
Raphael Moll
caed59d90d Layoutlib_create flag -p: don't change all accesses to public.
Change-Id: Icb1709ed0cb275a5a51ca34030695a5e94091499
2011-07-19 22:36:13 -07:00
Xavier Ducrohet
af64556de0 Layoutlib: misc fix + start of AndroidBidi support.
Change-Id: If2ce0b683da8cce01679322d503eed8dd474e521
2011-07-19 15:10:23 -07:00
Xavier Ducrohet
c810fffe1f am 9139868b: am ba6c98db: am 82943ecf: am d40c93f6: Merge "Add dependency generation to Aapt for R.java"
* commit '9139868b6c5cb29b3665984225dceb0193fec31d':
  Add dependency generation to Aapt for R.java
2011-07-19 10:23:19 -07:00
Xavier Ducrohet
e242042b81 am bf31250b: am d5431ed5: am 2e659ae5: am 42755155: Merge "Copy once-created R.java into library projects"
* commit 'bf31250ba0858a2e72a3906a1f0216846683bc2e':
  Copy once-created R.java into library projects
2011-07-19 10:23:16 -07:00
Xavier Ducrohet
9139868b6c am ba6c98db: am 82943ecf: am d40c93f6: Merge "Add dependency generation to Aapt for R.java"
* commit 'ba6c98db8f21016f81ecac35bb0ea3c433044bb7':
  Add dependency generation to Aapt for R.java
2011-07-19 10:18:28 -07:00
Xavier Ducrohet
bf31250ba0 am d5431ed5: am 2e659ae5: am 42755155: Merge "Copy once-created R.java into library projects"
* commit 'd5431ed5505a42e5e33c8bf7cc2ff72792979be9':
  Copy once-created R.java into library projects
2011-07-19 10:18:25 -07:00
Xavier Ducrohet
ba6c98db8f am 82943ecf: am d40c93f6: Merge "Add dependency generation to Aapt for R.java"
* commit '82943ecfe2c4266cf3db50326240825fefcaa38f':
  Add dependency generation to Aapt for R.java
2011-07-19 10:15:11 -07:00
Xavier Ducrohet
d5431ed550 am 2e659ae5: am 42755155: Merge "Copy once-created R.java into library projects"
* commit '2e659ae59c17a0c0584d35b8c400a294c9d49e12':
  Copy once-created R.java into library projects
2011-07-19 10:15:09 -07:00
Xavier Ducrohet
82943ecfe2 am d40c93f6: Merge "Add dependency generation to Aapt for R.java"
* commit 'd40c93f61ca5b3f2351b8db716f67b58f1625e85':
  Add dependency generation to Aapt for R.java
2011-07-19 10:10:17 -07:00
Xavier Ducrohet
2e659ae59c am 42755155: Merge "Copy once-created R.java into library projects"
* commit '42755155d6e8ddc3201b08def2bf262a64fa25f2':
  Copy once-created R.java into library projects
2011-07-19 10:10:15 -07:00
Josiah Gaskin
03589cc653 Add generation of dependency file for .ap_ package
Make Aapt generate a dependency file in the same directory as the
output ap_ file if the --generate-dependencies flag is set.
This dependency file can then be read by the ant exec loop task
to see whether to repackage resources.

Change-Id: I763679414daf76369700aa599c26dcf78d4de099
2011-07-18 16:37:55 -07:00
satok
91e88122cf Enable IMEs to set additional subtypes in background
Bug: 4591792

Change-Id: I7e61a576c56d1a3a56001bdf2fd51ad3801add01
2011-07-19 04:59:48 +09:00
Elliott Hughes
49062e3b4c Merge "Fix aidl to cope with multiple collection types per method." 2011-07-14 13:28:00 -07:00
Xavier Ducrohet
37b3cc3bbe am 9163a4a6: am aa4b1d8b: am d292d2a0: Merge 36a3a392 from mr1.
* commit '9163a4a686fc25fefc77d5b41c24a4538486a48e':
  Merge 36a3a392 from mr1.
2011-07-13 14:53:54 -07:00
Elliott Hughes
b9eba866b2 Fix aidl to cope with multiple collection types per method.
Bug: http://code.google.com/p/android/issues/detail?id=18497
Change-Id: I152416022524d2860cb16b46c4812c5be6bdcbad
2011-07-13 12:10:30 -07:00
Xavier Ducrohet
96131eef38 LayoutLib: updated fake accessbility manager and ensure there's an InputMethodManager
We had replaced the accessibility Manager but it lacked some new API. Obvisouly
this is fragile and should be fixed, but this works for now.

After fixing this there was another issue with the lack of InputMethodManager.
To fix this I had to create an implementation of IInputMethodManager which
normally comes from a binder object.

I may want to do a similar trick with the accessibility manager later.

Change-Id: I28c6494e333f39072f348d0199124efac93256a5
2011-07-12 12:35:50 -07:00
Xavier Ducrohet
0a49635b17 LayoutLib: Delegate for Display and IWindowManager implementation.
This allows ViewConfiguration to be properly implemented which is now
required for the rendering to happen.

Change-Id: I55629689fa8f5f874b43fcac2aa0789ce02d58f4
2011-07-12 11:49:22 -07:00
Xavier Ducrohet
77eaa10949 new button graphics for layoutlib.
Change-Id: I12a6bf9df87552321452ca3344449814cd3102bb
2011-07-11 14:40:48 -07:00
Xavier Ducrohet
9163a4a686 am aa4b1d8b: am d292d2a0: Merge 36a3a392 from mr1.
* commit 'aa4b1d8ba9d5e317b67638b764d92d17fb810aa0':
  Merge 36a3a392 from mr1.
2011-07-11 12:46:07 -07:00
Xavier Ducrohet
d292d2a031 Merge 36a3a392 from mr1.
Protect against OOB index in BridgeTypedArray.

Change-Id: I40be1e039f9eb36c182b6522bd50d6ed98e15b5c
2011-07-11 12:02:51 -07:00
Xavier Ducrohet
842725fc64 am 4d825e1f: Merge "Bring in more layout lib changes from hc-mr1." into gingerbread
* commit '4d825e1f3bb6b52ecbea6f0c4aa2081b7f1edc89':
  Bring in more layout lib changes from hc-mr1.
2011-06-28 18:55:46 -07:00
Xavier Ducrohet
9bce27a9ce am 4753498d: Merge "CherryPick 06942bc4 from hc-mr1. do not merge." into gingerbread
* commit '4753498d5c1ac3cf93b0730e77946a95b6913a82':
  CherryPick 06942bc4 from hc-mr1. do not merge.
2011-06-28 18:55:42 -07:00
Xavier Ducrohet
155cf6c1e1 am 9918ffb0: Merge "CherryPick 988eeeb5 from hc-mr1. do not merge." into gingerbread
* commit '9918ffb07f47430e22f6e53576d59b599f5a3534':
  CherryPick 988eeeb5 from hc-mr1. do not merge.
2011-06-28 18:53:54 -07:00
Josiah Gaskin
9bf34ca6f8 Add dependency generation to Aapt for R.java
Make Aapt generate a dependency file in the location specified
by RClassDir for R.java if the --generate-dependencies flag is set.
This dependency file is then read by the ant exec loop task
to see whether to recreate R.java.

Change-Id: I7152dac86b6ea0e448ef65e3a95694afe233c789
2011-06-27 16:44:57 -07:00
Josiah Gaskin
ce89f1531e Copy once-created R.java into library projects
This change adds functionality in Aapt to allow specification of
library projects to copy the generated R.java file into rather
than regenerating the file for each library project.

Change-Id: I05939d1dc875bd875be9298ca47cb639235070c6
2011-06-27 16:29:38 -07:00
Raphael Moll
b02367778d am f9705ef6: am 2b5f2d01: am e2b41b0d: Merge "Laoutlib_creator: keep original of delegate methods."
* commit 'f9705ef6d3f1502991dd312bfdbfb93cb07fe672':
  Laoutlib_creator: keep original of delegate methods.
2011-06-23 14:30:25 -07:00
Raphael Moll
f9705ef6d3 am 2b5f2d01: am e2b41b0d: Merge "Laoutlib_creator: keep original of delegate methods."
* commit '2b5f2d01558ba338042f486c754f63873c4061fe':
  Laoutlib_creator: keep original of delegate methods.
2011-06-22 18:05:22 -07:00
Raphael Moll
2b5f2d0155 am e2b41b0d: Merge "Laoutlib_creator: keep original of delegate methods."
* commit 'e2b41b0d5c8db85a60cd190c7094052db61114b2':
  Laoutlib_creator: keep original of delegate methods.
2011-06-22 17:44:29 -07:00
Brian Carlstrom
98e1e18c1c Fix build.
git cherry-pick --no-commit  22a614142aacce13fc46a0e524dbfb6ca56bf237

Change-Id: I1409bc3dd1f1b3027c12355e8b6aeffa2d857c83
2011-06-22 11:35:11 -07:00
Xavier Ducrohet
e86c5b2e9f Merge "Add missing delegate to the layoutlib." 2011-06-21 12:19:07 -07:00
Brett Chabot
3523325159 Merge "Include testdata in layoutlib-tests." 2011-06-21 11:27:29 -07:00
Xavier Ducrohet
fc511683b6 Add missing delegate to the layoutlib.
Change-Id: I8de5c1093052c40c0cd327a4d02b01651d3b76b5
2011-06-21 11:03:29 -07:00
Ying Wang
45ccfa5870 Output Proguard options for also overlay layouts.
Change-Id: I7bfac476247bd7b532510e295cb1a3e61e9af88b
2011-06-20 15:41:08 -07:00
Raphael Moll
865c3bef54 Laoutlib_creator: keep original of delegate methods.
For specific methods, Layoublib_create can rewrite the implementation
of a method to invoke a delegate instead of the original code. This
allows layoutlib to implement native code or override existing behavior.

This patch also 'saves' the original implementation of a rewritten
method so that the delegate can access the original implementation
as needed. Obviously this is only done for non-native methods.

Given a non-native SomeClass.MethodName, we generate 2 methods:
- A copy of the original method named "SomeClass.MethodName_original".
  The content is the original method as-is from the reader.
- A brand new implementation of SomeClass.MethodName which calls to a
  non-existing method named "SomeClass_delegate.MethodName".
  The implementation of this 'delegate' method is done in layoutlib_brigde.

Change-Id: I5ca2cd3ac55991a8e8a51c417e75ee447bf9e9e6
2011-06-17 19:07:13 -07:00
Brett Chabot
01f0fd84d0 Include testdata in layoutlib-tests.
Change-Id: I79fff895a13d171079b59db54d4b9d2bec555b3c
2011-06-17 17:03:20 -07:00
Xavier Ducrohet
ea5f0d0543 Bring in more layout lib changes from hc-mr1.
fe051bb2 : Change the way the layoutlib instantiate its XmlPullParser.

A lot of the init code was duplicated so I made a ParserFactory class.

Also created an extension of the KXmlPullParser to override toString().
This allows easier debugging when dealing with multiple parsers (which
is always the case).

Also added some (disabled) debugging printf to deal with parser stack
as it can be tricky figuring out which parsers are in the stack at
which point.

8969147c : Fix case where the int[] attrs doesn't directly match a styleable.

In the case of the FastScroller the int[] is a custom mix of attr
instead of a int[] that exists as R.styleable.foo.

This makes our reflection based mechanism used to find the styleable
fail, so instead we search for each attribute separately (like
we probably should have done from the beginning).

0c264b35: Fix various cases of getDimension to report error if unit is missing.

if getDimention###() is called for a string that has no unit,
then an error is output through LayoutLog, but the rendering keeps
going by using dp as a default.

0beb7eea: Make (Bridge)TypedArray.getInteger() call out to getInt()

Only getInt() resolved attribute flags/enum and I'm not sure why
there's two to begin with.

Change-Id: I015111263d2a2bee76834978ae71eef79defdae3
2011-06-16 18:26:25 -07:00
Xavier Ducrohet
d6465e10c2 CherryPick 06942bc4 from hc-mr1. do not merge.
Layoutlib - use the new getParser callback when possible.

Change-Id: I72b867aa573fcc07d610f139da3c90b1b654633c
2011-06-16 18:26:25 -07:00
Xavier Ducrohet
6b62c82848 CherryPick 988eeeb5 from hc-mr1. do not merge.
Support for custom declare-styleable attr with enum/flag in layoutlib.

Change-Id: I8a5b7cc629d61996ffade9aabd9d4d10961eb411
2011-06-16 18:26:24 -07:00
Dianne Hackborn
4bd44535fe am 810dc598: am f1c5dbbd: am abd4dffc: Merge "New orientation handling. Only impacts SDK (aapt dump badging)." into honeycomb-mr2
* commit '810dc5980c504a89974c07fcbd28a2b5dffb47de':
  New orientation handling.  Only impacts SDK (aapt dump badging).
2011-06-16 14:57:59 -07:00
Dianne Hackborn
810dc5980c am f1c5dbbd: am abd4dffc: Merge "New orientation handling. Only impacts SDK (aapt dump badging)." into honeycomb-mr2
* commit 'f1c5dbbd457bb14d3673508aaba497cdc328a1ef':
  New orientation handling.  Only impacts SDK (aapt dump badging).
2011-06-16 14:55:01 -07:00
Dianne Hackborn
abd4dffc86 Merge "New orientation handling. Only impacts SDK (aapt dump badging)." into honeycomb-mr2 2011-06-16 14:47:53 -07:00
Xavier Ducrohet
9340ab4a21 am 0be8522b: am d1abd94f: am 04ce8111: Bring in more layout lib changes from hc-mr1.
* commit '0be8522b430aca8d90023d7c7e5ef510aa48adc7':
  Bring in more layout lib changes from hc-mr1.
2011-06-16 14:04:18 -07:00
Xavier Ducrohet
0be8522b43 am d1abd94f: am 04ce8111: Bring in more layout lib changes from hc-mr1.
* commit 'd1abd94f57c0162186c57aea98790e8fa281e0a2':
  Bring in more layout lib changes from hc-mr1.
2011-06-16 13:55:30 -07:00
Xavier Ducrohet
04ce811131 Bring in more layout lib changes from hc-mr1.
fe051bb2 : Change the way the layoutlib instantiate its XmlPullParser.

A lot of the init code was duplicated so I made a ParserFactory class.

Also created an extension of the KXmlPullParser to override toString().
This allows easier debugging when dealing with multiple parsers (which
is always the case).

Also added some (disabled) debugging printf to deal with parser stack
as it can be tricky figuring out which parsers are in the stack at
which point.

8969147c : Fix case where the int[] attrs doesn't directly match a styleable.

In the case of the FastScroller the int[] is a custom mix of attr
instead of a int[] that exists as R.styleable.foo.

This makes our reflection based mechanism used to find the styleable
fail, so instead we search for each attribute separately (like
we probably should have done from the beginning).

0c264b35: Fix various cases of getDimension to report error if unit is missing.

if getDimention###() is called for a string that has no unit,
then an error is output through LayoutLog, but the rendering keeps
going by using dp as a default.

0beb7eea: Make (Bridge)TypedArray.getInteger() call out to getInt()

Only getInt() resolved attribute flags/enum and I'm not sure why
there's two to begin with.
2011-06-16 13:23:53 -07:00
Dianne Hackborn
f77ae6e65a New orientation handling. Only impacts SDK (aapt dump badging).
This is a new way of determining whether an application requires
specific orientations, done by looking at any requirements in its
activity tags.  Note that this won't catch all possible issues,
because applications can still force an orientation through Java
APIs, but the vast majority of applications that actually require
a specific orientation should be doing it this way because it the
easiest way and the only way to cleanly launch into the app from
a different orientation without doing some serious activity tricks.

Change-Id: I11d32104f6bc3d2a72aeeff1ca150b8f1c9f5588
2011-06-16 11:13:20 -07:00
Xavier Ducrohet
66743a1ec0 Fix changed native method delegates in layoutlib for ICS.
Change-Id: I49306868cd8a41b6b7d919c3e8b108d5c014530e
2011-06-15 14:43:42 -07:00
Dianne Hackborn
711516d140 resolved conflicts for merge of 77fc8b80 to master
Change-Id: I014f9a886d6f05607d2a5d101ad2052a6841ee8d
2011-06-14 12:17:35 -07:00
Dianne Hackborn
77fc8b8066 am 6c0533f9: am c5193c62: Merge "Add new landscape and portrait orientation features." into honeycomb-mr2
* commit '6c0533f994e7991b3bd60cab48362e8e2e6d86f0':
  Add new landscape and portrait orientation features.
2011-06-14 11:40:06 -07:00
Dianne Hackborn
e289bff0ec Add new landscape and portrait orientation features.
Updates aapt to know about these.  Also updates aapt badging to:

- No longer crash due to the change to how we match unspecified
configuration resources.
- Report the new "smallest screen" supported screen configs.
- Infer old screen size buckets based on new smallest width attrs.
- Report all of the different labels and icons in an app.

Change-Id: I7376042b817391bd070f549cebbc7f03be4635c8
2011-06-14 11:23:52 -07:00
Dianne Hackborn
ef42dace44 am f14dff12: am c6adfed6: am f795e9a8: Okay *now* really enforce the limit on non-public styles.
* commit 'f14dff1219d2a87340dccad657f666f5451d8c6e':
  Okay *now* really enforce the limit on non-public styles.
2011-06-10 14:08:41 -07:00