Commit Graph

17244 Commits

Author SHA1 Message Date
Amy Zhang
8527147b3d Merge changes from topic "tuner-rm"
* changes:
  Add a TunerResourceManagerService as an Android System Serivce.
  Add Lnb related APIs into the TunerResourceManager interface
  Add Cas related APIs into the Tuner Resource Manager
  Adding ITunerResourceManagerService interface into android.media.tv
2020-02-12 23:48:29 +00:00
Philip P. Moltmann
0946037764 Merge "Revert "Revert "Activity start: Send featureId from context->AppOpsManager""" 2020-02-12 18:52:23 +00:00
Philip P. Moltmann
ee29509ecd Revert "Revert "Activity start: Send featureId from context->AppOpsManager""
This reverts commit e7421e92d9.

Exempt-From-Owner-Approval: revert-revert and only piping anyway
Test: 1:1 revert-revert
Bug: 136595429
Change-Id: I44e5fa2019f5604c6e2c08bdd1967129c64a90a7
2020-02-12 18:51:53 +00:00
Alex Johnston
12a4461733 Merge "Modify Screen Capture Disabled APIs" 2020-02-12 16:55:36 +00:00
Alex Johnston
8e935f7737 Modify Screen Capture Disabled APIs
* Previously, setScreenCapturedDisabled and getScreenCaptureDisabled
  did not support explicitly querying the parent profile.
* This CL allows the COPE profile owner call these APIs on the parent
  profile to disable screen capture device-wide.

Bug: 149006854
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testScreenCaptureDisabled
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testScreenCaptureDisabled
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testScreenCaptureDisabled_assist
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testScreenCaptureDisabled_allowedPrimaryUser
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testCreateAdminSupportIntent

Change-Id: I64469af190577f66f48052c7f0df20067101aac4
2020-02-12 11:52:59 +00:00
TreeHugger Robot
c228e1d88a Merge "Add manifest broadcasts for profile (un-)available." 2020-02-12 11:39:12 +00:00
TreeHugger Robot
5f212d0010 Merge "Revert "enable dynamic binding in AppPredictionSession"" 2020-02-12 08:05:03 +00:00
Pierre Barbier de Reuille
1858482e49 Add manifest broadcasts for profile (un-)available.
This mean both switch on/off and add/remove profiles.

The broadcasts already exists for registered receivers, this adds them
for manifest receivers with INTERACT_ACROSS_PROFILES permission and
crossProfile attribute.

The MANAGED_PROFILE_REMOVED broadcast is sent to all application with
android:crossProfile="true". Any cross profile app may be impacted, and
there is no possible transfer of information as the account is already
deleted at the time the signal is emitted.

Change-Id: I17fb9a01b70b28845c5d6aacdcdd497a82391474
Fix: 145135525, 145598120
Test: Demo-app using Digital Wellbeing (automated test underway).
Test: atest com.android.cts.devicepolicy.CrossProfileAppsPermissionHostSideTest
Test: atest 'com.android.cts.devicepolicy.QuietModeHostsideTest#testBroadcastManagedProfileAvailable_withCrossProfileAppsOp'
Test: atest 'com.android.cts.devicepolicy.QuietModeHostsideTest#testBroadcastManagedProfileAvailable_withoutCrossProfileAppsOp'
2020-02-12 07:44:23 +00:00
Amy
06a551ee7b Add a TunerResourceManagerService as an Android System Serivce.
This service is used to interact with TunerHAL interface and the Tuner
framework to manage the Tuner resources currently used on the device.
Tuner framework claims resource from this service. The service will
handle the requests from multiple applications based on their priority.

