168 Commits

Author SHA1 Message Date
Elliott Hughes
81cfb63e9f am d13b23a4: Merge "Revert "fix potential memory leak""
* commit 'd13b23a436075262cc83f7502f7159de24546003':
  Revert "fix potential memory leak"
2013-01-03 18:47:37 -08:00
Elliott Hughes
767e1c010c am 9aac0c1b: Merge "fix potential memory leak"
* commit '9aac0c1b35ec666a18f320be99e6aa37d0bcf202':
  fix potential memory leak
2013-01-03 18:47:32 -08:00
Elliott Hughes
957efcdc73 Revert "fix potential memory leak"
This reverts commit bc268b9014f211910e412a7fda96b6394ff2badc

Change-Id: I07f49bd0cfecc43bc761d2b0635c9915a8e30272
2013-01-03 17:38:57 -08:00
Sungmin Choi
bc268b9014 fix potential memory leak
use delete before return

Change-Id: I5449ad90bb6910f057bd825b722c9803a7343c34
2013-01-04 09:56:18 +09:00
Christopher Tate
eea47240b0 am 4b0ed017: Merge "BackupHelpers: Fix Typo"
* commit '4b0ed0178de2c9c21bd5514671b8b4282f6a03db':
  BackupHelpers: Fix Typo
2012-12-17 11:02:04 -08:00
You Kim
8b2e2c8abc BackupHelpers: Fix Typo
delete --> free

Change-Id: Idbf7e677f8cc4a9a9d04e58b5cf7d0f1589c5211
2012-12-17 03:36:10 +09:00
Fabrice Di Meglio
5780e19680 am 5c0d6f99: am 9de88dad: Merge "Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale" into jb-mr1.1-dev
* commit '5c0d6f9980ed4684cbeefc28036dd9eeac474375':
  Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale
2012-12-13 12:33:35 -08:00
Fabrice Di Meglio
3509935919 Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale
aapt is not generating the correct CONFIG_LAYOUTDIR bit when a Drawable has a
LTR and RTL version. It was generating instead the wrong CONFIG_SCREEN_LAYOUT bit.

This was linked to the fact that the layout direction bits are contained into the
screen layout bit.

So now make sure that we are generating the correct CONFIG_LAYOUTDIR bit.

Change-Id: If17c84d31e6c128721ed97ee6711660b131bf941
2012-12-12 11:52:03 -08:00
Kenny Root
be37b5fa24 Merge "Free resources in correct order in ResStringPool::uninit" 2012-11-14 09:33:49 -08:00
Kenny Root
58b99bf1d8 am 82634313: Merge "Reject bad ResXMLTree::setTo calls"
* commit '826343138dfd8666d2263dd82bfdbf657fc1881e':
  Reject bad ResXMLTree::setTo calls
2012-10-12 23:57:38 -07:00
Kenny Root
32d6aef11a Reject bad ResXMLTree::setTo calls
Bug: http://code.google.com/p/android/issues/detail?id=21838
Change-Id: I1092499906f0cafe5a3c42ab2579edf3763cedb7
2012-10-10 10:25:06 -07:00
Chris Dearman
a1d82ff393 Free resources in correct order in ResStringPool::uninit
mOwnedData contains the mHeader data structure

Change-Id: I0ae9ba3a0d18fc3f368c629501fadebce8807198
2012-10-08 12:32:53 -07:00
Christopher Tate
49bbbf2c1c am d87cb794: am 0cd3c976: Merge "Settings (and general) restore fixes" into jb-mr1-dev
* commit 'd87cb794b063c503f4d732141904bd1edd5c5914':
  Settings (and general) restore fixes
2012-10-04 19:40:38 -07:00
Christopher Tate
5067685ccf Settings (and general) restore fixes
Pro tem, we ignore wifi configuration data when restoring system settings.
This is not ideal, but it *does* mean we do not bounce wifi off and on
again during the extended restore process, which in turn means we don't
interfere with things like the Play Store's download of applications.
We do continue to back up wifi configuration, and will start using that
data again when the new implementation that restores AP configurations
without having to bounce wifi comes to pass.

