Commit Graph

14494 Commits

Author SHA1 Message Date
Eric Laurent
5b9de38cd1 Merge "Activity manager: native callback for process state" 2018-12-04 16:40:27 +00:00
TreeHugger Robot
8dfdd61718 Merge "Add checkable two target preference layout" 2018-12-04 00:42:00 +00:00
Eric Laurent
25f2eacaf9 Activity manager: native callback for process state
Make getUidProcessState() callback in IActivityManager.aidl
available to native processes.

Test: Manual test with audio recording apps pushed to background and back
to top.
Bug: 111438757
Change-Id: Ia0c87ab96baf83fb7fdd119295582f203fb1a50e
2018-12-03 16:28:33 -08:00
Felipe Leme
ecb08be22e Split IntelligenceManager / IntelligenceService.
This name is too generic, so we split it in 2 parts:

- ContentCaptureManager: the public API used by views and apps to report their
  structure.
- SmartSuggestionsServiec: the system service use to consume these events and
  provide autofill suggestions.

This CL also:

- Optimizes ContentCaptureManager allocation so they are not created on contexts that are not
  capturing events (such as views from the system server).
- Uses a generic ContentCaptureEventsRequest (rather than a list of events) to make it easier
  to be extended.
- Fixed IntelligencePerUserService so it clears the sessions when the
  implementation changes.

Test: manual verification

Bug: 119776618
Bug: 117944706
Bug: 119638877

Change-Id: I069bcd23dda94afe18b2781fd3981b8b555afa56
2018-12-03 15:29:07 -08:00
Beverly
9cb05c9546 Add checkable two target preference layout
Test: atest NotificationManagerTest
Bug: 111475013
Change-Id: I2b0fe3e33eb4d8da486d57faca0d0fe711d51445
2018-12-03 14:16:06 -05:00
Chavi Weingarten
e8f76a3642 Merge "Reparent DisplayContent layers to SurfaceControl for ActivityView" 2018-12-03 18:08:43 +00:00
TreeHugger Robot
bdec147068 Merge "Updates color and size of bell icon." 2018-12-03 16:28:10 +00:00
Julia Reynolds
b56135964d Merge "Require a permission for Q apps using full screen intents" 2018-12-03 16:13:59 +00:00
SzuWei Lin
3a96f91ac5 Merge "Nullify the default wallpaper component if it does not exist" am: b25a4d60e6 am: ae7bf51ae5
am: 83735846d4

Change-Id: I866c756b67c19a54e8a52fba9a85ceb5e16076f0
2018-12-03 07:43:44 -08:00
Gus Prevas
bae5ba39dd Updates color and size of bell icon.
Test: manual
Bug: 116622974
Change-Id: I0419759e8f99f0a0b3d8b68f18f5a445680ec1af
2018-11-30 16:38:56 -05:00
chaviw
ff2e7d8f41 Reparent DisplayContent layers to SurfaceControl for ActivityView
With the current implementation, when an ActivityView is created, it creates
a new Display in both DisplayManager and SurfaceFlinger. Then it attaches the
SurfaceView's surface to the Display so the content generated for the second
display renders into the SurfaceView. However, this is inefficient since it
requires the rendered content to get copied over.

With this change, the ActivityView creates a VirtualDisplay but also creates
a new SurfaceControl. It then notifies WindowManager so WM can instead
reparent the windows that represent the new VirtualDispay to be a child of
the SurfaceControl passed in. The SurfaceControl passed in is a child of the
SurfaceView's SC so the content in the new VirtualDisplay will just
automatically render onto the main display without having to copy.

The SF hierarchy will have the VirtualDisplay's surfaces as children of the
SurfaceView, but the WM will still represent the VirtualDisplay as a second
display.

Test: Run app with ActivityView and launch Activity in AV
Change-Id: I21c9bb189b6c12b0d98c67c8e68f53c621a4a802
Fixes: 111440225
2018-11-30 10:48:28 -08:00
SzuWei Lin
83735846d4 Merge "Nullify the default wallpaper component if it does not exist" am: b25a4d60e6
am: ae7bf51ae5

Change-Id: I03cdecc05ab9247d35a35caff986948fa008cadc
2018-11-30 09:09:55 -08:00
Rafal Slawik
d03ae420b0 Delete rss_high_watermark_in_bytes field
Reading RSS high-water mark was moved to a separate atom.

