Commit Graph

7647 Commits

Author SHA1 Message Date
TreeHugger Robot
43b116d5fa Merge "Fix background sensor usage counter" 2017-02-18 01:06:52 +00:00
TreeHugger Robot
168ec38060 Merge "Append entries for real" 2017-02-17 23:13:50 +00:00
TreeHugger Robot
8c9a6b0089 Merge "Revert "Revert "Per user setting for instant app""" 2017-02-17 20:46:12 +00:00
Svet Ganov
8a10ef58d3 Append entries for real
Test: manual

bug:35447008

Change-Id: I8ddbd39395f5064f7797562c3a423ba555c0c933
2017-02-16 21:00:31 -08:00
Andrii Kulian
b047b8bd7e Report move to display for activities that handle config changes
When activity that is moved between displays handles all configuration
changes, it won't be restarted. This CL adds a callback to the client
to notify it about display change. Usually it will be followed by
onConfigurationChanged, except when configuration didn't actually change.
When activity is recreated, it won't receive onMovedToDisplay.

Bug: 34862802
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I9a9501cab788623ada15a31efb53e4b2378639fe
2017-02-16 17:33:59 -08:00
Todd Kennedy
be0b8896d1 Revert "Revert "Per user setting for instant app""
This reverts commit be9ffa15af.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ib21321cf157a79890de487060a093840f7182047
2017-02-16 12:43:37 -08:00
Xiaohui Chen
b69aaf0b35 Merge "ReolverActivity: try auto launching single choice" into nyc-mr2-dev am: daacf547ac
am: 0a804ff49c

Change-Id: I8f378b98f29aea48773804bb65306c5b6760a758
2017-02-16 19:37:17 +00:00
Xiaohui Chen
0a804ff49c Merge "ReolverActivity: try auto launching single choice" into nyc-mr2-dev
am: daacf547ac

Change-Id: I06ca33714f6227f8cf86ecce29e1b87df80add6b
2017-02-16 19:29:18 +00:00
TreeHugger Robot
daacf547ac Merge "ReolverActivity: try auto launching single choice" into nyc-mr2-dev 2017-02-16 19:22:02 +00:00
Amith Yamasani
154d124ace Fix background sensor usage counter
being out of sync with total count, due to nesting. Only update
the counter if nesting is 1.

Test: runtest -x
frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsSensorTest.java
Change-Id: Iabb153550a79afa9902569bbbbdb5815decdc613
Fixes: 34750473
2017-02-16 10:09:36 -08:00
Nick Kralevich
d0a2d5edea Merge "system_server: add CAP_SYS_PTRACE" 2017-02-16 17:24:43 +00:00
Soonil Nagarkar
760623a499 Merge "Use SystemConfig to control background location throttling whitelist." 2017-02-16 01:33:08 +00: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
Rubin Xu
b9382c23a8 Merge "Add escrow token support to synthetic password flow" 2017-02-15 22:41:54 +00:00
Rubin Xu
5ccd8291ed Merge "Add synthetic password to authentication flow" 2017-02-15 22:37:42 +00:00
Guang Zhu
626ffb4556 Merge "Revert "Per user setting for instant app"" 2017-02-15 21:47:34 +00:00
Guang Zhu
be9ffa15af Revert "Per user setting for instant app"
Bug: 35390781

This reverts commit 2f5811dcfd.

Change-Id: Ibb1c8dacbdc6908fc7fa2bc5dca664f2455162bf
2017-02-15 21:43:48 +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
Selim Cinek
b52448c8b5 Merge "Fixed a few coloring issues" 2017-02-15 20:08:58 +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
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
bf92b812db Merge "Per user setting for instant app" 2017-02-15 19:19:26 +00:00
Xiaohui Chen
393c8018a1 ReolverActivity: try auto launching single choice
We already does this on start.  Now we also do the same when
the list of options changes.

Test: locally on device
Bug: 34470067
Change-Id: Ib184d67b532c5afd584fb9cd52daac69a7c50d0a
2017-02-15 09:48:38 -08:00
Narayan Kamath
669afcc9d0 Zygote: Add support for explicit preloading of resources.
Add a --preload-default command that instructs the zygote to preload
resources. The command is a no-op if resources have already been
preloaded.

