Commit Graph

12179 Commits

Author SHA1 Message Date
Andrii Kulian
4d26c21a82 Merge changes from topic "lifecycle_transaction_base"
* changes:
  Add transaction unit tests
  Add basic lifecycle transaction containers
2017-11-28 20:47:34 +00:00
Makoto Onuki
3c1d0caedb Merge "Extreme battery saver: Tweak to file saver" 2017-11-28 20:02:54 +00:00
Makoto Onuki
e098b7595a Extreme battery saver: Tweak to file saver
- Restore the default values after a runtime restart.
- debug.batterysaver.no_write_files sysprop to avoid writing max_freq

Bug 63527520
Test: manual
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/FileUpdaterTest.java

Change-Id: Ic4783f181252b063cfe7ea6fee47b9241f1688cc
2017-11-28 09:46:58 -08:00
Jeff Sharkey
14e1b283e8 Merge "Skip FDE-specific operations, mkdir() throwing." 2017-11-28 16:57:19 +00:00
Naomi Musgrave
d2c83c08bf Merge "Add id to NetworkEvent." 2017-11-28 13:30:19 +00:00
Andrii Kulian
6b9d3a1400 Add transaction unit tests
Bug: 64797980
Test: android.app.servertransaction.ClientTransactionTests
Test: android.app.servertransaction.TransactionParcelTests
Change-Id: I108bacc819e9d43d0a2f5a30338ae88674a53239
2017-11-27 18:15:49 -08:00
TreeHugger Robot
edbd1d3dde Merge "Fix issue #68002319: Allow current VoiceInteractionService to avoid..." 2017-11-28 00:42:46 +00:00
Jeff Sharkey
ae26646824 Skip FDE-specific operations, mkdir() throwing.
vold already complains about calls that are FDE specific, which
results in a lot of wtf() noise, so skip those operations outright.

Throw from failed mkdir() back to caller instead of wtf().

Test: builds, boots
Bug: 68736572, 68736551
Change-Id: I4dc06bdedacd2b66a1e7ae8e1434b194a875a756
2017-11-27 13:32:28 -07:00
Bryce Lee
bc8c25a407 Merge "Store bounds in WindowConfiguration." 2017-11-27 19:15:06 +00:00
TreeHugger Robot
3971cdee9f Merge "Add meta-data constant for activity->slice" 2017-11-27 17:25:44 +00:00
Bryce Lee
f3c6a47bdd Store bounds in WindowConfiguration.
This changelist consolidates the usage of frame bounds in containers
into the WindowConfiguration. As a result, the bounds are now shared
across AM and WM. Any changes to the bounds on one side are
propagated to the other via override configuration changes. Previous
instrumentation to synchronize the two sides is no longer necessary.

This changelist does not attempt to consolidate common logic shared
between WM or AM components for setting bounds.

Bug: 68719294
Test: go/wm-smoke
Change-Id: Ia8978dba8525b83201640e159caefe16e626b7c1
2017-11-27 08:59:19 -08:00
Naomi Musgrave
3b501194ab Add id to NetworkEvent.
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java

Bug: 63910201
Change-Id: Iaac35fe27529937d2de7e3f096f6e94889cf8b85
2017-11-24 16:38:05 +00:00
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
Dianne Hackborn
08bd3ea8ca Fix issue #68002319: Allow current VoiceInteractionService to avoid...
...activity launch delays.

Activity manager now has a new private mechanism for other services
to report which apps are allowed to bypass the launch delay restriction,
which voice interaction service uses.

Test: manual

Bug: 68002319
Change-Id: I44e9b67411b5106b81e8363dc22d4e54caeb83c1
2017-11-22 13:59:17 -08: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
Jason Monk
da34022d12 Add meta-data constant for activity->slice
Test: its a constant
Change-Id: I331358bd9619beb413dfa98525b0f2589eaea8ae
2017-11-22 10:15:25 -05:00
Andrii Kulian
446e824e22 Add basic lifecycle transaction containers
This adds basic containers for holding some messages to a client,
that are related to activity lifecycle. Each transaction can hold
a list of callbacks and a final lifecycle state.

Some requests from ActivityManager to client that target activities
are now switched to use transactions. Scheduling, preparing and
executing a request is moved outside of ActivityThread class to
corresponding transaction items.

Bug: 64797980
Test: Existing AM CTS tests pass
Change-Id: I96df20787b3d792f655c9500e8a71032264d02cd
2017-11-21 18:13:52 -08: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