4414 Commits

Author SHA1 Message Date
Philip Milne
8e1c2b6b71 Revert "Simple MVC based binding mechanism for android controls." Do not merge.
This reverts commit 989709a973448980f36dacd587b0a58f89ffa11e.

Change-Id: Ifc2c511b0d99d4a3a164b4a2281ca140015b366d
2012-09-17 14:31:03 -07:00
Elliott Hughes
34de3bc309 Fix date formatting for fa locales.
This adds support for standalone months (L versus M) and localized
digits.

Bug: 6811327
Change-Id: I4687a4c67605c31b155c0b8d44b3da6ed378fc82
2012-09-17 11:17:10 -07:00
Dianne Hackborn
2ca2c87871 More adjustments to permissions.
- New "cost money" flag can be put on a permission to
  have this emphasized in the UI.
- Some further re-organization of permissions to better
  match UX spec.

Change-Id: I450ac739eff6b90e7c7fc39589d68db82b61f897
2012-09-16 16:41:27 -07:00
Dianne Hackborn
d65afc65ea Merge "More multi-user stuff." into jb-mr1-dev 2012-09-16 00:05:46 -07:00
Dianne Hackborn
5dc5a00e7e More multi-user stuff.
- New public APIs to find out when a user goes to the foreground,
  background, and is first initializing.
- New activity manager callback to be involved in the user switch
  process, allowing other services to let it know when it is safe
  to stop freezing the screen.
- Wallpaper service now implements this to handle its user switch,
  telling the activity manager when it is done.  (Currently this is
  only handling the old wallpaper going away, we need a little more
  work to correctly wait for the new wallpaper to get added.)
- Lock screen now implements the callback to do its user switch.  It
  also now locks itself when this happens, instead of relying on
  some other entity making sure it is locked.
- Pre-boot broadcasts now go to all users.
- WallpaperManager now has an API to find out if a named wallpaper is
  in use by any users.

Change-Id: I27877aef1d82126c0a1428c3d1861619ee5f8653
2012-09-15 23:58:55 -07:00
Jeff Sharkey
ee100445b7 Updating public API.
Change-Id: I7b549af9af5cee21600fb356a411794320e84c56
2012-09-14 21:57:38 -07:00
Jeff Sharkey
b3571a6ca8 Merge "Fix build" into jb-mr1-dev 2012-09-14 21:16:03 -07:00
Christopher Tate
5f9c4c475f Fix build
(Deprecation changes are considered API changes.  I knew that.)

Change-Id: I58da073875efc77b833fa55ce15541fd48c5d335
2012-09-14 21:15:29 -07:00
Kenny Root
1c9894aa7f Merge "Remove AndroidKeyStore from API" into jb-mr1-dev 2012-09-14 16:55:47 -07:00
Elliott Hughes
9ceede6d7e am 086676a4: am f5437ee8: am 297ad257: Merge "Deprecate those parts of DateUtils the documentation says not to use."
* commit '086676a4a669b5d3a90c01e4d88ab8d628ca65f0':
  Deprecate those parts of DateUtils the documentation says not to use.
2012-09-14 16:39:12 -07:00
Kenny Root
ce24985ad6 Remove AndroidKeyStore from API
Change-Id: Ibe09d78e5a5b86604f01144f344525bff94c2dde
2012-09-14 16:23:37 -07:00
Elliott Hughes
d3c01012d8 Deprecate those parts of DateUtils the documentation says not to use.
Applications using these fields and methods are just asking for i18n bugs.

Also @deprecate two int[]s that were never meant to be public.

Change-Id: I29b3a1c0c663fe344d2567df6ed3bb537270b3b7
2012-09-14 16:06:50 -07:00
Svetoslav Ganov
3efa8babf5 Merge "Adding accessibility events for touch and gesture detection states." into jb-mr1-dev 2012-09-14 15:16:27 -07:00
Svetoslav Ganov
77276b6085 Adding accessibility events for touch and gesture detection states.
1. Currently the system fires accessibility events to announce the
   start and end of a touch exploration gesture. However, such a
   gesture starts after we have decided that the user is not
   performing a gesture which is achieved by measuring speed of
   movement during a threshold distance. This allows an accessibility
   service to provide some feedback to the user so he knows that
   he is touch exploring.

   This change adds event types for the first and last touches
   of the user. Note that the first touch does not conincide with
   the start of a touch exploration gesture since we need a time
   or distance to pass before we know whether the user explores
   or gestures. However, it is very useful for an accessibility
   service to know when the user starts to interact with the
   touch screen so it can turn the speech off, to name one
   compelling use case.

   This change also provides event types for the start and end
   of gesture detection. If the user has moved over the threshold
   with a speed greater than X, then the system detects gestures.
   It is useful for an accessibility service to know the begin
   and end of gesture detection so it can provide given feedback
   type for such a gesture, say it may produce haptic feedback
   or sound that differs for the one for touch exploration.

   The main benefit of announcing these new events is that an
   accessibility service can provide feedback for each touch
   state allowing the user to always know what he is doing.

