49674 Commits

Author SHA1 Message Date
Anton Philippov
bc44678fb1 Add null check in BackupManagerService$PerformBackupTask.handleCancel()
handleCancel() can be called before we start backing up any particular
package, therefore we need to properly handle log messages in that case.

Bug: 36638539
Test: manual
Change-Id: Ic96e2fbad5c0a79640a3419d187e8b5e4d265de3
(cherry picked from commit 519a87db8fabb49f299aa384aeb5cfe4dfedf907)
2017-03-28 11:25:44 +00:00
Phil Weaver
668c34444d Merge "Fix permission checking for a11y volume." 2017-03-28 03:58:16 +00:00
Erik Kline
7f9bbae035 Merge "Add null check to IpManager.dump()" am: 58406d1df2 am: c5bca697ba
am: e398bae572

Change-Id: I172f23945a79191b777e2daf6795e2d228f510a6
2017-03-28 02:38:20 +00:00
Erik Kline
e398bae572 Merge "Add null check to IpManager.dump()" am: 58406d1df2
am: c5bca697ba

Change-Id: Id5ebbea0c64baa24d162c0545d45915c948f45e6
2017-03-28 02:34:15 +00:00
Erik Kline
c5bca697ba Merge "Add null check to IpManager.dump()"
am: 58406d1df2

Change-Id: I68f644a305d58e1396522d73c0983e1eb201cb1c
2017-03-28 02:30:18 +00:00
TreeHugger Robot
0870696681 Merge "Introduced additional lock - dbLock" 2017-03-28 02:12:07 +00:00
TreeHugger Robot
a2bd52aca3 Merge "Fix issue with task overlay activities not finishing." 2017-03-28 02:02:34 +00:00
Fyodor Kupolov
8cd927d8ea Introduced additional lock - dbLock
Right now it is always used with cacheLock. In the future, we will be
adding optimizations to reduce cacheLock contention by only holding it
when updating the cache.

This change is non-functional and doesn't change the current locking
contract

Test: Manual + AccountManagerServiceTest
Bug: 36485175
Change-Id: Iebc437463958d33b32fc1273a84680c22ac60825
2017-03-27 17:55:33 -07:00
TreeHugger Robot
77a1f7522e Merge "Parse NotificationChannel ID meta-data." 2017-03-28 00:46:57 +00:00
TreeHugger Robot
6e42a1d0ce Merge "Moved Session and ViewState to its own classes." 2017-03-28 00:28:59 +00:00
TreeHugger Robot
b567b580a8 Merge "Sync the constants in HAL and framework" 2017-03-28 00:02:23 +00:00
TreeHugger Robot
9d421ba050 Merge changes Ia971b2bc,I0001eb3d,I55a6951e
* changes:
  Remove framework-protos from SystemUI
  Disable proguard for PluginDummyLib
  Enable multidex for dx
2017-03-27 23:37:10 +00:00
TreeHugger Robot
d52cdfb89f Merge "Simplify the media button handling logic" 2017-03-27 23:36:38 +00:00
TreeHugger Robot
52b716df85 Merge "Don't spam the log during quota calculations." 2017-03-27 23:27:53 +00:00
Shubang
39f285d5a7 Sync the constants in HAL and framework
Test: Build and flash device

Bug: 36233336
Change-Id: Ie81862825b601bdafd7653564d7393686d54f531
2017-03-27 15:15:46 -07:00
Dmitry Dementyev
117e0c9b5a Merge "Add cache for Account Visibility values." 2017-03-27 22:14:34 +00:00
Phil Weaver
f1a9aff962 Fix permission checking for a11y volume.
Adding new permission for changing accessibility volume
to allow system UI to change it. Also providing audio
manager with a whitelist of bound accessibility service
uids so it can allow servics to change the volume.

Bug: 36569297
Test: Adding CTS test in linked CL.
Change-Id: I4f327e3a251fc3780c5957f41217c2ef5bb8b16e
2017-03-27 14:59:26 -07:00
Jaewan Kim
92dea33bfe Simplify the media button handling logic
Here's the new media handling logic.

1. If the foreground app consumes the media key event
  (Activity.onKeyDown/Up() or Activity.setMediaController()),
  we stop here.