Bug: 119598534
Test: atest UidAtomTests#testProcessMemoryState
Test: atest UidAtomTests#testNativeProcessMemoryState
Test: atest MemoryStatUtilTest
Change-Id: I18424ea3f0ab1555febe62df1be97b174e93a55c
2018-11-30 13:35:46 +00:00
SzuWei Lin
1c7ae31e97 Nullify the default wallpaper component if it does not exist
The default wallpaper component cannot be found after GSI is flashed.
The home screen background will have no wallpaper and be black.
It will also cause the following CTS tests to fail:

- KeyguardTests#testDialogShowWhenLockedActivity
- KeyguardTests#testTranslucentShowWhenLockedActivity

The patch will check if the package of the default component exists.
If not, it will fall back to null, which is the AOSP default value, and
display the wallpaper in framework resource.

Bug: 119895131
Bug: 111909699
Test: flash GSI aosp_arm64-userdebug on a crosshatch, got AOSP wallpaper
Test: flash full crosshatch-userdebug on a crosshatch, got crosshatch wallpaper
Change-Id: I9d618d05458a03a675324cb2f861decf31c5bf18
2018-11-30 13:33:55 +08:00
Gustav Sennton
c98b163de0 Avoid NPE when adding a smart action with a null icon.
Bug: 119914388
Test: atest SmartReplyViewTest
Change-Id: Idd7adce79b67d684b5d5c2fc0f183c9b36c336fe
2018-11-30 00:27:45 +00:00
Lucas Dupin
54ff93c6b2 Merge "Ambient wallpaper API feedback" 2018-11-29 20:44:13 +00:00
TreeHugger Robot
da6e447f2a Merge "Update B&R owners" 2018-11-29 19:53:39 +00:00
Garfield Tan
4df6418f0b Merge "Add a test API to remove launch param records." 2018-11-29 18:06:54 +00:00
Julia Reynolds
47fd15fa92 Require a permission for Q apps using full screen intents
Test: cts
Bug: 119489430
Change-Id: I812669bb53fe8ddf501760fea22fd88175e49a01
2018-11-29 12:17:10 -05:00
Ian Lake
fe46ecd6ad Merge "Add Activity.registerActivityLifecycleCallbacks()" 2018-11-29 16:59:35 +00:00
Lucas Dupin
4c8c3274da Ambient wallpaper API feedback
Making this api a @SystemApi, protecting it with a permission and
changing boolean animation parameter to a long.

Change-Id: Ife6aac2806a5590288a801751f22d85c3cfd4622
Fixes: 116117810
Test: atest DozeWallpaperStateTest
Test: atest WallpaperServiceTest
Test: set image wallpaper
Test: set AOD wallpaper that holds permission
Test: set AOD wallpaper that doesn't hold permission
2018-11-29 17:38:11 +01:00
Annie Meng
df70906e80 Update B&R owners
Owners source of truth is now in AOSP but has merge conflicts with
internal so submitting a separate CL here (AOSP change at
aosp/813915).

Test: N/A
Change-Id: I0e96914bb339874a30c80776596f2d84e508df85
2018-11-29 15:55:12 +00:00
TreeHugger Robot
8ce7d1d992 Merge "Add onActionClicked in NotificationAssistantService" 2018-11-29 15:43:29 +00:00
Michal Karpinski
f4f922b1a4 Merge "Mark AppDetailsActivity class @TestApi" 2018-11-29 15:31:28 +00:00
TreeHugger Robot
8dac427f33 Merge "Add new intent to signal that device customization is ready" 2018-11-29 15:05:22 +00:00
Tony Mak
7d4b3a5f19 Add onActionClicked in NotificationAssistantService
This is added to report clicks on actions buttons to NAS.

BUG: 119010281
Test: atest SystemUITests
Test: atest RemoteViewsTest
Test: atest NotificationManagerServiceTest
Test: Manual. Tapped on the action (both normal and contextual) and
      observed the log.

Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
2018-11-29 11:43:53 +00:00
Ian Lake
8a88cd6fe0 Add Activity.registerActivityLifecycleCallbacks()
As an alternative to requiring developers
register/unregister ActivityLifecycleCallbacks
at the Application level, provide the same API
at the Activity level.

This allows you to get lifecycle callbacks scoped
to only a single Activity without overriding
each individual callback.

