83 Commits

Author SHA1 Message Date
Nick Kralevich
631500ef58 Move VelocityTracker.cpp to target build only
VelocityTracker.cpp makes reference to property_get, which
doesn't make a lot of sense when compiling for the host.
Compile this file for the target only.

Keyboard.cpp: Remove unnecessary include file.

Change-Id: Iee9edd81953b2e7e815005770ce286a6ec586f20
2013-05-21 15:04:14 -07:00
Mathias Agopian
1f5762e646 libutils clean-up
Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
2013-05-07 17:09:46 -07:00
Bjorn Bringert
fb903a45d7 Allow compiling aapt for the device
Changes:

- The static device version of libandroidfw now includes
  the extra functions needed by aapt. I could only find
  a few host tools that use the static library, so this is
  hopefully not a problem.

- The pseudolocalization code is moved into aapt.
  It was previously in libhost, but only used by aapt.

Change-Id: Ib393ebb7dcebee8abbb628cbe5255ea1679674ac
2013-04-26 15:07:09 +01:00
Dianne Hackborn
c51d050f1b Maybe fix issue #8620910: Win_sdk build failed and unable to create...
...the sdk platform repo

Change-Id: Ib6cd7c0dfb9b6217ae79af3e2ac25fe0442996e3
2013-04-15 15:36:53 -07:00
Dianne Hackborn
f7be4800df Add new resources trace, also trace apk dex loading.
Change-Id: Ia48566efb21ee018659bd976ddb3a0f4997b9a3a
2013-04-12 14:53:10 -07:00
Michael Wright
bdb706e48d Merge "Pipe through device resolution information" into jb-mr2-dev 2013-04-05 21:43:31 +00:00
Jeff Brown
1951ce86c2 Correctly manage the lifecycle of IME InputChannels.
InputChannels are normally duplicated when sent to a remote process
over Binder but this does not happen if the recipient is running within
the system server process.  This causes problems for KeyGuard because the
InputMethodManagerService may accidentally dispose the channel
that KeyGuard is using.

Fixed the lifecycle of InputChannels that are managed by the IME
framework.  We now return a duplicate of the channel to the application
and then take care to dispose of the duplicate when necessary.
In particular, InputBindResult disposes its InputChannel automatically
when returned through Binder (using PARCELABLE_WRITE_RETURN_VALUE).

Bug: 8493879
Change-Id: I08ec3d13268c76f3b56706b4523508bcefa3be79
2013-04-04 22:45:12 -07:00
Michael Wright
c6091c64c9 Pipe through device resolution information
Bug: 8424494
Change-Id: Iafeeee0d5cd29342c1cdc86b9616222aaa5d1b94
2013-04-04 18:10:37 -07:00
Christopher Tate
294b512eca DO NOT MERGE - Full backup/restore now handles OBBs sensibly
OBB backup/ restore is no longer handled within the target app
process.  This is done to avoid having to require that OBB-using
apps have full read/write permission for external storage.

The new OBB backup service is a new component running in the
same app as the already-existing shared storage backup agent.
The backup infrastructure delegates backup/restore of apps'
OBB contents to this component (because the system process
may not itself read/write external storage).

From the command line, OBB backup is enabled by using new
-obb / -noobb flags with adb backup.  The default is noobb.

Finally, a couple of nit fixes:

- buffer-size mismatch between the writer and reader of chunked
  file data has been corrected; now the reading side won't be
  issuing an extra pipe read per chunk.

- bu now explicitly closes the transport socket fd after
  adopting it. This was benign but triggered a logged
  warning about leaked fds.

(Cherrypicked)

Change-Id: I471f6348abcccb7bf1e1710b7beda9f23de53e14
2013-03-08 15:08:10 -08:00
Kenny Root
893df066bb am 8dda0956: am 49999acb: Merge "StreamingZipInflater: fix mmap\'d end of read"
* commit '8dda0956b6565a958989af44e885b94dc9bfc9bd':
  StreamingZipInflater: fix mmap'd end of read
2013-02-21 16:24:41 -08:00
Kenny Root
c6e35cb47a StreamingZipInflater: fix mmap'd end of read
When reaching the end of a mmap'd segment, it was erroneously trying to
read more data. This is because we were reading data one character at a
time, so we never reached the Z_STREAM_END result without going through
the loop once more.

Bug: https://code.google.com/p/android/issues/detail?id=39041
Change-Id: I6c53b8187384a42217c32112d6a0c2857f471109
2013-02-15 11:05:48 -08:00
Jeffrey Brown
6b7fcc8f67 am 75701e8f: am 7eb4db35: am b9185fd1: Merge "Fix PointerCoords Parcel incorrectly storing values as Int32"
# By Ilya Polenov
# Via Android Git Automerger (2) and Gerrit Code Review (2)
* commit '75701e8fc92285680637f69e0f004741919ddc10':
  Fix PointerCoords Parcel incorrectly storing values as Int32
2013-02-06 20:56:07 -08:00
Jeffrey Brown
7eb4db3593 am b9185fd1: Merge "Fix PointerCoords Parcel incorrectly storing values as Int32"
# By Ilya Polenov
# Via Gerrit Code Review
* commit 'b9185fd1ffd85239e3ab10ab34cb9d8508970fb4':
  Fix PointerCoords Parcel incorrectly storing values as Int32
2013-02-06 20:50:17 -08:00
Michael Wright
1df477acf6 Add initial plumbing for brightness keys
Change-Id: I595e8a25e6c245e4b22f06df9a8acdbb75e4b041
2013-02-01 16:29:59 -08:00
Ilya Polenov
716f7b3f5e Fix PointerCoords Parcel incorrectly storing values as Int32
PointerCoords stores its values as float and its Parcel should
do the same. Wrong behaviour may be noticed when MotionEvent is
injected using Instrumentation method sendPointerSync. All its
PointerCoords values(size, orientation, pressure, etc) will be
casted to integer omitting their decimal part. This fix addresses
this issue.

Change-Id: Ifa3dfce4d5c2e6c060852f4208cb5684e827c7e6
Signed-off-by: Ilya Polenov <daioptych@gmail.com>
2013-01-30 10:15:00 +00:00
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