2. Find the media app whose AudioPlaybackConfiguration becomes
  PLAYER_STATE_STARTED lastly across the boot. The media app is the app
  with the media session.
  - If its session is still alive, send the media key event
    to the media session.
  - If its session has been released but the session set the media
    button receiver, send the media key event through the media button
    receiver.
  - If it has multiple media sessions, pick the media session whose
    PlaybackState matches with the AudioPlaybackConfiguration's player
    state.
3. Stop here. Don't try revive any other app.

This approach has two limitations.
1. If an app has multiple AudioPlaybackConfigurations and/or
   media sessions, the MediaSessionService may pick the wrong media
   session to send media key events.
2. If an app with a media session plays sound effects differently from
   the SoundPool class, the MediaSessionService would consider the app
   as the lastly played media app.

Bug: 33032080
Test: Manual tests as follows
  1. Checked that the lastly played app receives the media key events
     although the app's media session doesn't report its playback state.
  2. Checked that the lastly played app receives the media key events
     although the app's media session is released.
  3. Checked that the lastly played app doesn't receive the media key
     events if its playback is remote.
Change-Id: I1fd6f9eee0750da4dea9fcc7401fdb1c3f249a72
2017-03-27 14:58:43 -07:00
Daniel Nishi
f59418f29c Don't spam the log during quota calculations.
We base the cache quotas on usage stats on the device. These stats,
however, can contain entries from apps which are no longer installed.
In this case, we skip its calculation and log a warning. This patch
removes the warning aspect of it, because it is a legitimate case.

Change-Id: I2a6a797966bfee007515735308535a5dcc118f03
Fixes: 36649802
Test: Manual
2017-03-27 14:52:46 -07:00
Steven Moreland
96b14c7d78 Merge "Fix nativeProcs being null." 2017-03-27 21:03:23 +00:00
Martijn Coenen
94a0dcdde1 Fix nativeProcs being null.
dumpStackTraces originally checked this. This only happens when a silent
ANR is triggerred on a process name not in NATIVE_STACKS_OF_INTEREST.

Bug: 36414311
Bug: 36652737
Test: manual
Change-Id: I24402fb2ef2e08482f866dc1086ce83c1365d7ec
2017-03-27 21:01:34 +00:00
TreeHugger Robot
3ebc1b7f5a Merge "Updating to new aspect ratio limits." 2017-03-27 20:54:45 +00:00
Sudheer Shanka
995d1c97ea Merge "Uncomment a test." 2017-03-27 20:40:37 +00:00
Winson Chung
6954fc9a7e Fix issue with task overlay activities not finishing.
- The task overlay activity should only exist when there are activities
  present in the task.  When the last such activity is finished, we should
  remove the whole task entirely including the task overlay.
- Exposing the task overlay apis to CTS

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I1dabe7782fb6769a90d832664e8052be158041e1
2017-03-27 13:34:53 -07:00
Erik Kline
0ea70fc38b Add null check to IpManager.dump()
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 36650508
Change-Id: I2270bec20b966de487048f0ea0c97360e242cd9d
2017-03-28 05:30:41 +09:00
Dmitry Dementyev
71fa5261d3 Add cache for Account Visibility values.
Test: cts
Bug: 36485175
Change-Id: I075b81f8b287199d51ea09dc1108748310ab846c
2017-03-27 13:22:58 -07:00
David Stevens
e259c2c42b Merge "Compute the focused window in display focus order" 2017-03-27 19:59:58 +00:00
TreeHugger Robot
b0aaef2892 Merge "Fixed issue with SCREEN_ORIENTATION_BEHIND not working correctly" 2017-03-27 19:58:34 +00:00
Felipe Leme
6fa8a07143 Moved Session and ViewState to its own classes.
Such separation will make it easier to maintain them...

Bug: 35707731
Test: CtsAutoFillServiceTestCases pass
Change-Id: I7164598e1ce54dca8cdb8286f65ec4baa926f98d
2017-03-27 12:34:12 -07:00
Winson Chung
bd04196f8d Updating to new aspect ratio limits.
Bug: 35949789
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: Id47bdee0903744efb6aa3200691cd7817463aa13
2017-03-27 12:17:39 -07:00
Winson Chung
a2a3b1d7b5 Merge "Prevent cleaning up and resuming null activity when task is reparented." 2017-03-27 19:08:57 +00:00
TreeHugger Robot
5e01870015 Merge "Unbind from service on app killed and dedup association requests" 2017-03-27 18:43:37 +00:00
Jason Monk
b03314dad8 Merge "Clean up and cover more QS metrics" 2017-03-27 18:24:22 +00:00
David Stevens
4693956388 Compute the focused window in display focus order
A WindowContainer's children are sorted so the focused child is at the
end of the list, so RootWindowContainer needs to iterate from end to
start when looking for the focused window.

