3301 Commits

Author SHA1 Message Date
Christopher Tate
2892dfbeaf Merge "Fix default population of wifi settings" into jb-mr1-dev 2012-09-14 17:59:00 -07:00
Christopher Tate
6f5a9a9652 Fix default population of wifi settings
Various wifi settings that are explicitly defaulted did not get their
default code properly converted to refer to the correct settings
database table.

A collection of moved-to-Global settings that had not yet been
marked @deprecated in the Secure.* namespace are now so marked.

Also updated the namespace used to refer to wifi settings from the
Wifi Service.  These changes are cosmetic, but they do eliminate a
number of runtime log messages.

Bug 7153671

Change-Id: I9e5b6464d025cfb480ef97373996e38e82f90593
2012-09-14 17:57:35 -07:00
Daniel Sandler
8dd9206abb Fix NPE in rotation lock QS.
Bug: 7172228
Change-Id: I3ac35e18fe7ce5af13ee4c54dabae80df696c819
2012-09-14 17:29:21 -07:00
Winson Chung
4f49d9450f Adding data type overlay to network tile.
Change-Id: Iae3c188e2f7f03bd1ebaddc756021be312ddb0aa
2012-09-14 14:02:07 -07:00
Winson Chung
49321ec4fb Merge "Suppress ExpandHelper on quick settings." into jb-mr1-dev 2012-09-14 12:27:55 -07:00
Winson Chung
d4726d062e Adding rotation lock tile to quick settings (on tablets).
Change-Id: Ia68c07051acc1f0f42dde0b1322db034b5d54506
2012-09-14 12:28:40 -07:00
Christopher Tate
0dbc410800 Merge "Fix Settings writes to a different user" into jb-mr1-dev 2012-09-14 11:35:19 -07:00
Baligh Uddin
1a5efec6a0 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-13 21:49:37 -07:00
Christopher Tate
78d2a66ac1 Fix Settings writes to a different user
Oops.  Stacked bugs:  first, the desired user handle was not properly
being passed from the call() entry point to the database operations;
then on top of that, the client-side cache management was still
looking in the local user's cache for the data, so a request to read
a different user's settings would return the local user's instead if
that key was already known to the local user's cache.

Reads and writes of a different user's settings are now uncached,
so they're relatively much slower.  They're rare, however, so this
is not something to worry about unless we encounter a real world
case where it's a significant factor.

This CL also adds a bit of cross-user settings read/write testing
to the existing provider suite.  These new tests caught both the
known wrong-user-write bug and discovered the client-side cache
bug, so yay.

Finally, the existing wholesale mutual-exclusion approach would
deadlock in certain circumstances due to the fact that the
settings database creation code might have to call out to the
Package Manager while populating the bookmark/shortcut table,
and the Package Manager would then call back into the settings
provider in the course of handling that request.  The synchronization
regime has been significantly tightened up now: now the database
code [which is known to deal with concurrency itself] is allowed
to cope with multiple parallel openers of the same db; this
allows the settings provider to avoid calling out to other parts
of the system even implicitly while its internal lock is held.

Change-Id: Ib77d445b4a2ec658cc5c210830f6977c981f87ed
2012-09-13 19:15:54 -07:00
Winson Chung
ed1395f398 Updating Wifi/Mobile tiles to reflect actual connection state with new assets.
Change-Id: Ic1cd78c77f94f1c9cf9bbc1bcea3082ca536d94c
2012-09-13 18:16:02 -07:00
Winson Chung
81665b9b37 Merge "Updating assets, fixing Battery tile to show proper states." into jb-mr1-dev 2012-09-13 16:38:49 -07:00
Winson Chung
eaa5ab01a1 Updating assets, fixing Battery tile to show proper states.
Change-Id: I0df6d62f57e8034f17d6add31416b050af8a0c15
2012-09-13 16:36:59 -07:00
Christopher Tate
59c5beec64 Settings db upgrade steps only apply to the owner user
Change-Id: Ib74b42bcc2554edf721199f31f563daa9fc227a2
2012-09-13 14:46:25 -07:00
Baligh Uddin
38ba12cbdf Import translations. DO NOT MERGE
Change-Id: I45ff6d7cc265f5125ee3c651613f558182717b69
Auto-generated-cl: translation import
2012-09-13 12:07:20 -07:00
Michael Jurka
86398b6946 Merge "Fix crash in recents" into jb-mr1-dev 2012-09-13 11:17:31 -07:00
Michael Jurka
482f159dc4 Fix crash in recents
Bug: 7128044

