427 Commits

Author SHA1 Message Date
Jean-Michel Trivi
f4743a869d Merge "Fix bug 2481825 When TTS is synthesizing to a file, return an error if the file cannot be created." 2010-03-09 10:31:30 -08:00
Suchi Amalapurapu
a2b6c3775e Add conditions to check for updated system applications. Restrict them
to internal flash only even before we copy.

Return error codes when install flag options mismatch.
Some conditions for existings apps
 - install flags override existing location
 - explicity manifest option install location overrides previous location
 - if upgraded package's install location is unspecified or auto, fall
   back to recommended install policy which considers user setting as well.

Check for sdcard status before finding available size on sdcard
Add light weight parsing for manifest attributes including package name and
install location only

Change-Id: I5143dda87c88c595f564b317326c926d0ec3ceb8
2010-03-09 09:24:35 -08:00
Brad Fitzpatrick
1bd62bd3ca Cache hot settings in-memory in the SettingsProvider.
This brings down Settings lookups to 0.5 ms on sholes.  (down from
~10.5 ms originally, and ~2.5 ms after the ContentProvider.call()
interface)

Change-Id: Ibde7c3d21e0b0e5714714a2075f314726edfc19d
2010-03-08 22:20:43 -08:00
Jean-Michel Trivi
b21651c10c Fix bug 2481825
When TTS is synthesizing to a file, return an error if the file
cannot be created.
2010-03-08 16:45:00 -08:00
Amith Yamasani
156c435455 Move lockscreen settings to secure table to prevent tampering. b/2343673
Migrate old settings to secure on upgrade.
2010-03-08 15:42:48 -08:00
Daniel Sandler
8c9233fba2 Correct path to LowBattery.ogg.
Bug: 2320026
Change-Id: Idede20701c5a3d0e60bd327a869b1adf1577db21
2010-03-08 12:03:05 -05:00
Jean-Michel Trivi
c6120193ef Fix typo in log message in TTS SynthProxy.
Change-Id: Ica7dbf6cb3db2e07958fadad476571b91bde2c24
2010-03-07 14:29:58 -08:00
Jean-Michel Trivi
796325b619 Fix bug 2449814
Reduced the amount of filtering and amplification at the output
 of the Pico TTS engine v1.1.0.2

Change-Id: I89f577b5e94e171b4ed892faffb863f19428cc1a
2010-03-07 14:02:31 -08:00
Christopher Tate
4528186e0d Refactor android.backup => android.app.backup
Change-Id: I0b21316ff890d7f3c7d4b82837bb60670724c2e8
2010-03-05 16:27:15 -08:00
Brad Fitzpatrick
1877d0158b Add "call" method on ContentProvider.
This permits implementing interfaces which are faster than using
remote Cursors.  It then uses it for Settings & SettingProvider, which
together account for ~50% of total ContentProvider event loop stalls
across Froyo dogfooders.

For fetching Settings this looks like it should reduce average
Settings lookup from 10 ms to 0.4 ms on Sholes, once the
SettingsProvider serves most gets from in-memory cache.  Currently it
brings the Sholes average down from 10ms to 2.5 ms while still using
SQLite queries on each get.
2010-03-05 12:08:39 -08:00
Suchi Amalapurapu
fe73ce15fc Merge "Null check for scheme. If scheme is unspecified let package parse continue. We will return errors if parsing fails anyway. If scheme is not null, restrict it to being a file uri." 2010-03-04 11:23:52 -08:00
Kenny Root
1ead4f0f70 Expand buffer in SynthProxy to hold int
32-bit signed integers are 11 bytes and a byte at the end for \0

Change-Id: I6a9cf69ecc64614c610cbade1c3398506d6f62f5
2010-03-04 11:06:59 -08:00
Suchi Amalapurapu
3602f76d41 Null check for scheme.
If scheme is unspecified let package parse continue. We will return
errors if parsing fails anyway.
If scheme is not null, restrict it to being a file uri.
2010-03-03 18:21:07 -08:00
Suchi Amalapurapu
9b10ef5fe8 Rework the way PackageManager binds to default container service.
Clean up stale containers when enabling/disabling packages on sdcard.
Check the path of packages which are being enabled.
Make sure gc's are done prior to destroying containers when moving applicati
as well as enabling/disabling packages for sdcard mount status changes.

