Commit Graph

12164 Commits

Author SHA1 Message Date
Adrian Roos
e99bc0501a WM: Move WindowManagerPolicy, DisplayFrames and WindowManagerInternal into services
Splits WindowManagerPolicy into a framework and a services part, preventing concepts that are
internal to the window manager from leaking out into the framework.

Test: make droid
Change-Id: I7b6a54f55f76f6fbb5f27090981b8f1d4d8be88b
2017-11-23 17:23:26 +01:00
Christopher Tate
a732f014c5 The job scheduler now backs off jobs based on standby bucketing
The default parameters here translate to roughly this rate limiting:

  ACTIVE:   run jobs whenever
  WORKING:  ~ hourly
  FREQUENT: ~ every 6 hours
  RARE:     ~ daily

Bug: 63527785
Test: cts & manual (WIP)
      atest CtsJobSchedulerTestCases
Change-Id: I58f8e53e5bdf40601823e5a10a9f2383a6f67ae5
2017-11-22 22:07:06 +00:00
Eran Messeri
3daba14f25 Merge "DevicePolicyManager: Make installed keys user-selectable by default." 2017-11-22 17:12:29 +00:00
TreeHugger Robot
7430d8d896 Merge "Notify apps when channels/groups are blocked/unblocked" 2017-11-22 15:55:53 +00:00
Suprabh Shukla
2ffa7f0d12 Merge "Delaying jobs while coming out of doze" 2017-11-22 01:38:26 +00:00
Suprabh Shukla
106203bc53 Delaying jobs while coming out of doze
Foreground uids can run their jobs immediately given other constraints
are met. Other jobs will be delayed by 3 seconds when coming out of
doze to ensure imminent user tasks like screen-on can use resources.
Also added an API to allow apps to indicate their job is important to
the user enough that it is allowed to run when the app is in the
foreground or on the temp whitelist regardless of the dozing state of
the device.

Test: cts-tradefed run singleCommand cts-dev -m JobScheduler -t \
android.jobscheduler.cts.DeviceIdleJobsTest

Bug: 64291952
Bug: 64071030

Change-Id: Id52cb4386e683d4f8297e873b3a68c573e5be743
2017-11-21 15:38:20 -08:00
TreeHugger Robot
911fbd2313 Merge "Special handling of processes with recent tasks." 2017-11-21 20:36:28 +00:00
Eran Messeri
19d19048e4 DevicePolicyManager: Make installed keys user-selectable by default.
After Change-Id: Ibaba2ddd4f94fced1a2a7bfcfb91189302ec7f3a was merged,
KeyChain, by default, made keys installed in it not user-selectable,
which means users could not choose those keys in the Certificate
Selection prompt.
This is the correct behaviour (secure by default), but means the
DevicePolicyManager has to explicitly set keys as user-selectable
to be compatible with the previous behaviour.

This CL does the following:
* Adding an installKeyPair variant to the DevicePolicyManager to
  allow specifying user-selectability of the key.
* Make old installKeyPair variants delegate to the new variant,
  with the default of setting installed keys user-selectable.
* Modify the DevicePolicyManager service definition and service to
  take the extra user-selectability parameter and set the value
  in KeyChain.

Note that the reason the CTS test started failing is not related to
this change but a CTS Verifier test should catch the problem this
CL is solving.

Part of the fix for b/69337278

Bug: 69337278
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement
Change-Id: Ifc240ed4a20a9d00bc6140dfb45bd1140e1f8260
2017-11-21 17:01:39 +00:00
Julia Reynolds
3eb3ffd9c3 Notify apps when channels/groups are blocked/unblocked
So that apps can disable/enable receivers/jobs/etc. that
would only need to run to post notifications to the blocked
channel(s).

Additionally let apps retrieve an individual group so they
can inspect blocked state.

