Commit Graph

14761 Commits

Author SHA1 Message Date
Rob Carr
302d36b6a8 Merge changes from topic "public-sc"
* changes:
  Unhide parts of SurfaceControl API in SDK.
  Replace SurfaceView background with boundless color layer.
  SurfaceControl: Accept instance rather than handle for reparent
2019-01-23 04:57:59 +00:00
Rhed Jao
dcc2b928fb Merge "Enable multi-display support for magnification controller" 2019-01-23 03:34:54 +00:00
Ryan Savitski
e58c4b5850 Merge "zygote children: propagate profileability to bionic for native heap profiling" 2019-01-23 03:21:43 +00:00
Ryan Savitski
cfdc151d52 zygote children: propagate profileability to bionic for native heap profiling
go/heapprofd is a native heap profiler for android Q+. Its triggering is
implemented within /bionic/libc. App processes (i.e.  zygote children) are not
considered profileable by default on "user" builds. To opt-in into being
profileable, the app's manifest needs to have the Q+ go/profileable flag set
(or be marked as debuggable, which is its superset).

With this change, if the app is supposed to be profileable, post-fork runtime
init calls into bionic to mark itself as such, and possibly start "from
startup" profiling.

On userdebug, all zygote children are marked profileable via the same
mechanism. System server is also marked profileable on userdebug (and needs a
separate codepath, as it does not have an activity thread).

See go/heapprofd-java-trigger for details on why we're taking this approach.
Context on the profiler itself: go/heapprofd-design.

Test: flashed blueline-userdebug, confirmed that java profiling activates from startup and at runtime.
Test: flashed crosshatch-user, confirmed that no java profiling is enabled by default.
Bug: 120409382
Change-Id: Ia038871acfa6b9cae7b6a81f666aecce4b68a4fc
2019-01-23 00:08:15 +00:00
TreeHugger Robot
9a8406418d Merge "Added trace points for ContentCapture." 2019-01-22 23:05:27 +00:00
Sudheer Shanka
7ee3291911 Merge "Update DownloadManager.addCompletedDownload javadoc." 2019-01-22 22:21:17 +00:00
Robert Carr
10584fa98a SurfaceControl: Accept instance rather than handle for reparent
In preparation for public API.

Bug: 111297488
Test: Builds.
Change-Id: I80da54d92989ec0afe9fcdde324847f0de0c5083
2019-01-22 07:55:10 -08:00
Stefano Tommasini
69fbfdb787 Merge "Add support for enabling backup in work profile in DevicePolicyManager." 2019-01-22 11:48:28 +00:00
Svet Ganov
65f1b9ef44 Use proper API to get op name
Test: atest CtsAppOpstTestCases

Change-Id: Ibc5d9775092e6d82e7beb7163d91c1f9ea87e1be
2019-01-20 13:42:57 -08:00
Felipe Leme
b337e1c5dd Added trace points for ContentCapture.
Test: ./external/chromium-trace/systrace.py -o ~/tmp/trace.html -a android.contentcaptureservice.cts -t 1 view am
Fixes: 120440520

Change-Id: Ic6ad506ac88a9d04b096d58f568d04904b72fb04
2019-01-18 14:37:23 -08:00
Sudheer Shanka
fd2e571077 Update DownloadManager.addCompletedDownload javadoc.
Starting from Q, downloads added using
DownloadManager.addCompletedDownload are by default going to
be added to MediaProvider regardless of isMediaScannerScannable
argument specified by clients. Update the javadoc to reflect this.