Change-Id: Icaec50ef9dfbc5da78d71925215c3363f58d7d3d
2012-09-13 11:12:00 -07:00
Jeff Sharkey
cae22d83a7 Merge "Give DefaultContainerService all external storage." into jb-mr1-dev 2012-09-13 01:31:04 -07:00
Jeff Sharkey
dfa45309e0 Give DefaultContainerService all external storage.
Now we can bind to just one instance of DCS, instead of requiring
one-per-user. This also means we can operate on otherwise-stopped
users.

Bug: 7003520
Change-Id: I4881e064ae8942907f6a02c6b868926223455cdc
2012-09-13 01:04:15 -07:00
Daniel Sandler
b4e56edde6 Suppress ExpandHelper on quick settings.
Bug: 7004997
Change-Id: I423de03022982d9f87451eb3fb5ffdca818cac8a
2012-09-12 23:07:44 -07:00
Svetoslav Ganov
27d9183223 Merge "Core accessibility settings should not be cleared on restore." into jb-mr1-dev 2012-09-12 21:40:55 -07:00
Svetoslav Ganov
818d204590 Core accessibility settings should not be cleared on restore.
1. The core accessibility settings required for a blind user to use
   the device should not be overwritten on restore. There could have
   been enabled via a global gesture from setup wizard, hence the
   user definitely needs them. Restoring disabled values for these
   settings render the device useless unless sighted help is sought.

bug:7138401

Change-Id: Idc593889aa61fada65b0407623720517c827df53
2012-09-12 21:40:21 -07:00
Winson Chung
2a4057d2e9 Updating IME tile with proper subtype name.
Change-Id: Ie7fed20873f51e3b2b4def14532df00d71762418
2012-09-12 18:30:53 -07:00
Winson Chung
43229d7075 Adding IME tile.
- Adding checks for telephony before showing RSSI tile

Change-Id: I1dc4fb7a07d9693d8c6a96678ac9d4ff9abafe44
2012-09-12 18:06:23 -07:00
Christopher Tate
c868b645b4 Moved a few telephony settings from Secure to Global
Also tidy up the bookkeeping for a few settings that were earlier
moved to Global without the redirect tables being fixed up.

Change-Id: I69275db3b2636cd6ba9c8c51b88e97d8ba4b7b7d
2012-09-12 17:42:43 -07:00
Winson Chung
709c542b67 Merge "Fixing crash in emulator due to missing bluetooth." into jb-mr1-dev 2012-09-11 17:10:43 -07:00
Winson Chung
6072b00b62 Fixing crash in emulator due to missing bluetooth.
Change-Id: I0f652198cc759fac44f0de1729fcb52f515071a3
2012-09-11 17:10:32 -07:00
Benoit Goby
45f6aaa558 UsbDebuggingActivity: Strings update after review
Bug: 7056209
Change-Id: I447b021973332414e5e57a3b7066bf25dfccb628
2012-09-11 16:10:35 -07:00
Christopher Tate
4dc7a68dbe Set up default (random) Android IDs for all users
Also correct some now-misleading terminology in a permission-check
log message, and fix a bug in which a system component trying to
write to a secondary user's settings would wind up writing the
owner's settings instead.

Bug 7132405

