24965 Commits

Author SHA1 Message Date
Adrian Roos
e377c5011f Merge "Prevent regular processes from accessing the password history" 2015-02-25 13:27:05 +00:00
Christopher Tate
6a873711cd Merge "Don't crash when backup timeout races with agent completion" 2015-02-25 02:30:37 +00:00
Wale Ogunwale
fa9ec310d8 Merge "Have AMS.setFocusedActivityLocked() move the focus stack to the front" 2015-02-25 01:55:32 +00:00
Christopher Tate
12f783d6c6 Don't crash when backup timeout races with agent completion
There's a narrow window of time in which an agent reporting that its
operation has completed races with timeouts such that we wind up
handling the completion callback just after certain fundamental state
has been reset.  Detect this race and proceed gracefully instead of
crashing.

Bug 19498669

Change-Id: I5a475527db1a55a8e567366ddfb10112e427682e
2015-02-24 17:37:54 -08:00
Wale Ogunwale
af0e448859 Have AMS.setFocusedActivityLocked() move the focus stack to the front
Bug: 19219490
Change-Id: I089c42a6cf6277f5975064103c9804c2ab05dcd6
2015-02-24 17:37:29 -08:00
Christopher Tate
e266a9f8d1 Merge "Check DUMP permission in the backup service trampoline" 2015-02-25 01:11:34 +00:00
Christopher Tate
8dd7d01c1a Check DUMP permission in the backup service trampoline
Make sure that even if backup is disabled outright (and hence there
is no underlying service implementation for the trampoline to delegate
to), the DUMP permission exception is thrown as expected.

Bug 19422232

Change-Id: I6d1a17c5f85adcfad75af969b521920e786c05a8
2015-02-24 15:16:57 -08:00
Jeff Brown
9fb3fd1d66 To help assess latency, dump the time a broadcast was enqueued.
Previously we only dumped the time when a broadcast started dispatch.
Start tracking the time when a broadcast was enqueued so that
we can determine whether the broadcast queue was stalled and for
how long.  Together with other information in the dump, this can help
to ascertain whether broadcast latency is being caused by the sender,
the dispatcher, or the receiver.

Bug: 17695520
Change-Id: I4f2e4bb92f9178f5d095b9124a15eb2e5f13b9f6
2015-02-24 19:59:16 +00:00
Craig Mautner
5d8a69f277 Merge "Cleanup the activity before the task and stack" 2015-02-24 19:36:08 +00:00
Craig Mautner
acebdc84d1 Cleanup the activity before the task and stack
The method cleanupActivityLocked() should be called before
removeActivityFromHistoryLocked(). Previously it didn't matter but
now that we null TaskRecord.stack when removing the last activity
from the task it does.

Fixes NPE in bug 19491381.

Change-Id: Ia6f8f560c0fe4df330577f313e24d7dd02c18409
2015-02-24 11:07:18 -08:00
Wale Ogunwale
53a29a90f3 Added ActivityManager API and AM command to resize a task.
Also fixed issue with ActivityStackSupervisor.moveTaskToStackLocked()
functionality not working correctly.

Change-Id: Ia13f1e92a7c59ce6543c226533ac8ea623488290
2015-02-24 09:33:18 -08:00
Wale Ogunwale
d697ceac02 Improved back button behavior in multi-window mode.
Pressing the back button on the last activity in a stack that isn't
full screen causes the home stack to move forward and hide all other
visible stacks. This change allows the affected stack to be removed
while keeping the other stack visible.

Bug: 19423645
Change-Id: I30d84f84d525c114ee4993c1e4178af70fe47440
2015-02-24 08:24:58 -08:00
Adrian Roos
001b00d3bd Prevent regular processes from accessing the password history
Bug: 19019350
Change-Id: Iee410d62827fe0f9d43e08dd8869e8eea590382f
2015-02-24 17:16:44 +01:00
Chad Jones
1fb5528643 resolved conflicts for merge of 57bb5f5c to master
Change-Id: Id5dfe7fc919305658312771a031c0764cef5515c
2015-02-23 21:19:58 -08:00
Joe LaPenna
57bb5f5c8b am c0c39516: Merge "Hold a wake lock while dozing when display updates are pending." into lmp-mr1-modular-dev
* commit 'c0c395162ff14b83694158663470ad60e065d9a9':
  Hold a wake lock while dozing when display updates are pending.
2015-02-24 00:46:48 +00:00
Mike Lockwood
f3c7276a4f Merge "Add MIDI Manager API tweaks:" 2015-02-23 23:03:36 +00:00
Wale Ogunwale
4b8b226343 Merge "Don't delete home stack when last task is removed." 2015-02-23 22:51:44 +00:00
Mike Lockwood
b673770f71 Add MIDI Manager API tweaks:
- Change the package name from android.midi to android.media.midi

