326 Commits

Author SHA1 Message Date
Jean-Baptiste Queru
3e2d59146d resolved conflicts for merge of 13c04786 to jb-dev-plus-aosp
Change-Id: Ib7aa5a768f4606beb2a4387811cfed7c00cbc111
2012-05-01 10:02:02 -07:00
Jean-Baptiste Queru
39b58ba2b2 resolved conflicts for merge of bc2fb7b9 to jb-dev-plus-aosp
Change-Id: I5386585e473201268c6ed8b05e0a16569d434ea2
2012-05-01 09:54:38 -07:00
Jean-Baptiste Queru
b2228eb714 Merge "Runtime resource overlay: clean-up." 2012-05-01 09:20:32 -07:00
Jean-Baptiste Queru
9e3bc3f61d Merge "Build overlay packages just like regular packages." 2012-05-01 08:49:38 -07:00
Ying Wang
002f53770a Apply --extra-packages in case --custom-pacakge is also specified.
Cherry-picked from master.

Change-Id: I2d67b8821afdf064f4186ccd8def1b65f9a7dc88
2012-04-26 13:13:08 -07:00
Dianne Hackborn
4aa14b912f Add new aapt dump badging output explaining implicit badging.
New uses-implied-feature and uses-implied-permission tell you
about any features or permissions that aapt is automatically
adding to your app, and why it is doing so.

Change-Id: I45edb055408e1259699c994f956166ce67e8db5d
2012-04-16 11:34:15 -07:00
Dan Morrill
4527a92421 Merge "Adding a line for android-debuggable to 'dump badging' if AndroidManifest.xml is configured as such. This is to be used by e.g. Play Store to warn the developer that they are about to publish a security hole." 2012-04-10 17:13:17 -07:00
Dianne Hackborn
31b0e0e86a Implement call log permission compatibility.
If a pre-JellyBean application requests read/write contacts, it
will implicitly be given read/write call log.

Change-Id: I029db4b09fda737bb8fba4e1611355ebdbbfd34f
2012-04-05 19:33:30 -07:00
Amith Yamasani
ec4a50428d Embed layout padding in nine patch images
- Added a new custom PNG chunk that carries the layout padding ints.
- Extract the padding ticks from .9.png images and store in the chunk.
- Load the padding information at runtime into Bitmap and NinePatchDrawable.

- The new chunk is ordered first so that it doesn't cause a problem in older
  versions of the platform.

Bug: 6087201

Change-Id: I5de46167a1d44b3ec21065b0c165e594b1dc8399
2012-04-04 12:05:59 -07:00
Dan Morrill
b6ec11ef37 Adding a line for android-debuggable to 'dump badging' if AndroidManifest.xml
is configured as such. This is to be used by e.g. Play Store to warn the
developer that they are about to publish a security hole.

Change-Id: Ib6f8537462cbc00ed0504435bdeee2aae0c5b69b
2012-04-03 14:42:05 -07:00
Colin Cross
a982dc05d7 frameworks/base: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
2012-03-22 18:43:07 -07:00
Jeff Brown
fe75d62eba Use qsort_r_compat() as a portable wrapper for qsort_r().
Change-Id: Ie79f81625947f4e95122047605d994c86e872e74
2012-03-19 14:08:58 -07:00
Jeff Brown
80a6b33be2 Fix build break on glibc, for real.
Change-Id: I8bbec237229b05f96c708d41f3c4da17e2a90e2b
2012-03-19 12:02:10 -07:00
Jeff Brown
46fc395386 Fix build break on glibc hosts.
Change-Id: Ida70bec6ea972d042982428353cbbc33cde25136
2012-03-19 11:50:02 -07:00
Jeff Brown
c0f7366a15 aapt: Preprocess images in parallel.
Currently hardcoded to use up to 4 threads.

This change substantially reduces the amount of time spent
preprocessing framework resources to just a few seconds.

Change-Id: I02fdd283fb529a152aeb22ac87f278779fd77983
2012-03-17 14:12:57 -07:00
Jeff Brown
c9fd9263fe Use quicksort to sort the string pool.
The current implementation of Vector::sort uses insertion sort
on the assumption that the data is mostly sorted.  It isn't.

This change brings the total time spent sorting packages by config
down to 500ms from about 93 seconds.

Bug: 6186278
Change-Id: Iec8da11e09297acd6c73733d063b0fa9dacf69f7
2012-03-16 22:25:15 -07:00
Jeff Brown
61361f376b Add some comments about StringPool sort order.
Change-Id: I57f24d46328a6bfef883819eaf95c03114d573bb
2012-03-16 22:24:54 -07:00
Jeff Brown
345b7eb874 Remove dead code in StringPool.
The sorted string pool option was no longer used.
Neither were strings with associated identifiers.

