892 Commits

Author SHA1 Message Date
Christopher Tate
436344ae12 Turn off most of the backup-related debug logging
The core logging in BackupManagerService and in the Google backup transport are
still enabled at this point.

Change-Id: I10abfa565bbd1097dd3631051b6aca163e4af33a
2009-09-30 17:07:37 -07:00
Android (Google) Code Review
48e9a0dd66 Merge change Ice5e9209 into eclair
* changes:
  Fix issue #2150258: Suggestions become inactive and do not respond when pressed.
2009-09-30 18:47:45 -04:00
Suchi Amalapurapu
8550f25523 Check if rename of backed up file fails before persisting new changes.
If not these system services will end up with inconsistent settings files
when the device runs out of storage.
Delete mangled settings file in PackageManager if the current write fails
so that we don't end up overwriting the backed up version with the
mangled version
Include null check when retrieving fwd locked resource for an existing package
2009-09-30 15:36:29 -07:00
Dianne Hackborn
1bcf5a8a61 Fix issue #2150258: Suggestions become inactive and do not respond when pressed.
Change-Id: Ice5e920998fbe7eb1862f0ee7dca99876482b659
2009-09-30 15:22:29 -07:00
Dianne Hackborn
a33e3f7925 Fix issue #2154794: Force close when start facebook application.
I think when we were scanning the updated app in the system image,
from an older version on the data partition, we were not setting
the existing package to have the system flag, so not auto-granting
any new permissions.

This also includes some other cleanup in the package manager to
remove old files in various places, and tighten up logging.

Also similar logging cleanup elsewhere.

Change-Id: I6d113c7cf7e736ab9be512d6d7c94c806a24199a
2009-09-30 15:09:33 -07:00
Android (Google) Code Review
46e462a380 Merge change I852f8e46 into eclair
* changes:
  Only re-initialize backup state if @pm@ metadata is missing, to defensively work around a still-mysterious bug where the list of saved packages ends up being empty even though we still have state pending.  If we do re-initialize, then wipe all state to make sure the right thing happens.
2009-09-30 17:48:04 -04:00
Dianne Hackborn
dc6b635cfa Debugging for #2027266: app drawer showing up on the side
Nothing fixed, but this tells us what is going on.

Change-Id: I174d16a3864af2fa235e8cc7b1e74d32a375fb42
2009-09-30 14:28:16 -07:00
Dan Egnor
852f8e4660 Only re-initialize backup state if @pm@ metadata is missing,
to defensively work around a still-mysterious bug where the
list of saved packages ends up being empty even though we still
have state pending.  If we do re-initialize, then wipe all state
to make sure the right thing happens.

Don't keep open journal files -- close them after every update.
A bit less efficient, but possibly more reliable (again, this is
defensive programming here).  Also change "rwd" to "rws" mode
for fully synchronous operation.
2009-09-30 14:15:43 -07:00
Android (Google) Code Review
609c2c08d7 Merge change Ia54b1bf0 into eclair
* changes:
  - make SyncManager get the accounts list during the constructor,   which will allow syncs to be scheduled during bootup. The   providers need this so that they can potentially schedule   syncs while they are starting up. - make the SyncManager message handler wait until boot   has completed to start dispatching messages
2009-09-30 14:10:01 -04:00
Fred Quintana
e91ebe2be9 - make SyncManager get the accounts list during the constructor,
which will allow syncs to be scheduled during bootup. The
  providers need this so that they can potentially schedule
  syncs while they are starting up.
- make the SyncManager message handler wait until boot
  has completed to start dispatching messages
2009-09-30 11:06:25 -07:00
Robert Greenwalt
84612ea611 Add a delay to wifi driver stop on screen off.
We already had a delay if we were associated, but we have some race conditions
we think will be masked if we delay the driver stop for the other cases
too.  Don't wait as long (2 min instead of 15).