- Add option for specifying a Handler for DeviceCallback notifications

Change-Id: Ia9e9817a651c06299f4e02ee1da3c9666ff64cb9
2015-02-23 14:32:23 -08:00
Mike Lockwood
152d6b2c2c Merge "Add support for USB notification when connected as a MIDI peripheral" 2015-02-23 19:21:58 +00:00
Wale Ogunwale
49853bf1df Don't delete home stack when last task is removed.
Bug: 19470291
Change-Id: I4a6c24edb6cc83a0f155836ce4e1394807da1563
2015-02-23 09:24:42 -08:00
Jorim Jaggi
24bec7ce7a Implement nice transitions for light status bar
- When the flag changes, apply an animation from the current value
- When the flag change is caused by an app transition, synchronize
  the status bar animation with the app transition animation.
  PhoneWindowManager calculates the timings based on some heuristics
  of the app transition animations and supplies these timings to
  StatusBarService.

Bug: 19233606
Change-Id: I4f99afba8f1eebb3524699ed4d7fbafee5463a37
2015-02-23 13:08:41 +01:00
Jorim Jaggi
378756154f Stop app transition based on mAppWindowAnimating field
Bug: 19440051
Change-Id: Ic385eab15cca8c5b814dc9cdbfd2d2f79fd84b02
2015-02-23 12:44:47 +01:00
Jorim Jaggi
77ba4803a5 Add AppTransitionListener
Introduces the concept of a listener to be notified about app
transition events. The only client at the moment is window manager
which notifies activity manager about completed transitions, but this
can be used for various clients, including the status bar.

Bug: 19233606
Change-Id: Ia6fec5837b6eb4db90f3cb1c999d3f157ba6dd4a
2015-02-23 12:44:25 +01:00
Jinsuk Kim
48c217ab91 Merge "CEC: Switch ARC hardware circuit before device update" 2015-02-23 03:33:40 +00:00
Jinsuk Kim
757c097753 CEC: Switch ARC hardware circuit before device update
Audio Return Channel hardware circuit was being switched after
the device update initiated by hotplug event. The device instance
was already removed by the time ARC update was attempted, hence
caused an exception.

This CL ensure the config change is done in advance, when
the AVR device instance is still present.

Bug: 19250400
Change-Id: I31cf682f5c8d1a279a0703d10fe182f3da23d3db
2015-02-23 12:30:29 +09:00
Jinsuk Kim
7a9ba420f4 Pass old and new volume to CEC without rounding up
Unnecessary rounding up was causing volume change requests
not to be converted to CEC commands occasionally. Removed
the operation.

Bug: 19332158
Change-Id: Ia074722058ada55d46f38aea7a2b915bb5fd2a00
2015-02-23 06:51:45 +09:00
John Spurlock
fadb0879d9 Merge "VolumePrototypes: Allow current controller to access sessions." 2015-02-22 16:09:10 +00:00
John Spurlock
be19ed0bd6 VolumePrototypes: Allow current controller to access sessions.
Allow the currently blessed volume controller delegate to access
media session manager to support multiple remote sessions.

Bug: 19260237
Change-Id: I53120f0852c69a7ea08b7b4a9f61902b961dbc70
2015-02-22 10:57:55 -05:00
Mike Lockwood
c3c2ff70a2 Add support for USB notification when connected as a MIDI peripheral
Change-Id: Ib3efcda6af976c878e63b0d35a8e47a3ea9435a3
2015-02-20 15:10:20 -08:00
Jeff Brown
c2932a1be3 Hold a wake lock while dozing when display updates are pending.
When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.

This patch is somewhat approximate but should be good enough for
most devices today.

Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock.  There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing.  However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).

Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.

Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350
2015-02-20 10:54:09 -08:00
Wale Ogunwale
b3b8fef9e3 Revert "Defer tap outside stack until multiwindows"
This reverts commit baf6bef001a582fea275bf891294cf1fe9d5472e.

Bug: 19424251
2015-02-20 09:36:35 -08:00
Wale Ogunwale
822237858a Merge "Remove activity and window stacks when last task is removed." 2015-02-20 16:30:49 +00:00
Nicolas Prevot
f580c91618 Merge "Dump the profile/device owner when dumping device policy state." 2015-02-20 10:33:18 +00:00
Dianne Hackborn
5f83382c40 Merge "Add some detailed data as part of battery history." 2015-02-20 01:41:29 +00:00
Dianne Hackborn
d1eccbea38 Add some detailed data as part of battery history.
Every time the battery level changes, a new extended
detailed use data structure is written to the history.
This currently only contains delta CPU use since the
last detailed entry (total CPU and to three uids), but
it gives us the infrastructure for adding more detailed
data in the future.