Test: manual.
Change-Id: I4a846a7d911fa929af472d9071ffbff6df424176
2017-02-15 10:25:48 +00:00
Narayan Kamath
83e0faf2cc Merge "Zygote: Reset niceness if lazy preloading is enabled." 2017-02-15 10:15:16 +00:00
Selim Cinek
875ba9bd8e Fixed a few coloring issues
The color of the icon was happening in a
non-animated way. We're now animating the
color properly.
This also fixes an issue where the action
bar could be fully black.

Test: add colorized notification, observe animation
Fixes: 35308322
Change-Id: I4fbc1794fc027efb42eee3ee8f06fd9d8c513456
2017-02-14 17:28:15 -08:00
Michael Kwan
0bf608ee82 Merge "Fix incorrect values for VelocityTracker in SwipeDismissLayout." into cw-f-dev am: c61cd1a635 am: 83b072c48c
am: e7c91f721c

Change-Id: I0a3d2214a46f804681dde460bd9a6024fbc859f7
2017-02-14 23:02:18 +00:00
Michael Kwan
e7c91f721c Merge "Fix incorrect values for VelocityTracker in SwipeDismissLayout." into cw-f-dev am: c61cd1a635
am: 83b072c48c

Change-Id: I77b0a0a30e60658dbcf3ab0806bd0227939b8ba8
2017-02-14 22:57:48 +00:00
Michael Kwan
83b072c48c Merge "Fix incorrect values for VelocityTracker in SwipeDismissLayout." into cw-f-dev
am: c61cd1a635

Change-Id: Ib1cff2ace082862c2a1c250170453b989f6697df
2017-02-14 22:53:41 +00:00
TreeHugger Robot
c61cd1a635 Merge "Fix incorrect values for VelocityTracker in SwipeDismissLayout." into cw-f-dev 2017-02-14 22:47:00 +00:00
Todd Kennedy
2f5811dcfd Per user setting for instant app
The same application can run as either an instant app or an installed
app. Store this setting per-user instead of based upon the install
location.

Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iff565bb1ac10d631499f0bd0f69b401cb073c10e
2017-02-14 13:42:01 -08:00
Michael Kwan
390120b925 Fix incorrect values for VelocityTracker in SwipeDismissLayout.
The offset used to adjust MotionEvents for swipe velocity tracking
was incorrect, and caused issues when touch points where close
together. Fixed the offset used, which resolved swiping issues.

Bug: 34673753
Change-Id: Ide6060b511510bcf299e3db778e6ffc6afda5e19
2017-02-14 12:04:38 -08:00
Narayan Kamath
b49996d8e2 Zygote: Reset niceness if lazy preloading is enabled.
By definition, the zygote in question is lower priority if lazy
preloading is enabled. We therefore reset the zygote process'
niceness to 0 as soon as it comes up, rather than having it stick
around as a higher priority process until we eventually ask it
to load the default set of resources.

Test: manual.

Change-Id: I3ccfc0e7c3fdebf5f798d90b53140a554bf64c20
2017-02-14 16:20:45 +00:00
TreeHugger Robot
23a96af523 Merge "AOD: Fix contrast calculation" 2017-02-14 13:18:22 +00:00
TreeHugger Robot
171ef98df6 Merge "Fix interaction w/ work profile & last chosen" 2017-02-14 01:24:19 +00:00
Michael Kwan
321ceda49f Merge "Only modify window layout params when necessary." into cw-f-dev am: 9fbd981f23 am: a26e371c9b
am: 49fa0405b1

Change-Id: Iadf40b31d57157bc1303102b6afc38d23afc3996
2017-02-14 01:06:03 +00:00
Michael Kwan
49fa0405b1 Merge "Only modify window layout params when necessary." into cw-f-dev am: 9fbd981f23
am: a26e371c9b

Change-Id: I72bf9b5fa5dfaaa7573115ed5b6cca23a0be05f4
2017-02-14 01:00:23 +00:00
Michael Kwan
a26e371c9b Merge "Only modify window layout params when necessary." into cw-f-dev
am: 9fbd981f23

