368 Commits

Author SHA1 Message Date
Amith Yamasani
5cdf7f5b2a When a new user AID is generated, dump it to dropbox
Bug: 9595851
Change-Id: I6fde757eed84d7914db180e80c9d68448b3e5780
2013-06-28 09:58:43 -07:00
Christopher Tate
87bc7e7082 Need to explicitly disable scan-always when turning off wifi
... when you want wifi to be really most sincerely off, because
settings restore is about to rewrite the conf file.

Bug 9032154

Change-Id: I6a3a34ac3f14ec43aa9d9cc0159fca6168ccd0a2
2013-06-10 16:55:02 -07:00
Amith Yamasani
27db46850b Block access to accounts for limited users.
Make sure that apps that have access to restricted accounts can see them.
If they don't have access, they shouldn't be able to add a new account either.
Show an error message in the account picker if the user/app is not authorized.

Change-Id: I117c0b14d7d06c5ac4e66506df156b174567f5f3
2013-03-30 18:25:49 -07:00
Maggie Benthall
a12fccf57d Add user restrictions for bluetooth, sideloading, usb file transfer
Created constants for these in UserManager and current.txt. Also created
an accessor for individual user restrictions that takes the restriction key
(removing individual methods for particular restrictions).

Change-Id: Ibb5517cbcdffadd3925f52cbe67d7d525813faa9
2013-03-27 18:14:29 -04:00
Maggie Benthall
6794458f86 Add location sharing toggle user restriction.
And add support for respecting it.

Change-Id: Ia5cf9134c5f5741c3f55afadbe54f862da7bfe5b
2013-02-25 12:45:14 -05:00
Jeffrey Brown
a81a40e06d am 3c239d7e: am 8934c575: am 88ba2f48: Merge "Disable usage of WAL in DatabaseHelper"
# By Yevgen Pronenko
# Via Android Git Automerger (2) and others
* commit '3c239d7e8d78570b1e17ad968c408506e73a8f3f':
  Disable usage of WAL in DatabaseHelper
2013-02-06 20:55:58 -08:00
Jeffrey Brown
8934c57564 am 88ba2f48: Merge "Disable usage of WAL in DatabaseHelper"
# By Yevgen Pronenko
# Via Gerrit Code Review (1) and Johan Redestig (1)
* commit '88ba2f48a2d1193f3877575b2589897a7804aa75':
  Disable usage of WAL in DatabaseHelper
2013-02-06 20:50:09 -08:00
Jeffrey Brown
88ba2f48a2 Merge "Disable usage of WAL in DatabaseHelper" 2013-02-07 04:39:35 +00:00
Maggie Benthall
1095d9ac5d Merge "Fix for SettingsProvider to query for correct user." 2013-02-07 00:04:59 +00:00
Maggie Benthall
d2726582f1 Fix for SettingsProvider to query for correct user.
insertForUser takes a specified user and attempts to adjust that user's
settings, first looking at their existing settings to determine the difference.
However it was querying the settings for the calling user, rather than for
the user whose settings were being changed.

Also add a test that exercises the fix.

Change-Id: I6ed6fd79154ac1b6e6ab880769ac9081dfff6b80
2013-02-06 18:53:47 -05:00
Dianne Hackborn
961321fe4e App ops: add op for writing settings.
Also fix a build.

And fix a bug that I think was introduced in the multi-user work
that removed the permission check for writing to settings...!

Change-Id: I5945682faa789ffc78fd3546c0df7d03693f106d
2013-02-05 17:22:41 -08:00
Svetoslav Ganov
447d94684e "Fixing backwards cmpatibility for enabling explore by touch""
This reverts commit d1ed3cea37e4156eab14b7dc8207a520c9eab700

Change-Id: I622ef034526f8f006a5a233e72487b062020e4f6
2013-02-01 12:24:42 -08:00
Mike Cleron
d1ed3cea37 Revert "Fixing backwards cmpatibility for enabling explore by touch"
This reverts commit 0a9c7c144671f70f5f1af222050bd3ec6b11fe41

Change-Id: I8da530a6d0a57163522d5a63326e787a8d22ecbf
2013-02-01 18:36:41 +00:00
Svetoslav
0a9c7c1446 Fixing backwards cmpatibility for enabling explore by touch
Change-Id: I8cbc4f03223d289547e3f3f6d1f528ad5b4f6f72
2013-02-01 00:47:29 -08:00
Svetoslav
3822896e22 Remove "enhance web scripts" from settings and make it requested by plug-ins.
Currently we have an "enhance web accessibility" setting that has to be
enabled to make sure web content is accessible. We added the setting to
get user consent because we are injecting JavaScript-based screen-reader
pulled from the Google infrastructure. However, many users do not know
that and (as expected) do not read the user documentation, resulting in
critique for lacking accessibility support in WebViews with JavaScript
enabled (Browser, Gmail, etc).