Change-Id: I733b70c62cd0482d0cf9692ea9b00cf313ad7b81
Fixes: 36530302
Test: runtest systemui-notification, cts
2017-11-21 11:28:07 -05:00
Jason Monk
59955dcc06 Merge "Convert Slice type to string and add optional sub-type" 2017-11-21 16:05:39 +00:00
Jason Monk
a5f64a363c Merge "Add SliceSpec to Slice API" 2017-11-21 13:50:09 +00:00
TreeHugger Robot
3f297c11a9 Merge "Improve how parcels are recycled on AssisStructure custom parcelization." 2017-11-21 03:34:43 +00:00
Dianne Hackborn
68a0633ea9 Special handling of processes with recent tasks.
As the startup time of application processes has increased,
it is becoming more useful to try to keep around the process
for a recently used app, even if there are no longer any
actively running activities in it.  (For example, if you backed
out of the root activity.)

This change implements that behavior, keeping track of any recent
task entries that a process represents the root activity for,
and classififying them under a new cached proc state that is
managed the same as a cached activity.

Test: manual
Bug: 69386069
Change-Id: I430741646478763fd85b33a5384278ece831b2c3
2017-11-20 14:35:15 -08:00
Jason Monk
d054fb36c7 Convert Slice type to string and add optional sub-type
The type will control the serialization that the platform uses to
get the object from one place to another. The sub-type optionally
will specify a specific interpretation of this object.

Test: cts
Bug: 68378558
Change-Id: I78f41f6e5b6c91c510e4f968c32d96e9030d0e8a
2017-11-20 16:40:19 -05:00
Jason Monk
2af1998e59 Add SliceSpec to Slice API
SliceSpec will be used to handshake versions between Slice renderers
and Slice providers. The renderer will pass in info about supported
specs, and expect that the returned slice will be compatible.

Test: manual
Bug: 68378561
Change-Id: Id094ec3b6f682a3d84a2b992e1a8274212778970
2017-11-20 16:40:19 -05:00
Jason Monk
e1b070fe46 Remove SliceView (its moving to support)
Test: manual
Bug: 68378561
Change-Id: I33b5a709da39c83e047e9005a20afc0ebde7f85f
2017-11-20 12:56:34 -05:00
TreeHugger Robot
52418b56f0 Merge "Implement Activity Manager Dumpsys --service option" 2017-11-17 23:24:04 +00:00
Cody Northrop
1fe5547eda Merge "Rootless GPU Debug" 2017-11-17 20:33:33 +00:00
Yi Jin
6b51414154 Implement Activity Manager Dumpsys --service option
Bug: 66729158
Test: out/host/linux-x86/bin/incident_report -w amservices
Change-Id: I72015b9744bc8028001306283f169fca4797c700
2017-11-17 11:58:06 -08:00
Amith Yamasani
f3141f30b9 Merge "Add a new usage event type for seen notification" 2017-11-17 19:32:43 +00:00
Ahmad Melegy
719c227c69 Merge "Fix typo" am: 913f396c11 am: 8c7c6e3952
am: 9296c2c8c1

Change-Id: Idb98baf68132e27718c69d4b9a6bc22e8db77a0e
2017-11-17 19:13:29 +00:00
Ahmad Melegy
9296c2c8c1 Merge "Fix typo" am: 913f396c11
am: 8c7c6e3952

Change-Id: Ieed26cd7bb6be66c6084dd0fc8f0dcc05d9156d0
2017-11-17 19:04:55 +00:00
Ahmad Melegy
8c7c6e3952 Merge "Fix typo"
am: 913f396c11

Change-Id: I244ccafe5bf76718cdc48b2fa7d9ce8270b0dd33
2017-11-17 18:55:53 +00:00
Felipe Leme
c52b6ea33d Improve how parcels are recycled on AssisStructure custom parcelization.
1.Make sure the temporary data parcel is always recycled.
2.Recycle the parcel attribute after data is fully fetched on go().

Bug: 68604253

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsAssistTestCases

