109173 Commits

Author SHA1 Message Date
Svetoslav
6283608e0b Tweak the print APIs.
1. Adding bundle with metadata to PrintDocumentAdapter#onLayout
   with one key for now to specify whether this is for a preview.

2. Cleaned up docs.

Change-Id: I89380781bf3ae41aa89f8a0347d74516a210394c
2013-07-17 14:55:15 -07:00
Chet Haase
cdce4835fb Merge "Changed name of recent hasLayout() method to isLaidOut()" 2013-07-17 21:50:27 +00:00
Christopher Tate
e0a22b324d Batch alarms to reduce device wakeups
The default Alarm Manager behavior for KLP+ apps will be to aggressively
coalesce alarms, trading exact timeliness of delivery for minimizing the
number of alarm-delivery points, especially wakeup points.

There is new API in AlarmManager, setExact() and setExactRepeating(),
for use by apps that absolutely *must* get their alarms at a specific
point in time.

Bug 9532215

Change-Id: I40b4eea90220211cc958172d2629664b921ff051
2013-07-17 14:37:12 -07:00
Chris Craik
c84d203da2 Add reconfigure method to Bitmap
bug:9797004

Grants a means to reuse a bitmap's allocation for different
width/height/Config without going through
BitmapFactoryOptions.inBitmap

Change-Id: Ib62319f3bd96c451fc1636288adf06a8275b4e3d
2013-07-17 12:08:01 -07:00
Chet Haase
7a46dde1ae Changed name of recent hasLayout() method to isLaidOut()
This new method on view reflects whether the view has been laid out
at least once since it was attached. hasLayout() seems too vague for that
meaning; every View that has a parent has a layout (since we use container,
parent, and layout interchangeably). The new version of the method
is closer to the actual meaning.

Change-Id: I519745739b6a6317faeb077aa61f994025cf81f3
2013-07-17 10:22:53 -07:00
John Spurlock
209bede6b9 Remove trailing whitespace from system ui.
Baseline existing .java files, no excuses going forward.

Change-Id: I4bd0f25bbda6f2ec832e34ef5c70d4830bf07f99
2013-07-17 12:23:27 -04:00
Dianne Hackborn
4a8baef3f5 Merge "Make ArrayMap public! :)" 2013-07-17 00:53:33 +00:00
John Spurlock
332d84a567 Merge "Fix View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION." 2013-07-17 00:20:36 +00:00
Adam Powell
f52ae147fb am 42658ed5: am 30ad7203: Merge "Consider mScrollX when drawing the checkMarkDrawable"
* commit '42658ed5182a75b82dd2b970a1f97fc30407d1e3':
  Consider mScrollX when drawing the checkMarkDrawable
2013-07-16 17:12:49 -07:00
Dianne Hackborn
3e82ba1a67 Make ArrayMap public! :)
Also do some tweaking of the various container classes
to synchronize them with the support lib and make it
easier to copy code between the two.

And update activity/fragment to use ArrayMap.

Change-Id: I3cfe82392a17119dfc72c3d9961f64e1914f42be
2013-07-16 17:08:04 -07:00
Adam Powell
42658ed518 am 30ad7203: Merge "Consider mScrollX when drawing the checkMarkDrawable"
* commit '30ad720304790b07112b87f973a7e6ed5e1e6ee5':
  Consider mScrollX when drawing the checkMarkDrawable
2013-07-16 17:06:36 -07:00
Adam Powell
30ad720304 Merge "Consider mScrollX when drawing the checkMarkDrawable" 2013-07-17 00:04:28 +00:00
John Spurlock
7045aaa21e Fix View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.
If a window's task stack has no sibling, restore old behavior
of allowing frame to go below the nav bar.

Bug:9884905
Change-Id: Ifc38901a6633cf431dba8740a65258d0618c0fd0
2013-07-16 19:42:23 -04:00
Romain Guy
af093fd414 Merge "Skip unnecessary measurements when possible" 2013-07-16 23:37:29 +00:00
Romain Guy
93c567cddc Skip unnecessary measurements when possible
This change introduces a new measure cache to View, to remember
the measured dimensions for previous pairs of measure specs. The
measure cache is cleared whenever a View requests layout.

Unfortunately some Views rely on measure being always called when
layout is invoked. To work around this problem, we need to remember
when we hit the measure cache to force a call to measure just prior
to calling onLayout(). This does not completely removes all measure
calls but enough to optimize a number of layouts.