Some miscellaneous issues
   Remove hack to avoid renaming containers.
   Fix test with forward locked apps
   Remove adding container id to asec list when renaming
   Some cosmetic changes to DefaultContainerService
2010-03-03 14:06:10 -08:00
Ying Wang
c882ddacc8 Fix Proguard flags. 2010-03-02 09:36:33 -08:00
Charles Chen
6a8b73be57 Fixing a bug with TTS that caused TTS to ignore the default settings
unless the user had set the defaults to always override app settings.
2010-03-01 18:52:41 -08:00
Christopher Tate
03b6d90db9 Make sure to apply the auto-restore setting when the system is restored
Change-Id: If2e09d6b4e65c75e7e90754adc2425fa73d2602a
2010-02-26 14:15:24 -08:00
Dianne Hackborn
2269d1572e Re-arrange android-common so framework no longer links with it.
This is the framework part, moving classes around so the framework
no longer needs to link to android-common.  Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
2010-02-25 11:39:33 -08:00
Jean-Michel Trivi
e379710cc5 Merge "Fix bug 2452941 Add a flag to maintain the intended direct playback of TTS data independently from the associated AudioTrack state. Only start the track when it's been stopped but is supposed to be playing." 2010-02-25 08:47:40 -08:00
Jean-Michel Trivi
e3c1890a4c Fix bug 2452941 Add a flag to maintain the intended direct playback
of TTS data independently from the associated AudioTrack state.
 Only start the track when it's been stopped but is supposed to be
 playing.
2010-02-24 18:52:39 -08:00
Eric Fischer
00f58438bd Filenames of sound effects are not translatable. 2010-02-24 11:43:12 -08:00
Suchi Amalapurapu
cf6eaeaae9 Some framework fixes for apps on sd
change hard coded path in installd
fix tests
Work around for renaming containers.
Do forced unmount when destroying containers.
Force a gc in default container service to release handle to parsed package
and thus avoid getting killed by vold
Some cosmetic changes to PackageManager api.
Unit tests for renaming container for MountService
Remove internal size limit on app to be installed.
2010-02-24 11:31:36 -08:00
Daniel Sandler
63e1d264a7 Turn off lock screen sounds by default.
This change also fixes a typo that was suppressing the dock
sounds. But: so as not to surprise anyone, this change
defaults dock sounds off as well. Will need to add UI
somewhere to turn them on (Spare Parts?).

Bug: 2465483
Change-Id: Ic2cccb416d5616a84363debb740bf5897f0831c4
2010-02-23 19:43:35 -05:00
Oscar Montemayor
f1cbfff03a Fix bug when adding SET_INSTALL_LOCATION to SettingsProvider database, upgrade path. 2010-02-22 16:23:19 -08:00
Dianne Hackborn
21f1bd17b2 Fix issue #2438980: Implement package watcher for voice recognizer service setting
I am getting tired of writing package monitor code, realized this is missing in
a number of places, and at this point it has gotten complicated enough that I
don't think anyone actually does it 100% right so:

Introducing PackageMonitor.

Yes there are no Java docs.  I am still playing around with just what this
thing is to figure out what makes sense and how people will use it.  It is
being used to fix this bug for monitoring voice recognizers (integrating the
code from the settings provider for setting an initial value), to replace
the existing code for monitoring input methods (and fix the bug where we
wouldn't remove an input method from the enabled list when it got
uninstalled), to now monitor live wallpaper package changes (now allowing
us to avoid reverting back to the default live wallpaper when the current
one is updated!), and to monitor device admin changes.

Also includes a fix so you can't uninstall an .apk that is currently enabled
as a device admin.

Also includes a fix where the default time zone was not initialized early
enough which should fix issue #2455507 (Observed Google services frame work crash).