Also, this CL fixes a longstanding bug in BackupDataInput.skipEntityData()
that was being reproduced reliably once settings restore was skipping
the wifi-related entities in the restore stream.

Bug 7249405

Change-Id: I61520a9a116b66ebdf95734d09d9afd46406df01
2012-10-04 19:10:11 -07:00
Kenny Root
f0771b192c am cee11240: am 07b4339b: Merge "Change androidfw tests to native test target"
* commit 'cee1124052202c7f2a1956a54e5aa538d82197a7':
  Change androidfw tests to native test target
2012-10-02 13:10:59 -07:00
Kenny Root
f3f286df4d Change androidfw tests to native test target
Change the androidfw tests to the BUILD_NATIVE_TEST target so they end
up in the correct directory. Also remove the module tags and C include
paths. The include paths are automatically added when the library is
used.

Change-Id: Ia47f6c25130c5068b89d6dc067e5d9c714a6d08a
2012-10-02 11:54:01 -07:00
Fabrice Di Meglio
8a802dbdab Use "ldrtl" and "ldltr" config qualifiers for RTL / LTR resources
- we cannot use "rtl" / "ltr" qualifiers as they can conflict with ISO-639 Alpha-3
codespace which uses 3 letters for identifying a language code (and could use either
"rtl" or "ltr" strings for defining a language in the future).

- we are using instead "ldrtl" for RTL and "ldltr" for LTR resources. Those qualifiers
are defined by more than 3 chars and outside of what is defined into ISO-639. They
are also more understandable as "ld" prefix is for "layoutdirection"

Change-Id: Id43e948103707e09bef63ebd54ac1779dde58e72
2012-09-06 11:13:24 -07:00
Fabrice Di Meglio
5f79799939 Add support for "-rtl" in resources
- fix bug #7035019 Need to have "-rtl" support for Resource

Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
2012-08-23 14:55:33 -07:00
Mathias Agopian
69a3ce1eb1 libutils cleanup
Change-Id: Ic069539338ba4097dba9399904f02bbd0296c20e
2012-08-05 12:38:51 -07:00
Nick Kralevich
4b447b91de Add mode when open(O_CREAT) is used.
When creating a new file using open(..., O_CREAT), it is an error
to fail to specify a creation mode. If a mode is not specified, a
random stack provided value is used as the "mode".

This will become a compile error in a future Android change.

Change-Id: I8635e8b69587ed107253870d991c3fcf563ca876
2012-06-26 15:03:38 -07:00
Jeff Brown
78f04a364f am 51df04b9: Port the legacy velocity tracker strategy.
* commit '51df04b93e8e362edd867abd7efaf1659b8b8b82':
  Port the legacy velocity tracker strategy.
2012-06-04 13:13:34 -07:00
Jeff Brown
ba58221769 am a5b06982: Implement a second order integrating VT strategy.
* commit 'a5b0698231459ac5b54cf8e8952ac5c2b2b2198b':
  Implement a second order integrating VT strategy.
2012-06-04 13:13:30 -07:00
Jeff Brown
2fd6baef59 am 18f329e9: Implement a weighted least squares VelocityTracker strategy.
* commit '18f329e9480fca75210bb7496e5b4bc987b4ad8f':
  Implement a weighted least squares VelocityTracker strategy.
2012-06-04 13:13:27 -07:00
Jeff Brown
51df04b93e Port the legacy velocity tracker strategy.
For comparison purposes, port the legacy velocity tracker
algorithm as it behaved prior to ICS.

Bug: 6413587
Change-Id: I7e8e56584dcdb1a3c660ca9d8f9c5bd5d868e449
2012-06-04 12:34:03 -07:00
Jeff Brown
a5b0698231 Implement a second order integrating VT strategy.
Bug: 6413587
Change-Id: I51bc7b8cbff22b10b728fc84ee15370e9984dd55
2012-06-04 12:34:03 -07:00
Jeff Brown
18f329e948 Implement a weighted least squares VelocityTracker strategy.
No change to the default strategy.

