7400 Commits

Author SHA1 Message Date
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
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
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
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
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
John Spurlock
d3cfc504d5 Merge "AudioService: easier forced camera sound debugging." 2015-02-19 16:59:38 +00:00
John Spurlock
5e783732b6 AudioService: easier forced camera sound debugging.
- Add mCameraSoundForced to the service state dumpsys output.
 - Add a sysprop to opt-in to this behavior for testing.  Does
   not replace the configuration check.
 - Centralize the configuration read in one place.

Change-Id: I83f84394b616f0788029412233ae1412b3cdedf2
2015-02-19 10:34:41 -05:00
Amith Yamasani
072543f580 Backup/restore owner info from locksettings
Backup the owner info string and whether or not
owner info is to be shown on the lockscreen.

Watch for changes to the two settings in LockSettingsService
and inform backup manager.

Bump up version numbers for the new entity.

Bug: 19300363
Change-Id: I35485c961d18b26be68873f4d5eeedc5ae513cc8
2015-02-18 16:03:25 -08:00
Adrian Roos
a187960989 Merge "Set the light status flag based on right window" 2015-02-18 20:37:57 +00:00
Adrian Roos
cd3884dfb2 Set the light status flag based on right window
The flag needs to be set based on the top window that is either
reaching beneath the status bar or is dimming.

Bug: 19233606
Change-Id: I7b97f6869e3b7d5ae2b7030122b311ee9e13871f
2015-02-18 20:09:42 +01:00
Adrian Roos
7478de1e87 Merge "Decouple package manager lock and bitmap decoding" 2015-02-18 18:09:09 +00:00
Kenny Guy
c627484653 Merge "Handle users being deleted in getUserHandle." 2015-02-18 16:56:52 +00:00
John Spurlock
fadfc4e11b Merge "Volume prototypes: Allow delegate volume UI to set remote controller." 2015-02-18 16:12:14 +00:00
Craig Mautner
2ada234d82 Merge "Refactor to split computeScreenConfigurationLocked" 2015-02-18 15:42:17 +00:00
Craig Mautner
7fe224e8e9 Refactor to split computeScreenConfigurationLocked
Split into two methods, one that updates the Display and
another that updates the Configuration.

Change-Id: I7b503311da5bfddea2650cdb7dbb447e7a1d09cc
2015-02-17 17:06:07 -08:00
Craig Mautner
2cfc46c91a Merge "Fix NPE in DisplayContent.setTouchExcludeRegion." 2015-02-17 23:50:17 +00:00
Craig Mautner
1bef389f70 Fix NPE in DisplayContent.setTouchExcludeRegion.
DisplayContent.mTapDetector is null for any non-default display. When
testing ActivityView DisplayContent.setTouchExcludeRegion() throws an
NPE when dereferencing mTapDetector.

This change adds a null test to avoid the NPE.

Fixes bug 19413700.

Change-Id: I48a66c0ed071c87b38b354eead58a4de97fb47b9
2015-02-17 15:09:47 -08:00
John Spurlock
eb69e24e85 Volume prototypes: Allow delegate volume UI to set remote controller.
Allow the blessed component (stored in secure settings) to replace
the remote volume controller (for media sessions) in addition
to the volume controller - needed in order to properly support
cast etc.

Bug: 19260237
Change-Id: I7ecc79cb4249744e8d4ffedcab737a35331e220f
2015-02-17 17:15:04 -05:00
Craig Mautner
44e62ca807 Merge "Do not make ActivityContainer available to apps." 2015-02-17 20:54:12 +00:00
Adrian Roos
1bdff9139f Decouple package manager lock and bitmap decoding
Also moves the actual reading and decoding of the
icon into the client process to avoid unnecessary
copies.

Bug: 18474438
Change-Id: I71623ef48c770d752593aa97d69517f6139cc947
2015-02-17 20:57:23 +01:00
John Spurlock
ffeee4b5f1 Merge "Use the unresolved stream type for mute checking." 2015-02-17 18:51:54 +00:00
Craig Mautner
aa7e3ed947 Do not make ActivityContainer available to apps.
A security leak was discovered whereby a malicious app could get the
IActivityContainer object from one app and use it to inject events
into another app. This fix removes the availability of the
IActivityContainer and replaces its one use with a method for
returning the information the IActivityContainer was used for.

Fixes bug 19394591.