Change-Id: Ie085fbcf186e9d7505e1127e0786a12968ebc344
2013-07-16 16:25:09 -07:00
Chris Craik
b3d8388822 Merge "Support stencil-based clipping for functors" 2013-07-16 22:43:02 +00:00
Jeff Brown
07c09ce248 Merge "Fix missing lock in power manager." 2013-07-16 22:28:31 +00:00
Romain Guy
775ffa78f3 Merge "Fix crashes in setMatrix() and concat()" 2013-07-16 22:27:04 +00:00
Jeff Brown
d91e417b06 Fix missing lock in power manager.
The display wake lock and other internal state could become
out of sync if we happened to execute the power manager's update
function concurrently due to the missing lock.

This bug can be trigged due to display state changes or proximity
sensor updated.  Although it would be extremely rare, we have
some evidence of this happening on at least a few devices resulting
in rapid power drain with the screen off or a crash.

Bug: 9880044
Change-Id: I3c674ce429621a50cbb36c3a01883d5f388205b2
2013-07-16 15:22:14 -07:00
Chet Haase
4a83804ddf Merge "Fix issues with delayed transitions" 2013-07-16 22:20:24 +00:00
Chet Haase
c43524f386 Fix issues with delayed transitions
Previously, there were two distinct problems with how delayed
transitions were being run:
- there would be a delay between the transition being put into
a preDrawListener (to be kicked off when that listener fired) and
being removed from the pending list. This allowed another delayed
transition to be run in parallel, which would cause conflicting/
clobbering issues with transition values on the same objects.
- there would be an extra frame delay in some cases due to how/when the
delayed transition would be started. Specfically, we would postOnAnimation()
to call a method that would then add the onPreDraw listener. This two-step
forwarding caused issues noted above.

The fix is to simply add the transition to the preDrawListener immediately, removing
the two-step problem, and also ensuring that the transition is only removed
from the pending list when it is actually started, which prevents other transitions
from starting in the meantime.

Also, added more debug logging to help chase future issues with transitions.

Change-Id: Ie2ff8e73d29f342512842e9641bd8d605e74544c
2013-07-16 14:55:26 -07:00
Romain Guy
4e7b772b73 Fix crashes in setMatrix() and concat()
setMatrix() was crashing in native code, only with hw acceleration on.
concat() would throw a NullPointerException. It now ignores null matrices.

Change-Id: Iebd8b410a957d2ba501570c6fbb3f680ff4a1a23
2013-07-16 14:52:55 -07:00
Craig Mautner
b48fe0ec5e Merge "Remove iterators." 2013-07-16 21:45:32 +00:00
Svetoslav
17b7f6e6d4 Clean up of the print APIs.
1. Fixed a case in which the onPrintCompleted callback may not be invoked.

2. Added string resulrces for the different error messages for failed
   printing in OnPrintCompletedCallback

3. Fixed the string comments for the MediaSize constants.

4. Added APIs to create certain print attributes by passing in a
   string label instead of resource and package name since in some cases
   a print service may be getting already internationalized lables
   or it may not know all possible values.

5. Fixed a crash in PrintJobConfigActivity if there is no input or
   output tray.

Change-Id: Ie877b7dc669051606394aa290e6d2b979a42db4c
2013-07-16 14:39:32 -07:00
Eino-Ville Talvala
29b173ae07 Merge "Camera2: Remove/@hide non-public keys." 2013-07-16 21:10:43 +00:00
Svetoslav
0231409195 Add a clean spec rule due to renamed *.aidl
Change-Id: I87bfd02b8c4f3ceb43594a91ac8f501a867ccfe6
2013-07-16 13:49:44 -07:00
Craig Mautner
f8924150b3 Remove iterators.
Remove DisplayContentsIterator and AllWindowsIterator. These were cute
but they take up valuable resources. Iterate over ArrayList members
in their place.

Change-Id: I1d8a3b040175cb88b98f6a7e97cab06d17d5706b
2013-07-16 13:45:29 -07:00
Svetoslav
a8c7e3f86a Fix the build - missed a renaming
Change-Id: I0e85723647c0e5a6f6374e119f0fbd43db477ee0
2013-07-16 13:43:41 -07:00
Chris Craik
ecca6da4ea Support stencil-based clipping for functors
bug:9070351
Change-Id: I1c54e1bea1b84b1619cce27b14f189b42cab7062
2013-07-16 13:27:18 -07:00
Jeff Sharkey
1117048161 Merge "Disable documents test UI." 2013-07-16 20:03:35 +00:00
Jeff Sharkey
e6ddb9222d Disable documents test UI.
Change-Id: Iae8ef3e751a53a3f7df0a7c5bc666ec75e91d9e9
2013-07-16 13:01:57 -07:00
Svetoslav Ganov
c59df3caeb Merge "Refactoring of the print sub-system and API clean up." 2013-07-16 20:01:34 +00:00
Svetoslav Ganov
a00271533f Refactoring of the print sub-system and API clean up.
1. Now a user state has ins own spooler since the spooler app is
   running per user. The user state registers an observer for the state
   of the spooler to get information needed to orchestrate unbinding
   from print serivces that have no work and eventually unbinding from
   the spooler when all no service has any work.

