56 Commits

Author SHA1 Message Date
Jeff Brown
fa25bf5382 Add display manager skeleton.
The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of
displays.

This patch also starts to make a distinction between logical displays
and physical display devices.  Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
2012-07-25 18:56:16 -07:00
Dianne Hackborn
e6c2d62efb am 9906e784: am 17990395: Merge "Fix issue #6717667: expanded notification actions don\'t work on the lock screen" into jb-dev
* commit '9906e784faca2cc8388a04fdc544722ea93d51be':
  Fix issue #6717667: expanded notification actions don't work on the lock screen
2012-06-25 18:17:15 -07:00
Dianne Hackborn
1927ae8a56 Fix issue #6717667: expanded notification actions don't work on the lock screen
FLAG_ACTIVITY_CLOSE_SYSTEM_DIALOGS was a mistake.

Instead, and the infrastructure for the status bar to take care
of closing and hiding things itself when you press these buttons,
just like it does for the main Intent of the notification.

Bug: 6717667
Change-Id: I1b22186e0cedc05f46a1a3ec78053a72afaf61b1
2012-06-25 14:28:48 -07:00
Jeff Brown
dc6f8b2b8c Merge "Deprecate DatabaseUtils.InsertHelper." 2012-06-22 15:34:33 -07:00
Jeff Brown
b33eb4e32a Deprecate DatabaseUtils.InsertHelper.
This class does not offer any advantages over SQLiteStatement
and just makes code more complex and error-prone.

Documented that the class is not thread-safe.

Removed a potential deadlock in insert() and replace() caused
by the insertInternal() method being synchronized in the case
where the class was being used concurrently (woe to you!).

Thread A would start a transaction.
Thread B would call insertInternal() and acquire the object monitor,
but block because it could not obtain the db connection because
thread A is holding onto it.
Thread A would call insertInternal() and block because Thread B
was holding the object monitor.
Deadlock.

Changed this code to use a transaction instead of a lock,
which provides the necessary mutual exclusion guarantee without
the potential for a deadlock.  Even so, the class really isn't
thread safe.

Bug: 6625094
Change-Id: I51d9a15567a6f2bad6f25e550b48f8f6ffcab2a7
2012-06-22 15:24:26 -07:00
Jeff Brown
1244cdaedd Clean up PowerManager API.
Mostly just moved the code around and improved the docs.

Fixed a minor inefficiency in WakeLock.setWorkSource() where
we would tell the power manager that the work source was changed
even when the old work source and new work source were both null.

Fixed a bug in WakeLock.setWorkSource() where we would not
notify the power manager that the work source was changed if
there was no work source previously specified.

Added synchronized to WakeLock.setReferenceCounted.

Added a checked in WakeLock.acquireLocked() and WakeLock.release()
to check whether the wake lock is actually not held / held
before performing the corresponding operation.  This change avoids
making redundant calls into the power manager service in the
case where the wake lock is not reference counted and acquire()
or release() have been called multiple times.

Made the PowerManager and WakeLock classes final.  They are not
directly instantiable by applications so this change does not
break the API.

Removed a little dead code (one private constructor and an
unused constant).

Change-Id: I4e10cf893506115938a35756136c101256dccf30
2012-06-19 18:42:05 -07:00
Svetoslav Ganov
ec7c7ebf01 Merge "API for finding accessibility focus in virtual tree not needed." into jb-dev 2012-06-18 11:27:44 -07:00
Svetoslav Ganov
45a02e0809 API for finding accessibility focus in virtual tree not needed.
1. The function for finding where the accessibility focus in a virtual
   node tree presented by an AccessibilityNodeProvider is not needed
   API since the framework already keeps track of the accessibility
   focused virtual node in order to draw the focus rectangle. This API
   adds unnecessary complexity to developers of AccessibilityNodeProviders.

bug:6675330

Change-Id: I84774686b06a995073a39e45b8ef22f2cd04b773
2012-06-17 15:07:38 -07:00
Daniel Lehmann
1024de5961 Allow restricting the scope of a phone-filter search
This also includes a previous change to current.txt that hasn't been
copied to 16.txt yet

Bug:6662259