Bug: 120876251
Test: n/a
Change-Id: Ie091703d801bb9cecc9574a122e13a242f4cca95
2019-01-18 14:19:37 -08:00
Lucas Dupin
00be88f1fd New pulsing notification layout
Test: wake up with power
Test: look at shelf on lock screen
Test: lock device w/ notifications from home screen
Test: receive notification on AOD
Test: atest KeyguardClockPositionAlgorithmTest
Test: atest NotificationRoundnessManagerTest
Test: atest ScrimControllerTest
Test: atest NotificationContentViewTest
Bug: 111405682
Change-Id: I9b4f2febd56a62256124567bffebc9f5f8255847
2019-01-18 13:57:04 -08:00
Yohei Yukawa
9f141ee802 Plumb Context#mUser to TextServicesManager to TextServicesManagerService
This is a follow up CL to our previous CL [1], which enabled spell
checker for background users.  In that CL, we assumed that spell
checker user ID can and should always be determined by the calling
user ID.  This assumption is not valid at least for direct-reply
notifications on System UI, because System UI always runs as user 0 no
matter who is the current active user.

In order to allow TextServicesManagerService (TSMS) connect to the
right user for such a special use case, this CL introduces a hidden
parameter "userId" to each IPC so that clients that have
INTERACT_ACROSS_USERS_FULL can override the target user ID when
necessary.

For instance, to interact with user 10's spell checker services, you
can obrain a special instance of TextServicesManager as follows.

  TextServicesManager tsmForUser10 = context
          .createPackageContextAsUser("android", 0, 10 /* userId */)
          .getSystemService(TextServicesManager.class)

If the calling process does not belong to user 10, any operations on
that TextServicesManager will result in SecurityException unless the
calling package needs to have INTERACT_ACROSS_USERS_FULL.

This CL is just a preparation.  There should be no user-visible
behavior change yet.

 [1]: I06c27ef834203a21cc445dc126602c799384527b
      06a2624049

Bug: 123043618
Test: spell checker still works
Change-Id: I31dda3ae8795190d44b0622b8335c34ddbc5dd48
2019-01-18 09:17:16 -08:00
Aurimas Liutikas
feccee99fa Merge "Remove old private constant from ResourceId." 2019-01-18 16:53:46 +00:00
Stefano
00a6e52734 Add support for enabling backup in work profile in
DevicePolicyManager.

Test: atest ProfileOwnerTest
BUG: 121198006
Change-Id: I9a1d4bf5530c432be3276e17f0535e26e77c8d59
2019-01-18 12:33:45 +00:00
Rhed Jao
02655dc38c Enable multi-display support for magnification controller
1) New api for a11y service to specify display id and return
per display magnification controller.
2) Updae MagnificationController to support multi-display.
3) Update AccessibilityController to support multi-display
magnifier.

Bug: 112273690
Test: atest MagnificationControllerTest
Test: atest MagnificationGestureHandlerTest
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases

Change-Id: I643a8f96e7d57f729daf8df7f26c9014b1dfd476
2019-01-18 16:53:32 +08:00
TreeHugger Robot
9c81c7cc5e Merge "Log history of Content Capture flushes." 2019-01-17 21:08:48 +00:00
Aurimas Liutikas
d8ebfefcee Remove old private constant from ResourceId.
Bug: 122967079
Test: make -j builds
Change-Id: I3e999044df02549e84208d38bb77d2ce1d1bd73b
2019-01-17 12:51:58 -08:00
Yueming Wang
21be1cf12d Merge "Add new intents, extras and constants for provisioning optimization." 2019-01-17 08:34:18 +00:00
Felipe Leme
1af85ea149 Log history of Content Capture flushes.
Bug: 122959591

Test: manual verification
Test: atest CtsContentCaptureServiceTestCases \
            FrameworksCoreTests:android.view.contentcapture.ContentCaptureTest

Change-Id: I9a5af8d1ea882b7b8fbbfa32aa2a37466b524ce5
2019-01-16 18:08:14 -08:00
Hui Yu
46c2a56f6d Merge "UsageStats DEVICE_SHUTDOWN event." 2019-01-16 23:22:06 +00:00
yuemingw
c5524f2944 Add new intents, extras and constants for provisioning optimization.
Bug: 122725418
Test: manual
Change-Id: I84ebac25621ea252030741b9f725075eeed1cd7b
2019-01-16 22:29:14 +00:00
Varun Shah
c51b2c6023 Merge "Adding a null check for ActivityManager#switchUser(UserHandle)." 2019-01-16 20:31:43 +00:00
Hui Yu
b1d243a51b UsageStats DEVICE_SHUTDOWN event.
DEVICE_SHUTDOWN event is used to close all open usage events that do
not have matching closing event when device is shut down. For example,
ACTIVITY_RESUMED or FOREGROUND_SERVICE_START are open events, the
DEVICE_SHUTDOWN event will close the usage session of the open events.

