101 Commits

Author SHA1 Message Date
Romain Guy
0a63716ed0 Modify the base gestures API to use streams instead of files. Adds new wrappers to easily load/save gestures from files, resources, etc. Do the same for the letters recognizer. 2009-05-29 14:43:54 -07:00
Bjorn Bringert
761e0918d3 Unmap memory in MemoryFile.close().
As reported in http://b/issue?id=1398215 MemoryFile did not
munmap(2) the ashmem region after closing it. This
causes the process to leak virtual address space.

This change fixes the problem by calling munmap(2) in
close(). The unmapping is done by a helper method deactivate().
The change also replaces the use of an int for the
file descriptor with a FileDescriptor object to
make sure that we keep track of when the file descriptor
has been closed. I chose to implement it this way because I
will need decativate() and a FileDescriptor object in an
upcoming change that allows sending MemoryFile file
descriptors between processes.

The change also adds a number of tests for the behavior
of close(). The testCloseRead() and testCloseWrite() fail
with the old MemoryFile implementation, and testCloseLeak()
causes a segfault. They all pass now.
2009-05-29 13:28:14 +01:00
Android (Google) Code Review
511a0134e1 Merge change 2302 into donut
* changes:
  added SmsMessage ConcatRef parsing validation
2009-05-25 23:23:18 -07:00
Romain Guy
82f3495b14 Cleanup Gestures API and make it easier to use in 3rd party apps. Also fix the events processing in the gestures overlay mechanism. Give better control of the various properties of the overlay through XML attributes. 2009-05-24 23:45:03 -07:00
Romain Guy
380cd96e5d Fix the build 2009-05-22 07:32:41 -07:00
Romain Guy
d6a463a9f2 Add a new API to ListView: setGestures(int). This allows developers to enable gestures to jump inside the list or filter it. This change also introduces a new XML attribute to control this API. It also adds the ability to theme the GestureOverlayView from the gestures library. Finally, this adds a new VERSION header to the binary format used to store the letters for the recognizer. 2009-05-22 01:59:59 -07:00
Tammo Spalink
550885d158 added SmsMessage ConcatRef parsing validation
addresses bugs:
http://b/issue?id=1870607
http://b/issue?id=1688238

and prior perforce commit:
http://s9/?change_num=136189
2009-05-22 13:38:35 +08:00
Romain Guy
db567c390b Move the Gestures API to the framework in android.gesture. 2009-05-21 18:12:56 -07:00
Yang Li
ac6a4b8eab Renamed setGestureType in GestureLibrary 2009-05-21 16:08:35 -07:00
Romain Guy
b6d99b7d17 Modify how GestureLibrary stores its data. The XML format is now replaced by a more efficient binary format which should speed up saving/loading. The format is very similar to the one used by the letters recognizer. The format is documented in GestureLibrary.java. 2009-05-21 15:26:46 -07:00
Android (Google) Code Review
aeed1816b7 Merge change 2219 into donut
* changes:
  Updated LetterRecognizer & related gesture recognition code - added personalization for letter recognizer
2009-05-21 15:03:57 -07:00
Yang Li
e6ea003ab6 Updated LetterRecognizer & related gesture recognition code
- added personalization for letter recognizer
2009-05-21 14:47:59 -07:00
Guang Zhu
73f60763cb Fixed SD card access permission issue in manifest
On branch b1869634_sdcard_perm
 Changes to be committed:
   (use "git reset HEAD <file>..." to unstage)

	modified:   tests/DumpRenderTree/AndroidManifest.xml
2009-05-21 14:44:58 -07:00
Romain Guy
7269d9ac10 Tweak the Gestures Overlay demo. This shortens the fade duration to make it more usable and also adds a longer pause before the fade. This change also introduce a new compile-time setting to decide whether or not the overlay should steal the events from the underlying ListView. It is now off by default, per discussion with hackbod. It feel a little bit better but it may vary from user to user so studies will be necessary. 2009-05-20 16:58:44 -07:00
Romain Guy
c534727972 First pass at cleaning up the gestures code. 2009-05-20 15:10:45 -07:00
Joe Onorato
d2110dbce0 Hook up the backup data writer, and add a utility to read the backup data files. 2009-05-20 11:24:20 -07:00
Android (Google) Code Review
5bc21aa067 Merge change 1127 into donut
* changes:
  SmsHeader rewrite, in preparation for migration to public API.