To smoothen the user experience now "enhance web accessibility" is a
feature an accessibility plug-in can request, similarly to explore by
touch. Now a user does not need to know that she has to explicitly
enable the setting and web accessibility will work out-of-the-box.

Before we were showing a dialog when a plug-in tries to put the device
in a touch exploration mode. However, now that we have one more feature
a plug-in can request, showing two dialogs (assume a plug-in wants both
features) will mean that a user should potentially deal with three
dialogs, one for enabling the service, and one for each feature. We
could merge the dialogs but still the user has to poke two dialogs.

It seems that the permission mechanism is a perfect fit for getting
user permission for an app to do something, in this case to enable
an accessibility feature. We need a separate permission for explore
by touch and enhance web accessibility since the former changes the
interaction model and the latter injects JavaScript in web pages. It
is critical to get user consent for the script injection part so we
need a well-documented permission rather a vague umbrella permission
for poking accessibility features. To allow better grouping of the
accessibility permissions this patch adds a permission group as well.

bug:8089372

Change-Id: Ic125514c34f191aea0416a469e4b3481ab3200b9
2013-01-29 13:56:22 -08:00
Christopher Tate
58f41ecfa5 Migrate BUGREPORT_IN_POWER_MENU from Secure to Global settings
Bug 7273591

Change-Id: I5790f9d18ddf22282144be1c2d96dd4d706caa14
2013-01-11 15:40:36 -08:00
Dianne Hackborn
c1b3d21306 am 53d99836: am 26c00dec: am b2d3904b: Merge "Setting the default value for dock audio"
* commit '53d998368c6c6107c6d18de945f4dfee482e6f91':
  Setting the default value for dock audio
2013-01-08 10:27:08 -08:00
Dianne Hackborn
26c00decb4 am b2d3904b: Merge "Setting the default value for dock audio"
* commit 'b2d3904b0d0f02b3eddef1d228724b99962cba56':
  Setting the default value for dock audio
2013-01-07 13:26:38 -08:00
Dmytro Dubovyk
729f6685f9 Setting the default value for dock audio
There was no default value for parameter "dock_audio_media_enabled"
in global settings and because of that it couldn't be obtained before
Settings app first start and improper actions, such as FORCE_NONE
sending to AudioSystem instead of FORCE_ANALOG_DOCK, were taken.
This patch sets default value to 'true'.

Change-Id: Idbe343519db15f806f3a237e8b39f8420b9edde1
Signed-off-by: Dmytro Dubovyk <dmytro.dubovyk@ti.com>
2012-12-19 11:14:38 +02:00
Amith Yamasani
912f01865a am 68c30860: am 73f24ae1: am 9a147340: Merge "Don\'t update global table when upgrading secondary users\' database." into jb-mr1.1-dev
* commit '68c308607b01bafd31c91572a81f4563e2199260':
  Don't update global table when upgrading secondary users' database.
2012-12-12 11:46:41 -08:00
Amith Yamasani
2d43fabaf7 Don't update global table when upgrading secondary users' database.
Bug: 7722149
Change-Id: I0c1373cba316b924701136579083274eb6c9b1da
2012-12-12 09:52:26 -08:00
Jeff Brown
ace7404de8 resolved conflicts for merge of d7337fb9 to master
Change-Id: I51dedcc5ee521e62ad6101c0b09e4f881b8c4bf0
2012-12-11 15:21:02 -08:00
Jeff Brown
84e2756c0f Play a tone when wireless charging begins.
Only plays a tone if the battery level is below 95% which
is the same heuristic used when determining whether to turn
the screen on.

Use new low battery and wireless charging sounds on Mako.

Bug: 7371658
Change-Id: Ia4527ec398d024ee418a4287e1fcbf0ec83bcc24
2012-12-11 12:55:03 -08:00
Yevgen Pronenko
4de6f2cff1 Disable usage of WAL in DatabaseHelper
According to SQLite documentation, WAL can not be used when database
partition is not accessible for writing (even when the client just
performs read operation).
However, such situation may happen when the partition is full.
As SettingsProvider should always be able to read a value of ANDROID_ID
from corresponding database, this commit disables usage of WAL.
Without this we risk ending up in a situation where /data is full
and the phone is unable to boot properly.