In addition, this finally introduces a mechanism to determine if the
"force stop" button should be enabled, with convenience in PackageMonitor
for system services to handle it.  All services have been updated to support
this.  There is also new infrastructure for reporting battery usage as an
applicatin error report.
2010-02-22 11:27:52 -08:00
Suchi Amalapurapu
8946dd3355 Move package from internal to external and vice versa. 2010-02-19 14:20:54 -08:00
Dianne Hackborn
ef6b22fc04 Fix issue #2420412: API review: DeviceAdmin API changes
Note in docs that callbacks are on main thread.
Rename to DeviceAdminReceiver?
Document resetPassword is the device's password.

Also hide android.R.attr.neverEncrypt.
2010-02-17 10:29:52 -08:00
Suchi Amalapurapu
679bba339e Move mount service wrapper calls to PackageHelper
Fix bug related to forward locked apps.
2010-02-16 15:11:04 -08:00
Suchi Amalapurapu
642b7c0f19 Merge "Include install location preference when installing packages. Changes include Add new remote call in default container service to determine install location. Rename INSTALL_ON_SDCARD Remove recommentAppInstall method Add some additional flags used in remote stubs. Move check for protected apps prior to copy. Unit tests" 2010-02-16 09:23:51 -08:00
Daniel Sandler
0e9d2af2d6 New user interface sound effects:
- Low battery. (http://b/2320026)
 - Dock/undock events.
 - Keyguard lock/unlock events.

New system settings have been created to turn these on/off
and to specify the relevant sound files.

[Production notes: The provided low battery sound and dock
sounds were synthesized; the lock screen sounds are
processed samples of a ballpoint pen click mechanism.]

Bug: 2320026
Change-Id: I374285b0f94f59c7555bb8816580f5a8c802e90d
2010-02-12 23:26:12 -05:00
Suchi Amalapurapu
5b993ce7bc Include install location preference when installing packages.
Changes include
Add new remote call in default container service to determine
install location.
Rename INSTALL_ON_SDCARD
Remove recommentAppInstall method
Add some additional flags used in remote stubs.
Move check for protected apps prior to copy.
Unit tests

DefaultContainerService first parses the file uri(if content uri is specified
it returns a default install internal only value) and returns
a recommended location. Based on which the temporary id is determined
either a file name or a container id and the file is copied there.
This is then later renamed during install.
Todo's light weight parsing of package when determining location since we
just need the install location attribute only when finding out
recomended location. This will also enable to move the check for
updated system apps(cannot be on sdcard) prior to copying.
2010-02-12 18:50:47 -08:00
Chris Tate
cf36010357 Merge "Remove BACKUP_DATA permission and associated checks" 2010-02-12 16:30:39 -08:00
Christopher Tate
a87240c227 Remove BACKUP_DATA permission and associated checks
Any package can now participate in backup/restore, without requiring any
manifest-declared permission.  *Control* of the backup manager is still
guarded by the BACKUP permission, which is signatureOrSystem.

Change-Id: I116fcfcd4cd255e3c976330da1c4dea7d4faae9d
2010-02-12 15:49:30 -08:00
Jim Miller
6176677e01 Watch 2274882: Add a field to the db when we wipe due to an error in the upgrader.
This should give us the ability to diagnose and fix db upgrade errors as reported by partners and end users.
2010-02-12 14:56:49 -08:00
Mike LeBeau
cb0be8a530 Use the new RecognitionService.SERVICE_INTERFACE instead of
RecognizerIntent.ACTION_RECOGNIZE_SPEECH when finding a voice
recognition service.
2010-02-11 15:01:27 -08:00
Charles Chen
d5663a1087 Merge "Setting the synth busy flag inside a synchronized block for thread safety." 2010-02-11 11:58:01 -08:00
Mike LeBeau
5d34e9b63d Add new setting for the ComponentName of the service to be used
for voice recognition on the device. Right now this just queries
the package manager at boot and finds the (hopefully) single
available recognizer.

TODO: Add an attribute to let recognition services expose a settings
activity, and expose the settings activity of the chosen recognition
service in the system settings for voice input & output.
2010-02-11 11:40:02 -08:00
Charles Chen
9b7cb792d0 Setting the synth busy flag inside a synchronized block for
thread safety.
2010-02-10 19:46:48 -08:00
Suchi Amalapurapu
a9c1625e71 Set default value for default install location 2010-02-10 12:39:59 -08:00
Suchi Amalapurapu
117818e4f1 Add new manifest option for install location
Change recommendAppInstallLocation api
add code to parse new attribute.
Define flags in PackageInfo
Add new settings attributes for enabling setting and value for install location
Some tests
The policy for install location: if explicitly set in manifest as internal only we try to install the app only on internal storage. if set to preferExternal, we try to install it on sdcard if possible. If not we fall back to internal.
If the user enables setting SET_INSTALL_LOCATION(which will always
be set to false in final release builds) and sets a prefered location, we try
to honour it.
2010-02-10 08:59:08 -08:00
Dianne Hackborn
e83cefcef0 New external storage APIs.
This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
2010-02-09 14:20:55 -08:00
San Mehat
b104340496 Framework: Clean up / Refactor Mount APIs
- Move android.storage.* -> android.os.storage.* and refactor users
 - Refactor generic shares back to explicit ums enable/disable/isEnabled
 - Remove media insert/removed event callbacks (not ready for Froyo)
 - Remove 'label' from volume state change callbacks
 - Add public API functions for enabling/disabling USB mass storage (permissions enforced
   in MountSevice)
 - Remove some stray un-needed import lines
 - Move android.os.IMountService / android.os.IMountServiceListener -> android.os.storage
 - Improve code comments

Updated:
  MountService: Add dup state check and move debugging behind a conditional
  UsbStorageActivity: Fix review comments + a TODO
  StorageNotification: Add @Override tags
  StorageManager: Don't use a static Listener list
  MountService: Reduce bloat and fix == where I meant .equals()
  PackageManagerTests: Update for new API

Signed-off-by: San Mehat <san@google.com>
2010-02-09 11:03:16 -08:00
Charles Chen
44afb7be73 Fixing a race condition in the TextToSpeech service that could be
triggered if many long utterances are started and interrupted in
rapid succession.
2010-02-08 14:11:45 -08:00
Charles Chen
6004edc67c Merge "Fixing a bug with the TextToSpeech speech queue processing. The queue processor should not be called for the next item until synthesis has actually happened for the current item; before it was being incorrectly called regardless of whether or not the synthesizer had processed the current item." 2010-02-05 17:23:44 -08:00
Charles Chen
f5c87b386c Fixing a bug with the TextToSpeech speech queue processing.
The queue processor should not be called for the next item
until synthesis has actually happened for the current item;
before it was being incorrectly called regardless of
whether or not the synthesizer had processed the current item.
2010-02-05 17:13:59 -08:00
Doug Zongker
4f8ff39c1e use device serial number to seed RNG for generating ANDROID_ID
Change-Id: I1bcc55f1309cb908803bc42084846a046041eda6
2010-02-03 10:48:22 -08:00
Suchi Amalapurapu
08675a3376 Apps on sdcard: Add new broadcasts
Add new broadcasts ACTION_MEDIA_RESOURCES_AVAILABLE and
ACTION_MEDIA_RESOURCES_UNAVAILABLE that get broadcast by
PackageManagerService when sdcard gets mounted/unmounted
by MountService so that packages on sdcard get recognized by
various system services as being installed/available or
removed/unavailable by the system.
The broadcasts are sent before the actual package cleanup which includes
mounting/unmounting the packages and we force a gc right after so
that any lingering file references to resources on sdcard get
released.
2010-02-02 18:33:29 -08:00
San Mehat
63d15ee6ae DefaultContainerService: Refactor MountService calls (new api)
Signed-off-by: San Mehat <san@google.com>
2010-02-02 11:17:47 -08:00
Dianne Hackborn
9327f4f671 More device policy work: clarify password modes, monkeying.
Clarifies what the password modes mean, renaming them to "quality"
and updating their documentation and the implementation to follow.

Also adds a facility to find out if a monkey is running, which I
need for the api demo to avoid letting it wipe the device.
2010-01-29 17:16:02 -08:00
Suchi Amalapurapu
a8eed0d3b6 Add asec permission to DefaultContainerService 2010-01-27 15:02:41 -08:00