2009-05-19 19:52:07 -07:00
Tammo Spalink
64c499113a SmsHeader rewrite, in preparation for migration to public API.
See http://b/issue?id=1751571

Changes the semantics of SmsHeader from containing only opaque data
to exposing occurs-once frequently-used fields together with a list
of opaque fields.  Also changes the coding to and from byte array to
be symmetrical, whereas previous encoding had an extra length field.

Cdma SmsMessage -- cleanup of code paths along with adjustments to
match the new header semantics, which should address at least some
of the issues with concatenated messages.  See http://b/issue?id=1809759
2009-05-20 09:27:10 +08:00
Android (Google) Code Review
12bb9471cb Merge change 1936 into donut
* changes:
  Recovered the code of the gesture library
2009-05-19 10:32:01 -07:00
Bjorn Bringert
5615d35b28 Add tests for the new SQLite _TOKENIZE() 'tag' column. 2009-05-19 09:53:38 +01:00
Android (Google) Code Review
15e74b9da8 Merge change 1939 into donut
* changes:
  Temporarily suppress flaky test LocationManagerProximityTest until test harness support can be rolled out.
2009-05-18 19:34:33 -07:00
Brett Chabot
78a1c9067f Temporarily suppress flaky test LocationManagerProximityTest until test harness support can be rolled out. 2009-05-18 19:15:09 -07:00
Yang Li
35aa84b1f9 Recovered the code of the gesture library 2009-05-18 18:29:05 -07:00
Android (Google) Code Review
1058c63b26 Merge change 1909 into donut
* changes:
  Fixed IndexOutofBoundException, improved how memory information is captured (run GC first)
2009-05-18 15:18:17 -07:00
Guang Zhu
2a197b128a Fixed IndexOutofBoundException, improved how memory information is captured (run GC first) 2009-05-18 14:37:23 -07:00
Android (Google) Code Review
6342d3936a Merge change 1575 into donut
* changes:
  Change _TOKENIZE tests to test the new token_index column
2009-05-17 12:44:38 -07:00
Yang Li
935fd37d27 Revert "Squashed commit of the following:"
This reverts commit f8173411cc612017ecfa115d71fb823b0714d982.
2009-05-15 16:51:46 -07:00
Android (Google) Code Review
e85bb9ebcc Merge change 1823 into donut
* changes:
  Add the backup data file writer C++ class.
2009-05-15 15:36:32 -07:00
Joe Onorato
2e1da32203 Add the backup data file writer C++ class. 2009-05-15 18:20:19 -04:00
Yang Li
f8173411cc Squashed commit of the following:
commit db1a75ffc2d5a811a8d983289dd4d0d9f2eeba5c
Author: Yang Li <liyang@google.com>
Date:   Fri May 1 17:49:29 2009 -0700

    Fixed a few more styles issues and made some methods package private

commit f9735c3f1bbe6183337df226aa730b4be1225d55
Author: Yang Li <liyang@google.com>
Date:   Fri May 1 16:38:16 2009 -0700

    - Refactored the code for Android coding styles and performance
    - Renamed GesturePad to GestureOverlay
    - Added GestureAdapter for default touch-through interactions of GestureOverlay
    - Added a new exmaple, ContactListGestureOverlay, to show how to gesture over an arbitary view

commit 31050183c6d85091612f53155126c2488b920e32
Author: Yang Li <liyang@google.com>
Date:   Wed Apr 29 18:41:54 2009 -0700

    Refactored the Gesture Library (An initial check-in).
2009-05-15 13:55:56 -07:00
Joe Onorato
4535e40544 Implement the C++ class to write the backed up file data. 2009-05-15 10:37:10 -04:00
Bjorn Bringert
819e3f2148 Change _TOKENIZE tests to test the new token_index column
The SQLite _TOKENIZE function has been changed to use a third
column, token_index. This commit adds tests for the
_TOKENIZE token_index column, and for the source column,
which was previously untested.
2009-05-15 12:03:32 +01:00
svetoslavganov
75986cf9bc Accessibility feature - framework changes (replacing 698, 699, 700, 701 and merging with the latest Donut) 2009-05-14 23:47:05 -07:00
Joe Onorato
290bb011c5 Get the backup calling through to the file backup helper.
This includes some cleanup to make the parameters match
between BackupService.onBackup and FileBackupHelper.performBackup.
2009-05-14 09:39:32 -04:00
Joe Onorato
8ad028117d With this, the BackupService onBackup method is called.
It took a bunch of refactoring inside BackupManagerService,
which is unfortunately all temporary anyway, but it unblocks
a bunch of stuff.
2009-05-13 01:41:44 -04:00
Guang Zhu
4010ac35b1 added reliability test usding DumpRenderTree 2009-05-11 20:09:37 -07:00
Jorg Pleumann
b4735b6c04 am 25f9637: AI 148665: Disabling a test that does not work as
Merge commit '25f963753ea762c12c74c0dcb861b023ac92177a' into donut