The callbacks are purposefully nested within
the Application scoped ActivityLifecycleCallbacks.

Test: new CTS test
BUG: 116118635
Change-Id: Iab6d841019010a0bf9d91fe889db82e0135b4b9c
2018-11-29 05:59:27 +00:00
TreeHugger Robot
99e225d425 Merge "Fixed a racecondition when creating notification headers" 2018-11-29 03:00:40 +00:00
Michal Karpinski
958462ffe5 Merge "Add a setting for background activity starts enabled state and basic rules for enforcement" 2018-11-29 01:56:07 +00:00
yuemingw
4bcea96bde Add APIs for cross profile calendar whitelist in DPM.
Bug: 118444029
Test: atest DevicePolicyManagerTest#testCrossProfileCalendar_failIfNotProfileOwner
atest ManagedProfileTest#testCrossProfileCalendarPackage

Change-Id: Id7e6a2fc32ec8bcf770700df1596378c858168c2
2018-11-28 23:46:41 +00:00
Selim Cinek
10bbc0ea78 Fixed a racecondition when creating notification headers
Previously we were modifying the extras of a shared notification
during the notification creation, which breaks if multiple builders
are accessing the same notification. We're now passing these options
as parameters into the various functions.

Test: create low priority group / notification / observe normal behavior
Change-Id: I2aaa5632cff55a87937a2bb3f947f15555d2e897
Fixes: 117150727
2018-11-28 13:27:03 -08:00
Garfield Tan
015486394b Add a test API to remove launch param records.
Some tests are broken because launch params are persisted between test
cases.

Bug: 120035844
Test: Manual test on the CTS.
Change-Id: Ia4f23778467f73dad471487eb94979bfccde16d9
2018-11-28 09:26:59 -08:00
Neil Fuller
f148c8d7d4 Merge "Track move of timezone classes to libcore.timezone" am: d48dbc9a34 am: f79ecf7c82
am: 402dc485d0

Change-Id: If9c8cfdce9bd0b3bcd460216edca369fd75abdde
2018-11-28 08:24:57 -08:00
Neil Fuller
402dc485d0 Merge "Track move of timezone classes to libcore.timezone" am: d48dbc9a34
am: f79ecf7c82

Change-Id: I1551e5d4330ea290ba3e3054349f79ee28f919c6
2018-11-28 08:10:04 -08:00
Michal Karpinski
8596dedf18 Add a setting for background activity starts enabled state
and basic rules for enforcement

The setting is on by default. It can be switched off with
a developer option (see accompanying commit) or
"adb shell settings put global background_activity_starts_enabled 0".

The setting is wired into ActivityStarter. When it's switched
off, all unsupported background activity starts are aborted and
it's currently manifested with a toast for quick feedback.

Only basic policy rules are added for now:
0) is it one of the most important UIDs?
1) does the calling app have any foreground activity?
2) is the calling process important enough to always be able
   to start an activity?
3) does the calling uid have any visible window?

The policy rules will be extended to allow for more use cases
in forthcoming CLs.

Most notable use cases not currently covered:
1) Notifications
2) Widgets
3) Shortcuts
4) Some of the most important system apps (e.g. com.android.vending)
5) Accessibility services and similar (IMEs covered thanks to
   visible window exemption)
6) Recents button double tap to open the previous app
See bluedoc for some more.

Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Manual test:
  (on)  observe all activities are started as they used to be
  (off) starts not satisfying one of the above rules are aborted,
        a toast specifying callingPackage is shown instead
Change-Id:  I1a3e14828c96f005d975ef6998f3bda678ccab29
2018-11-28 15:08:28 +00:00
Mårten Kongstad
fd20b8387d Add new intent to signal that device customization is ready
Add a new intent to be broadcast when a new configuration has been
installed to signal that it is time to reboot the modem, refresh caches,
etc. To receive the intent, recipients must hold the new permission
"android.permission.RECEIVE_DEVICE_CUSTOMIZATION_READY".

This CL registers the intent, but does not send it: that is the
responsibility of the customization client, e.g. Phonesky. The sender is
expected to call PackageManager.sendDeviceCustomizationReadyBroadcast
and hold the new permission "android.permission.SEND_DEVICE_CUSTOMIZATION_READY".