2. Abstracted a remote print service from the perspective of the system
   in a class that is transparently managing binding and unbinding to
   the remote instance.

3. Abstracted the remote print spooler to transparently manage binding
   and unbinding to the remote instance when there is work and when
   there is no work, respectively.

4. Cleaned up the print document adapter (ex-PrintAdapter) APIs to
   enable implementing the all callbacks on a thread of choice. If
   the document is really small, using the main thread makes sense.

   Now if an app that does not need the UI state to layout the printed
   content, it can schedule all the work for allocating resources, laying
   out, writing, and releasing resources on a dedicated thread.

5. Added info class for the printed document that is now propagated
   the the print services. A print service gets an instance of a
   new document class that encapsulates the document info and a method
   to access the document's data.

6. Added APIs for describing the type of a document to the new document
   info class. This allows a print service to do smarts based on the
   doc type. For now we have only photo and document types.

7. Renamed the systemReady method for system services that implement
   it with different semantics to systemRunning. Such methods assume
   the the service can run third-party code which is not the same as
   systemReady.

8. Cleaned up the print job configuration activity.

9. Sigh... code clean up here and there. Factoring out classes to
   improve readability.

Change-Id: I637ba28412793166cbf519273fdf022241159a92
2013-07-16 12:59:59 -07:00
Dmitry Shmidt
5ab422bfa3 wifi: Add tdls_discover command to tdls enable call
Bug: 8539031

Change-Id: I29739e74f73b68fbf9ff73cfc19017a01655f9a4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-07-16 12:41:22 -07:00
Chris Wren
7b5c6170db Merge "unify variable naming scheme." 2013-07-16 18:41:00 +00:00
Adam Powell
628bc64b86 Merge "Fix collapsible action views." 2013-07-16 18:37:36 +00:00
Adam Powell
2dc27f22c9 Fix collapsible action views.
Fix a regression caused by a previous overzealous refactoring. (Oops.)
Watch those conditionals, everyone!

Bug 9866559

Change-Id: Ia88a4ee38edef378e70bdc7151c825375a3d482d
2013-07-16 11:35:17 -07:00
Chris Wren
574a55e9ee unify variable naming scheme.
inflateViews() and updateNotification() reference the same objects
with different names, and it was confusing.  #cleanup

Bug: 6497005
Change-Id: I0d9a94d7ec156b6bfcf4b85c777f9b58311d07d0
2013-07-16 14:34:46 -04:00
Chad Brubaker
d1c87546b3 Move markSocketAsUser to the top of IConnectivityManager.aidl
Move markSocketAsUser to the top of IConnectivityManager.aidl to make
calls from
framework/native/services/connectivitymanager less fragile

Change-Id: Iba92c21dfef175b570521f34e7ee2732e5a0a9c9
2013-07-16 11:29:11 -07:00
Dianne Hackborn
cdae0f3c60 Merge "Switch proc stats to use new process state constants." 2013-07-16 18:15:09 +00:00
Eino-Ville Talvala
855ccce701 Camera2: Remove/@hide non-public keys.
Change-Id: I28fc5d6d41a444730061b6d2652f5cb75f97d56b
2013-07-16 11:13:12 -07:00
Glenn Kasten
78b6a8615c Merge "AudioTrack write() on a full buffer while paused returns 0" 2013-07-16 17:54:26 +00:00
Alan Viverette
d91f8af40b Merge "Add disabled state to FastScroller." 2013-07-16 14:41:40 +00:00
John Spurlock
fe4fb365ba Merge "Un@hide View.PRESSED_STATE_SET." 2013-07-16 13:37:18 +00:00
Alon Albert
2d48f0690a Merge "Minor Formating Fix" 2013-07-16 07:57:32 +00:00
Rom Lemarchand
0a880d0402 Merge "Increase swappiness of processes when memcgroups are enabled" 2013-07-16 02:32:13 +00:00
Baligh Uddin
59983f7b45 Merge "Import translations. DO NOT MERGE" 2013-07-16 02:24:34 +00:00
Mathias Agopian
377d7bd543 Merge "always pass the BufferQueue explicitely to consumers" 2013-07-16 02:17:56 +00:00
Jeff Brown
e77d6dd943 Merge "Completely remove skia dependency from libinput." 2013-07-16 01:49:52 +00:00
michaelwr
20555cb645 Merge "Add a keycode to switch audio tracks (1/2)" 2013-07-16 01:38:46 +00:00