Change-Id: Iaab5c38ad56882a1270b5276ba7a399bbb8a49f3
2012-06-15 20:32:33 -07:00
Svetoslav Ganov
531d5866d8 Merge "Accessibility focus search and setting it from hover are performed by the client." into jb-dev 2012-06-15 15:00:43 -07:00
Svetoslav Ganov
8ffe8b304e Accessibility focus search and setting it from hover are performed by the client.
1. Currently we are providing accessibility focus search algorithm in the
   framework and we are also setting accessibility focus from hover. It
   appears that implementing a focus search strategy that works for all
   accessibility services is non trivial task if feasible. Based on
   feedback from the developers of two such services at Google - TalkBack
   and BarilleBack - the built in focus search does not quite match what
   they need and they would like to implement a custom strategy.

   Hence, having APIs for accessibility focus search in the framework does
   not make. Therefore, we are hiding this APIs and later will take out the focus
   search logic and allow the accessibility service to implement search.

   Also putting accessibility focus from hover is tightly integrated with
   the focus search since the set of views that get accessibility focus
   from hover should be the same as the set of views returned by the
   focus search routine. Therefore, we are letting the accessibility service
   decide where to put accessibility focus when it gets an accessibility
   hover event.

bug:6675330

Change-Id: Ie152230990a6602f3fd1d82de2177d0b1444d654
2012-06-15 10:50:23 -07:00
Adam Powell
90b9f84c43 Merge "API updates for MediaRouter" into jb-dev 2012-06-14 17:51:27 -07:00
Adam Powell
0d03c042f9 API updates for MediaRouter
* Accept a Context when fetching the names of routes and
  categories. This lets string resources resolve at time of access
  with the correct configuration. The older versions remain available
  that will use the static resources from the application. (There are
  enough cases where applications will populate this from external
  data that requiring it each time even when it was not initialized
  from a resource doesn't seem reasonable.)

* Remove the ability for apps to programmatically select non-user
  routes.

* Make MediaRouter.Callback an abstract class instead of an interface.
  This will make further extensions easier to keep compatible in the
  future.

Change-Id: If981c511dfbdfaf41ef0d1cfe4a377fc14bb5600
2012-06-14 16:16:31 -07:00
Jeff Brown
de7a8ead24 Add new ASSIST key and map it to the global assist intent.
Moved some duplicate code from SearchPanelView and LockScreen
over to SearchManager to avoid creating yet another copy of it
in PhoneWindowManager.

Bug: 6594275
Change-Id: Ib4ebcd6817639d17548952ab2ce7cb876c05777c
2012-06-14 04:16:26 -07:00
Dianne Hackborn
b58b8f832d Rework media router to be per-context with global process state.
Change-Id: Ic1cb6f13e691d22783bcdafae85b7c75aec0a66f
2012-06-11 15:41:08 -07:00
Adam Powell
d0d2cda9d4 Further work on MediaRouter
Remove volume control and tracking. This will be handled by extensions
to existing audio and media APIs for now.

Tweak/refine other aspects of the API. Pass the router to callbacks for
easier future-proofing. Add group/ungroup callback methods.

Change-Id: Ib69e76e5f46280a9002b545bcf4cbc7b839844ee
2012-06-11 13:17:44 -07:00
Dianne Hackborn
4ca17df380 Fix build.
Change-Id: I42c3f6466d926258bbd303f2082de7207734451a
2012-06-06 15:02:25 -07:00
Dianne Hackborn
636fd528f7 Docs (mostly): enumerate JELLY_BEAN target SDK changes.
Okay this isn't entirely docs.  I have un-hidden the new permission
for binding to accessibility services; we were going to go out with
it hidden since it didn't go into factory ROM, but now that we are
doing other things we might as well expose it.

Also changed a log from E to W, since it is not an error.

Change-Id: I9226c95e3b63e12218fe41dc3f4290d9824a9e5c
2012-06-06 11:36:49 -07:00
Daniel Sandler
f756e495d5 Fix build break.
Change-Id: I3ce946740e0de0850f17c05b6701a7b070bfe8c9
2012-06-04 14:36:25 -04:00
Adrian Ludwig
4bc97b54f4 Fix build.
Change-Id: I739102258739ceb9856b8867949fa7f53532189d
2012-06-01 16:03:04 -07:00
Dianne Hackborn
4034bc431d Survey says: NIET!
Bug: 6593206
Change-Id: I5390609a5615d6aff1793a9bc361012a0cea330b
2012-06-01 13:38:48 -07:00
Jean-Michel Trivi
37fde0aca0 Unhide KeyguardManager locked and secure state getters
Unhide the following methods:
  android.app.KeyguardManager.isKeyguardLocked()
  android.app.KeyguardManager.isKeyguardSecure()

Fix some javadoc typos

Change-Id: Iedcd9f6a5261b7a3b47431edff013f629e1dc45d
2012-05-24 18:09:44 -07:00
Jeff Brown
1957fd271f Merge "Add public API to Choreographer." into jb-dev 2012-05-21 18:32:26 -07:00
Jeff Brown
cae804901e Add public API to Choreographer.
The API allows applications to post FrameCallbacks that will
run on vsync and that are provided with the frame time.

Change-Id: Ieb39fcdd085ef8a57805b8f78e7a307f416ff21d
2012-05-21 18:15:29 -07:00
Romain Guy
13b907353f Remove unused, obsolete debug code
All these features have either been abandonned and left un-maintained
for years or can be replaced by systrace.

Change-Id: I42e4579a8078744047e5fe08a7a15254970b09bc
2012-05-21 13:29:06 -07:00
Dianne Hackborn
35013d0e8b Merge "DO NOT MERGE: Remove a few left-over layout direction things." into jb-dev 2012-05-18 18:04:11 -07:00
Dianne Hackborn
39af624f31 DO NOT MERGE: Remove a few left-over layout direction things.
Change-Id: Id66b171594af939df4716aa0e0baa25fe47eecee
2012-05-18 17:34:06 -07:00
Romain Guy
5a418c771d Gallery, we need to talk...
Change-Id: Ie4b62df03c27161565d303d11447e3d7ff3115c4
2012-05-18 17:09:53 -07:00
Dianne Hackborn
abe3927701 Merge "Fix issue #6515427: Add android.hardware.television and fix..." into jb-dev 2012-05-17 18:18:27 -07:00
Dianne Hackborn
0cf2c8a533 Fix issue #6515427: Add android.hardware.television and fix...
...logic for notouch in Configuration

Added new TELEVISION feature.

We now force the configuration to "television" if the TELEVISION
feature is set, and "notouch" if the TOUCHSCREEN feature is not set.

Also cleaned up documentation, deprecated some configurations that
are not used.

Change-Id: If1c7a284b580a8a66bda2a75f0c7fa841b3dc9b7
2012-05-17 18:11:14 -07:00
Jean-Michel Trivi
482c9bb390 New action and extra in RecognizerIntent for "hands free" voice search
New action and extra for android.speech.RecognizerIntent:
  ACTION_VOICE_SEARCH_HANDS_FREE
  EXTRA_SECURE

Change-Id: I1f390ede4f4087bae1781347bb211dc0a093e857
2012-05-17 15:43:40 -07:00
Dianne Hackborn
e302a16235 A few odds and ends.
- Add documentation on "television" UI mode.
- Tweak new documentation and implementation around propagating
  URI grants through choosers.
- Add new activity launch flag for closing system dialogs.

Change-Id: I978c05f0dc3d16e1c55d43631828b9efa6335b19
2012-05-15 14:58:32 -07:00
Jeff Brown
2f09576074 Rename kcm attribute to keyboardLayout.
Bug: 6478076
Change-Id: I7fc0d8eb36d03a628d070f8fd6ea1e1464b1a163
2012-05-11 12:32:56 -07:00
Dianne Hackborn
fa61f0b2e2 JellyBean is now 4.1.
Change-Id: Ie37a7c4356d593010686d5dc7d6e715d30099e1e
2012-05-10 19:02:19 -07:00
Dianne Hackborn
b1b55e6c6b Fix build.
Change-Id: Ie255c93442d0b62032ac25e6de97f2c03e5df3ba
2012-05-10 16:25:54 -07:00
Fabrice Di Meglio
66388dcb09 Hide RTL related APIs - DO NOT MERGE
- fix bug #6441155 API review: @hide RTL layout APIs

Change-Id: I13c5ea5f579cecffed9d517f06180ab0576cd26a
2012-05-04 13:15:12 -07:00
Steve Block
d26286684b Fix build warning due to WebSettings now being abstract
WebSettings was made abstract in
https://android-git.corp.google.com/g/#/c/177360

current.txt was updated, but this causes a build warning because 16.txt was not
updated to match.

Change-Id: I4e00297361048509fab236f292c07d8a0df28f28
2012-04-27 12:08:43 +01:00
Michael Jurka
61a5b0160d New API to allow third-party apps to bind widgets
Change-Id: I1a3761c1a0f557a32d4d3bdd0207567fec918ba7
2012-04-24 17:25:08 -07:00
Jeff Brown
25157e458d Refactor SensorManager to move non-API bits into a subclass.
Changed the SensorManager class so that it only contains API-related
bits including what's needed to support legacy sensors.  Mostly just
moved stuff around.  Making the class abstract is safe because
it does not have a visible constructor in the API.

One minor change is that the cache of sensor type to sensor lists
is now per instance of SensorManager instead of being static.
We can fix this if desired.

Another small change is that we bail out early from registerListener
if the listener has already been registered for the particular
sensor.  This happened for both legacy and standard listeners.
The problem is that the ListenerDelegate maintains two lists of
sensors, one is a Map and the other is a List.  Adding a sensor
twice causes one entry to be added to the Map and two entries to be
added to the List, but when the sensor is removed the next time, only
one entry is removed from the List, leaving it in an inconsistent
state.

Removed Sensor.getLegacyType() since the value it provides is only
needed in LegacyListener and we don't really save any significant
computation by caching it.  Removing the field makes support for
legacy sensors a little more self-contained.

Bug: 6339552
Change-Id: I50d41ac97cf535924f2bfa2026d28547a4d00286
2012-04-16 13:03:55 -07:00
Jonathan Dixon
caf97c7db9 Merge "Two WebView API cleanups" 2012-04-16 01:05:06 -07:00
Jeff Brown
75e0dcbca1 Merge "Extract Vibrator implementation from interface." 2012-04-13 17:03:05 -07:00
Jonathan Dixon
939e5040b5 Two WebView API cleanups
- remove final from classes which we will need to provide subclasses
  in future: CookieManager, GeolocationPermissions, WebIconDatabase
  and WebStorage. None of these have published constructors,
  so applications cannot subclass them anyway.

- Also convert some protected members of JsResult to private, as its of
  no use to legal subclasses, and applications cannot subclass it.

Change-Id: Iaca9d2db31e25853b6c55feae41d9e7774087479
2012-04-13 16:36:16 +01:00
Jeff Brown
c2346134bb Extract Vibrator implementation from interface.
Moved the core logic of Vibrator into SystemVibrator, potentially
allowing for the creation of other Vibrator subclasses.

Fixed several places where we were creating new Vibrator
instances unnecessarily instead of getting it from the Context.

It is safe to make Vibrator abstract because its constructor
was hidden from the SDK so it was not possible to subclass it.

Bug: 6334179
Change-Id: I18ece6544c26a7efb2d5099f8346a10aef8a5e18
2012-04-13 04:05:17 -07:00
Jonathan Dixon
a3dc86e637 Hide the public constructors for singleton classes
WebStorage and GeolocationPermissions are not intended for direct use
by application code. Existing APKs using this will still work (as well
as they ever could have), but this change will cause a compile break if they
move to SDK >= 16, which should be fixed by using getInstance() instead.

Bug: 6238010
Change-Id: I75789cc260c8fe005c42942bc81483193cc54f17
2012-04-12 20:23:37 +01:00
Jonathan Dixon
39edeeefe7 Merge "Hide WebView.getZoomControls()" 2012-04-12 02:29:50 -07:00
Brett Chabot
f1253cd68a Upgrade junit.runner classes to their JUnit4.10 implementation.
Bug 5826326

Change-Id: If7e4c48a4369c1056dee5a2049c891bb6ab7d8d0
2012-04-11 19:01:30 -07:00
Jonathan Dixon
c69be70afe Hide WebView.getZoomControls()
This was deprecated and the replacement provided in API level 3.
Hiding it in API 16 as a step toward removing support for it in 17.

Bug: 5012841

Change-Id: Ice66a0fc1031c0d6705973dae7cbc11b028e14c9
2012-04-04 16:08:50 +01:00
James Dong
029d7e15f3 Hide deprecated MediaRecorder.java APIs
o related-to-bug: 6085208

Change-Id: I6d4d2c20756b317661c94ebe35752a040ece8283
2012-03-12 12:33:10 -07:00
Jeff Brown
baefdfad6e Make SQLiteDatabase final.
The SQLiteDatabase constructor is inaccessible so it is not
possible for applications to subclass it.  To remove all possible
remaining temptation to do so, make the class final.

Change-Id: I4148e9b06f0661ec22aab8e45afde38498d2375a
2012-03-05 13:24:02 -08:00
Gilles Debunne
8279570b22 Fix for broken build part 2. Update 16.txt too
Change-Id: I8609dd818a6e4059f9b149a8089d681ac2972d66
2012-02-28 16:36:45 -08:00