Change-Id: Ic5f6368637fbeedfda873d63f4ad0f3ea9d0d603
2012-03-16 15:25:17 -07:00
Jeff Brown
8a9cfcc852 Make StringPool entry types trivially movable.
Change-Id: If93957a840a0f1cae2e6ef291eeeb1b0c7c20958
2012-03-16 15:24:32 -07:00
Dianne Hackborn
7924512aa1 Add new READ_EXTERNAL_STORAGE permission.
Also adds some initial compatibility code for dealing with it.

Change-Id: I104bff11798349e4aaa6da9b7be787b257daa1bb
2012-03-12 15:07:31 -07:00
Ben Gruver
a0b29f5565 Merge "Fix an issue where a non-styled string could be made into a styled string" 2012-03-08 14:52:09 -08:00
Ben Gruver
db6e67d8ec Fix an issue where a non-styled string could be made into a styled string
If a styled version of an otherwise identical string is encountered before
a non-styled version, aapt merges the two, effectively making the
non-styled string have a spurious style.

Change-Id: I424a61c0c83c59e0b9c8939e457402efd06a7a4f
2012-03-07 21:19:16 -08:00
Ben Gruver
59eb5fd509 Fix up getAttributeFlags() function
In addition to a couple of minor clean-up items, this fixes an issue that can
rarely cause incorrect parsing of attribute flag values, when there is a '|'
character in the few bytes past the end of the attribute value being parsed.

Change-Id: I6050b1c2db60720c7c0ab7df9eba8cfc629b320e
2012-03-07 10:49:55 -08:00
Xavier Ducrohet
b3c780f16c am 816b873d: Move the automatic namespace outside of the res namespace. do not merge.
* commit '816b873df1ab98d0e79913cf589b7b1fbaf14e85':
  Move the automatic namespace outside of the res namespace. do not merge.
2012-02-23 18:42:01 -08:00
Xavier Ducrohet
816b873df1 Move the automatic namespace outside of the res namespace. do not merge.
(cherry picked from commit d9fe8018ffbf94f18a840005e688ad1d712f0225)

Change-Id: I48ca78d5fccc75392b3f1cf9525890e5145293c4
2012-02-23 18:10:20 -08:00
inazaruk
eed8d0b3af Fix for issue 9656 - custom xml attributes in Android Libraries. do not merge.
Added support for predefined namespace http://schemas.android.com/apk/res/auto
that aapt tool recognizes and treats as namespace with package name
taken from current application's AndroidManifest.xml, //manifest/package attribute.

Signed-off-by: inazaruk <ievgenii.nazaruk@gmail.com>

(cherry picked from commit e348909c1966c3d192841cc131a32be6ed90da18)

Change-Id: I4bff836c42a309bac36e5d1ce1899131b3c4c194
2012-02-23 18:09:31 -08:00
Xavier Ducrohet
d9fe8018ff Move the automatic namespace outside of the res namespace.
Change-Id: I107ee94af0a13f008ef4a8844a9038b84f97a247
2012-02-23 16:59:27 -08:00
Jean-Baptiste Queru
111a7a107c am 0842a226: am fe99051c: am 0e25e4cd: am 63e43ba5: Merge "Fix for issue 9656 - custom xml attributes in Android Libraries"
* commit '0842a2262d03fc98e42541cb38f51a341d346ae0':
  Fix for issue 9656 - custom xml attributes in Android Libraries
2012-02-23 13:04:24 -08:00
Jean-Baptiste Queru
0e25e4cd29 am 63e43ba5: Merge "Fix for issue 9656 - custom xml attributes in Android Libraries"
* commit '63e43ba56a95708c229eec539a544967f1bbb7d7':
  Fix for issue 9656 - custom xml attributes in Android Libraries
2012-02-23 12:57:03 -08:00
Jean-Baptiste Queru
63e43ba56a Merge "Fix for issue 9656 - custom xml attributes in Android Libraries" 2012-02-23 12:38:14 -08:00
Mathias Agopian
cbc69718cb another attempt at fixing the linux build
Change-Id: Iac20439fd6eea4682859112e72f051294bc87ef6
2012-02-21 14:34:47 -08:00
Mathias Agopian
83c64e6b62 frameworks/base refactoring
create the new libandroidfw from parts of libui and libutils

Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
2012-02-20 22:38:43 -08:00
Mathias Agopian
b13b9bdad2 frameworks/base refactoring.
step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2012-02-17 19:01:26 -08:00
Mårten Kongstad
249e3ed540 Runtime resource overlay: clean-up.
This is a combination of three minor clean-up tasks:

