283 Commits

Author SHA1 Message Date
Christopher Tate
959a4bcc46 am b1d790b: Pass null as savedState to indicate a full backup is require
Merge commit 'b1d790b63e2115be558d451efbc914d1f8dfa846'

* commit 'b1d790b63e2115be558d451efbc914d1f8dfa846':
  Pass null as savedState to indicate a full backup is required
2009-05-06 15:49:00 -07:00
Android (Google) Code Review
37dbf09917 am 9a6f250: Merge change 1089 into donut
Merge commit '9a6f25033c51390cbcc4eec38f27e0ac35e97f1c'

* commit '9a6f25033c51390cbcc4eec38f27e0ac35e97f1c':
  Add a Backup Manager interface to request a full backup
2009-05-06 15:48:59 -07:00
Christopher Tate
b1d790b63e Pass null as savedState to indicate a full backup is required 2009-05-06 12:38:21 -07:00
Christopher Tate
4675812386 Add a Backup Manager interface to request a full backup
Given a package name, the Backup Manager schedules a *full* (i.e. non-
incremental) backup pass for that package.  Also added the state-file
handling for distinguishing to the target between the full and incremental
backup requests.
2009-05-06 11:24:27 -07:00
Michael Chan
e96440fa15 AI 148368: Decrease CPU usage by throttling touch events
We are decreasing CPU usage at the cost of event latency. Events are queued up
  and released to the app at the specified rate. You can
  experiment with different values via:
  adb shell setprop windowsmgr.max_events_per_sec 35
  The new value is picked up when you let go and retouch the screen. No
  reboot needed.
  Also the following changes were made after profiling:
  - In WindowManagerService, limit the call to userActivity() when we
  have a flood touch events.
  - In PowerManagerService, skip checking of permission if the caller
  is system user.
  - In PowerManagerService, integrated the functionality of gatherState()
  into reactivateWakeLocksLocked(). They loop through the same data
  structure and are called back to back.
  BUG=1692771

Automated import of CL 148368
2009-05-06 10:27:36 -07:00
Dianne Hackborn
7a13559501 merged 231cc608d06ffc31c24bf8aa8c8275bdd2636581 2009-05-06 00:28:37 -07:00
Android (Google) Code Review
39a8bb2632 am 3ed8b3d: Merge change 1018 into donut
Merge commit '3ed8b3dc42800068951332aea024f9737c25a0ed'

* commit '3ed8b3dc42800068951332aea024f9737c25a0ed':
  If no battery stats are found, return status_unknown
2009-05-05 16:18:25 -07:00
Android (Google) Code Review
dccc39b17a Merge change 777 into donut
* changes:
  Rewrite SyncStorageEngine to use flat files and in-memory data structures.
2009-05-05 16:17:25 -07:00
Android (Google) Code Review
3ed8b3dc42 Merge change 1018 into donut
* changes:
  If no battery stats are found, return status_unknown
2009-05-05 16:15:53 -07:00
Rebecca Schultz Zavin
e7e6fa3fbf If no battery stats are found, return status_unknown
If the battery files can't be found return status_unkown instead of an
error.  On systems where we haven't brought up battery stats yet they
assume the battery is dead and turn off as soon as the runtime starts

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-05-05 16:15:36 -07:00
Christopher Tate
17ac18e280 am f417247: Further development of backup file handling
Merge commit 'f417247fa68524f2f34960f7389168eed7eb4a88'

* commit 'f417247fa68524f2f34960f7389168eed7eb4a88':
  Further development of backup file handling
2009-05-05 16:14:39 -07:00
Christopher Tate
f417247fa6 Further development of backup file handling
Put backup data in flight into /cache
    Close the files and delete the intermediates after backup pass
2009-05-05 15:50:03 -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
Christopher Tate
3cbab32afe am 22b8787: Squashed commit of the following:
Merge commit '22b8787ed4be8d4b7ed5d54802f9913fedb41425'

* commit '22b8787ed4be8d4b7ed5d54802f9913fedb41425':
  Squashed commit of the following:
2009-05-05 10:51:45 -07:00
Christopher Tate
22b8787ed4 Squashed commit of the following:
Author: Christopher Tate <ctate@google.com>
Date:   Mon May 4 16:38:11 2009 -0700

    IBackupService now passes ParcelFileDescriptors rather than int fds

    The outlines of backup state file / data file handling are now in place as well
    in the BackupManagerService.

Author: Christopher Tate <ctate@google.com>
Date:   Thu Apr 30 12:40:19 2009 -0700

    Hide the backup stuff for now

    Also adjust based on comments:
    + changed service intent string to conform to usage guidelines
    + only publish the IBackupService binder when invoked with the right
      intent action
    + docs tweaks
