1077 Commits

Author SHA1 Message Date
Dianne Hackborn
68c33ca7ce Add new API to find smallest/largest screen size.
Change-Id: I790801fceaf84ee2e3b1c9d32828285ad3231d0e
2012-04-19 14:55:13 -07:00
Jeff Brown
420489ca1f Merge "Support loading keyboard layout overlays from resources." 2012-04-17 17:59:03 -07:00
Jeff Brown
6ec6f79e1a Support loading keyboard layout overlays from resources.
Added the concept of a keyboard layout overlay, which is
a key character map file that has "type OVERLAY".

Added support for loading keyboard layout overlays from
resources dynamically.  The layouts are reloaded whenever they
are changed in the Settings application or an application
is installed.  This is somewhat more aggressive than necessary
so we might want to optimize it later.

Before system-ready, the input system uses just the generic
keyboard layouts that are included on the device system image.
After system-ready, it considers the user's selected keyboard
layout overlay and attempts to load it as necessary.  We need to
wait until system-ready before doing this because we need to
be in a state where it is safe to start applications or access
their resources.

Bug: 6110399
Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
2012-04-17 17:56:32 -07:00
Dianne Hackborn
ac76e72272 Merge "Add new scale-up window manager animation." 2012-04-16 17:34:25 -07:00
Dianne Hackborn
eabfb3a36e Add new scale-up window manager animation.
Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
2012-04-16 17:32:50 -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
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded.  Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured.  This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
2012-04-10 18:23:58 -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
29d6fa9d8b Merge "Implement call log permission compatibility." 2012-04-06 11:11:32 -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
Jeff Brown
ac14351e16 Move some APIs from window manager to input manager.
Simplified input injection API down to just one call.

Removed all input state reading API.  It was only used by the
window manager policy and required a permission that applications
could not obtain.  READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
2012-04-05 19:33:11 -07:00
Dianne Hackborn
5459c43b83 Merge "Clean up status bar, system bar, navigation bar management." 2012-04-05 11:47:02 -07:00
Dianne Hackborn
f87d19621d Clean up status bar, system bar, navigation bar management.
The status bar and navigation bar are two completely separate
elements, with their own semantics.  The system bar now classifies
itself as a navigation bar, since that is really how it behaves.

This required rewriting the HDMI resizing code, so that it is
all done by PhoneWindowManager since that is what is responsible
for the size of the navigation bar (and thus now system bar).  This
actually gets rid of a fair amount of code, and means we can also
do the same thing for a pure navigation bar.

Likewise the system bar now has the navigation bar ability to be
hidden when requested by system UI flags.  To get the behavior
we want on Xoom, we only allow the nav bar to be hidden when it
will help provide a better aspect ratio for showing widescreen
videos.

Finally the nav/system bar now animates when hidden and shown.

Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
2012-04-04 16:00:45 -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
Xavier Ducrohet
fbd0509f47 Merge "Add Delegate for ViewRootImpl#isInTouchMode to prevent IPC call in Eclipse." 2012-03-23 16:29:50 -07:00
Xavier Ducrohet
22f700a1b8 Add Delegate for ViewRootImpl#isInTouchMode to prevent IPC call in Eclipse.
Also fix some new/removed method from BitmapFactory.

Change-Id: I606bd8bee6ff1e2c6c9472b4672175bfdaff45de
2012-03-23 16:07:23 -07:00
Dianne Hackborn
8078d8c8a2 Add new thumbnail animation.
Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
2012-03-23 14:13:13 -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
bf02b98473 Merge "Remove dead code in StringPool." 2012-03-16 19:10:57 -07:00
Jeff Brown
4eb7fbb250 Merge "Make StringPool entry types trivially movable." 2012-03-16 19:10:47 -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
Xavier Ducrohet
5d701eddcf LayoutLib: Properly support attr ns when used in styles.
Change-Id: I885864588928589d7c9a34b94339917c5be47fa5
2012-03-16 15:14:02 -07:00
Xavier Ducrohet
a421f6c0ba Fix sdk layout rendering in JB.
Since JB, com.android.internal.R does not contain all the resources,
instead only the ones that are accessed through Java.
This means we need to dynamically generate IDs for resources that are
private and only accessed from other XML resources. This is done
through the DynamicIdMap class.

