535 Commits

Author SHA1 Message Date
Christopher Tate
433830452d Don't NPE if a restore session is requested for an invalid transport 2009-07-13 15:17:13 -07:00
Suchi Amalapurapu
9ba6998b0b am ea5c0444: When apps switch between system and data partition the code and resource paths should also be updated based on which version is being picked up. update the code and resource paths when a path change is detected
Merge commit 'ea5c044412f6853d686e93b8bef07f4729b6ad26'

* commit 'ea5c044412f6853d686e93b8bef07f4729b6ad26':
  When apps switch between system and data partition the code and
2009-07-13 11:20:29 -07:00
Suchi Amalapurapu
ea5c044412 When apps switch between system and data partition the code and
resource paths should also be updated based on which version
is being picked up. update the code and resource paths when a path change
is detected
2009-07-13 10:57:50 -07:00
Android (Google) Code Review
48e61cf545 Merge change 6841
* changes:
  resolved conflicts for merge of 889c2d37 to master
2009-07-10 16:46:26 -07:00
Dianne Hackborn
54a26bc85f resolved conflicts for merge of 889c2d37 to master 2009-07-10 16:05:59 -07:00
Mike Lockwood
0900f36576 wifi: Keep the WLAN network interface up whenever wifi is enabled.
We now only bring it down briefly and bring it back up again when
we want to reset the interface.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-10 17:24:07 -04:00
Android (Google) Code Review
889c2d37f7 Merge change 6718 into donut
* changes:
  Fix bug #1873249i: Apps can DoS/brick device
2009-07-10 13:42:51 -07:00
Mike Lockwood
622f82a0c7 WifiService: Remove hidden AP counting logic for active/passive scanning mode.
Apparently this code was not 100% correct, and now the Wifi driver is responsible
for setting the scan mode to active for hidden networks, so this is no longer needed.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 23:39:01 -04:00
Dianne Hackborn
854060af30 Fix bug #1873249i: Apps can DoS/brick device
This is the problem where various things are listening for broadcasts
(such as battery status, PIN/PUK/Network) that an application can send
to cause harm to the system.

Solving this is tricky because many of these broadcasts are sticky,
and I have never figured out how to do permissions with sticky
broadcasts in a sane way.  So instead, I am going to punt on the
general problem and just brute force it:

There is new a way for system components to declare specific
broadcast actions to be protected, which means that only the system
and the phone can send them.  This is good enough for now.  None
of it is exposed in the public API so we can make something a little
less stupid in the future if we ever need to.
2009-07-09 18:14:31 -07:00
Android (Google) Code Review
6811355d96 am 463aacfb: Merge change 6661 into donut
Merge commit '463aacfbd220c9ef2f6ed915d54092289fdac05b'

* commit '463aacfbd220c9ef2f6ed915d54092289fdac05b':
  wifi: WifiManager.startScan() will now do passive scans by default.
2009-07-09 14:27:38 -07:00
Mike Lockwood
a5ec95cdb1 wifi: WifiManager.startScan() will now do passive scans by default.
Active scans will only happen if a hidden AP is in use, or if the new method
WifiManager.startScanActive() is called.
This fixes some audio playback problems with bluetooth A2DP.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 16:54:39 -04:00
Mike Lockwood
c2efaa4ab0 am ed760377: Add a persistent system property to disable the adb notification.
Merge commit 'ed7603779282d416356ce3c9739056d632307275'

* commit 'ed7603779282d416356ce3c9739056d632307275':
  Add a persistent system property to disable the adb notification.
2009-07-09 12:50:37 -07:00
Dianne Hackborn
e3f054411b resolved conflicts for merge of 2af632f8 to master 2009-07-09 12:15:46 -07:00
Mike Lockwood
ed76037792 Add a persistent system property to disable the adb notification.
Setting to persist.adb.notify to 0 will disable the ad notification.
You need to be root to set this, so this allows disabling the notification
only on eng and userdebug builds.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-09 14:24:42 -04:00
Dianne Hackborn
2af632f87d Add new <path-permission tag for use by global search.
This adds a new <path-permission> tag you can use inside of a <provide>
to define additional path-based permissions that broaden the global
read and write permissions.  The initial use for this will be global
search, so that a content provider that is protected by permissions
can make a part of itself available to global search under another
permission.  This addresses the issue with global search not being able
to request permissions it would need of providers it doesn't know
about at build time.
2009-07-08 18:08:13 -07:00
Android (Google) Code Review
afefa49abc am 4af0a709: Merge change 6555 into donut
Merge commit '4af0a709ee08e8ae43f49d8fc5c9cae142aaf2c4'