Sepolicy changes are in https://android-review.googlesource.com/c/platform/system/sepolicy/+/1161873
Test: cuttlefish
Bug:
Change-Id: Ifedc4e6f120e711aadffdf715d8720e0b64fbe16
2020-02-11 19:39:44 -08:00
TreeHugger Robot
07e850a979 Merge "Add new permission / appop for reading loader data" 2020-02-12 01:56:31 +00:00
Todd Kennedy
b0948d4cec Add new permission / appop for reading loader data
Bug: 148374455
Test: Manual
Test: Create three packages; 1) only request PACKAGE_USAGE_STATS, 2) only request LOADER_USAGE_STATS, 3) request both
Test: Go to Settings -> Apps & Notifications -> Special app access
Test: See that there is only a single entry for "Usage access"
Test: Under "Usage access", see all three test apps appear
Test: Disable access for each application and verify that only the appop for the declared permisson is flipped using
Test: adb shell cmd appops get <<PACKAGE_NAME>>
Test: atest CtsPermission2TestCases
Change-Id: I7741a703fd4494832347e51e113adf974cc31d2b
2020-02-11 15:46:43 -08:00
Pinyao Ting
5052796bf0 Revert "enable dynamic binding in AppPredictionSession"
This reverts commit 6b172567d5.

Reason for revert: Unexpected Crash

Bug: 149282975
Change-Id: I674397398ae40d106f84e6a650f75e77769e9de1
2020-02-11 22:30:42 +00:00
Julia Reynolds
3f39de97d0 Merge changes from topic "jr-hist-snooze"
* changes:
  Add tracing for notification history actions
  Optionally exclude snoozed notifs from dismissal archive
2020-02-11 21:54:58 +00:00
Fiona Campbell
004e36da64 Merge "Add support for brightness as a float" 2020-02-11 18:51:02 +00:00
Julia Reynolds
27e26448ff Optionally exclude snoozed notifs from dismissal archive
Test: manual
Bug: 137396965
Change-Id: I9238b3edc89a0c0821bcee38612dcb81b2f3f69c
2020-02-11 11:31:35 -05:00
TreeHugger Robot
8eaa866603 Merge "Enable App Prediction for Work Profile" 2020-02-11 03:49:50 +00:00
Pinyao Ting
ac68aac0ac Enable App Prediction for Work Profile
call to different instance of AppPredictionPerUserService based on
calling context.

Bug: 148230574
Test: Manual
Change-Id: I5987ed6a80155a8aed7c1985e8edd1ba98e51149
2020-02-10 17:13:32 -08:00
Fiona Campbell
d4eb295196 Add support for brightness as a float
Change the framework to handle brightness as a float rather than an int.

Test: AutomaticBrightnessControllerTest
BrightnessConfigurationTest
BrightnessMappingStrategyTest
BrightnessUtilsTest
DevicePolicyManagerTest
DisplayManagerServiceTest
DisplayTest
DozeScreenBrightnessTest
PowerManagerTest
PowerManagerVrTest
SettingsProviderTest

Exempt-From-Owner-Approval: Changing param from int to float

Change-Id: I413641cd987c5ec8f82753c0388a33f85a9682de
2020-02-10 23:44:40 +00:00
Evan Rosky
825f041a0c Merge "Add utility to get all root tasks on a display" 2020-02-10 21:52:08 +00:00
Automerger Merge Worker
0f7945a435 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3 am: 5d3e5fb3b5 am: 4c0d1a02b6
Change-Id: I5da9a24dac34cea069906337b8d39cbe43c20213
2020-02-10 21:50:00 +00:00
Automerger Merge Worker
4c0d1a02b6 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3 am: 5d3e5fb3b5
Change-Id: Ie1963bb7965827d9f9985b08c78e70b2de3319a7
2020-02-10 21:35:05 +00:00
Automerger Merge Worker
5d3e5fb3b5 Merge "Add TEST_MAPPING for gating and logging" am: 05fb4434f3
Change-Id: I701ef53dada696ee5f6e45d8539ca385a08ffc29
2020-02-10 21:24:31 +00:00
Treehugger Robot
05fb4434f3 Merge "Add TEST_MAPPING for gating and logging" 2020-02-10 21:12:10 +00:00
TreeHugger Robot
530d3e4982 Merge "Pass PictureInPictureParams in TaskInfo." 2020-02-10 20:17:31 +00:00
Soonil Nagarkar
ad1c960744 Merge "Add location notification and target sdk checks" 2020-02-10 19:43:06 +00:00
Andrei Onea
1a0195349b Add TEST_MAPPING for gating and logging
The tests included are unit tests for the implementation (under
FrameworksServicesTests), for the corresponding TestRule
(PlatformCompatGating) and CTS tests.