bug: 2147260
2009-09-30 09:04:22 -07:00
Dan Egnor
726247ca61 Better event log tracking for initializeDevice() requests --
on success, record "backup_initialize" event; on failure,
record "backup_transport_failure" event (and add tags to
"backup_transport_failure" events that aren't associated
with a particular package -- namely "(initialize)" and
"(finish)").
2009-09-29 20:39:01 -07:00
Christopher Tate
55f931a375 Add more useful-for-debug info to 'dumpsys backup'
Change-Id: I52e20bac01ff63feaf28920a79311881992293a3
2009-09-29 17:17:34 -07:00
Christopher Tate
b808a93932 Remove DEBUG-only logging in metadata backup agent
Change-Id: Ia75da053463249597b91ba629fd7a663cab1a07c
2009-09-29 16:10:55 -07:00
Android (Google) Code Review
a2f5afe6c6 Merge change I27009b08 into eclair
* changes:
  Fix EVDO SNR signal bar calculation
2009-09-29 00:35:55 -04:00
Dianne Hackborn
6b1cb352b8 Fix issue #2149126: unable to answer incoming call, various problems
Now that we can have a non-app-window cross-wallpaper animation,
we need to make sure to not access a null app token.

Change-Id: Ia00debd4b2b431d15bd074927a9035e1bc0a6445
2009-09-28 19:56:43 -07:00
Mike Lockwood
733fdf34b6 Disable keyguard while docked when the lock screen is insecure.
Change-Id: If6e11bb49a2cbbe904517e6037d1e8b99fe2717c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-28 19:21:07 -04:00
Dianne Hackborn
6af0d50a8e Fix issue #2149145: Safe Mode does not work on Sholes device
The APIs for checking whether keys are held down now also look
at virtual keys.

However it turns out there is less than a second between the time we
start the input thread and check for safe mode, so there is not enough
time to actually open all of the devices and get the data from them
about the finger being down to determine if a virtual key is down.

So now you can also hold DPAD center, trackball center, or s to
enter safe mode.  Also give some vibrator feedback.

Change-Id: I55edce63bc0c375813bd3751766b8070beeb0153
2009-09-28 13:40:45 -07:00
John Michelau
1336a56368 Fix EVDO SNR signal bar calculation
Bug: 2149249
Change-Id: I27009b083fab7a8cae7d3b74046f50235458dde0
2009-09-28 10:17:37 -07:00
Android (Google) Code Review
5fbbdf2a21 Merge change 27325 into eclair
* changes:
  Don't forget to clear "backup in progress" state when finishing a pass
2009-09-27 18:58:27 -04:00
Christopher Tate
a253f16cf8 Don't forget to clear "backup in progress" state when finishing a pass
If a backup pass had been skipped (either because the transport was unavailable
or -- in a common case! -- because there was simply no work pending when the
periodic backup check fired), we were forgetting to reset the "backup currently
in progress" flag.  Once we'd done that, the device would *NEVER* perform a
backup until it was rebooted, since it would forever think that there was one
currently in operation that must not be interfered with.

Change-Id: I0d6d7375dc6de99b599222a449934e70fe13ebb9
2009-09-27 15:16:44 -07:00
Android (Google) Code Review
ac939d086c Merge change 27291 into eclair
* changes:
  Fix issue #2148939: Sholes slow to wake up in landscape mode
2009-09-27 17:00:20 -04:00
Dianne Hackborn
7433e8aebd Fix issue #2148939: Sholes slow to wake up in landscape mode
This was introduced when I did the fading of the lock screen,
which relies on setting the policy visibility of the windows behind
it to be hidden.  As a result, when the orientation changed or
the activity was restarted, they wouldn't be resized or reported
as drawn, and the activity manager would wait until its timeout
before unfreezing the screen.

We now have a new method on WindowState to find out if a window
has drawn itself, which is used in the appropriate places.

Change-Id: If05f8b1947d3029917f62ad0f89b43544bd0a4dc
2009-09-27 13:21:20 -07:00
Mike Lockwood
d81b1f41e5 BatteryService: Specify low battery levels in resources.
Also trigger low battery when battery reaches the specified level
rather than when it drops below the level.

Fixes bug b/1788656

Change-Id: I81f5cbb9892fc6574320d92e153211f83c69f415
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-27 15:42:07 -04:00
Dianne Hackborn
039c68e756 The touch screen is probably a feature.
Also extend the feature APIs a bit.

Change-Id: I99e932d7f4e61edb0e20f75c55e9831e4b59a14d
2009-09-26 16:39:23 -07:00
Android (Google) Code Review
48c84052e2 Merge change 27162 into eclair
* changes:
  Fix Activity.overridePendingTransition().