* commit '4af0a709ee08e8ae43f49d8fc5c9cae142aaf2c4':
  Make it so the notification manager doesn't mysteriously
2009-07-08 17:30:05 -07:00
Android (Google) Code Review
4af0a709ee Merge change 6555 into donut
* changes:
  Make it so the notification manager doesn't mysteriously beep during boot.
2009-07-08 17:09:54 -07:00
Joe Onorato
302754801c Make it so the notification manager doesn't mysteriously
beep during boot.
2009-07-08 17:09:14 -07:00
Mitsuru Oshima
c3f60ddaea am 1ecf5d28: Re-implementation of large screen support using window manager. * added background filler surface to fill the outer rim. Using the same layer as dim surface because they never co-exists (in the same window) * clean up the obsolete code in Compatibilt
Merge commit '1ecf5d28817f0a051e77488380dcd5bc622ea169'

* commit '1ecf5d28817f0a051e77488380dcd5bc622ea169':
  Re-implementation of large screen support using window manager.
2009-07-08 15:59:16 -07:00
Mitsuru Oshima
1ecf5d2881 Re-implementation of large screen support using window manager.
* added background filler surface to fill the outer rim. Using the same layer as dim surface because
   they never co-exists (in the same window)
 * clean up the obsolete code in CompatibiltyMode/ViewRoot for support large screen support.
2009-07-08 15:21:30 -07:00
Android (Google) Code Review
61e1d0021a am 1bd3e0fb: Merge change 6504 into donut
Merge commit '1bd3e0fb7e87f1daa983d06bc396393a788181b0'

* commit '1bd3e0fb7e87f1daa983d06bc396393a788181b0':
  Don't invoke the transport if doBackup supplied no data
2009-07-08 13:55:58 -07:00
Christopher Tate
b407f22c9d Don't invoke the transport if doBackup supplied no data
If there's no data to be backed up, we no longer invoke the transport.  We *DO*
still require that the agent have emitted a valid new state file, however.

This change also finally uncomments the code that removes the backup data file
after it has been sent to the transport, so there will be no more
packagename.data files lying around in the staging area.
2009-07-08 13:52:50 -07:00
Android (Google) Code Review
9046fff201 am 7b68a408: Merge change 6426 into donut
Merge commit '7b68a408e9261a170c5ab9ae7ef999cc1d92ae0e'

* commit '7b68a408e9261a170c5ab9ae7ef999cc1d92ae0e':
  Remove a lot of debug-log verbosity