Bug: 137821288
Test: cd frameworks/base/core/java/android/app/compat && atest
Test: cd frameworks/base/services/core/java/com/android/server/compat \
          && atest
Change-Id: I1a652775715f1a9738cc72725303bc78dfa17d03
2020-02-10 18:25:06 +00:00
Automerger Merge Worker
826a1848bc Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6 am: 00f11fe5fd am: 912f8487d2
Change-Id: I8dc566e8d2fb1c8604f686298867f5a451e480b9
2020-02-10 16:52:00 +00:00
Automerger Merge Worker
912f8487d2 Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6 am: 00f11fe5fd
Change-Id: I90fd68462e5967cfe7eef2c3b86dbec78a124f72
2020-02-10 16:35:29 +00:00
Philip P. Moltmann
41308eced1 Merge "Revert "Activity start: Send featureId from context->AppOpsManager"" 2020-02-10 16:31:33 +00:00
Automerger Merge Worker
00f11fe5fd Merge "Clear callingId before binder calls in CompatChanges" am: 45d1f67bf6
Change-Id: I803ed8ac7035295d819130d1b19c9585fe0edb65
2020-02-10 16:23:49 +00:00
Philip P. Moltmann
e7421e92d9 Revert "Activity start: Send featureId from context->AppOpsManager"
Revert "Adjust monkey to changed internal APIs"

Revert "Test featureId is correctly used in startActivity"

Revert submission 10111030-activityStarter_featureId

Reason for revert: presubmit test breakage
Reverted Changes:
Ic7056b492: Activity start: Send featureId from context->AppOp...
I8e2a07da7: Adjust monkey to changed internal APIs
I7a6af6fb1: Test featureId is correctly used in startActivity

Change-Id: I48c55a962c990b22ea49e923baa7c73b121d179b
2020-02-10 16:14:12 +00:00
Andrei-Valentin Onea
45d1f67bf6 Merge "Clear callingId before binder calls in CompatChanges" 2020-02-10 16:13:13 +00:00
Eran Messeri
83235861a5 Merge "Revert: Prevent auto-granting of location permission via DPM" 2020-02-10 13:52:35 +00:00
Wu Ahan
b4ab54ad97 Merge "Unit tests for wide color gamut of ImageWallpaper" 2020-02-09 14:17:16 +00:00
Philip P. Moltmann
6e406c8ae7 Merge "Activity start: Send featureId from context->AppOpsManager" 2020-02-08 22:54:50 +00:00
Philip P. Moltmann
9c5226fe36 Activity start: Send featureId from context->AppOpsManager
The expected usage pattern for noteOp is to get the
Context#getOpPackageName() and Context#getFeatureId() in the calling app
and the call

noteOp(callingPackageName, Binder.getCallingUid(), callingFeatureId)

As the featureId parameter is new this parameter has to been piped all
through from the ...Manager classes running in the app all way deep into
the bowels of the system server.

There is a special featureId==null for the "default" feature. This is
used in two cases:
- In case the system server (packageName == null || packageName ==
  "android") makes a call
- In the case there is no caller. In this case I left annotations in the
  code to make clear that the default feature is used

Raw binder interfaces (defined in AIDL files) are not supposed to be
used by apps. Still historically this has happened and we ended up with
@UnsupportedAppUsage tags in these files. Also AIDL does not support
two methods with the same name but different parameters. I.e. in the
case when I had to add a paramater to a method tagged as UnsupportedAppUsage I
- created a new method ...WithFeature with the additional paramter
- set a maxTargetSDK for the old method and mention the public API to
  use in the deprecation method
This is really not pretty. Once there is no more app using the old
internal API this hack can be removed.