- Generate correct idmap even if name lookup fails:

  Any resources following a resource with a spec but no actual values
  would receive an incorrect ID in the idmap due to an accumulating offset
  error. To combat this, a dummy value is inserted in the idmap whenever
  a resource with a spec but no values is encountered.

- Optimize pruning of padding zeroes in idmaps:

  Earlier, trailing zeroes were iteratively popped from the end of each
  type block of an idmap. This commit instead tracks where to make the
  cut, and does so with a single function call.

- aapt: warn about resources which lack values:

  The resource framework assumes every resource to have a value for
  at least one valid configuration. However, if multiple resource
  directories are used (several -S options to aapt), the list of
  configurations is limited by dpi (-c option to aapt) and a resource
  is only available in discarded dpi configurations, aapt will create
  a resource entry where each configuration lack an actual value. This
  commit lets aapt emit a warning whenever this has happened.

Change-Id: Ic7451b7f4adfef5bfa6b0d7e64e057f317a2cdaa
2012-02-16 16:43:07 +01:00
Dianne Hackborn
1644c6d7f4 Only generate private symbols that are needed.
Change-Id: Icc4c86638db8429a387bf87c934cc712f807e213
2012-02-07 12:57:50 -08:00
Mårten Kongstad
c761d8b008 Build overlay packages just like regular packages.
Previously, building overlay packages required passing aapt its -o flag.
This commit decouples the idmap generation code from the effects of the
-o flag.

Since this commit renders the -o flag obsolete, support for the flag was
removed from aapt as well.

Change-Id: Ied2e0ab8cb800e49623f0a2044b06cd4935473d5
2012-02-07 19:14:28 +01:00
Xavier Ducrohet
b54f371cc4 am f8aea993: Make aapt ignore tools-related data.
* commit 'f8aea99385df8373b6edd6d5dd1d15b7b36b525b':
  Make aapt ignore tools-related data.
2012-02-06 11:41:56 -08:00
Xavier Ducrohet
f8aea99385 Make aapt ignore tools-related data.
This patchset introduces a new standard namespace http://schemas.android.com/tools
which will be used for tools specific XML attributes.
Any attributes using this namespace will not be compiled into the binary XML file.

The namespace node is also not written at all, and its string is not collected
to ensure that there is no impact on the devices.

(cherry picked from commit a5d5e9d906583ebeb590ca200ca9840302a5cd1a)

Change-Id: I62937b8bc34c07ac544930aa8eadd7797e0179d5
2012-02-06 11:25:28 -08:00
Xavier Ducrohet
a5d5e9d906 Make aapt ignore tools-related data.
This patchset introduces a new standard namespace http://schemas.android.com/tools
which will be used for tools specific XML attributes.
Any attributes using this namespace will not be compiled into the binary XML file.

The namespace node is also not written at all, and its string is not collected
to ensure that there is no impact on the devices.

Change-Id: I3e75d44cda54e1fa7b5cdc56b3eb27db80fe7761
2012-02-02 17:53:43 -08:00
Dianne Hackborn
6c997a9e88 aapt now sorts the strings in the resource string pool.
In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).

Also add a new aapt command to print the contents of the resource
table string pool.

Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
2012-01-31 15:41:30 -08:00
Dianne Hackborn
d96e3dfa02 Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc.
Change-Id: I519d6cdc527a402d93b98df17a64fc1da52ad598
2012-01-25 15:14:50 -08:00
Steve Block
c6aacce371 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
2012-01-19 14:45:03 -08:00
Steve Block
a51f0e707f Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
2012-01-19 14:44:59 -08:00
Steve Block
933e856150 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
2012-01-19 14:44:56 -08:00
Steve Block
1afd5bab4e Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
Change-Id: I44f267700356967dc51e8f85ebf457dc85cfb229
2012-01-19 14:44:50 -08:00
Steve Block
06ade6ae1b Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
2012-01-19 14:44:31 -08:00
Steve Block
3762c31172 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-08 13:19:13 +00:00
Dan Morrill
74366c06ff Merge "Minor tweak to console output." 2012-01-06 14:39:11 -08:00
Dan Morrill
e74763e26f Minor tweak to console output.
Change-Id: I494910eda1d02f6bcff945b9a13c83767f2248b6
2012-01-06 14:10:45 -08:00
Steve Block
8564c8da81 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
2012-01-06 10:07:54 +00:00