At orderly shutdown like selecting Power Off or Restart after pressing
power button, a DEVICE_SHUTDOWN event is sent to UsageStats.
UsageStats persists UsageStatsDatabase to disk immediately.

When power button is pressed for 3.5 seconds (configured by
config_veryLongPressTimeout in config.xml). A DEVICE_SHUTDOWN
event is sent to UsageStats. UsageStats persists UsageStatsDatabase
to disk immediately.

This is the mechanism that we do not lose UsageStats data when the
device is shut down.

When the device boots up, if the last event is not
DEVICE_SHUTDOWN, we add a DEVICE_SHUTDOWN with timestamp set to be the last
time database file is persisted. This is to handle the case device
shutdown abruptly due to power drained or cold temperature.

Bug: 111464278
Test: atest UsageStatsTest.java
Change-Id: I1e88063ba71d09042d02c6deb9f07d8581a15c30
2019-01-16 11:13:58 -08:00
TreeHugger Robot
4180876be4 Merge "Fixed how ContentCapture checks for system apps." 2019-01-16 03:30:44 +00:00
TreeHugger Robot
d9043b830e Merge "Implement setContentCaptureEnabled for manually enabling content capture" 2019-01-16 03:23:30 +00:00
Felipe Leme
0c6b23d5d1 Fixed how ContentCapture checks for system apps.
The previous check was disabling it for "non-system" apps that were bundled
in the system...

Bug: 121045049
Fixes: 122915433

Test: manual verification
Test: atest CtsAutoFillServiceTestCases

Change-Id: I2352fc21de27750509715035ba2f9c2dc2371428
2019-01-15 17:05:36 -08:00
Varun Shah
e7f6b54312 Adding a null check for ActivityManager#switchUser(UserHandle).
Also updated documentation and added the relevant test.

Bug: 122887441
Test: atest com.android.server.pm.UserManagerTest#testSwitchUserByHandle_ThrowsException
Change-Id: Ic936570ff24d4879732017c717d8c81f38356553
2019-01-15 17:04:59 -08:00
Chavi Weingarten
f9d1062118 Merge "Added turn on/off virtual display" 2019-01-15 23:53:08 +00:00
Mady Mellor
7c73162d40 Merge "Create BubbleMetadata use it instead of app overlay intent" 2019-01-15 22:24:45 +00:00
Adam He
6079d151e4 Implement setContentCaptureEnabled for manually enabling content capture
Change-Id: Id660aebac0b35a33b39a7c74da0f11c0958549ee
Fixes: 121047183
Test: atest CtsContentCaptureServiceTestCases
Test: atest android.contentcapture.cts.ChildlessActivityTest#testDisabledByApp
2019-01-15 12:13:21 -08:00
Mady Mellor
c39b4aedb0 Create BubbleMetadata use it instead of app overlay intent
* BubbleMetadata encapsulates necessary info to display a bubble
* Replaces app overlay intent usages with BubbleMetadata
* Renames existing bubble APIs to use 'bubble' rather than 'app overlay'

Bug: 111236845
Test: existing tests pass
Change-Id: I6a85d3c41dda47139fb8d960cadf1c8e109cf29b
2019-01-15 10:28:31 -08:00
Chandan Nath
2c9ae09194 [Multi-user] Change ActivityManagerService to use userId.
1. The book-keeping needs to be per user.
2. The calls into IBackupManager need to pass in the userId.
3. convert clearPendingBackup to an internal service call.

Bug: 121197004

Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) 'adb shell bmgr' enabled/backupnow flow