Bug: 36590788
Test: DisplayContentTests#testFocusedWindowMultipleDisplays
Change-Id: I56e6b7d2054bc1e74b54a4f99706a08d278fa2e1
2017-03-27 11:07:22 -07:00
Wale Ogunwale
5e5a68dc06 Fixed issue with SCREEN_ORIENTATION_BEHIND not working correctly
If an app specifies SCREEN_ORIENTATION_BEHIND, then use the orientation
of the app behind it regardless of the visibility state of the app
behind.

Fixes: 35281868
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskStackTests
Change-Id: Ieba4e4bb1a7f47cd6f082491d37fcabcf5bd5199
2017-03-27 11:02:54 -07:00
Sudheer Shanka
deeb08fdcb Uncomment a test.
It was commented earlier because of a crash. Since that issue has been
fixed, uncomment the test.

Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
Change-Id: I5f2b1b0bffe032633f42c8c34ed8a7ae5a3dfc10
2017-03-27 10:57:01 -07:00
TreeHugger Robot
af4bb6864f Merge "Remove task activities from LRU list when task is reparented." 2017-03-27 17:51:19 +00:00
Kang Li
1eb2708865 Merge "Move retention length of users' chooser selections to SystemProperties, to meet CDD requirement." 2017-03-27 17:39:02 +00:00
Jason Monk
8c09ac7435 Clean up and cover more QS metrics
Change-Id: I4ab5e54398024c8b16ca8223f0639aadcdef4377
Fixes: 34801532
Test: runtest systemui
2017-03-27 12:36:25 -04:00
TreeHugger Robot
e784f7a0a3 Merge "WatchDog: dump hal pids when killing a process." 2017-03-27 16:36:01 +00:00
Yorke Lee
82cff222db Merge "Only change bounds if new activity is being added to InTask" 2017-03-27 16:34:34 +00:00
Jeff Sharkey
72ba815ca4 Merge "Add a new "virtual disk" feature." 2017-03-27 15:22:52 +00:00
Kang Li
2bdf134eff Move retention length of users' chooser selections to SystemProperties,
to meet CDD requirement.

bug: 33423136
Test: manual - shared images in Camera. More CTS and GTS tests to be
added.

Change-Id: I0e0c759bec11137e2290f4a43a92be8e97eef022
2017-03-27 08:19:41 -07:00
Steven Moreland
6b47c54a65 WatchDog: dump hal pids when killing a process.
Test: `adb shell am hang --allow-restart` -> Watchdog dumps
  hal traces (eventually)
Bug: 36414311
Change-Id: I5143cedf3e5ab4695d2507a29993e748f6de17d5
2017-03-27 08:06:54 -07:00
Michal Karpinski
aa870a4782 Merge "Add support for key-value packages to adb backup/restore." 2017-03-27 09:28:05 +00:00
Joel Scherpelz
b58609d7a6 Merge "Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces"" am: 63d26caa38 am: 84c2fb2070
am: c3e0dcf082

Change-Id: I9a48897312a785ea7e0338aa68c8bb4877a741e6
2017-03-27 05:35:41 +00:00
Joel Scherpelz
c3e0dcf082 Merge "Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces"" am: 63d26caa38
am: 84c2fb2070

Change-Id: I6601d7a30e3eabc3e3929a02f415ba620a2b5c28
2017-03-27 05:29:02 +00:00
Joel Scherpelz
84c2fb2070 Merge "Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces""
am: 63d26caa38

Change-Id: I367506eee558dbd7abeeabf09716f7024c2e43d8
2017-03-27 05:24:09 +00:00
Joel Scherpelz
63d26caa38 Merge "Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces"" 2017-03-27 05:17:22 +00:00
Joel Scherpelz
6a35f3c3e2 Revert "Set accept_ra_rt_info_max_plen to 64 before enabling IPv6 interfaces"
On second thought, let's set accept_ra_rt_info_m**_plen in 
Netd (InterfaceController::initializeAll())

This reverts commit 25870a2c9effd7a7d31c0678c34a6e952b2d56a1.

Change-Id: I22b000623bb852e375385d4aae789d007e84ba3d
2017-03-27 00:54:41 +00:00