Change-Id: I1f79bbcd8d0f64bf35dc9d7b846bcfb2664d2eac
2012-12-11 09:30:58 +01:00
Jianzheng Zhou
dcf03f3972 Refactor getPersistedNetworkPreference
Optimize for updating mNetworkPreference according to device's networkAttributes
setting from overlay config.xml when connectivityservice start.

Change-Id: I90286332d4f453038f1ddac7dd9d1265d96b4859
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
2012-12-06 12:00:04 -08:00
Dianne Hackborn
13579ed330 Cleaner initial boot.
This does some cleanup of the initial boot, especially when
booting in "no core apps" mode for encryption/decryption.

Change-Id: Ifb3949f580e52f54559e603c4b0b104f6bac2f6c
2012-11-28 18:09:01 -08:00
Dianne Hackborn
40e9f2922c Quiet down a lot of logging.
Also fix a little problem where the USER_STARTED broadcasts
were not being sent as ordered broadcasts(!).

Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
2012-11-27 19:12:23 -08:00
Baligh Uddin
051ab5c2e8 Import translations. DO NOT MERGE
Change-Id: I51415c91026c1ea461f1b1239a75ec999fd7fe0c
Auto-generated-cl: translation import
2012-10-22 12:01:02 -07:00
John Spurlock
ed108f3d12 Frameworks base: Promote dream setting defaults to config.
So that:
 - the values can be shared (to fix assoc bug)
 - the values can be customized in product overlays

Bug:7373284
Change-Id: I37f037082523a3d975f6014f36afa28c60117372
2012-10-19 11:32:03 -04:00
Christopher Tate
d488bc0ef4 Defer wifi bounce following restore for 1 minute...
...to allow network-reliant restore actions by apps to get underway.

Bug 7304761

Change-Id: Ia1d2321ef86609588efbc7add043c24a12ec6a20
2012-10-09 15:11:01 -07:00
Amith Yamasani
531c237b82 Add an upgrade step for settings moved to global.
For some reason, the original step didn't work for some testers. This re-applies the move, which
should be no-ops if the entries are already in the right table.

Bug: 7254629

Also moved a few more entries to the global initialization section. Otherwise they would write
into the wrong table.

Change-Id: Ic0f5c4e09680f5687d08dccf78063508b9c0584c
2012-10-08 17:04:17 -07:00
Christopher Tate
73755c95ff Merge "Fix settings restore" into jb-mr1-dev 2012-10-05 15:24:06 -07:00
Christopher Tate
3543beb255 Fix settings restore
Now with more fix.

Bug 7249405

Change-Id: Ib8bc2e9c5b054054f4aaacf14af8d5a0d05d6e3a
2012-10-05 15:01:42 -07:00
Christopher Tate
d0f199308e Merge "Make sure settings writes are permission checked correctly" into jb-mr1-dev 2012-10-05 14:46:01 -07:00
Christopher Tate
61695ffcbc Make sure settings writes are permission checked correctly
The last bit of undoing the earlier tangle around query results having
observers under the calling user's identity.  We do *not* want to drop
calling identity in the call() processing; we want the table-based
permission checks at the point of the underlying db operations to be
performed against that identity.

Bug 7265610

Change-Id: Ie0c9331ebd0918262a0a32b5b03b876fc2a92ca3
2012-10-05 12:05:13 -07:00
John Spurlock
7f1c248e80 Fix upgrade case for Settings.Secure.USER_SETUP_COMPLETE.
Existing primary users were never being marked as complete,
causing things that relied on this (e.g. showing the quick settings panel)
to break.

Bug:7282088
Change-Id: I9c8622f3cd0fb99a44477946d3db22fa2cbbc6fc
2012-10-05 11:45:18 -04:00
Christopher Tate
5067685ccf Settings (and general) restore fixes
Pro tem, we ignore wifi configuration data when restoring system settings.
This is not ideal, but it *does* mean we do not bounce wifi off and on
again during the extended restore process, which in turn means we don't
interfere with things like the Play Store's download of applications.
We do continue to back up wifi configuration, and will start using that
data again when the new implementation that restores AP configurations
without having to bounce wifi comes to pass.

Also, this CL fixes a longstanding bug in BackupDataInput.skipEntityData()
that was being reproduced reliably once settings restore was skipping
the wifi-related entities in the restore stream.

Bug 7249405

Change-Id: I61520a9a116b66ebdf95734d09d9afd46406df01
2012-10-04 19:10:11 -07:00
Christopher Tate
34637e57fc Make sure to check write perms after rewriting destination table
The write-permission check must occur after any destination-table
rewriting, otherwise any application would be able to write to
any global setting, by supplying a fraudulent "system" namespace
in the uri, but with a key name that will be redirected to global.