Change-Id: If49e00fc1d6aa770815c454f01b53865f6a68db4
2019-01-15 12:54:28 +00:00
TreeHugger Robot
1efe5f627a Merge "Add intent action and extra for managing a single default app." 2019-01-15 00:47:40 +00:00
TreeHugger Robot
09203ca2be Merge "Adding an api to mark a package as distracting" 2019-01-14 23:53:02 +00:00
TreeHugger Robot
e7d8df324d Merge "Disable content capture for system apps." 2019-01-14 19:31:07 +00:00
Adam He
b66babbf55 Disable content capture for system apps.
Change-Id: I58f827bd2b6da63768d670f2a3e40f7d2cd003e6
Fixes: 121045049
Test: manual verification
Test: atest CtsContentCaptureServiceTestCases # still passing
2019-01-14 18:43:35 +00:00
Hai Zhang
3a21289896 Add intent action and extra for managing a single default app.
This change adds Intent.ACTION_MANAGE_DEFAULT_APP and
Intent.EXTRA_ROLE_NAME for managing a single default app, which will
be launched from Settings' App info page. The new
Intent.EXTRA_ROLE_NAME also replaces RoleManager.REQUEST_ROLE_NAME.

Bug: 110557011
Test: build
Change-Id: Ice81150b0e960d050d24d963ade04254852a4ee4
2019-01-14 10:41:08 -08:00
Hyunyoung Song
9114be68cd Merge "Add @SystemApi to OverlayManager that ThemePicker needs" 2019-01-14 17:53:17 +00:00
Issei Suzuki
9178eee8b1 Merge "Add inheritShowWhenLocked System API to activity." 2019-01-14 14:34:45 +00:00
Julia Reynolds
413ba846b3 Don't allow importance updates for oem locked channels
Test: atest, make sure missed call notifications are no
longer demoted by aosp notification assistant
Change-Id: I80728bae67501d64359e0dac02dca928c34a7e95
Fixes: 122657004
2019-01-14 14:03:55 +00:00
Issei Suzuki
74e1eb2220 Add inheritShowWhenLocked System API to activity.
Let an activity show on top of the lock screen if the activity behind
this can be shown on top of the screen. This is pre-requisite for
showing permission dialog on top of the lock screen only when it makes
sence.

Bug: 109754623
Test: atest server.am.KeyguardTests
Change-Id: Ideaa2b77519649a70c682bc95277e451e149adad
2019-01-14 13:42:24 +01:00
Michal Karpinski
ceeadaed26 Merge "Temporarily whitelist processes to open activities from background when service-based PendingIntent was whitelisted" 2019-01-12 14:20:38 +00:00
Hyunyoung Song
880a9510c2 Add @SystemApi to OverlayManager that ThemePicker needs
Test: builds and tested in local theme picker

Bug: 121328713

Commands executed:
$ make system-api-stubs-docs-update-current-api
$ make api-stubs-docs-update-current-api

Cts tests to follow

Change-Id: Id26d32f482c1bbab3497b517b7a553d145a1e3df
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2019-01-11 15:02:24 -08:00
Hai Zhang
85b762c9c8 Add home and emergency role names.
This change adds the names of the home and emergency roles, which will
be used by Settings.

Bug: 110557011
Test: build
Change-Id: I40bb0e021232acff62a32e0bdc24a04ff9ec6ba8
2019-01-11 14:35:10 -08:00
Eugene Susla
40335c1be9 Merge "Mirgate default SMS app handling to RoleManager" 2019-01-11 21:23:34 +00:00
Winson Chung
fb922e9bac Merge changes from topic "prediction_suggestion_services"
* changes:
  Initial commit of Content Suggestions (overview long press) Manager.
  Adding initial implementation of Prediction client/service API
2019-01-11 20:21:19 +00:00
Svetoslav Ganov
9a788837ef Merge "Historical app ops." 2019-01-11 18:48:55 +00:00
Garfield Tan
0c81667a08 Merge "Drop stale activity configuration updates." 2019-01-11 17:06:39 +00:00
TreeHugger Robot
cbdbc4d9c6 Merge "Add a privileged API for capturing and consuming bugreports" 2019-01-11 12:37:33 +00:00