Change-Id: Ifb2f1d088260384f7523ca6d02631ec56535ac0a
2017-11-17 09:42:55 -08:00
Cody Northrop
86cedcb583 Rootless GPU Debug
Add the ability to load GPU debug layers from the base
directory of debuggable applications.

This commit:
* Adds a new Setting to Developer options: "Enable GPU debug layers"
* Adds a new way to discover and specify GPU debug layers per app
* Moves much of the layer enabling logic into GraphicsEnvironment
* Removes the JNI component of ApplicationLoaders

Bug: 63708377
Test: Manual, CTS tests to follow
Change-Id: I7d33e9f835f49aa8d86e63bdb32037728bc8b6a4
2017-11-16 22:58:45 -07:00
Philip P. Moltmann
b13f15332e Remove one legacy install path
Also removed everything needed only for this path

Test: Installed app via package installer, adb, google play store
Bug: 65261282
Change-Id: Ia8a03fa5900687cd2adf844ba7e6c07e0537382e
2017-11-16 11:32:47 -08:00
Amith Yamasani
803eab6906 Add a new usage event type for seen notification
On a notification becoming visible, NOTIFICATION_SEEN event is
dispatched. This will only bump up the app's bucket to WORKING_SET and
no higher. Same goes for sync adapters associated with a content
provider. Only move them to WORKING_SET.

Updated NotificationManagerService to report event to usagestats on
visibility changes.

Bug: 63527785
Test: runtest -x
frameworks/base/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
atest NotificationManagerServiceTest
Change-Id: I5b132e1fc1f70e2126473b43b9b1979fbc523b85
2017-11-16 09:15:03 -08:00
Winson Chung
eaf2a4ef5c Merge changes from topic "expose_methods"
* changes:
  Removing references to hidden classes in shared lib.
  Exposing a few more methods in the lib
  Move assist data receiver interface to accessible namespace
2017-11-16 02:00:28 +00:00
TreeHugger Robot
40a21a4eaf Merge "Allow read-access to notification policy" 2017-11-15 18:15:54 +00:00
Beverly
312ef3e064 Allow read-access to notification policy
Test: manual
Change-Id: I2b3c597b56f910b3bcad902e08f6f432493ce768
Fixes: 69358003
2017-11-15 11:25:26 -05:00
TreeHugger Robot
d28796d32c Merge "Implement intent to uri mapping for slices" 2017-11-15 02:52:53 +00:00
Mady Mellor
3b0a72f022 Implement intent to uri mapping for slices
This adds the notion of creating a slice based on an intent. To use this
developers can implement onMapIntentToUri and return a uri based on the
intent. This enables SliceView to be populated via an intent.

Test: to be added...
Change-Id: I2abd861f2a3dff80ab8b6492a5c3205bc891d19c
2017-11-14 17:23:58 -05:00
TreeHugger Robot
ea0baebfb9 Merge "Add hints for toggles in Slice" 2017-11-14 21:56:07 +00:00
Ahmad Melegy
e2bfbf1348 Fix typo
Fix typo in Activity class in requestPermissions method

Test: Existing unit tests still pass.
Bugs: None

Change-Id: If81117a0e769bca2f303e1ebce57ecda9544e129
Signed-off-by: Ahmad Melegy <ahmad.melegy@gmail.com>
2017-11-14 21:51:40 +00:00
Tianran Li
6e2a6cfc6a Merge "TimePickerDialog OTG keyboard entry discarded" am: 8c2cb6ff08 am: 2973f63816
am: 97997ca19e

Change-Id: I599c31481eef25311f8500df1428602051f1d04b
2017-11-14 21:31:38 +00:00
Winson Chung
e210468aa0 Move assist data receiver interface to accessible namespace
- Also adding bundle options to pass to the recents component that is
  launched through startRecentsActivity()