* commit '25f963753ea762c12c74c0dcb861b023ac92177a':
  AI 148665: Disabling a test that does not work as
2009-05-11 00:39:55 -07:00
Jorg Pleumann
25f963753e AI 148665: Disabling a test that does not work as
expected on a device with a SIM.
  BUG=1657996

Automated import of CL 148665
2009-05-11 00:36:52 -07:00
Joe Onorato
c825d3ebd6 fix the sim build. disables the tests for now. 2009-05-08 09:33:19 -07:00
Joe Onorato
b1a7ffef3a More backup tests 2009-05-07 15:32:48 -07:00
Mike Lockwood
7f7840b41e CoreTests: Fix LocationManagerProximityTest.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-07 13:29:59 -04:00
Romain Guy
d90a33111b Add new setTag(int, Object) API to allow applications to specify several tags. 2009-05-06 16:49:56 -07:00
Bjorn Bringert
a92041306e Refactor SearchableInfo.
- Removes the mSearchable field which was only
  for communication between the constructor and
  getActivityMetaData().
- Removes the badge and query rewriting fields,
  since their values can be efficiently computed
  on the fly.
- Makes all the other public fields private and adds getters
  for them.
- Makes all fields final, except mActionKeys.
- Removes the DBG_INHIBIT_SUGGESTIONS_CONSTANT.
  I don't see why we would every want that, and it
  complicated making the fields final.
- Makes all fields in ActionKeyInfo final.
- Makes all fields in ActionKeyInfo private and adds getters.
- Removes the use of ActioKeyInfo.mKeyCode for failure
  signalling. Uses IllegalArgumentException instead.
- Replaces the ad hoc linked list for looking up
  action keys by a HashMap. This is needed to
  make the fields in ActionkeyInfo final, and also avoids O(N)
  lookup in the (unlikely) case that an activity
  has lots of action keys.
- Don't throw exceptions when reading searchable
  meta-data, since that could crash SearchManagerService.
- Adds debug logging.
2009-05-06 13:54:42 +01:00
Tammo Spalink
d2b124f97c new cdma sms unit tests (from QC on-site test) 2009-05-06 15:05:45 +08:00
Android (Google) Code Review
be3ac2d5ba Merge change 1040 into donut
* changes:
  Add a test app for the backup
2009-05-05 18:58:05 -07:00
Android (Google) Code Review
4488b11c51 Merge change 1039 into donut
* changes:
  Add some C++ code to do raw files for backup
2009-05-05 18:58:01 -07:00
Joe Onorato
f9225f89aa Add a test app for the backup 2009-05-05 18:34:31 -07:00
Dianne Hackborn
231cc608d0 Rewrite SyncStorageEngine to use flat files and in-memory data structures.
The previous implementation used a database for storing all of its state, which could cause
a significant amount of IO activity as its tables were updated through the stages of a sync.
This new implementation replaces that in-memory data structures, with hand-written code
for writing them to persistent storage.

There are now 4 files associated with this class, holding various pieces of its state that
should be consistent.  These are everything from a main XML file of account information that
must always be retained, to a binary file of per-day statistics that can be thrown away at
any time.  Writes of these files as scheduled at various times based on their importance of
the frequency at which they change.

Because the database no longer exists, there needs to be a new explicit interface for
interacting with the sync manager database.  This is provided by new APIs on IContentService,
with a hidden method on ContentResolver to retrieve the IContentService so that various
system entities can use it.  Other changes in other projects are required to update to the
new API.

The goal here is to have as little an impact on the code and functionality outside of
SyncStorageEngine, though due to the necessary change in API it is still somewhat extensive.
2009-05-05 15:40:53 -07:00
Joe Onorato
3ad977b41c Add some C++ code to do raw files for backup 2009-05-05 13:45:25 -07:00
Guang Zhu
b933f669e2 Back-merge all changes done in master to DumpRenderTree to donut. 2009-05-05 01:02:14 -07:00