307978 Commits

Author SHA1 Message Date
Andrii Kulian
7d95df4971 Always check front stack on its current display
Previously checks for front stacks were looking among
stack on primary display only. This doesn't make any
sense for stacks on secondary screens, so let's always
check among other stacks on its current display.

Bug: 34862802
Test: Manual.
Change-Id: I29ee160d455719d75f4a5981a6ba9c60f3d90084
2017-02-15 15:15:03 -08:00
Nick Kralevich
3082eb7c72 system_server: add CAP_SYS_PTRACE
Commit https://android.googlesource.com/kernel/common/+/f0ce0eee added
CAP_SYS_RESOURCE as a capability check which would allow access to
sensitive /proc/PID files. system_server uses this capability to collect
smaps from managed processes. Presumably this was done to avoid the
implications of granting CAP_SYS_PTRACE to system_server.

However, with SELinux enforcement, we can grant CAP_SYS_PTRACE but not
allow ptrace attach() to other processes. The net result of this is that
CAP_SYS_PTRACE and CAP_SYS_RESOURCE have identical security controls, as
long as system_server:process ptrace is never granted.

Add CAP_SYS_PTRACE to the set of capabilities granted to system_server.

Don't delete CAP_SYS_RESOURCE for now. SELinux has blocked the use of
CAP_SYS_RESOURCE, but we still want to generate audit logs if it's
triggered. CAP_SYS_RESOURCE can be deleted in a future commit.

Bug: 34951864
Test: Device boots, functionality remains identical, no sys_resource
denials from system_server.

Change-Id: I2570266165396dba2b600eac7c42c94800d9c65b
2017-02-15 15:12:31 -08:00
Winson Chung
c3c62b3072 Merge "Apply minimized offset when fetching new aspect ratio bounds." 2017-02-15 23:05:50 +00:00
Hassan Shojania
18d58d81b4 Merge "New setDataSource API for accepting cookies" 2017-02-15 23:03:02 +00:00
Hall Liu
c788f3e15c Merge "Add extra key for app-specified outgoing call timeout" am: decc6c9d56 am: 2bc24e252e am: 38f5001c10
am: b521143aa1

Change-Id: I416d7ad1a12a6b8ddb2ea2958356a487e7f10aef
2017-02-15 22:56:31 +00:00
Jason Monk
f13413e2f3 Various QS fixes and cleanup
Test: runtest systemui
Change-Id: If87f58f2af00b23c5e1a8e38a63a6a63d903002c
2017-02-15 17:48:27 -05:00
Rubin Xu
b9382c23a8 Merge "Add escrow token support to synthetic password flow" 2017-02-15 22:41:54 +00:00
Hall Liu
67c708bed8 Add extra key for app-specified outgoing call timeout
Bug: 34474757
Test: manual
Merged-In: I6e7e67c946205b28440a4daeeab3a002f8d6bccc
Change-Id: Ia93d68d6a01308b0b93b88977daf983a0ed3a22c
2017-02-15 14:39:43 -08:00
Rubin Xu
5ccd8291ed Merge "Add synthetic password to authentication flow" 2017-02-15 22:37:42 +00:00
Hall Liu
b521143aa1 Merge "Add extra key for app-specified outgoing call timeout" am: decc6c9d56 am: 2bc24e252e
am: 38f5001c10

Change-Id: I6e7e67c946205b28440a4daeeab3a002f8d6bccc
2017-02-15 22:35:52 +00:00
Hall Liu
38f5001c10 Merge "Add extra key for app-specified outgoing call timeout" am: decc6c9d56
am: 2bc24e252e

Change-Id: I1912bfa8856e78f375587d94bf589ef2fd25bee8
2017-02-15 22:30:44 +00:00
Hall Liu
2bc24e252e Merge "Add extra key for app-specified outgoing call timeout"
am: decc6c9d56