Also add a PolicyManager and a PowerManager since those are now
needed by ViewRootImpl?!?

Change-Id: If2ae8ad79502fa084d852664a44aefd46e01aec6
2012-03-15 16:23:51 -07:00
Dianne Hackborn
a4972e951b Add new "options" argument to all startActivity APIs.
This will be used to allow new features to be requested...  such as,
say, a special kind of animation.  Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
2012-03-14 12:57:14 -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
Romain Guy
583fcb9175 Merge "Dispatch screen state change events to Views Bug #6120957" 2012-03-08 15:06:50 -08:00
Romain Guy
bb9908b828 Dispatch screen state change events to Views
Bug #6120957

Using this new callback, views can interrupt and resume their
animations or other periodic tasks based on the current state
of the display.

Change-Id: I398f4abd421e9c5f207107bf1009a7b92cf45daa
2012-03-08 15:05:12 -08: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
Romain Guy
731f018928 Merge "Fix the build" 2012-03-08 11:09:49 -08:00
Romain Guy
e0cf12fc4d Fix the build
Change-Id: Ia86ba9b1c432ab3f8107557e95b12c9eedc4d9f7
2012-03-08 11:08:31 -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
aeb17f17ff am 77fdcbff: am f038868d: am 44e63a21: Support rendering layout that use the new res-auto namespace.
* commit '77fdcbff8b458dd3430b38e60aee1a28ca92a738':
  Support rendering layout that use the new res-auto namespace.
2012-02-27 07:51:05 -08:00
Xavier Ducrohet
77fdcbff8b am f038868d: am 44e63a21: Support rendering layout that use the new res-auto namespace.
* commit 'f038868d74af534effceaa8f1d932f9576f4f647':
  Support rendering layout that use the new res-auto namespace.
2012-02-24 19:35:25 -08:00
Xavier Ducrohet
f038868d74 am 44e63a21: Support rendering layout that use the new res-auto namespace.
* commit '44e63a218cf8fcab9b4418246a512bd0b0c9157b':
  Support rendering layout that use the new res-auto namespace.
2012-02-24 19:32:47 -08:00
Xavier Ducrohet
44e63a218c Support rendering layout that use the new res-auto namespace.
Change-Id: I9b89c965dc8c9458e74c15ab8ff765e16e1b32c2
2012-02-24 19:29:31 -08:00
Dianne Hackborn
cb581bbe2e resolved conflicts for merge of 34706a4c to master
Change-Id: I4dd24f3b917aa7e3d2c4b0fae51e951dfcf88ba8
2012-02-24 16:37:35 -08:00
Dianne Hackborn
34706a4c81 am e65a9ab1: am 5786f5cf: Merge "Fix build." into ics-mr1
* commit 'e65a9ab1ea42d1f6190bee844ee666b7910d71ef':
  Fix build.
2012-02-24 16:26:57 -08:00
Dianne Hackborn
e65a9ab1ea am 5786f5cf: Merge "Fix build." into ics-mr1
* commit '5786f5cf1b248b79f938b3fa3c5d534159261f09':
  Fix build.
2012-02-24 16:24:40 -08:00
Dianne Hackborn
5786f5cf1b Merge "Fix build." into ics-mr1 2012-02-24 16:23:07 -08:00
Dianne Hackborn
b69b2c01b4 Fix build.
Change-Id: Id3262bff0df598ecc81a4346dee9febd3aaa60c9
2012-02-24 16:10:26 -08:00
Xavier Ducrohet
54c8c3d920 am b3c780f1: am 816b873d: Move the automatic namespace outside of the res namespace. do not merge.
* commit 'b3c780f16c37d2fb41a4eb211ea062b4c0b4e366':
  Move the automatic namespace outside of the res namespace. do not merge.
2012-02-23 18:44:16 -08:00