1077 Commits

Author SHA1 Message Date
satok
688bd47fcc Add an api to switch to the next IME and subtype
Bug: 5975302

Change-Id: I48aa4220159c65f456d61a324efcdf0a1ceec91c
2012-02-10 16:44:12 +09:00
Dianne Hackborn
1644c6d7f4 Only generate private symbols that are needed.
Change-Id: Icc4c86638db8429a387bf87c934cc712f807e213
2012-02-07 12:57:50 -08:00
Xavier Ducrohet
c8a0b8e6bc Fix a setBackgroundDrawable in layoutlib.
Change-Id: Id5f3ec8cc6863fa5929743ef4014c331633efce9
2012-02-06 17:29:19 -08:00
Xavier Ducrohet
b1f95c6a93 am 331bb0c3: Setup ActionBars in layoutlib the same way the platform does it. do not merge.
* commit '331bb0c393d5e2ea2485102dcddbb8c2d42654d2':
  Setup ActionBars in layoutlib the same way the platform does it. do not merge.
2012-02-06 16:42:56 -08:00
Xavier Ducrohet
331bb0c393 Setup ActionBars in layoutlib the same way the platform does it. do not merge.
Instead of using a simple ImageView for the icon, this uses the platform
layout/action_bar_home which uses a custom class to position and resize
the icon (and also supports the Up icon that we don't yet support).

This ensures that the icon is properly positionned and sized like
on devices.

(cherry picked from commit 7396348dfcfb45b7ad055f4c18cabbe5e8270d26)

Change-Id: Ifd3bc318089b70ba843519523e366e59d434e919
2012-02-06 16:40:03 -08:00
Xavier Ducrohet
7396348dfc Setup ActionBars in layoutlib the same way the platform does it.
Instead of using a simple ImageView for the icon, this uses the platform
layout/action_bar_home which uses a custom class to position and resize
the icon (and also supports the Up icon that we don't yet support).

This ensures that the icon is properly positionned and sized like
on devices.

Change-Id: I57432afa82d257bb043247001320b368045d7f55
2012-02-06 15:11:12 -08:00
Xavier Ducrohet
3d4db0dc18 am c205a9d6: am f8aea993: Make aapt ignore tools-related data.
* commit 'c205a9d68c23e9ade2cbe28bba0f257d84d23a97':
  Make aapt ignore tools-related data.
2012-02-06 11:42:50 -08: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
edc3c65387 Merge "Make aapt ignore tools-related data." 2012-02-06 10:57:40 -08:00
Jeff Brown
ec99f609cc Merge "Rename CancellationSignal using preferred spelling." 2012-02-02 18:50:55 -08:00
Jeff Brown
4c1241df8f Rename CancellationSignal using preferred spelling.
Bug: 5943637
Change-Id: I12a339f285f4db58e79acb5fd8ec2fc1acda5265
2012-02-02 18:02:16 -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
Xavier Ducrohet
46d43ccfd8 Make Layoutlib compile on Java 6.
Change-Id: Ic8f0e321c6c218de83664fc01f253a07fa80852c
2012-02-02 17:45:45 -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
Jeff Brown
2d2d7d6f42 Merge "Implement a cancelation mechanism for queries." 2012-01-27 17:37:24 -08:00
Jeff Brown
75ea64fc54 Implement a cancelation mechanism for queries.
Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object.  The application
creates a CancelationSignal object and passes it as an argument
to the query.  The cancelation signal can then be used to cancel
the query while it is executing.

If the cancelation signal is raised before the query is executed,
then it is immediately terminated.

Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
2012-01-27 17:33:21 -08:00
Dianne Hackborn
d96e3dfa02 Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc.
Change-Id: I519d6cdc527a402d93b98df17a64fc1da52ad598
2012-01-25 15:14:50 -08:00
Jim Miller
d3fe9abfb9 am ab9601cd: am 230a7092: Merge "Fix 5863053: Add method to lock screen immediately." into ics-mr1
* commit 'ab9601cdbb95ae94088750eff9a926a572c1a4d6':
  Fix 5863053: Add method to lock screen immediately.
2012-01-20 15:48:21 -08:00
Romain Guy
d2f0dcd182 Merge "Remove unused code" 2012-01-19 17:42:10 -08:00
Romain Guy
68fc1dfce0 Remove unused code
Change-Id: Ife0a43f3cfe64a1e74401b10bf74d37cbeefb5af
2012-01-19 17:41:39 -08:00
Jean-Baptiste Queru
12b7da6995 am 6df477be: Merge "Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)"
* commit '6df477be186233e36fc370c4d2db6c1ed928a740':
  Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
2012-01-19 17:26:12 -08:00
Jean-Baptiste Queru
f3f650db96 am a826f9e2: Merge "Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)"
* commit 'a826f9e2c4f6329d8d48c927f6e942e78ffaf92f':
  Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
2012-01-19 17:26:08 -08:00
Jean-Baptiste Queru
08d3c6e5ba am 4f367f33: Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)"
* commit '4f367f3387887c538c81c34cc8becaea6fa5e430':
  Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
2012-01-19 17:26:03 -08:00
Jean-Baptiste Queru
7ae84204c1 am ba7f0d2a: Merge "Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)"
* commit 'ba7f0d2a03643ce429421b81febf18fd50473070':
  Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
2012-01-19 17:25:58 -08:00
Jean-Baptiste Queru
97aa8ee811 Merge ee4618bc
Change-Id: Ie1dc6ad38e7c30636d80f6caef11cf6673144940
2012-01-19 17:18:25 -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
Xavier Ducrohet
5bf2802ad9 Fix broken drawCircle LayoutLib.
Change-Id: I5e23bbe0119e385fa2f77854a8f88128351d3759
2012-01-18 17:08:53 -08:00
Jim Miller
93c518e4f8 Fix 5863053: Add method to lock screen immediately.
This fixes a bug where the device fails to lock when DevicePolicyManagerService
requests the device to be locked and the screen was off because the user hit
the power button.

The change allows DPMS to directly invoke screen lock, bypasssing the screen state.

Change-Id: Iecdda6fc61e9c519119de495be23c69c3b983921
2012-01-17 18:11:05 -08:00
Jeff Brown
5aa73ae58f Improve heuristics for orientation detection.
1. Except as otherwise indicated, orientation change happens once
   the predicted rotation has been stable for 40ms.  Noise is
   suppressed by a low-pass filter with a 200ms time constant which
   seems to be about as small as is practical given the quality
   of the sensor data.

2. If the magnitude exceeds a threshold (excessive noise or freefall),
   resets the predicted orientation.
   Doesn't happen very often even when shaking the device.
   This heuristic mainly protects the detector from spurious tilt due
   to inaccurate determination of the gravity vector.

3. If the device was previously in a flat posture (on a table for at
   least 1000ms), then it must move out of that posture for at least
   500ms before the next orientation change will happen.
   This heuristic suppresses most spurious rotations that happen while
   picking up the device.

4. If the device is tilted away from the user by 20 degrees within
   a span of 300ms, the device is said to be swinging and at least
   300ms must elapse after the device stops swinging before the
   next orientation change will happen.
   This heuristic suppresses some but not all spurious rotations that
   happen while putting down a device.  Unfortunately, this heuristic
   sometimes triggers a false positive when turning the device very
   rapidly due to accelerometer noise.  The 300ms pause is a compromise
   so that occasional mispredicted swings don't significantly delay
   the rotation.

Bug: 5796249
Change-Id: Id7b36c4c563e35b70d6a7ac36d04f3c3d6ea5811
2012-01-17 17:07:10 -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
Steve Block
6215d3ff4b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-04 20:05:49 +00:00
Steve Block
5baa3a62a9 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-01-03 22:38:27 +00:00
Joe Onorato
44fcb83b38 Add a new ui mode for "appliance"
The idea is that this is a device which is more-or-less headless.  It
might have some limited interaction capabilities, but it's not something
that you want to rely on having.

Change-Id: Ib92f53a120bf83de781728011721a4859def7d9f
2011-12-15 16:16:14 -08:00
Raphael
7c3bef85da Merge "AAPT fix printf %zd crash on Windows". Do not merge.
There's no printf %zd on Mingw/Cygwin so the verbose
printf crashes aapt.

SDK bugs: 20395, 20986

Bug: 5742142

(cherry picked from commit f51125d8429ffa71c57ba6fbdca9effc72642a9b)

Change-Id: I7545734ce8ce4a1f3e95f8a255daa8a909f870a1
2011-12-11 13:59:02 -08:00
Kenny Root
063a44e541 Add aapt support for implicitly-granted permissions
Bug: 2363582
Bug: 2877343
Change-Id: Iff7b496fb845e45fe1be2317089a96f7d63ed223
2011-12-08 08:46:34 -08:00
Tor Norbye
e98ae0a050 Merge "Upgrade layoutlib generation code to use ASM 4.0" 2011-12-06 13:31:04 -08:00
Jeff Brown
96e942dabe Use a Choreographer to schedule animation and drawing.
Both animations and drawing need to march to the beat of
the same drum, but the animation system doesn't know
abgout the view system and vice-versa so neither one
can drive the other.

We introduce the Choreographer as a drummer to keep
everyone in time and ensure a magnificent performance.

This patch enabled VSync based animations and drawing by
default.  Two system properties are provided for testing
purposes to control the behavior.

"debug.choreographer.vsync": Enables vsync based animation
timing.  Defaults to true.  When false, animations are
timed by posting delayed messages to a message queue in
the same way they used to be before this patch.

"debug.choreographer.animdraw": Enables the use of the animation
timer to drive drawing such that drawing is synchronized with
animations (in other words, with vsync or the timing loop).
Defaults to true.  When false, layout traversals and drawing
are posted to the message queue for execution without any delay or
synchronization in the same way they used to be before this patch.

Stubbed out part of the layoutlib animation code because it
depends on the old timing loop (opened bug 5712395)

Change-Id: I186d9518648e89bc3e809e393e9a9148bbbecc4d
2011-12-05 16:39:59 -08:00
Tor Norbye
f7270ba908 Upgrade layoutlib generation code to use ASM 4.0
Change-Id: I46b3854a05677dc7cadd217efb001dbb25631fbd
2011-12-05 14:26:04 -08:00
Dianne Hackborn
c0b7f65ae0 am 496f6e2a: am b54980d1: Merge "Fix issue #5588689: Black camera preview after coming back from gmail" into ics-mr1
* commit '496f6e2ad656c5bb8a277e191554d16abd290b58':
  Fix issue #5588689: Black camera preview after coming back from gmail
2011-11-28 16:57:17 -08:00
Dianne Hackborn
6d05fd3c79 Fix issue #5588689: Black camera preview after coming back from gmail
Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window.  This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
2011-11-28 14:45:50 -08:00
Tor Norbye
8836c55818 Set theme-tag in render log when failing to find style
Change-Id: I20461a7113eb25469deca13dca870936bdb33a29
2011-11-01 11:51:20 -07:00
Raphael
f51125d842 AAPT fix printf %zd crash on Windows.
There's no printf %zd on Mingw/Cygwin so the verbose
printf crashes aapt.

SDK bugs: 20395, 20986

Change-Id: I5b8ac36749263205a19f1448b1aaca90d5a2e06d
2011-10-27 17:11:21 -07:00