Change-Id: I58a70b265f4b5af735e93c9004616bd44d5c51de
2017-02-15 22:24:23 +00:00
Adrian Roos
dcdaaec8d5 Merge "AOD: Show High notifications on AOD" 2017-02-15 21:56:40 +00:00
Badhri Jagan Sridharan
efad4e0d6a Merge changes from topic 'dual_role_chargers' am: 37b939a180 am: 0a3efc2622 am: d4a847495e
am: ac0bb1f7b2

Change-Id: I9647bbeea800b9e7d73748474f8c5bb83620df39
2017-02-15 21:49:17 +00:00
Guang Zhu
d80ba8abc8 Merge "Revert "remove app-ephemeral"" 2017-02-15 21:47:34 +00:00
Guang Zhu
626ffb4556 Merge "Revert "Per user setting for instant app"" 2017-02-15 21:47:34 +00:00
Winson Chung
28217a4ca2 Ensuring that there are per-user last stack active times.
- This fixes an issue where the last stack active time would be clobbered
  when switching between users.  With the policy in the phone/stack
  recents, this is fine, but with the grid recents, it no longer only
  applies when out of the historical window, so it is always wrong (it
  would normally be wrong if switching back from another user after the
  historical time of six hours).

  This CL will migrate the last stack active time to a per-user secure
  setting, which will be used going forward.

Bug: 35375206
Test: On the Ryu, launch some tasks, switch users, launch more tasks, and
      return to the original user

Change-Id: I9941526de5d1dd52d1f9003e795995389064b19d
2017-02-15 13:46:52 -08:00
Guang Zhu
be9ffa15af Revert "Per user setting for instant app"
Bug: 35390781

This reverts commit 2f5811dcfd840e149851a9333e27ef3cdddf7a46.

Change-Id: Ibb1c8dacbdc6908fc7fa2bc5dca664f2455162bf
2017-02-15 21:43:48 +00:00
Guang Zhu
c2f0d886f4 Revert "remove app-ephemeral"
Bug: 35390781

This reverts commit 4eb7cea562cd117e598a327ab4d93142589c1ae6.

Change-Id: I94567d333b40f99f7a2573125259f4ab575a0519
2017-02-15 21:43:38 +00:00
Soonil Nagarkar
2b565df367 Use SystemConfig to control background location throttling whitelist.
Test: manual

Change-Id: I51285f9a463381855f2bb3fa9af34af1930b8ebd
2017-02-15 13:43:11 -08:00
Hall Liu
decc6c9d56 Merge "Add extra key for app-specified outgoing call timeout" 2017-02-15 21:41:23 +00:00
Philip P. Moltmann
9a044dad00 Merge changes from topic 'revert-anr-revert'
* changes:
  Process queuedWork on main thread and add logging
  Revert accidential merge 492a058d58e991445996cb8cc8dcb24494ac20c5
2017-02-15 21:37:34 +00:00
Conrad Chen
485c9f7ede TIF: Add internal provider ID field to channels
Test: build
Bug: 35101383
Change-Id: Ic725da964a287a2aa434998dd4e5879ea1f8e6bd
2017-02-15 13:23:18 -08:00
Fan Zhang
d95dcb4fe7 Add logging for advanced button expand action
Change-Id: I648984686e2dda053f3d0648954c252edd805342
Fix: 35356464
Test: Builds
2017-02-15 13:22:04 -08:00
Fan Zhang
65899436fc Add FIELD_CONTEXT to track source of action in eventlog.
Change-Id: Id32aaab4b4445e5db318d2b48d198b2a815b7cd4
Fix: 35359289
Bug: 35356464
Test: builds
2017-02-15 13:21:35 -08:00
Selim Cinek
74841fb59f Merge "Fixed that an icon could become invisible" 2017-02-15 21:17:56 +00:00
Jason Monk
d7937b3488 Merge "New system for versioning sysui plugins" 2017-02-15 20:49:05 +00:00
Julia Reynolds
dc71f6c268 Merge "Add logs, reorder bugreport." 2017-02-15 20:36:49 +00:00
Badhri Jagan Sridharan
ac0bb1f7b2 Merge changes from topic 'dual_role_chargers' am: 37b939a180 am: 0a3efc2622
am: d4a847495e