Change-Id: I5b8fafc35720390a01652e386ab5b7c0ad751abe
2012-09-11 14:51:33 -07:00
Winson Chung
db425bbb28 Merge "Fixing issue with Airplane Mode. (Bug 7141144)" into jb-mr1-dev 2012-09-11 09:59:39 -07:00
Winson Chung
08b1cc8475 Fixing issue with Airplane Mode. (Bug 7141144)
Change-Id: I83e2bdd5e8b0e0c732e8d46c47f8619daa0c7c02
2012-09-11 10:01:24 -07:00
Winson Chung
1679b36800 Adding brightness dialog to quick settings.
Change-Id: I81f640138057c26320d41f70c7f47a518fc1bd4a
2012-09-10 20:20:22 -07:00
Winson Chung
e641b6a99c Adding alarm to quick settings.
- Cleaning up some code

Change-Id: Iaea2077084ba16b4fb4d47c8b2df5da6983ceb91
2012-09-10 20:20:03 -07:00
Christopher Tate
d5fe147924 Miscellaneous fixes for Settings
(1) It's okay to write literal null as a settings element value
(2) Properly convey the user handle in the put-for-user variant

Bug 7137201
Bug 7139826

Change-Id: I0ed77d65e8377f0e0580a2668f10b7167ad34928
2012-09-10 17:32:39 -07:00
Christopher Tate
c09cdce1b0 Update airplane-mode manipulation for the new Settings namespace
Quick Settings and global actions (aka longpress-Power) toggles are
included in this CL.  The Settings app manipulations are updated in
a different CL because that's a different git package.

Bug 7132230

Change-Id: I50838f5e8d7b25a750d2bcae90bf384b09816dbb
2012-09-10 16:50:57 -07:00
Baligh Uddin
996be34081 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-10 11:13:44 -07:00
Baligh Uddin
7c07cdd668 Import translations. DO NOT MERGE
Change-Id: I2996f36103f8089ab115bc87c175d4c1ca6e4625
Auto-generated-cl: translation import
2012-09-10 10:44:19 -07:00
John Spurlock
61e36836b7 Notifications: Hide ticker updates from background users.
We should only update the notification ticker area when
the notification is for the current user.

Bug:6924835
Change-Id: Ieaccbd8c972b3d0f62c74d29d42e0fa77ec3148c
2012-09-10 09:43:27 -04:00
Jeff Brown
7a8cce3d8a Handle case where user info might not be available.
The CursorLoader can return a null cursor if the query
failed for some reason.  This may happen in certain states
where the provider is not available.

Bug: 7133411
Change-Id: Id7b383bca45a61bc8726ba9f6115cbbc07e5d0b4
2012-09-09 17:26:50 -07:00
Jeff Brown
21c7153d30 Disable wifi display API when the adapter is not registered.
Bug: 7132341
Change-Id: I46d859082077afd2c8adc829ad285977dff80d07
2012-09-09 13:28:04 -07:00
Jeff Brown
508257bdfc Add skeleton Wifi-Display tile in QS.
Pop up a little dialog when the tile is touched with options
to connect, scan and disconnect.

Change-Id: Ic9e28344899310692ace36c322974df175f82e08
2012-09-08 23:15:12 -07:00
Winson Chung
d63c597865 Initial changes to add QuickSettings.
Change-Id: If510f74d6046929e5e8a794c6dc2fddb15a03d6b
2012-09-08 15:55:31 -07:00
Christopher Tate
0a26696560 Merge "Log all individual settings restored" into jb-mr1-dev 2012-09-07 18:10:02 -07:00
Christopher Tate
d71778804c Log all individual settings restored
Trying to get a handle on bug 7129406

Change-Id: If436c7888f0a8565d83c03024c54ea6ec83e7955
2012-09-07 18:09:03 -07:00
rich cannings
4d8fc793f0 Move verification settings to Settings.Global
Move Settings.Secure.PACKAGE_VERIFIER_ENABLE,
Settings.Secure.PACKAGE_VERIFIER_TIMEOUT,
Settings.Secure.PACKAGE_VERIFIER_DEFAULT_RESPONSE to
Settings.Global.PACKAGE_VERIFIER_ENABLE,
Settings.Global.PACKAGE_VERIFIER_TIMEOUT,
Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE, respectively.