Additionally this change removed all internal calls to
AppOpsService.noteOperation and AppOpsService.checkOperation and
replaces them with the public API equivalent. This sometimes means to
move the resolution of the mAppOpsManager to be lazy.

Exempt-From-Owner-Approval:: Just piping through arguments
Bug: 136595429
Test: atest --test-mapping frameworks/base/services/core/java/com/android/server/am/
      atest CtsAppOpsTestCases added test to cover activity start
      atest WmTests
Change-Id: Ic7056b492cb1c9a79158e6c2b4864898a0eb5b2a
2020-02-08 22:53:43 +00:00
Automerger Merge Worker
af5dbf486a Merge "Disabled some DEBUG constants." into qt-qpr1-dev am: e8d9d331ae
Change-Id: I7d4e49253b1ecd54dc8036e21e23e7392aa47602
2020-02-08 21:24:30 +00:00
TreeHugger Robot
1e77561653 Merge "Descriped how getFeatures map is keyed" 2020-02-08 17:46:03 +00:00
Julia Reynolds
d05b0a7f66 Merge "Add support for Conversation settings" 2020-02-08 11:48:17 +00:00
Automerger Merge Worker
06dd4617c0 Merge changes from topic "lights-manager" am: 59401aab80 am: bd0f475895
Change-Id: I2f4ba72c3b56b5ae0f9ec82e368281734b9a9715
2020-02-08 01:53:41 +00:00
Automerger Merge Worker
bd0f475895 Merge changes from topic "lights-manager" am: 59401aab80
Change-Id: I9a45024b3cb557afd4fb09e69692f35c4372c928
2020-02-08 01:37:15 +00:00
Julia Reynolds
6ae380d699 Merge "Add ability to delete individual history items" 2020-02-08 01:15:39 +00:00
Robert Carr
f6690d1c7e Pass PictureInPictureParams in TaskInfo.
This way TaskOrganizerImplementations can use the parameters from
taskAppeared. We also wire up taskInfoChanged.

Bug: 146594635
Bug: 139371701
Test: TaskOrganizerTests
Change-Id: I5371af16177ebdf6e2187beb7184efd499c8f36d
2020-02-07 13:29:43 -08:00
Jing Ji
c0324f3a1f Merge "Update ApplicationExitInfo per API Review" 2020-02-07 21:22:58 +00:00
Evan Rosky
29d4a0a5d5 Add utility to get all root tasks on a display
This is intended to replace getAllStackInfos for
task organization purposes.

Bug: 33381284
Test: updated TaskOrganizerTests
Change-Id: I1ff10de188218f1cd0b5638c297dffbf2a9a04a2
2020-02-07 12:50:20 -08:00
Felipe Leme
85382ce4d2 Disabled some DEBUG constants.
Bug: 138939803
Bug: 142965266
Bug: 148457657

Test: echo 'in TH we trust!'

Change-Id: Ie3112fa1965d9b03bc142924ca17cf27dd6aa44d
(cherry picked from commit e966b8e76d26283163721620528eea0bfd77b43c)
2020-02-07 11:52:28 -08:00
Andrei Onea
01ba3215fa Clear callingId before binder calls in CompatChanges
Since this was already a recurring pattern when using PlatformCompat
directly, clear calling id before binder calls in CompatChanges.

Bug: 149091690
Test: atest CtsAppCompatHostTestCases
Change-Id: I4eec315eba14b840f9ef222b81b624d8e4f201eb
2020-02-07 19:19:20 +00:00
Evan Rosky
a85b3f1828 Merge "Add hierarchy operations to container transaction" 2020-02-07 19:19:12 +00:00
Julia Reynolds
b1a7718ff8 Add ability to delete individual history items
Test: atest
Bug: 137396965
Change-Id: I825a93bdf8fd28c4d58bf3df4a00c7c6505678bf
2020-02-07 14:10:16 +00:00
Julia Reynolds
882f206956 Add support for Conversation settings
Test: atest
Bug: 137397357
Change-Id: I68df21cc94d4964b417cad7aaad05526e1b4f967
2020-02-07 09:06:12 -05:00