Change-Id: Ib3cec25b25130cd8e098892c057742cfd575cfdd
2015-02-17 10:31:20 -08:00
John Spurlock
3ce3725b28 Use the unresolved stream type for mute checking.
Change-Id: I2eab68727f1d1e6846ad0536ee456daf26f6699e
2015-02-17 13:20:45 -05:00
Jorim Jaggi
8de8627657 Merge "Keep light status bar flag when opening notification shade" 2015-02-17 17:16:13 +00:00
Wale Ogunwale
b1193ade25 Merge "Apply stack dim layer to entire screen for system windows." 2015-02-17 16:45:39 +00:00
Wale Ogunwale
6e5c7cb41c Merge "Don't move multi-window stacks on orientation change." 2015-02-17 16:45:14 +00:00
John Spurlock
7d3cf59227 Merge "Volume: Allow dialog to query "muteable" streams." 2015-02-17 16:36:43 +00:00
Jorim Jaggi
73fef8df00 Keep light status bar flag when opening notification shade
Bug: 19233606
Change-Id: I20e50c7267b8c1cd035eafd54609537d493a5ea9
2015-02-17 17:11:25 +01:00
John Spurlock
a9dfbe8b12 Volume: Allow dialog to query "muteable" streams.
Similar to the existing ability to query streams affected
by ringer mode.

Bug:19260237
Change-Id: I76eb5ab6b7c7e3a4d73ac1909289c560194d4fe8
2015-02-17 11:01:51 -05:00
Wale Ogunwale
498e8c92d7 Apply stack dim layer to entire screen for system windows.
System windows like alert dialogs are attached to the currently
focused stack even when the stack isn't full screen. This causes
the dim not to apply to other visible stacks when a system
window is up. Change applies the dim to the entire screen for
system windows since they extend outside a resized stack.

Bug: 19332229
Change-Id: I94affa6a652326bf2cf14b1b8bf54862c111c540
2015-02-16 17:37:56 -08:00
Wale Ogunwale
4a02d8133b Don't move multi-window stacks on orientation change.
Change allows resized stacks to remain in the same location
while their content change orientation.

Bug: 19358195
Change-Id: I5a9898c1cf85cb5c4c2eab0f4969b339defb199a
2015-02-16 17:26:33 -08:00
Craig Mautner
2447a40fce am c8036cdc: am 5d8f2491: am 2a005f6f: Merge "Prevent leaking surfaces from exiting windows"
* commit 'c8036cdc602a35a415fd66370c7621bb957f657e':
  Prevent leaking surfaces from exiting windows
2015-02-16 23:15:56 +00:00
Craig Mautner
c8036cdc60 am 5d8f2491: am 2a005f6f: Merge "Prevent leaking surfaces from exiting windows"
* commit '5d8f249104a1798b6c55ae1de4e5ea36a4babd53':
  Prevent leaking surfaces from exiting windows
2015-02-16 23:09:22 +00:00
Craig Mautner
2a005f6fe9 Merge "Prevent leaking surfaces from exiting windows" 2015-02-16 22:59:20 +00:00
tiger_huang
713abc2879 Prevent leaking surfaces from exiting windows
AM would set the exiting app to be invisible twice by calling
setAppVisibility(). If the screen is turned off during these calls,
the window surfaces of this exiting app won't be destroyed.

The flow:
 1. Screen is on
 2. App A is finished
 3. AM calls setAppVisibility() token=App A, visible=false
 4. WM sets a dummy animation to App A
 5. WM marks App A's wtoken.inPendingTransaction=true
 6. Screen is turned off
 7. AM calls setAppVisibility() token=App A, visible=false
 8. WM calls setTokenVisibilityLocked() directly (screen is off)
 9. WM sends app visibility to App A's client (ViewRootImpl)
10. WM clears the dummy animation from App A
11. App A's client calls WMS.relayoutWindow() to be not visible
12. WM sets App A's window mExiting=true but not destroy its surface
13. App A's window surface leaks...

Note:
a. The call in 3. is from ActivityStack.finishActivityLocked
b. The call in 7. is from ActivityStack.resumeTopActivityInnerLocked
c. In 10., App A won't get the real animation while screen is off
d. In 12., App A's inPendingTransaction=true; WM takes it's animating
e. mExiting won't be cleared because App A has no animation to
   trigger WindowStateAnimator.finishExit()

After applying this patch, WM would destroy the surface in 12. of the
above flow.

Change-Id: I18b79ba96695ec80d57a85dc15cf92a9e7d3a6ef
2015-02-16 08:27:28 +00:00
Wale Ogunwale
421d6ad191 Merge "Adjust activity display metrics based on stack configuration." 2015-02-15 20:20:08 +00:00
Wale Ogunwale
7c72668f19 Adjust activity display metrics based on stack configuration.
Apps normally use context.getResources().getDisplayMetrics()
or getWindowManager().getDefaultDisplay() to get information
about the screen dimensions. Not all the screen space is available
for apps in a multi-window environment, so we limit the dimensions
of the display object exposed to the app to that of the containing
stack.

Bug: 19225079
Bug: 19354838
Change-Id: I8dc3a6c9b99ecedcca28fc4ddaba9f31feb4f871
2015-02-13 21:12:47 -08:00