Bug: 7082362
Change-Id: I21fde031a330563891c0129132f3d6369ac5e7a5
2012-09-07 15:34:08 -07:00
Christopher Tate
9219874be9 Further fixup of migration to global settings
The Settings.System.STAY_ON_WHILE_PLUGGED element should have been
migrated to the global table, but wasn't.  This CL does a couple of
things around dealing with this:

(1) Tidies up the migration tables outright, so that they correctly
    reflect the intended final state

(2) Introduces the option of doing a key migration only if the element
    has not yet been moved to the new table, to allow for safe retry-
    -with-ignore.  This will make it easy to make any future alterations
    to the global vs per-user association of individual elements

(3) Migrates the STAY_ON_WHILE_PLUGGED element if it hasn't been already.

Bug 7126575

Change-Id: Ic5fa9ba45f11b09270bd5bc94c26fbbd84abc749
2012-09-07 12:00:13 -07:00
Christopher Tate
1a9c0dfdbb Mark all settings upgrade transactions as successful along the way
If you don't, then the upgrade gets rolled back by the open helper,
and Bad Stuff Happens.

Change-Id: I191263e5cceb21b96ef413d28e7ee00a924acfc2
2012-09-06 22:52:23 -07:00
Christopher Tate
a96798e4a5 Don't use toArray() inappropriately
HashSet<String>.toArray() does not give you an array of strings.

Change-Id: I2053e714b12eab718aaf75d92bbc0625745b9932
2012-09-06 19:17:45 -07:00
Svetoslav Ganov
1cf70bbf96 Screen magnification - feature - framework.
This change is the initial check in of the screen magnification
feature. This feature enables magnification of the screen via
global gestures (assuming it has been enabled from settings)
to allow a low vision user to efficiently use an Android device.

Interaction model:

1. Triple tap toggles permanent screen magnification which is magnifying
   the area around the location of the triple tap. One can think of the
   location of the triple tap as the center of the magnified viewport.
   For example, a triple tap when not magnified would magnify the screen
   and leave it in a magnified state. A triple tapping when magnified would
   clear magnification and leave the screen in a not magnified state.

2. Triple tap and hold would magnify the screen if not magnified and enable
   viewport dragging mode until the finger goes up. One can think of this
   mode as a way to move the magnified viewport since the area around the
   moving finger will be magnified to fit the screen. For example, if the
   screen was not magnified and the user triple taps and holds the screen
   would magnify and the viewport will follow the user's finger. When the
   finger goes up the screen will clear zoom out. If the same user interaction
   is performed when the screen is magnified, the viewport movement will
   be the same but when the finger goes up the screen will stay magnified.
   In other words, the initial magnified state is sticky.

3. Pinching with any number of additional fingers when viewport dragging
   is enabled, i.e. the user triple tapped and holds, would adjust the
   magnification scale which will become the current default magnification
   scale. The next time the user magnifies the same magnification scale
   would be used.

4. When in a permanent magnified state the user can use two or more fingers
   to pan the viewport. Note that in this mode the content is panned as
   opposed to the viewport dragging mode in which the viewport is moved.

5. When in a permanent magnified state the user can use three or more
   fingers to change the magnification scale which will become the current
   default magnification scale. The next time the user magnifies the same
   magnification scale would be used.

6. The magnification scale will be persisted in settings and in the cloud.

Note: Since two fingers are used to pan the content in a permanently magnified
   state no other two finger gestures in touch exploration or applications
   will work unless the uses zooms out to normal state where all gestures
   works as expected. This is an intentional tradeoff to allow efficient
   panning since in a permanently magnified state this would be the dominant
   action to be performed.

Design:

1. The window manager exposes APIs for setting accessibility transformation
   which is a scale and offsets for X and Y axis. The window manager queries
   the window policy for which windows will not be magnified. For example,
   the IME windows and the navigation bar are not magnified including windows
   that are attached to them.