Bug: 118462251
Test: manual (custom apps)
Change-Id: I9a723ca9ade16e8c5d316efbc7effd01e13ff2e7
2018-11-27 15:00:27 -08:00
Patrick Baumann
fc2851e4d5 Removes ASEC-related logic from the framework
This change removes remaining ASEC-related logic from the framework in
preparation for install refactoring.

Bug: 109941548
Test: install still works
Change-Id: Ic7322038e45c026bcc59800a5a9fafdbb461021f
2018-11-27 12:56:14 -08:00
Jeff Sharkey
a789183401 Merge "Iterate on storage permissions model." 2018-11-27 15:51:14 +00:00
Neil Fuller
b8383a10b9 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Change-Id: Ic807977a85276b888362295d1d305effe33076fc
2018-11-27 14:44:59 +00:00
TreeHugger Robot
18ff896138 Merge "Introduce Message.USER_LOCAL and added logic to map person to user id" 2018-11-27 13:44:39 +00:00
wilsonshih
968b30ee74 Support wallpaper on secondary displays.(4/N)
Provides a flag to let the system server and wallpaper picker know
if this wallpaper service supports multiple displays.

Bug: 115486823
Test: Manually test with modified wallpaper sample app.
Change-Id: I0c8b2c5d00bfd97d069511dda9965c557b5733c6
2018-11-27 04:47:46 +00:00
Wei Sheng Shih
da77cc6ea3 Merge "Support wallpaper on secondary displays.(3/N)" 2018-11-27 04:47:08 +00:00
TreeHugger Robot
dca59bf420 Merge "Do not update AppStandbyController on foreground service events" 2018-11-27 00:45:35 +00:00
TreeHugger Robot
b0851aef24 Merge "Add Notification.Builder.setAllowSystemGeneratedContextualActions()." 2018-11-26 21:59:33 +00:00
Hui Yu
7e5bf5c54f Do not update AppStandbyController on foreground service events
Change-Id: I3ce067c9e7aae50aaf9784f1a63618c6cbaea2cc
Fix: 119781710
Test: atest HostsideRestrictBackgroundNetworkTests#testAppIdleMetered_enabled
2018-11-26 11:14:40 -08:00
Jeff Sharkey
9787a9459d Iterate on storage permissions model.
This change updates the permissions design to use app-ops for
controlling write access, which is only extended to the default app
for a particular collection type.

Bug: 119713234
Test: atest android.appsecurity.cts.PermissionsHostTest
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I40811ff175b3b8410b58ed901948a23a56f8a8c2
2018-11-26 12:00:35 -07:00
Tony Mak
f99ee17fc0 Introduce Message.USER_LOCAL and added logic to map person to user id
1. Introduce Message.USER_LOCAL to allow caller to specify which
   message is from the local user.

2. TextClassifierImpl will now encode the Person object to a user
   id.

3. Fixed a bug in Person.equals check

BUG: 111437455
BUG: 111406942

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/ActionsSuggestionsHelperTest.java

Change-Id: I6629f42244a402fa210f87afa88a629c2ca4a510
2018-11-26 18:33:16 +00:00
TreeHugger Robot
50f27c4a60 Merge changes from topic "revert-to-single-threaded-oms-init"
* changes:
  Decouple the display manager from the overlay manager
  Revert: "Init of OverlayManagerService on a parallel thread"
2018-11-26 16:30:24 +00:00
Neda Topoljanac
19f291660d Managed System Updates API
Adding API to install a system update from a file on the device.

Test: manual in TestDPC, CTS tests for negative cases: atest com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate

Fixes: 116511569

Change-Id: I34b5c6344301a9d2d64c98dedc4ed5e4a75c57d1
2018-11-23 16:28:07 +00:00
wilsonshih
81e10a7068 Support wallpaper on secondary displays.(3/N)
The launchers which running on secondary displays can set the desired
wallpaper dimensions and paddings on correct display.
Preset reasonable wallpaper size for newly added displays.
Add some error handling between the binder calls.

Note: We still only save/load wallpaper info for default display, as most of
time secondary displays are not fixed.

Bug: 115486823
Test: atest WallpaperManagerTest
Test: atest WmTests
Test: atest ActivityManagerMultiDisplayTests

Change-Id: Ifd1a96fa185f2d75825c6fe8d3db69466b31c5c8
2018-11-23 17:12:24 +08:00