Change-Id: Icadc77cb7630e61166ab3c9608f60736c24e52c1
2017-02-15 20:27:18 +00:00
Jason Monk
6650e89dbc Merge "Tuner updates" 2017-02-15 20:24:44 +00:00
Badhri Jagan Sridharan
d4a847495e Merge changes from topic 'dual_role_chargers' am: 37b939a180
am: 0a3efc2622

Change-Id: I2c0ba36c46674ff7f9a0b963543e271eec93858c
2017-02-15 20:20:15 +00:00
Badhri Jagan Sridharan
0a3efc2622 Merge changes from topic 'dual_role_chargers'
am: 37b939a180

Change-Id: I2b9eda605ae85347eb2e3e4202a6c7ec176778af
2017-02-15 20:13:53 +00:00
Selim Cinek
251334e1dc Merge "Made the notificationViewStates static" 2017-02-15 20:10:11 +00:00
Selim Cinek
b52448c8b5 Merge "Fixed a few coloring issues" 2017-02-15 20:08:58 +00:00
Jason Monk
61becf08fc Merge "Fix test failures on treehugger?" 2017-02-15 20:07:50 +00:00
Badhri Jagan Sridharan
37b939a180 Merge changes from topic 'dual_role_chargers'
* changes:
  Introduce debounce to filter rapidly toggling type-c ports
  Fix handling usb dialog for wall chargers.
2017-02-15 20:00:25 +00:00
Rubin Xu
aab7a4146c Add escrow token API in DevicePolicyManager.
Take advantage of the new authentication flow in LockSettingsService
and allow PO or DO to provision escrow tokens on the device. The
escrow token grants them the ability to change device lockscreen
(if used by DO) or work profile challenge (if used by PO). The
new password reset mechanism is even usable before user unlocks,
and it preserves authentication-bound keys in keystore.

Test: runtest frameworks-services -c com.android.server.SyntheticPasswordTests
Test: runtest frameworks-services -c com.android.server.devicepolicy.DevicePolicyManagerTest
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testResetPasswordWithToken
Bug: 33126620
Change-Id: Iaa684c51946f726cbd909e9ac70ad3e9ca3de1ac
2017-02-15 19:54:31 +00:00
Rubin Xu
f095f8366b Add escrow token support to synthetic password flow
Escrow token provides an alternative way to derive synthetic password for a
given user. In the new flow, a pre-provisioned escrow token
should be able to do anything the user password can do, since they both
derives the synthetici password which is the master key in the new auth flow.

Test: runtest frameworks-services -c com.android.server.SyntheticPasswordTests
Bug: 33126414
Change-Id: Ib5ee38fd61f66de3245427ce992ebc12f1873a26
2017-02-15 19:54:25 +00:00
Selim Cinek
5ece5a7c34 Fixed that an icon could become invisible
A icon could be invisible because we were not aborting the animation
in certain cases. This should be fixed now.

Change-Id: I8caf35034704a0df3d205205086c4622b60e0da9
Fixes: 35385932
Test: runtest systemui
2017-02-15 11:49:35 -08:00
Rubin Xu
3bf722a8d5 Add synthetic password to authentication flow
The user password is used to unlock a per-user synthetic password which
serves the purpose of what the user password previsouly achieves (protect
keystore, vold disk encryption, auth token generation).

Test: runtest frameworks-services -c com.android.server.SyntheticPasswordTests
Test: manual
    1. Start with fresh device, enable synthetic password with "adb shell cmd lock_settings sp 1"
        1.1 add device lock, reboot and verify (positive & negative); change device lock, reboot and verify.
        1.2 Inflate a work profile, reboot and verify device lock. check SID with "adb shell dumpsys lock_settings"
        1.3 Un-unify and add work challenge, reboot and verify work challenge and SID.
        1.4 Re-unify work challenge, reboot and verify.
        1.5 Clear device lock, reboot and verify lock and SID.

    2. Start with a fresh device, add a device lock and inflate a work profile.
        2.1 Enable synthetic password, note current SID
        2.2 Reboot and unlock device. Verify synthetic password is generated and SID remains.
        2.3 Clear device lock, reboot and verify (SID should be cleared)

    3. Start with a fresh device, inflate a work profile, add separate work challenge
        3.1 Enable synthetic password, not current SID
        3.2 Reboot and unlock device and profile. Verify synthetic password is generated.
        3.3 Clear device lock only, reboot and verify (work profile SID should remain)

    All steps tested on marlin (FBE) and bullhead (FDE)