2. The accessibility features such a screen magnification and touch
   exploration are now impemented as a sequence of transformations on the
   event stream. The accessibility manager service may request each
   of these features or both. The behavior of the features is not changed
   based on the fact that another one is enabled.

3. The screen magnifier keeps a viewport of the content that is magnified
   which is surrounded by a glow in a magnified state. Interactions outside
   of the viewport are delegated directly to the application without
   interpretation. For example, a triple tap on the letter 'a' of the IME
   would type three letters instead of toggling magnified state. The viewport
   is updated on screen rotation and on window transitions. For example,
   when the IME pops up the viewport shrinks.

4. The glow around the viewport is implemented as a special type of window
   that does not take input focus, cannot be touched, is laid out in the
   screen coordiates with width and height matching these of the screen.
   When the magnified region changes the root view of the window draws the
   hightlight but the size of the window does not change - unless a rotation
   happens. All changes in the viewport size or showing or hiding it are
   animated.

5. The viewport is encapsulated in a class that knows how to show,
   hide, and resize the viewport - potentially animating that.
   This class uses the new animation framework for animations.

6. The magnification is handled by a magnification controller that
   keeps track of the current trnasformation to be applied to the screen
   content and the desired such. If these two are not the same it is
   responsibility of the magnification controller to reconcile them by
   potentially animating the transition from one to the other.

7. A dipslay content observer wathces for winodw transitions, screen
   rotations, and when a rectange on the screen has been reqeusted. This
   class is responsible for handling interesting state changes such
   as changing the viewport bounds on IME pop up or screen rotation,
   panning the content to make a requested rectangle visible on the
   screen, etc.

8. To implement viewport updates the window manger was updated with APIs
   to watch for window transitions and when a rectangle has been requested
   on the screen. These APIs are protected by a signature level permission.
   Also a parcelable and poolable window info class has been added with
   APIs for getting the window info given the window token. This enables
   getting some useful information about a window. There APIs are also
   signature protected.

bug:6795382

Change-Id: Iec93da8bf6376beebbd4f5167ab7723dc7d9bd00
2012-09-06 18:56:17 -07:00
Christopher Tate
06efb530a4 Per-user settings
Each user has its own Settings.System.* and Settings.Secure.* namespace now.  In
addition, this CL introduces the new Settings.Global.* namespace, which contains
a number of previously-elsewhere named settings entities; these Global.* entities
are common to all users.  Because these elements have been moved from their prior
existence in the other namespaces, attempts to access them under their old names
and namespaces are detected and redirected (with appropriate compile-time and
logging messages) to their new homes.

The new Global.* namespace can only be written by system-level code, just like
the existing Secure.* namespace.  If an app attempts to write a key that was
previously in the System.* namespace but has been moved to the Global.* namespace,
then a warning is logged and no write is performed; the action is a no-op.  (The
app is explicitly not crashed, to avoid breaking well-behaved apps that can't
know any better.)

There is also now a hidden API for getting/setting settings entities associated
with a user other than the caller's.  Reading/writing data for a user other than
yourself requires the signature-level INTERACT_ACROSS_USERS_FULL permission.

Manipulating data for a different user cannot be done via the ContentProvider
query() / insert() APIs; you must use the Settings.get/put APIs for that degree
of control.  In general, use of the get/set API is *strongly* preferred over
query-type access to Settings.

Bug 6985398

Change-Id: Ibee54ddff99fb847c8c2479c23b50f1e7524d724
2012-09-06 16:39:08 -07:00
rich cannings
16e119e798 Add secure setting for package verification
Framework changes to store and read a secure setting for package verification.
Default is on/true.

This setting will be turned on/off via the Settings app.

Bug: 7082362
Change-Id: I6f93d3136add8af0dbbdc664f0473c5f5b7e3fee
2012-09-06 14:37:44 -07:00