3262 Commits

Author SHA1 Message Date
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
Baligh Uddin
6f7c139137 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-06 11:37:34 -07:00
Daniel Sandler
40e86a56da Merge "New "Start dreams" launcher shortcut." into jb-mr1-dev 2012-09-06 11:04:45 -07:00
Daniel Sandler
32f6fd55b1 New "Start dreams" launcher shortcut.
Change-Id: Ice46fc8b99dae615e421ccf4eb6ca6f2a76cbe5f
2012-09-06 11:52:10 -04:00
Michael Jurka
4848f42f65 Merge "Fixing issue where recents items would go dim" into jb-mr1-dev 2012-09-06 01:13:59 -07:00
Michael Jurka
14895405c1 Fixing issue where recents items would go dim
Bug: 6772614
Change-Id: I2f57f001d91d6cb445c58ac705e6c3ad1fa70dd3
2012-09-05 13:40:50 -07:00
Baligh Uddin
f6bdb634c2 Import translations. DO NOT MERGE
Change-Id: I0825c7b01d6c6a75e18de2531364c7fab66238bf
Auto-generated-cl: translation import
2012-09-05 12:43:01 -07:00
Dmitry Shmidt
91a65b5339 Merge "Restore original default Wifi sleep policy (always)" into jb-mr1-dev 2012-09-05 12:39:23 -07:00
Daniel Sandler
fd5494b8ef Merge changes I4ef284da,Ie8cc69bd into jb-mr1-dev
* changes:
  Make the SystemUI stop the screen saver when a full-screen notification is posted.
  Do not play sounds or vibes for background users' notifications.
2012-09-05 12:38:25 -07:00
Dmitry Shmidt
8de24dca68 Restore original default Wifi sleep policy (always)
BUG: b/7092819

Change-Id: I6ee6755fd04df2f0169f8602e60542c3591038f3
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-09-05 12:35:09 -07:00
Daniel Sandler
5a426f6c4a Merge "Full-height panels on phones." into jb-mr1-dev 2012-09-05 09:33:50 -07:00
Daniel Sandler
bf526d14f3 Full-height panels on phones.
The dynamic carrier label is also back for those devices.

Finally, allow the panel to be dragged just by touching the
(newly reopened) empty area.

Bug: 6999596
Change-Id: I65f2867f1bd1977270de0bcedd32cb7141fcb6b1
2012-09-05 10:36:02 -04:00
Michael Jurka
78770167ce Merge "Fixing preloading recents for all devices" into jb-mr1-dev 2012-09-05 05:45:51 -07:00
Daniel Sandler
c9ce0abe29 Make the SystemUI stop the screen saver when a full-screen notification is posted.
This keeps all the fullScreenIntent logic (including
multiuser implications) in one place.

Change-Id: I4ef284daf90464f105780ade1d971e9e081fbbb5
2012-09-05 08:41:07 -04:00
Michael Jurka
d0d4bb8459 Fixing preloading recents for all devices
- Fixed for tablets and phones with hard nav buttons

Change-Id: I1dc2249376b3f376c283598f5cef6e326b191ace
2012-09-05 05:39:16 -07:00
Michael Jurka
881f0b1ee0 Remove unneeded imports 2012-09-05 04:44:59 -07:00
Michael Jurka
8481980495 Merge "Porting old code for min alpha for items in recents" into jb-mr1-dev 2012-09-05 03:40:15 -07:00
Michael Jurka
a1730fa4f1 Merge "Debug code for window transition crash" into jb-mr1-dev 2012-09-05 03:09:11 -07:00
Daniel Sandler
e32bb6c9c6 Merge "Only show the BeanFlinger screensaver to the worthy." into jb-mr1-dev 2012-09-04 12:29:04 -07:00
Baligh Uddin
d9d00c1c2d Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-09-04 09:07:45 -07:00
Michael Jurka
adf0b21590 Porting old code for min alpha for items in recents
Change-Id: I68dce175b3a2c0263c5df1ef787c28d6c622e879
2012-09-04 05:15:26 -07:00
Michael Jurka
a4dd30174d Debug code for window transition crash
https://b.corp.google.com/7060284

- Throw exception before we try to start window
transition with null thumb
- also remove some old unneeded debug code

Change-Id: Ic9693372724cbfaa4c4cb2594128ca10677d9d8f
2012-09-04 03:52:16 -07:00
Dianne Hackborn
4120375d46 Remove Binder.getOrigCallingUid().
Replaced all remaining places that used it with explicit user
specification.

While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications...  but have no way to specify
the user for the notification.

So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls.  I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.

There is more work that needs to be done here, though.  For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.