Bug: 6413587
Change-Id: I08eb6f9a511e65ad637359b55b5993c26ba93b40
2012-06-04 12:34:03 -07:00
Jeff Brown
767bc6d26c am 1fbbc071: Merge "Implement an integrating VelocityTracker strategy." into jb-dev
* commit '1fbbc0716f9b70c6dcee00c4550757077ef7f7b5':
  Implement an integrating VelocityTracker strategy.
2012-06-03 21:19:16 -07:00
Jeff Brown
7d3fa093bb am f47e76e2: Merge "Make velocity tracker strategy configurable." into jb-dev
* commit 'f47e76e2c78e78e26110786e99548d718d177c32':
  Make velocity tracker strategy configurable.
2012-06-03 21:19:13 -07:00
Jeff Brown
53dd12a668 Implement an integrating VelocityTracker strategy.
This algorithm better tolerates certain kinds of errors in the
touch input than the least squares strategy but it may underestimate
the velocity of accelerating movements.  This algorithm is
mainly of interest as a baseline for testing and comparison with the
least squares algorithm, which remains the default.

Bug: 6413587
Change-Id: I8ddb50084e44875e234717907e5b06d03f59788c
2012-06-03 19:23:58 -07:00
Jeff Brown
9eb7d86181 Make velocity tracker strategy configurable.
This change is very useful for testing purposes because it makes it
easy to compare different implementations to see how they behave.

There is no change to the current default strategy.

Bug: 6413587
Change-Id: I4d8567aa4160571ba9fa397ce419882cd9366749
2012-06-03 19:21:49 -07:00
Jeff Brown
aebfdc231a am e4db99cf: Merge "Detect when pointer has stopped moving." into jb-dev
* commit 'e4db99cf87c47730e80dc1431f07f4f1062c648e':
  Detect when pointer has stopped moving.
2012-05-15 11:31:47 -07:00
Jeff Brown
634ec69aa9 am 08b544c7: Merge "Fix pointer indexing issue in VelocityTracker." into jb-dev
* commit '08b544c7be67343b10a4130611318b8273d06433':
  Fix pointer indexing issue in VelocityTracker.
2012-05-15 11:31:45 -07:00
Jeff Brown
7469f8bb94 am 47a4a50d: Merge "Improve touch event resampling." into jb-dev
* commit '47a4a50df09b5ab76ee06cb8845fe5a02952ec32':
  Improve touch event resampling.
2012-05-15 11:31:32 -07:00
Jeff Brown
e2ec70bf92 am 00ff4748: Merge "More VelocityTracker refactoring." into jb-dev
* commit '00ff47484f8137aa3e59f680ff07d2662cfb4088':
  More VelocityTracker refactoring.
2012-05-15 11:31:08 -07:00
Jeff Brown
90729403d5 Detect when pointer has stopped moving.
Some input devices do not generate ACTION_MOVE events while all
pointers have stopped, thereby lulling the VelocityTracker into
a false sense of complacency.  Before handling the following sample,
reset the VelocityTracker state so as not to be influenced by
earlier samples before the pointer stopped.  The velocity after
stopping is assumed to be discontinuous.

Bug: 6413587
Change-Id: I6387bc036ff141d083d3d17a89e37eeaa3188349
2012-05-14 18:57:05 -07:00
Jeff Brown
dcab190bd2 Fix pointer indexing issue in VelocityTracker.
VelocityTracker was implicitly assuming that the pointer ids in
a MotionEvent were ordered.  That is not necessarily the case
so we need to be careful while copying the pointer coordinates out.

Bug: 6413587
Change-Id: I3b23a954f893eebdf786f2a94207149b092ef036
2012-05-14 18:44:17 -07:00
Jeff Brown
7174a491bc Improve touch event resampling.
Fixed a few bugs related to the id-to-index mapping for
pointer coordinates.

Tightened the bounds on the resampling time interval to
avoid predicting too far into the future.

Only lerp X and Y components of motion events.