A detail entry for regular history looks like:

     Details: cpu=15730u+2307s (u0a57=11312u+502s, 1000=2344u+701s, 0=473u+991s)
              /proc/stat=15377 usr, 1797 sys, 197 io, 0 irq, 8 sirq, 23103 idle (42.9% of 6m 44s 820ms)

u is user-space cpu time, s is system/kernel time.

The equivalent check-in output is:

9,h,0,Dcpu=15730:2307/10057:11312:502/1000:2344:701/0:473:991
9,h,0,Dpst=15377,1797,197,0,8,23103

Also add a new "unplug" command to the battery service,
to easily put it into a state where it always considers
the device to be running on battery.

Change-Id: Ic76d966f11e592b9dd671879977bf999ebc11eef
2015-02-19 17:37:12 -08:00
Craig Mautner
4f9796e028 Merge changes Ib2def344,Ifd15736b
* changes:
  Permit layout when stopped if reporting draw
  Refactor computeScreenConfigurationLocked and more.
2015-02-20 01:35:17 +00:00
Wale Ogunwale
df33727718 Merge "Fixed issue with focused stack frame not displaying in multi-window." 2015-02-20 01:06:14 +00:00
Craig Mautner
b605f4af14 Refactor computeScreenConfigurationLocked and more.
- Recognizing that computeScreenConfigurationLocked() only returned
false if mDisplayReady was false allows multiple code
simplifications.
- Make computeNewConfigurationLocked() always return a non-null
value.
- Remove unused Session parameter from removeWindowInnerLocked().
- Just allocate mForceRemoves one time.
- Since ADJUST_WALLPAPER_VISIBILITY_CHANGED was unused have
adjustWallpaperWindowsLocked() return a boolean.
- Remove unused long parameter from handleNotObscuredLocked().

Change-Id: Ifd15736b163ab6e989f8ca32cf8f94b316386216
2015-02-19 16:51:12 -08:00
Amith Yamasani
081eba6e66 Merge "Backup/restore owner info from locksettings" 2015-02-20 00:48:27 +00:00
Wale Ogunwale
0f95e3f075 Remove activity and window stacks when last task is removed.
Also,
* Only restore recent task to a full screen stack instead of any
  randomly sized stack.
* Fixed issue where we were restore task from recents for some
  operations when we didn't need to.
* Null out TaskRecord.stack when the task is removed from the
  stack.

Bug: 19083170
Change-Id: I4e006f101f9d0f2aebde130ad77afc4d258c6612
2015-02-19 16:21:09 -08:00
Paul McLean
ceb47aae5a Changing AudioManager.listAudioDevicePorts to take a ArrayList<AudioDevicePort> argument.
Change-Id: Ide9a2f58a7544e263600e100ba4274403201c5fa
2015-02-19 15:33:34 -08:00
Paul McLean
83b40599bb Merge "Audio Device Enumeration API." 2015-02-19 23:09:07 +00:00
Paul McLean
0e4242f9cb Audio Device Enumeration API.
Change-Id: Ic78fda8b2a6f6ac0f37a1f665b29f3359cfc5ecc
2015-02-19 15:03:53 -08:00
Fyodor Kupolov
fcc87275e3 Merge "Code cleanup" 2015-02-19 22:53:26 +00:00
Fyodor Kupolov
22029f0a50 Code cleanup
Use preconditions for argument checking.

Change-Id: I2e9dcd8da1e0bdac917393376d1a7442ab63a638
2015-02-19 14:50:44 -08:00
Wale Ogunwale
aa8a9b711d Fixed issue with focused stack frame not displaying in multi-window.
Problem was caused by getting the canvas from the surface while
within a transaction.

Also, cleaned up code a little so it is clearer what is happening.

Bug: 19249857
Change-Id: I9ff1f612bc8a58a0e0c7939dbb400d083d8a7039
2015-02-19 10:57:02 -08:00
John Spurlock
0dfc90157d Merge "AudioService: Fire volume-changed intents for all streams." 2015-02-19 17:56:40 +00:00
John Spurlock
c16442c515 Merge "AudioService: Fire the mute-changed intent for all changes." 2015-02-19 17:50:03 +00:00
John Spurlock
f63860cd80 AudioService: Fire volume-changed intents for all streams.
Allow observing all stream changed events, including streams
that are bound to another stream via aliasing.

Change-Id: I2c1717ce632c4cb045c06785cb1ecc531a221ff8
2015-02-19 12:10:01 -05:00
John Spurlock
22b9ee1298 AudioService: Fire the mute-changed intent for all changes.
Not merely those coming from explicit mute adjustments.

Change-Id: I79ad7e5800eb0602fd10d966441973800a1c318b
2015-02-19 12:02:02 -05:00