Change-Id: I36aa427a3023dcba2a29eccfc0b7aac43748e534
2017-02-14 00:55:32 +00:00
Michael Kwan
d56887f8fa Merge "Only modify window layout params when necessary." into cw-f-dev
am: 9fbd981f23

Change-Id: I14316841b80bdb25755e174528ef4bb271d3e005
2017-02-14 00:55:29 +00:00
Michael Kwan
9fbd981f23 Merge "Only modify window layout params when necessary." into cw-f-dev 2017-02-14 00:48:12 +00:00
Hakan Seyalioglu
aeb1f1241e DO NOT MERGE - Check exported status in chooser
am: 7bae18232e

Change-Id: Id29e65bd455c704738618f1dacfcad53b8d0b773
2017-02-14 00:41:55 +00:00
Hakan Seyalioglu
13405c5529 Fix interaction w/ work profile & last chosen
bug: 34677697
Test: New unit tests added
Change-Id: Ibb5c804c16a758ff041ce7165fda561d903b5f31
2017-02-13 15:24:58 -08:00
Hakan Seyalioglu
7bae18232e DO NOT MERGE - Check exported status in chooser
Relevant change in master is ag/1844170

bug: 34147053
Change-Id: Ic9d9d65c66325904c95ab3966bdcc16e7668278b
(cherry picked from commit e3286c3145)
2017-02-13 23:12:28 +00:00
Yohei Yukawa
ff54b306de Merge "Track event flow to IMMS#setImeWindowStatus" 2017-02-13 22:08:35 +00:00
Michael Kwan
134ad6ef3f Only modify window layout params when necessary.
Cancelling swipe-to-dismiss will trigger a check to ensure the window
is reset to its original state. Ensure that the reset is actually
required before setting the new layout attributes.

Bug: 34816397
Change-Id: Idf26ce7c8b63dc44a76effefcb32eb8d8665f605
2017-02-13 13:20:09 -08:00
Winson Chung
4de191dc1b Merge "Adding PipManager dumps." 2017-02-13 20:40:35 +00:00
Winson Chung
12cb6628db Merge "Create a new stack for the assistant activity." 2017-02-13 20:39:52 +00:00
Selim Cinek
2698d1d1e8 Merge changes Ie3736d80,I52444f4e
* changes:
  Improved collapsed messaging notifications
  Fixed a bug where the heads-up couldn't time out
2017-02-13 20:37:48 +00:00
Yohei Yukawa
6db3bfe33d Track event flow to IMMS#setImeWindowStatus
This is part of work to introduce historical debugging infrastructure
for Android IME.

In this CL, we will focus on the following two event flows.

 A1. IMMS#attachNewInputLocked() queues MSG_(RE)START_INPUT to deliver
     new InputConnection/EditorInfo to the current IME
 A2. The IME triggers IMS#onStartInput()/IMS#onRestartInput() and
     updates the following fields:
      - InputMethodService#mStartedInputConnection
      - InputMethodService#mInputEditorInfo

 B1. IME is expected to call back IMM#setImeWindowStatus() to notify
     its window visibility change to IMMS.
 B2. IMMS updates the following field if the caller is still the
     current IME.
      - InputMethodManagerService#mImeWindowVis

What this CL aims to do is to enable IMMS to access A1 state when it
was in B2 state, by considering that for given a B1 the last A2
happened before B1 is the cause of B1 and B2.

To do this, IMMS issues a binder token in A1 and each IME keeps it
so that it can be passed in B1. By using this Binder token as a key,
IMMS can keep tracking state snapshot taken from each A1. Note that
those state snapshots keep alive until the Binder token's proxy in the
IME process loses strong reference from its GC root.

Test: Make sure `adb shell dumpsys input_method | grep mImeWindowVis`
      matches to the IME window visibility.
Test: Make sure the current IME is not receiving any
      InvalidParameterException from IMMS.
Bug: 35079353
Change-Id: I9921b381e02106dbffff5e0b3d13f0a1245ce807
2017-02-13 12:04:41 -08:00
Michael Kwan
6853de9729 Add tweaks to smooth out swipe to dismiss. am: 5758a9a94c
am: 2155f773db

Change-Id: Iab07b13f24b7ca32b6bbb6faf788a71fccb969ec
2017-02-13 19:38:32 +00:00