That's for another change, however.

Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
2012-08-31 15:11:13 -07:00
Daniel Sandler
0bcf4adcde Only show the BeanFlinger screensaver to the worthy.
(That is: you must have discovered the flying-jellybeans
easter egg to gain permanent access to the Dreams version of
same.)

Change-Id: I65ce39c0ab5b61f492a3637e3c31b3c91f4f0f89
2012-08-31 16:18:31 -04:00
Daniel Sandler
8c890f8a69 Merge "Work around instability of Display.getRotation()." into jb-mr1-dev 2012-08-31 12:06:42 -07:00
Daniel Sandler
7f3cf9586e Work around instability of Display.getRotation().
Ensures that the navigation buttons are properly oriented
each time the screen comes on.

Bug: 7086018
Change-Id: Iac6243792a8c64001ff7409108fb892bd470e4c4
2012-08-31 14:58:13 -04:00
Sascha Prueter
6beee2694c am a3503f26: am 6ee6615d: Merge "Revert "Update Back softkey icon Bug: 6020915"" into jb-dev
* commit 'a3503f2688c69b49a309763d8da7e7c04327d6d7':
  Revert "Update Back softkey icon Bug: 6020915"
2012-08-31 11:46:13 -07:00
Sascha Prueter
a3503f2688 am 6ee6615d: Merge "Revert "Update Back softkey icon Bug: 6020915"" into jb-dev
* commit '6ee6615d8f923a68021d04dc06b20d72c3f8498a':
  Revert "Update Back softkey icon Bug: 6020915"
2012-08-31 11:43:59 -07:00
Sascha Prueter
f14f01cc26 Revert "Update Back softkey icon Bug: 6020915"
This reverts commit 962daf9b1c4b12aff68a137472b6a7f4db123c65

Change-Id: If60099643336e35fe5bf7dcbf68a419bcd7ebae3
2012-08-31 11:39:44 -07:00
Baligh Uddin
aed83ee84f Import translations. DO NOT MERGE
Change-Id: If32fc3d101fae6ecb8ec9199e632f9fac6eacf53
Auto-generated-cl: translation import
2012-08-31 08:43:24 -07:00
Dianne Hackborn
73365695e4 Merge "Improve multi-user broadcasts." into jb-mr1-dev 2012-08-30 14:56:11 -07:00
Dianne Hackborn
5ac72a2959 Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
2012-08-30 14:33:22 -07:00
Daniel Sandler
25bb8eec2d Turn off deadzone flash, replacing it with logcat.
Change-Id: I30db97e5c3a6ef3a06e6065ccf087a7f6d1f9286
2012-08-30 17:10:50 -04:00
Daniel Sandler
8601e8b3ab Merge "Expand the navbar dead zone briefly after touches elsewhere." into jb-mr1-dev 2012-08-29 20:29:28 -07:00
Daniel Sandler
c26185bb7b Expand the navbar dead zone briefly after touches elsewhere.
For now, each time the dead zone captures a touch, it will
flash to let you know that's what happened. We should
probably turn this off before shipping.

Note also that this currently only expands the navbar on
ACTION_DOWN elsewhere in the UI (because this is the only
time ACTION_OUTSIDE is generated); this isn't perfect and
we'll need to do some mucking about with the input system to
get information about ongoing drags or additional pointers
down, but this CL is a good start and introduces the general
mechanism for expanding and contracting the dead zone.

Change-Id: I43e63aed1e541fd07d83fde4d66bcb5be89b69d2
2012-08-29 20:11:21 -04:00
John Spurlock
4e724c8423 Change default setting for dreams to 'when docked'
Bug:7078718
Change-Id: I4ec74cc9562ab728d6f86938758ede74c241c63b
2012-08-29 17:14:49 -04:00
Jean-Baptiste Queru
c88a80a1d7 am 15e099cc: am 0e0942c7: Merge "Default WiFi sleep policy setting"
* commit '15e099cc09589f963933f046d7267552ba3ffad8':
  Default WiFi sleep policy setting
2012-08-29 10:58:35 -07:00
Jean-Baptiste Queru
15e099cc09 am 0e0942c7: Merge "Default WiFi sleep policy setting"
* commit '0e0942c7209c758bc00939ae54059dc24bce3abb':
  Default WiFi sleep policy setting
2012-08-29 10:49:25 -07:00
Erik Ljungberg
7e07147ece Default WiFi sleep policy setting
Creates a defult.xml setting for WiFi sleep policy.

It is now possible, through device overlays, to change
the default sleep policy to e.g. never in order to improve
user experience of WiFi.

Change-Id: Ie459b8e70fdbc7c605452fe0692d7bc26460e939
2012-08-29 09:52:12 +02:00
Amith Yamasani
7af0c166f0 Merge "Fix recents list for multiuser" into jb-mr1-dev 2012-08-28 17:02:29 -07:00