2009-05-04 20:19:21 -07:00
Android (Google) Code Review
176ef2dfa4 am 1ab6e21: Merge change 909 into donut
Merge commit '1ab6e21237fc9f436be002d4f3821fce963a0a2a'

* commit '1ab6e21237fc9f436be002d4f3821fce963a0a2a':
  Let screenOrientation="behind" works as expected
2009-05-04 17:20:31 -07:00
Owen Lin
3413b8983a Let screenOrientation="behind" works as expected 2009-05-01 19:31:33 -07:00
Mike Lockwood
e90c0da675 am 275555c: location: Add support for location providers outside of the
Merge commit '275555c8eb3fb5df6e7320873b88b77cdde85a9e'

* commit '275555c8eb3fb5df6e7320873b88b77cdde85a9e':
  location: Add support for location providers outside of the system process.
2009-05-01 12:39:03 -07:00
Mike Lockwood
275555c8eb location: Add support for location providers outside of the system process.
Also added new permissions android.permission.INSTALL_LOCATION_PROVIDER
and android.permission.INSTALL_LOCATION_COLLECTOR to the public API.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-01 15:06:31 -04:00
Mike Lockwood
ac7a3de471 am 15e3d0f: location: Use ILocationProvider Binder interface for all loc
Merge commit '15e3d0f082d551f8819fbe4b0d502cc108627876'

* commit '15e3d0f082d551f8819fbe4b0d502cc108627876':
  location: Use ILocationProvider Binder interface for all location providers.
2009-05-01 05:26:44 -07:00
Mike Lockwood
15e3d0f082 location: Use ILocationProvider Binder interface for all location providers.
This change eliminates the LocationProviderImpl class which had been used
for location providers running in the system process.
Now the LocationProvider base class is only used to implement the
LocationManager.createProvider() method for retrieving provider information.
Added a new IGpsStatusProvider interface for providers that serve GPS status.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-01 08:24:47 -04:00
Fred Quintana
718d8a2d7f decouple SyncAdapter from ContentProvider 2009-04-30 17:28:09 -07:00
Android (Google) Code Review
171fd53213 am 2cd006c: Merge change 837 into donut
Merge commit '2cd006c8f927d3e364c32f946b844377bdc56d3e'

* commit '2cd006c8f927d3e364c32f946b844377bdc56d3e':
  Make the home screen come up in the simulator.
2009-04-30 17:03:26 -07:00
Marco Nelissen
54796e7405 Make the home screen come up in the simulator. 2009-04-30 15:16:30 -07:00
Android (Google) Code Review
171134a0e2 am 021dce4: Merge change 811 into donut
Merge commit '021dce4198afbf602109ba5807a193c437b05361'

* commit '021dce4198afbf602109ba5807a193c437b05361':
  Add android.backup.BackupManager
2009-04-30 12:34:10 -07:00
Christopher Tate
a8bf815c61 Add android.backup.BackupManager
Also tweak the dataChanged() api to have the client supply a package name.  We
don't necessarily TRUST this, but we use it to narrow the set of packages requesting
a backup pass, no longer blithely scheduling a pass for all packages associated
with the caller's uid.
2009-04-30 11:36:21 -07:00
Christopher Tate
f8997690da am 487529a: First baby steps towards settings backup
Merge commit '487529a70cd1479ae8d6bbfb356be7e72542c185'

* commit '487529a70cd1479ae8d6bbfb356be7e72542c185':
  First baby steps towards settings backup
2009-04-29 15:16:57 -07:00
Christopher Tate
487529a70c First baby steps towards settings backup
This change adds a sketched outline of the backup system architecture, with
all of the major pieces represented other than client-side helpers for
specific types of data.  IBackupManager and BackupService are public so that
we can write test apps against SDK-domain symbols from the outset.

What code exists in this change hasn't been tested and may crash.  It's the
beginnings of the real implementation but of course is barely begun.
2009-04-29 14:49:30 -07:00
Android (Google) Code Review
212548f634 am 76b25e5: Merge change 692 into donut
Merge commit '76b25e5e78dde3443f9c57c47e5989ad8ff43771'

* commit '76b25e5e78dde3443f9c57c47e5989ad8ff43771':
  location: Optimize use of mProviders ArrayList.
2009-04-29 13:35:38 -07:00
Mike Lockwood
73ee32d41b am b8adcad: location: Remove obsolete fake provider support.
Merge commit 'b8adcad61d9225ecdabde1a01b73455f484cbed7'

* commit 'b8adcad61d9225ecdabde1a01b73455f484cbed7':
  location: Remove obsolete fake provider support.