Alter the future to satisfy past predictions.  (Rewrite touch
events to conceal obvious discontinuities.)

Added a system property to control whether resampling is enabled
for debugging purposes.

Bug: 6375101
Change-Id: I35972d63278bc4e78148053a4125ad9abeebfedb
2012-05-14 18:31:53 -07:00
Jeff Brown
85bd0d6283 More VelocityTracker refactoring.
Bug: 6413587
Change-Id: Ida1152e7a34d5fe5caab5e6b5e1bc79f6c7a25e6
2012-05-13 16:10:57 -07:00
Jeff Brown
47272c932a am b12b6b51: Merge "Minor refactoring before starting on velocity tracker changes." into jb-dev
* commit 'b12b6b5116e3d76474296b45f570693bb10d6c99':
  Minor refactoring before starting on velocity tracker changes.
2012-05-11 14:06:30 -07:00
Jeff Brown
8a90e6e317 Minor refactoring before starting on velocity tracker changes.
Bug: 6413587
Change-Id: I5eba2bb57193bff78cb3740de5f87aca0b31d154
2012-05-11 12:32:56 -07:00
Jeff Brown
c3cca66404 am 0632b35b: Merge "Improve handling of built-in keyboard." into jb-dev
* commit '0632b35b6828cd4324b3d218c2e38f895e819aad':
  Improve handling of built-in keyboard.
2012-05-01 18:41:00 -07:00
Jeff Brown
daa3753a04 Improve handling of built-in keyboard.
The window manager policy made some incorrect assumptions about the
meaning of the Configuration.keyboard field.  We need to be more
careful about distinguishing between built-in and external keyboards.

Most of this change is to move the determination of the parts of
the Configuration related to input devices into the WindowManagerService
leveraging new features of the InputManagerService to good effect.

Then we plumb through the flag that indicates whether a device
is internal or external so that we can be more particular about
how the lid switch effects changes to the Configuration.

Bug: 6424373
Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
2012-05-01 16:34:20 -07:00
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
Jeff Brown
771526c88f Resample touch events on frame boundaries.
Bug: 6375101
Change-Id: I8774e366306bb2b6b4e42b913525bf25b0380ec3
2012-04-27 15:58:42 -07:00
Jeff Brown
8bca94ad83 More work on international keyboards.
Changed the English US keymaps to implement a strict US key map
with no additional ALT functions.

Fixed a bug copying the alias in the InputDevice copy constructor.

Added support for end of line comments in KCM and KL files.

Added the German keyboard layout.

Sorted the keys in the keyboard layout files by physical arrangement
to make it easier to maintain them.

Bug: 6110399
Change-Id: If44d83de5b98f2bf0016cbb8e12264387b286aaa
2012-04-23 16:12:32 -07:00
Jeff Brown
5bbd4b4f5f Get alias for Bluetooth devices.
Bluetooth devices can be renamed by the user.  Make the
input system aware of the user-specified name and transparently
pass it down to applications.  This enables the keyboard
layout picker Settings UI to use device names that are
consistent with what the user set in the Bluetooth UI.

Bug: 6363157
Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
2012-04-20 20:11:12 -07:00
Jeff Brown
9a2bbf680e Improve handling of certain keyboard layout properties.
Automatically choose a default value for the 'number' property
based on the characters that the key can generate.

Don't generate any character when ctrl, alt or meta is
pressed unless the behavior exactly matches the modifier keys
that are pressed.

Simplified the basic keyboard layouts taking into account the
new features.

Bug: 6110399
Change-Id: Ibc0f0b50c2dcf3f962a33ac77c24d2993b77637d
2012-04-18 15:01:57 -07:00
Jeff Brown
4a3862f6b0 Add Dvorak keyboard layout.
Added support for mapping both scan codes and HID usages to
KeyLayoutMap and KeyCharacterMap.  Keyboard overlays can
now influence how key events are mapped to key codes.

Bug: 6110399
Change-Id: I6619fd2d3e1337c55928f89869dbc45b535c7ccf
2012-04-17 18:50:05 -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