Bug: 33126414
Change-Id: Idb9ebfc7bba2fe40670c5fee2189e873d9704540
2017-02-15 19:48:33 +00:00
Todd Kennedy
93a8e2c7d1 Merge "remove app-ephemeral" 2017-02-15 19:48:22 +00:00
Tony Mak
606f8e79a2 Defer readSessionsLocked until system ready
readSessionsLocked depend on DPMS, so defer it until all system
service is started

Fix: 34663223

Test: Manual
      1. Try to install an app and reboot before it is installed
         (so the session is persisted in a file)
      2. Observe that PackageInstallerService
         read the persisted session in onSystemReady and 
         able to get the DPM instance.
      3. Observe play can read the persisted session

Change-Id: Ia14ed09db08fcf59189fa29293f0ac5066650942
2017-02-15 19:44:08 +00:00
Philip P. Moltmann
a211bc1a03 Process queuedWork on main thread and add logging
- The queued work processing thread might be sleeping while the main
  thread is waiting for it to do work. Hence process the work in the main
  thread.
- Carefully add logging so that slowness can be tracked.
- Fix usage of the wrong lock (sWork instead of sLock).
- Increase the time of the delay between apply and write to make
  possible side-effects more visible

Test: SharedPrefencesTest, looked at logging
Bug: 30662828
Change-Id: Ie8a5d531e180dacec29c947ba0b59b170facf782
2017-02-15 11:27:27 -08:00
Todd Kennedy
bf92b812db Merge "Per user setting for instant app" 2017-02-15 19:19:26 +00:00
Conrad Chen
2e94d3e9fc Merge "TIF: Add browsable field to programs" 2017-02-15 19:15:22 +00:00
Chris Craik
9138948df9 Merge "Always flush renderstate in DeferredLayerUpdater::apply" 2017-02-15 19:10:08 +00:00
Chris Craik
3c5f924c3b Merge "updateTexImage before bitmap readback of DeferredLayerUpdaters" 2017-02-15 19:09:09 +00:00
Jason Monk
4cfd8c740d Fix test failures on treehugger?
Test: runtest systemui
Change-Id: I0660729aade05cd63b240eed13ed9d5c9ff8de91
2017-02-15 13:52:47 -05:00
Winson Chung
bdc646f5d5 Reducing number of configuration changes during PiP transition.
- Fixes issue with the incorrect calculation of configuration smallest
  width for floating and always-fullscreen stacks.  Fullscreen stacks
  now have the smallest width matching the display, and floating stacks
  are set to the smallest size of their bounds.
- This CL also ensures that we test the combined global/override configs
  for changes in case changes when moving between stacks results in a
  shift in the configuration between the parent to the override of the
  child (ie. when going from fullscreen -> pinned)
- Also ensure that we are animating to the right fullscreen bounds for
  the PiP transition, accounting for the insets when calculating the config
  change the same way we would do for fullscreen tasks.

Bug: 33779483
Test: android.server.cts.ActivityManagerConfigChangeTests passes
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testSingleConfigurationChangeDuringTransition
Change-Id: I2c2b695572cd17087d522cf6c8ebd105e57e08b8
2017-02-15 10:51:17 -08:00
Jason Monk
790442e4cd Tuner updates
Some UX updates to the tuner to feel better and align with settings
UX patterns.

Test: visual
Change-Id: I9c57194b9649c61e0d6d3f9e21a51d9c4a5c1286
2017-02-15 13:35:00 -05:00