bug:7166935

Change-Id: I26270d774cc059cb921d6a4254bc0aab0530c1dd
2012-09-14 15:12:54 -07:00
Kristian Monsen
4cb846b8de Merge "Hiding some of the deprecated android.webkit API's" into jb-mr1-dev 2012-09-14 14:01:37 -07:00
Svetoslav Ganov
3240ad0f39 Fix the build
Change-Id: Ibdabfbd70fe27188be3361792b2886dec78a49d4
2012-09-13 19:40:03 -07:00
Svetoslav Ganov
33aef98fd2 Allowing association between a view and its label for accessibility.
1. For accessibility purposes it is important to be able to associate
   a view with content with a view that labels it. For example, if
   an accessibility service knows that a TextView is associated with
   an EditText, it can provide much richer feedback.

   This change adds APIs for setting a view to be the label for another
   one and setting the label for a view, i.e. the reverse association.

bug:5016937

Change-Id: I7b837265c5ed9302e3ce352396dc6e88413038b5
2012-09-13 18:41:40 -07:00
Jason Sams
80d819033d Unhide intrinsics and document API.
Change-Id: I0233245c68f9a08780213062e62cfea6cf909c13
2012-09-13 17:00:48 -07:00
Daniel Sandler
0c89049ebf Add Notification.Builder.setShowWhen(boolean).
No more setting when to 0 to hide the timestamp! *cheering*

Bug: 6915046
Change-Id: I1560a1c2dd366d416d1d059704ca7c63149334eb
2012-09-13 13:17:54 -07:00
Adam Powell
8a788cbfe5 Fix build.
Add new permission constants to public api

Change-Id: Iedde8c43f3738b51b74a81b72e9a39f51b43fc9d
2012-09-13 11:44:20 -07:00
Eino-Ville Talvala
f353f948a5 Merge "NEW_API: Unhide android.hardware.Camera#enableShutterSound" into jb-mr1-dev 2012-09-13 11:15:15 -07:00
Dianne Hackborn
bd7057f777 Fix build.
Change-Id: Ie655344e7752393b231f093beb7575def437cc77
2012-09-12 21:58:25 -07:00
Dianne Hackborn
7454d3b73c New permissions UI, again.
Change-Id: I0bbecd88ff1f212b30d1ef32d5bcaa49cdf1e9ce
2012-09-12 18:57:07 -07:00
Fabrice Di Meglio
b967464049 Merge "Enforce encapsulation for MarginLayoutParams startMargin and endMargin" into jb-mr1-dev 2012-09-12 13:25:22 -07:00
Selim Gurun
4f8da32ffa Merge "Make JavascriptInterface annotation public." into jb-mr1-dev 2012-09-12 12:48:32 -07:00
Kristian Monsen
bd0fe87834 Merge "Deprecating methods (and a constant) for JB MR1" into jb-mr1-dev 2012-09-12 09:34:37 -07:00
Selim Gurun
e91d5bee24 Make JavascriptInterface annotation public.
Bug: 7073422

This change makes @JavascriptInterface public and it requires
using this annotation to allow javascript access to public java
methods for API level JELLY_BEAN_MR1 and above. The behavior
does not change for API levels JELLY_BEAN and below.

Change-Id: I4108b17cf71b9ac273d7b61b1c8f7f5581e922ee
2012-09-12 08:04:26 -07:00
Fabrice Di Meglio
a40627daee Enforce encapsulation for MarginLayoutParams startMargin and endMargin
Change-Id: Ibaf5ade22612dfa52173978e4b520a6407162d13
2012-09-11 17:16:36 -07:00
Adam Cohen
2071e8408a Fixing build (update-api)
Change-Id: I78738cc8320dab1fde082bfa9f65d020c6573de7
2012-09-11 13:54:07 -07:00
Adam Cohen
aec914b130 Merge "Adding notion of keyguard widgets" into jb-mr1-dev 2012-09-11 13:18:14 -07:00
Eino-Ville Talvala
ff5c9146b5 Merge "NEW_API: Unhide android.hardware.Camera.Parameters#SCENE_MODE_HDR" into jb-mr1-dev 2012-09-11 12:41:11 -07:00
Eino-Ville Talvala
7cfd7d5b65 NEW_API: Unhide android.hardware.Camera.Parameters#SCENE_MODE_HDR
Bug: 7054970

Change-Id: I509fa18f1203022bb23cd9ef5c70cb3a3fbb8b77
2012-09-11 11:34:59 -07:00
Eino-Ville Talvala
af87681f48 NEW_API: Unhide android.hardware.Camera#enableShutterSound
Change-Id: I8e7ef3e035dd261be51874f514d6be2fb8933e96
2012-09-11 11:16:52 -07:00
Adam Cohen
0aa2d42e87 Adding notion of keyguard widgets
-> Persisting certain appwidget options
-> Adding ability to specify appwidget options on bind
   so as to avoid AppWidgetProvider update call with no
   options.