2009-04-29 13:35:34 -07:00
Mike Lockwood
05d0243296 am 79762a3: location: Move DummyLocationProvider.java and LocationProvid
Merge commit '79762a3ee34eb8be5549bcb183af844b6f19c266'

* commit '79762a3ee34eb8be5549bcb183af844b6f19c266':
  location: Move DummyLocationProvider.java and LocationProviderImpl.java to the internal package.
2009-04-29 13:35:34 -07:00
Android (Google) Code Review
7c8dbb5418 am 7cb8ed2: Merge change 414 into donut
Merge commit '7cb8ed23ab81b7cffdff6fc1cad473f55732ea66'

* commit '7cb8ed23ab81b7cffdff6fc1cad473f55732ea66':
  location: Run LocationManagerService in a separate thread.
2009-04-29 13:35:34 -07:00
Android (Google) Code Review
093dda9dec am 5fa1533: Merge change 482 into donut
Merge commit '5fa153302c1c7f179bfd6ddd301e7526b8c06de5'

* commit '5fa153302c1c7f179bfd6ddd301e7526b8c06de5':
  location: Location Manager wakelock cleanup, phase 2
2009-04-29 13:35:22 -07:00
Android (Google) Code Review
137b0c9d64 am 0b8ffd1: Merge change 460 into donut
Merge commit '0b8ffd17bc6641fc522db3e842a868b6cdbf6d82'

* commit '0b8ffd17bc6641fc522db3e842a868b6cdbf6d82':
  More optimization of dumpsys output.
2009-04-29 13:11:27 -07:00
Mike Lockwood
662ea09a71 location: Optimize use of mProviders ArrayList.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 21:38:06 -04:00
Mike Lockwood
b8adcad61d location: Remove obsolete fake provider support.
Now that we have GPS support in the emulator and public APIs for mock providers,
the fake provider support is no longer needed.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 13:23:57 -04:00
Mike Lockwood
79762a3ee3 location: Move DummyLocationProvider.java and LocationProviderImpl.java to the internal package.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 12:42:08 -04:00
Mike Lockwood
3d12b51ee3 location: Run LocationManagerService in a separate thread.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 07:28:33 -04:00
Mike Lockwood
48f1751822 location: Location Manager wakelock cleanup, phase 2
Remove two second timeout for wakelock when broadcasting events to
location listeners. Instead, hold wakelock until receipt of the event
is acknowledged, either via a Binder call or the
PendingIntent.OnFinished interface.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-23 19:27:41 -07:00
Android (Google) Code Review
0b8ffd17bc Merge change 460 into donut
* changes:
  More optimization of dumpsys output.
2009-04-22 18:33:57 -07:00
Dianne Hackborn
1d442e0d99 More optimization of dumpsys output.
There are three major classes of changes here:

- Avoid writing lines where their values are often empty, false, or some other typical thing.
- Use partial writes to the PrintWriter to avoid creating temporary strings.
- Use StringBuilder where we need to generate real String objects (and where possible cache the result).
2009-04-22 18:03:21 -07:00
Jean-Baptiste Queru
74008f608a Merge donut into master 2009-04-22 17:12:34 -07:00
Mike Lockwood
a0e3cd3853 Fix timing problem that was introduced when we removed location provider polling
The wake lock was not being held until after we enabled location tracking,
so the check to see if the wake lock was held before propogating a
new location prevented us from receiving a network location as soon as we
enabled the provider.
This check is not necessary anyway, so this change removes it.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 21:27:33 -07:00
Mike Lockwood
9ce7217c8e location: Remove support for a message that never actually gets sent.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 20:18:41 -07:00
Mike Lockwood
61fc286e8f location: Remove unnecessary code that monitors the screen on/off state.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 20:02:52 -07:00
Android (Google) Code Review
3ea1f8759d Merge change 372 into donut
* changes:
  WifiService: Cleanup parsing of wifi scan results.
2009-04-21 15:12:25 -07:00
Mike Lockwood
b30475ecef WifiService: Cleanup parsing of wifi scan results.
Also add support for possitive RSSI values, fixing b/1786306

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 13:55:07 -07:00
Mike Lockwood
6de3154674 location: Add some null pointer checks.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 12:13:35 -07:00
Android (Google) Code Review
31d40ab260 Merge change 360 into donut
* changes:
  location: Location Manager wakelock cleanup, phase 1
2009-04-21 09:40:38 -07:00
Mike Lockwood
e2b44c5aaf location: Location Manager wakelock cleanup, phase 1
Move cell and wifi lock from LocationManagerService to NetworkLocationProvider

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 09:38:18 -07:00