Bug 7289965

Change-Id: I122098a64e40d14e00d3cb6608c50aeb74faf7ce
2012-10-04 16:01:10 -07:00
Christopher Tate
35dd752238 Merge "Rewrite raw insert()s and some raw query()s of moved-to-global keys" into jb-mr1-dev 2012-10-03 19:31:40 -07:00
Christopher Tate
c221d2be7d Rewrite raw insert()s and some raw query()s of moved-to-global keys
The Settings put*() APIs fix up references via the old namespaces,
but the raw insert() interface didn't.  Now it does.  Also, when
possible we fix up direct query() operations on the old namespace
to point to the correct one.  At present that is only done for
query() operations with Uris of the form

    content://secure/adb_enabled

There is no rewriting done on queries of the form

    content://secure WHERE name='adb_enabled'

since the app-supplied WHERE clause can be arbitrarily complex.

Bug 7267568

Change-Id: I5c8cecbea7f5b1da6247a53b1428d3effb0bbca5
2012-10-03 19:20:51 -07:00
Christopher Tate
1a2fac3eed Merge "Use myUserId() only in registerContentObserver()" into jb-mr1-dev 2012-10-03 18:54:49 -07:00
Christopher Tate
afccaa84c8 Use myUserId() only in registerContentObserver()
The reason for this is a bit subtle: we want to guarantee that
when a content observer is registered using the public API, it
is *always* bound to the host user's view of the data behind the
observed Uri, never the calling user's.  Now, the reason it was
the calling user in the first place is that the Settings provider
(and potentially any singleton provider) needs the observers
underlying Cursors returned from query() to be tied to the caller's
user, not the provider's host user.

In order to accomplish that now that the public-facing behavior is
always tied to the host user, the concrete class that implements
the Cursor type handled by the Settings provider has been extended
with a new hidden API for setting a notification observer tied to
an arbitrary user; and then the provider explicitly downcasts the
query result's Cursor to that class in order to register the
notification observer.  We can do this safely because this is platform
code; if we change the way that these underlying cursors are constructed,
we can just fix this point of call to follow along.  If they get out
of sync in the future, the Settings provider will scream bloody
murder in the log and throw a crashing exception.

Bug 7231549

Change-Id: I0aaceebb8b4108c56f8b9964ca7f9e698ddd91c8
2012-10-03 17:41:51 -07:00
Eric Laurent
55b02226c0 fix settings data base upgrade for ringer mode
Ringer mode setting was moved from System to Global group
but a db upgrade cleanup step was missing.

Bug 7128886.

Change-Id: Id20994fe74575afa2b68154a620aa3c8807e8304
2012-10-03 16:13:04 -07:00
Christopher Tate
66488d64df Make settings backup/restore work in the new multi-user world
1) Properly handle restores of settings elements that have been migrated
   to the new global namespace

1) Back up and restore the new global settings namespace

3) Make sure to back up / restore the global entity
   ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED

Bug 7249405

Change-Id: Ibfa9930ea4d0e16c7635697e8c631b155e4c0cb2
2012-10-02 15:22:30 -07:00
Jeff Sharkey
6e2bee75ce Migrate more System and Secure settings to Global.
Includes telephony, WindowManager, PackageManager, and debugging
settings.  Update API to point towards moved values.

Bug: 7231764, 7231252, 7231156
Change-Id: I5828747205708872f19f83a5bc821ed0a801cb79
2012-10-02 13:55:15 -07:00
Jim Miller
b14288d4b1 Attempt to fix missing lock sounds
bug 7254629

Change-Id: I65eee674fe014a0e84d5ec20ead81abdec38f890
2012-10-01 18:14:41 -07:00
Jeff Sharkey
0ac1028b0d Move bluetooth priorities from Secure to Global.
Bug: 7231171
Change-Id: I836fdc2cfb8d67f984b4715559b9e92d0dc41c95
2012-10-01 12:54:12 -07:00
Jeff Sharkey
625239a054 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Jeff Sharkey
bdfce2ec05 First step towards cleaning up Global settings.
Remove all @Deprecated @hide settings, and clean up any stragglers.

Bug: 7232125
Change-Id: Ibf67093c728d4a28565129b923edb1701d3b2789
2012-09-26 17:18:49 -07:00
Jean-Baptiste Queru
d336460089 Merge into jb-mr1-dev
Change-Id: Idf183be6a41ff37add5141a20e96d5190396d1a4
2012-09-25 09:40:08 -07:00