2009-09-25 19:11:43 -04:00
Dianne Hackborn
8b571a817c Fix Activity.overridePendingTransition().
Change-Id: I4ce995bd58efbbedbe4d0d1e9e0d0f4a8e261843
2009-09-25 16:09:43 -07:00
Fred Quintana
6ecaff1583 add a optional String to the key of notifications to allow users
to scope them
2009-09-25 16:01:22 -07:00
Android (Google) Code Review
a0cad2f5d1 Merge change 27078 into eclair
* changes:
  Fix generic build boot sequence.
2009-09-25 14:40:27 -04:00
David 'Digit' Turner
4ef8ec3a21 Fix generic build boot sequence.
The TelephonyRegistry service crashed badly in the generic build, because
there is no system property to tell if the phone is GSM or CDMA. Adding a
simple null check solves the issue and allows the system to boot properly.
2009-09-25 11:33:24 -07:00
Dianne Hackborn
3b3e145d3c A variety of work on animations.
- The lock screen now fades in and out.
- Fixed a bug where we would accidentally freeze the screen when switching
  to an activity with a different orientation than the current (but
  the screen itself is in the current orientation).  This would mess up
  the animations on the car dock.
- New API to force a particular animation for an activity transition
  (untested).
- New wallpaper animations.
- Resources now uses the next API version when in a development build,
  to help applications being developed against such builds.

Change-Id: I2d9998f8400967ff09a04d693dc4ce55f0dbef5b
2009-09-25 00:48:02 -07:00
Android (Google) Code Review
fdf53a4628 Merge change 26935 into eclair
* changes:
  Fix bug 2129190 The context used by the status bar (i.e., the system context) was not properly initialized to have the right ApplicationInfo inside its PackageInfo. This eventually caused it to believe that it was running at 160dpi.
2009-09-25 00:45:23 -04:00
Mike Cleron
432b713c94 Fix bug 2129190
The context used by the status bar (i.e., the system context) was
not properly initialized to have the right ApplicationInfo inside
its PackageInfo. This eventually caused it to believe that it
was running at 160dpi.

Kudos to Dianne for figuring this out.
2009-09-24 21:41:19 -07:00
Christopher Tate
21ab6a5bdb Disallow concurrent backups; consult transport requestBackupTime()
* We now check for in-progress backups when asked to perform one, and don't
  bother firing off another one concurrently (nor do we adjust the scheduling;
  after all, someone asked to do a backup "now" and we're doing one, so we are
  in line with expectations).  We also defer backup passes while a restore is
  in flight, and abort attempts to perform a restore during a backup pass.

* When a backup attempt fails, we now ask the transport how far in the future we
  should put our retry.  Previously we were simply not bothering to consult with
  the transport, so we would wind up retrying backup while network connectivity
  was known to be down, etc.

Change-Id: Ic7758010b74e06e90c50d46b7b0dd01b17af7c90
2009-09-24 19:54:46 -07:00
Christopher Tate
4cc86e1ae8 Clear the device's data from the transport when backup is disabled
Turning off backup in the Settings UI constitutes an opt-out of the whole
mechanism.  For privacy reasons we instruct the backend to wipe all of the data
belonging to this device when the user does this.  If the attempt fails it is
rescheduled in the future based on the transport's requestBackupTime()
suggestion.  If network connectivity changes prompt the transport to indicate a
backup pass is appropriate "now," any pending init operation is processed before
the backup schedule is resumed.

The broadcasts used internally to the backup manager are now fully protected;
third party apps can neither send nor receive them.

(Also a minor logging change; don't log 'appropriate' EOF encountered during
parsing of a backup data stream.)
2009-09-24 11:19:04 -07:00
Dianne Hackborn
ffa424800d Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns off
Lot of infrastructure for more things to go away when "clear system dialogs"
happens, and now do this when we turn on the lock screen.

Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf
2009-09-23 23:17:07 -07:00
Android (Google) Code Review
ce60514221 Merge change 26717 into eclair
* changes:
  Newer animations.
2009-09-23 20:04:44 -04:00
Dianne Hackborn
5baba16989 Newer animations.
Change-Id: I1bb8e52f91dc60a6ec9496e2c66623bc8080b95d
2009-09-23 17:03:41 -07:00
Ken Shirriff
e21167a9e5 Fix widget stopListening NPE.
lookupHostLocked caller needs to check for null return value.
2009-09-23 16:43:34 -07:00
Dianne Hackborn
fed534ee5d Fix bug where onStartCommand() was never called with a null intent.
Also clean up some of the service java docs.