Bug: 67864419
Test: Everything builds, existing tests pass
Test: go/wm-smoke
Change-Id: Ie9ee472efb132add69b8bc10798dc5214d1fa1e2
2017-11-14 12:39:21 -08:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
TreeHugger Robot
341775bfef Merge "Adds client API for interacting with statsd." 2017-11-14 20:25:09 +00:00
Mady Mellor
fc2b340cf4 Add hints for toggles in Slice
Test: Manual, build a slice with a toggle needs the support lib CL to
      present the toggle
Bug: 68378574

Change-Id: I4cdae84e11e2b182663186f862fed95e3bacbac5
2017-11-14 12:01:54 -08:00
Tianran Li
97997ca19e Merge "TimePickerDialog OTG keyboard entry discarded" am: 8c2cb6ff08
am: 2973f63816

Change-Id: Ia9904d1654ec70e1c039d8f1fed6c1211863ee38
2017-11-14 19:55:16 +00:00
Tianran Li
2973f63816 Merge "TimePickerDialog OTG keyboard entry discarded"
am: 8c2cb6ff08

Change-Id: Ib28468e637c146e69d59ee352b5a019654b3dc14
2017-11-14 19:47:34 +00:00
Treehugger Robot
8c2cb6ff08 Merge "TimePickerDialog OTG keyboard entry discarded" 2017-11-14 19:35:20 +00:00
David Chen
adaf8b344e Adds client API for interacting with statsd.
This API will primarily be used by GmsCore to send updated configs.
Also, sending a config will implicitly notify the StatsD that this
client wants to know when it should request data for this config.

We send a broadcast so that all interested subscribers can know if
data needs to be pulled.

Test: Manually tested that sending broadcast works via new adb
command added in StatsService.

Change-Id: I23cdd1df706036e14b32c3d01af30c3d4af819fa
2017-11-13 19:37:12 -08:00
Calin Juravle
8ed29cdd59 Merge "Create secondary dex profiles relative to the provided dex path" am: f7f5732e2c
am: 310bc2b571

Change-Id: Ic639fd4d9f0e0a76669c1dd05bc0c0a86f84a074
2017-11-14 03:14:34 +00:00
Calin Juravle
310bc2b571 Merge "Create secondary dex profiles relative to the provided dex path"
am: f7f5732e2c

Change-Id: I6f2eb760e07959e26d46f8a0f3d4b4358b9a5a1e
2017-11-14 03:03:56 +00:00
TreeHugger Robot
0fbd9d163b Merge "Support insets on secondary displays" 2017-11-14 02:59:12 +00:00
Calin Juravle
d35451d76b Create secondary dex profiles relative to the provided dex path
We previously used the realpath to simplify the validation and processing
in installd. However it ended up making things more complicated when
cleaning up the profiles, especially because of /data/user/0 symlinks to
/data/data/.

Instead of using the realpath of the dex file to compute the profile
location, use the file path as given. This makes things consistent with
DexManager registration and allows for easier dex file reconciliation in
the presence of symlinks.

Bug: 64460009
Test: manual

(cherry picked from commit c119c5a8c1d8e3ba6c90300a82d2086273d0d3f3)

Merged-In: I2362f32a679324d4bc1e8a0fe83b5b17ee523e7a
Change-Id: Ic9c38a920c5eef85f26ac33f2b8a37c3694bfbad
2017-11-13 17:37:24 -08:00
Calin Juravle
8971229afd Merge "Create secondary dex profiles relative to the provided dex path" 2017-11-14 01:30:10 +00:00
Wale Ogunwale
828ff7e3ef Support insets on secondary displays
Indroduced DisplayFrames object to track frames used to calculate
window insets per display vs. at a global level in PhoneWindowManager.

Bug: 64148922
Change-Id: I19f166920eba0a4f933a223a77e096bcc8dab0c1
Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Test: go/wm-smoke
2017-11-14 01:03:50 +00:00
TreeHugger Robot
29cd580e4a Merge "Deprecate framework Fragments and Loaders" 2017-11-13 22:34:34 +00:00