Change-Id: I5631039f19f1822b8e123b559b6353c880c0192e
2012-09-11 10:53:57 -07:00
Victoria Lease
d7f5a51baf Merge "IME support for trackball and generic motion events" into jb-mr1-dev 2012-09-10 14:12:48 -07:00
Victoria Lease
b38070caa5 IME support for trackball and generic motion events
Trackball and generic motion events now pass through the IME in case
it would like to handle them before passing them on to the view
hierarchy.

While I was at it, I also...
...fixed the documentation on InputMethodService.onKeyUp()
...added documentation to InputMethodService.onTrackballEvent()
...added trackball and generic motion events to the "input" command
...fixed input consistency verification involving ACTION_OUTSIDE

Bug: 7050005
Change-Id: I40ab68df4a9542af6df25de6ec2ec500e4c02902
2012-09-10 14:01:42 -07:00
Wu-cheng Li
753e1280cb Merge "Unhide INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE." into jb-mr1-dev 2012-09-10 00:48:26 -07:00
Dianne Hackborn
1b8ecc5031 A little cleanup.
Change-Id: Ie33fd1b02011606e67ce08df3cce887c07680c60
2012-09-09 14:41:34 -07:00
Dianne Hackborn
74ee8652e0 Add Binder.getCallingUserHandle().
Change-Id: I2a7eedfdc7baeeb4c2cd2ca0153aa95e0cf0bf45
2012-09-07 18:33:18 -07:00
Chet Haase
89b3f48fa3 Merge "Enable changing properties of layer paint" into jb-mr1-dev 2012-09-07 14:44:43 -07:00
Dianne Hackborn
5e03e2ca7d More multi-user stuff:
- New (hidden) isUserRunning() API.
- Maintain LRU list of visited users.
- New FLAG_IS_DATA_ONLY for ApplicationInfo.
- Clean up pending intent records when force-stopping a user (or package).
  (Also fixes bug #6880627: PendingIntent.getService() returns stale
  intent of force stopped app)
- Fix force-stopping when installing an app to do the force-stop across
  all users for that app.
- When selecting which processes to kill during a force stop, do this
  based on the actual packages loaded in the process, not just process
  name matching.
- You can now use --user option in am when starting activities, services,
  and instrumentation.
- The am --user option accepts "current" and "all" as arguments.
- The pm uninstall command now uninstalls for all users, so it matches
  the semantics of the install command.
- PhoneWindowManager now explicitly says to start home in the current
  user.
- Activity manager call to retrieve the MIME type from a content provider
  now takes a user argument, so it will direct this to the proper user.
- The package manager uninstall paths are now implemented around
  PackageSetting, not PackageParser.Package.  This allows them to work
  even if the application's apk has been removed (in which case it only
  exists as a PackageSetting, not the PackageParser.Package parsed from
  the apk).

Change-Id: I3522f6fcf32603090bd6e01cc90ce70b6c5aae40
2012-09-07 13:55:23 -07:00
Chet Haase
d15ebf25c5 Enable changing properties of layer paint
Previously, to draw a layered view with a changed Paint object for the
drawLayer operation, you'd have to invalidate the parent view, to get the
native DisplayList to pick up the new Paint properties. This change adds
API and functionality so that the developer can call setLayerPaint(), which
does the proper invalidation (lightweight, doesn't cause redrawing the view).

Issue #6923810 Make it easy to efficiently animate a layer's Paint

Change-Id: I7fea79788d50f6d9c86dd5e5b2a4490cb95142bb
2012-09-07 13:27:02 -07:00
Kristian Monsen
f4912580e6 Hiding some of the deprecated android.webkit API's
Change-Id: I1775a2ff615d1633fe9a20a5af49623222d3d27b
2012-09-07 15:34:20 -04:00
Kristian Monsen
5cc2351ded Deprecating methods (and a constant) for JB MR1
Change-Id: I3eb0eaff5ea5d8984ad143f801efa19e25bd0685
2012-09-07 15:34:13 -04:00
Wu-cheng Li
e590dc6f7d Unhide INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE.
bug:7053266

Change-Id: I4e00199598f57f11250abeab4ce17ced18f41f14
2012-09-07 19:05:41 +08:00
Svetoslav Ganov
01fa888903 Merge "Adding FEEDBACK_BRAILLE to AccessibilityServiceInfo." into jb-mr1-dev 2012-09-06 19:43:54 -07:00
Svetoslav Ganov
eb9862fd4c Adding FEEDBACK_BRAILLE to AccessibilityServiceInfo.
1. The feedback type provided by braille devices differs from all
   already predefined types and this change defines braille
   feedback type. Braille does not fit in the already predefined
   categories.

bug:6998945

Change-Id: Ide6043bed03fdecd6d2ee45a08762f5bd07a2118
2012-09-06 19:40:34 -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
Dianne Hackborn
62bea2f171 Nested fragments.
Change-Id: I79acc19b391352c16b06afee2ca543223c38e364
2012-09-06 11:05:53 -07:00