Change-Id: I40e7d713e2393f7ee1db9822da8f07fb6304a9e4
2009-09-23 00:42:12 -07:00
Dianne Hackborn
99f7eb453c Dock screen on config can now select AC or USB.
Change-Id: Ifae9af4eb0295ba8e46c65879440b0da543b18e6
2009-09-22 18:59:35 -07:00
Christopher Tate
b03b3bbd68 If backup fails, reenqueue all of the affected packages for next time. 2009-09-22 14:14:10 -07:00
Dianne Hackborn
9bfb707597 Various fixes and improvements to window, activity.
- New meta-data you can add to a dock activity to have it launched by the
  home key when the device is in that dock.

- Fix a deadlock involving ActivityThread's internal content provider lock.

- New window flag to have a non-secure keyguard entirely dismissed when a
  window is displayed.

- New WindowManagerPolicy APIs to allow the policy to tell the system when
  a change it makes during layout may cause the wall paper or
  overall configuration to change.

- Fix a bug where an application token removed while one of its windows is
  animating could cause the animating window to get stuck on screen.

Change-Id: I6d33fd39edd796bb9bdfd9dd7e077b84ca62ea08
2009-09-22 13:39:34 -07:00
Android (Google) Code Review
6c644f248f Merge change 26379 into eclair
* changes:
  Add parameter for the restore set (device id) data is being restored from to the restore_start event
2009-09-22 15:49:58 -04:00
Dan Egnor
313b29faaf Add parameter for the restore set (device id) data is being restored from to the restore_start event 2009-09-22 10:44:10 -07:00
Mike Lockwood
94db928d8c PowerManager: Require proximity sensor value be less than Sensor.getMaximumRange()
This allows us to support binary proximity sensors that only return 0.0 and 1.0

Change-Id: Ifaf3a4e6fc720cb246ac3558e3e733b4b612c95b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-22 00:20:10 -04:00
Android (Google) Code Review
9bbd5ee49f Merge change 26290 into eclair
* changes:
  Make IBackupTransport.finishBackup() also return an int code, since it too can return TRANSPORT_NOT_INITIALIZED (in fact that's typically how it comes).
2009-09-21 22:26:35 -04:00
Dianne Hackborn
fe2bddfae1 Don't wake up the screen as soon as the lid opens.
We may need to wait until the lock screen is ready.

Change-Id: Id114f4f37051680ab880056b4c989b1fa8aa02b3
2009-09-21 17:39:15 -07:00
Dianne Hackborn
bfe319e06a Turn animations on by default.
Add API to skip the animation for a particular start activity, so that
a latter better one can be used.

Fix Theme.NoDisplay to actually work.

Fiddle with various animations: don't do a different animation for task
switching, try a scale animation for switching in/out of the wallpaper.

Adjust the animation duration so that at normal speed we have something
more like the slower animation option (so slow is now the default).

Change-Id: Ieba9f3db0bd9a762a19b327a3ecccbc7b547893d
2009-09-21 17:26:41 -07:00
Dan Egnor
0144516e19 Make IBackupTransport.finishBackup() also return an int code, since it too can
return TRANSPORT_NOT_INITIALIZED (in fact that's typically how it comes).

For consistency, make other IBackupTransport methods return int instead of
boolean, and handle accordingly.

Make initializeDevice() its own method instead of a flag on performBackup().
This will be needed when un-checking the settings box anyway, and is
conceptually unrelated to whatever happens to be the first post-initialization
backup we perform.  (Note that even if the init is sent separately from the
backup operation, the server will remember that an init has been done and
will *not* return NOT_INITIALIZED for the subsequent backup.)

Fix LocalTransport accordingly (trivial changes).

Handle failures more robustly in BackupManagerService -- most notably,
doQueuedBackups() was ignoring the result code of processOneBackup(), so
a NOT_INITIALIZED error would go past unseen (at least until the next
backup pass).  Keep track of error code returns more universally now.
(This includes finishBackup(), of course.)
2009-09-21 17:04:05 -07:00