2009-07-07 16:38:59 -07:00
Christopher Tate
22b60d8fd0 Remove a lot of debug-log verbosity
We now log in dataChanged() only when an app is added to the backup set (and
*not* if it redundantly asks to be added after it's already there) and on error.
2009-07-07 16:36:02 -07:00
Christopher Tate
ea9f8a4d88 am a7de3845: Only write to the pending-backup journal when necessary
Merge commit 'a7de3845507b7bf57a2c7b26fb08f05b193697d6'

* commit 'a7de3845507b7bf57a2c7b26fb08f05b193697d6':
  Only write to the pending-backup journal when necessary
2009-07-07 14:53:56 -07:00
Christopher Tate
a7de384550 Only write to the pending-backup journal when necessary
We now only commit to the pending-backup journal on disk the first time that a
given package is added to the backup set.  This avoids a lot of write thrashing
of the disk, particularly since Settings tends to call dataChanged() a great
many times during boot, while the Settings UI is in use, etc.
2009-07-07 14:50:26 -07:00
Android (Google) Code Review
c5ae493b84 am c4cf22e8: Merge change 6403 into donut
Merge commit 'c4cf22e82ba8ec4eec7051ae3a8eb397ded578d1'

* commit 'c4cf22e82ba8ec4eec7051ae3a8eb397ded578d1':
  Fix the metadata-available test during restore
2009-07-07 14:31:19 -07:00
Christopher Tate
3d7cd13e77 Fix the metadata-available test during restore 2009-07-07 14:23:07 -07:00
Android (Google) Code Review
f93a7c88e5 am c1c44a56: Merge change 6363 into donut
Merge commit 'c1c44a5614c4ab7aaf5315f92dc1c8f6420c8f1c'

* commit 'c1c44a5614c4ab7aaf5315f92dc1c8f6420c8f1c':
  LocationManagerService: Use Context.checkCallingOrSelfPermission for permission checks
2009-07-07 11:25:26 -07:00
Android (Google) Code Review
c1c44a5614 Merge change 6363 into donut
* changes:
  LocationManagerService: Use Context.checkCallingOrSelfPermission for permission checks
2009-07-07 11:02:04 -07:00
San Mehat
856d080ae5 am 0310f9aa: WifiService: Fix build (missing import)
Merge commit '0310f9aa21ed8714acbe56afea061596fb8f1ac4'

* commit '0310f9aa21ed8714acbe56afea061596fb8f1ac4':
  WifiService: Fix build (missing import)
2009-07-07 10:52:51 -07:00
San Mehat
0310f9aa21 WifiService: Fix build (missing import)
Signed-off-by: San Mehat <san@google.com>
2009-07-07 10:50:39 -07:00
San Mehat
a15dd950e5 am fa6c7111: WifiService: use wifi association state to determine if we should suspend wifi instead of the existance of an IP address.
Merge commit 'fa6c7111fe58e09a92741c7655221c3629d3220e'

* commit 'fa6c7111fe58e09a92741c7655221c3629d3220e':
  WifiService: use wifi association state to determine if we should suspend wifi instead of
2009-07-07 10:19:56 -07:00
Mike Lockwood
b7e9922722 LocationManagerService: Use Context.checkCallingOrSelfPermission for permission checks
so other services running in the system process can use the location manager.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-07 13:18:21 -04:00
San Mehat
fa6c7111fe WifiService: use wifi association state to determine if we should suspend wifi instead of
the existance of an IP address.

Signed-off-by: San Mehat <san@google.com>
2009-07-07 09:41:39 -07:00
Android (Google) Code Review
48f7d85d7b am dbee95ca: Merge change 6317 into donut
Merge commit 'dbee95cacff9d2faf30638e64abe26fbeb128787'

* commit 'dbee95cacff9d2faf30638e64abe26fbeb128787':
  Make enable/provisioning of the backup service a two-step process
2009-07-06 18:26:42 -07:00
Christopher Tate
8031a3df2f Make enable/provisioning of the backup service a two-step process
This CL adds the concept of 'provisioned' to the backup manager.  No backups
will be scheduled until the user has indicated that backups are to be enabled
*and* has clicked all the way through the setup wizard.

When the user first turns on the backup system, the delay before the initial
backup pass is different from the periodic backup interval.  Currently that
initial delay is 12 hours.  The intent here is to guess at a less-active time
for performing that first backup pass.

NOTE: currently the backup service defaults to 'provisioned'.  Once the real
code goes live in Setup Wizard, this will be changed to default to
not-provisioned until the user has confirmed all the relevant UI.
2009-07-06 17:43:03 -07:00
Android (Google) Code Review
a370b84883 am 8d07c068: Merge change 6305 into donut
Merge commit '8d07c0684619b6c30f525d25d92835254a7220a9'

* commit '8d07c0684619b6c30f525d25d92835254a7220a9':
  Fix up permissions for 'dumpsys backup'
2009-07-06 16:00:27 -07:00
Christopher Tate
34ebd0e1bb Fix up permissions for 'dumpsys backup' 2009-07-06 15:44:54 -07:00
Amith Yamasani
47873e5526 Backup Wifi supplicant data.
WifiService requests a backup when it writes wifi configuration to disk.
Backup the wifi supplicant file when settings provider runs backup.
2009-07-06 14:28:06 -07:00
Android (Google) Code Review
48c3064718 am 0d725f7d: Merge change 6162 into donut
Merge commit '0d725f7d5a7efd9dc63f6ddb67a619d659bb4428'

* commit '0d725f7d5a7efd9dc63f6ddb67a619d659bb4428':
  Hold a wakelock during backup/restore/clear operations
2009-07-06 12:43:28 -07:00
Android (Google) Code Review
0d725f7d5a Merge change 6162 into donut
* changes:
  Hold a wakelock during backup/restore/clear operations
2009-07-06 11:54:34 -07:00
Christopher Tate
b6787f2ee5 Hold a wakelock during backup/restore/clear operations
We need to make sure we stay alive for the duration of a backup or (especially)
restore operation.  The existing Handler-based timing system was simply not
properly functional, so it's been retooled to use a repeating alarm delivering a
broastcast PendingIntent to our registered receiver.

We acquire a partial wake lock in the broadcast receiver [i.e. while the Alarm
Manager is holding one for the duration of broadcast delivery] and pass the
wakelock object to the backup thread, which eventually releases it when it's
finsihed operations.  A similar pattern is used for the threads handling restore
and clear.
2009-07-06 11:49:49 -07:00
Chung-yih Wang
58c714c41a am 699ca3f2: Add password field for WiFi configuration.
Merge commit '699ca3f2518360ea3250ff5a0e5d39e122c64a91'

* commit '699ca3f2518360ea3250ff5a0e5d39e122c64a91':
  Add password field for WiFi configuration.
2009-07-06 11:22:18 -07:00
Android (Google) Code Review
4753ff4466 am 7e8cbfc2: Merge change 6143 into donut
Merge commit '7e8cbfc2bc3ea2334c38db7fd2b6a1e17eefcac6'

* commit '7e8cbfc2bc3ea2334c38db7fd2b6a1e17eefcac6':
  Fix the simulator.
2009-07-06 11:17:12 -07:00
Android (Google) Code Review
3d20432649 am e15df401: Merge change 6132 into donut
Merge commit 'e15df4017c3625de700e9f9953073f38898bbc89'

* commit 'e15df4017c3625de700e9f9953073f38898bbc89':
  If we can't get the restore set's metadata, don't continue
2009-07-06 11:16:58 -07:00
Android (Google) Code Review
3042bb6238 am 9701b3d5: Merge change 5979 into donut
Merge commit '9701b3d594868bd6750d5887af560c6295ea091b'

* commit '9701b3d594868bd6750d5887af560c6295ea091b':
  Remove the constraint to assign new uid when code path changes for system packages
2009-07-06 11:02:59 -07:00
Christopher Tate
f77b4112ea am 4e3e50cf: Clean up the last two literal permission string usages
Merge commit '4e3e50cfa7cf02270ed0dd454d5c51bf7065bd14'

* commit '4e3e50cfa7cf02270ed0dd454d5c51bf7065bd14':
  Clean up the last two literal permission string usages
2009-07-06 11:02:55 -07:00
Android (Google) Code Review
0a04ca7c97 am 7c5ae202: Merge change 6104 into donut
Merge commit '7c5ae202c53be1ab4881a6811aa5bd091c3aef10'

* commit '7c5ae202c53be1ab4881a6811aa5bd091c3aef10':
  Add a "clear backed-up data" method to the backup mechanism
2009-07-06 11:02:50 -07:00
Patrick Scott
18dd5f0d25 Improve the Vibrator service by keeping track of multiple vibration requests.
There are 2 types of vibrations: simple and repeated. Simple vibrations run for
a given length of time while repeated patterns run until canceled or the calling
process dies.

If a vibration is currently running and another request is issued, the newer
request always takes precedence unless the current vibration is a simple one and
the time left is longer than the new request.

If a repeating vibration is running and a new request overrides that vibration,
the current vibration is pushed onto a stack. Once the new vibration completes,
the previous vibration resumes. IBinder tokens are used to identify Vibration
requests which means that multiple calls to Vibrator.vibrate with the same
Vibrator object will override previous vibrations on that object.
2009-07-06 08:31:33 -04:00