Move install location values to secure settings.
Diable attribute for UI. Set default value to auto.
Add command line interface to set install location via pm.
Change-Id: I80e97b3d24845adad7102f40dcbe238f00efa406
unclosed SQLiteStatement objects cause finalizer warnings.
nix them by closing this object in finally block.
Change-Id: Iea86ff169f935bb743aa0c32aa4aeb0cb4fcd4ad
Use constants defined in PackageHelper for user preferences
to install auto, internal, external.
Set default install location to external.
Update settings db version number
Change-Id: Ib5110c9377990e20a48cee923e55898dfddfd1e6
On insert(), check to see if the value is redundant by checking if
it's the same value already in our cache (but without faulting it in
to check). If so, avoid hitting sqlite or spamming all the
notification listeners with such uselessness.
This reportedly is happening a fair bit.
Change-Id: If58feb3ff1d00027dd927e0900087388cbcd72ae
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
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.
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.
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
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.
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.
- 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
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
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.
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.
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.
Adds 4 new Settings:
Secure.MOUNT_PLAY_NOTIFICATION_SND - Play notification sound on events
Secure.MOUNT_UMS_AUTOSTART - Auto-start UMS when host detected
Secure.MOUNT_UMS_PROMPT - Show notification when host detected
Secure.MOUNT_UMS_NOTIFY_ENABLED - Show notification while UMS enabled
These settings are also added to the Settings backup list
Signed-off-by: San Mehat <san@google.com>
The build system does not honor user tags on apps,
and setting it is misleading.
This removes the confusion by making the makefiles
behave like they read.
Change-Id: I7c5feba1c7d07f915b97dd098584f29938a4c885