Commit Graph

17259 Commits

Author SHA1 Message Date
Automerger Merge Worker
ec47b48311 Merge "Update InCallService API docs." am: 11e7b55ea9 am: 040db280fa am: 01bb7cef0e
Change-Id: Ie50b8f5173a16f34d9a9674a081ce62a45687656
2020-02-13 19:48:37 +00:00
Automerger Merge Worker
01bb7cef0e Merge "Update InCallService API docs." am: 11e7b55ea9 am: 040db280fa
Change-Id: Id6df82c6284b2cc027dba1d2b355806888185761
2020-02-13 19:26:10 +00:00
Automerger Merge Worker
040db280fa Merge "Update InCallService API docs." am: 11e7b55ea9
Change-Id: Ica011ce75760d1d7338c3accdf29dc7505fd9949
2020-02-13 19:09:01 +00:00
Tyler Gunn
11e7b55ea9 Merge "Update InCallService API docs." 2020-02-13 18:48:00 +00:00
Kweku Adams
d088856bfb Merge "Make apps active when charging." 2020-02-13 18:37:44 +00:00
Alex Johnston
c39e9b2e25 Merge "Modify DPM KEYGUARD_DISABLE_SECURE_CAMERA restriction" 2020-02-13 17:50:29 +00:00
Alex Johnston
af0aa258a1 Modify DPM KEYGUARD_DISABLE_SECURE_CAMERA restriction
* Introduced new logic that allows the profile owner of an
  organization-owned device (COPE PO) to set the restriction
  KEYGUARD_DISABLE_SECURE_CAMERA on the parent profile.
* Modified the API setKeyguardDisabledFeatures to be callable
  on the parent profile for restriction KEYGUARD_DISABLE_SECURE_CAMERA.

Bug: 148656201
Test: Manual testing with TestDPC
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetKeyguardDisabledFeatures
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyguardDisabledFeatures
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetKeyguardDisabledFeatures
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyguardDisabledFeaturesLogged

Change-Id: I13984193e24b8745686e48c9c58ebee40a204fc7
2020-02-13 16:08:06 +00:00
Alex Johnston
7ab8a28306 Merge "Rename lockdown admin configured networks API" 2020-02-13 09:51:00 +00:00
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
Kweku Adams
f35ed37018 Make apps active when charging.
This undoes part of the work to remove parole windows from
AppStandbyController. In the past, UsageStatsManager.isAppInactive would
return false when the device was charging. This wasn't documented
behavior, but was intentional, so removing it was the wrong thing to do.
I've updated the documentation to explicitly call out the behavior and
added it back so that the behavior is consistent with previous versions.

Bug: 148988544
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest AppIdleHistoryTests
Test: atest AppStandbyControllerTests
Change-Id: If5cad80b693a1e043ae64b8206e28abb60f83853
2020-02-12 11:52:28 -08: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
Automerger Merge Worker
f0b9f042de Merge "Add HomeVisibilityObserver APIs in ActivityManager." am: cb47d86158 am: c1363ad2b9
Change-Id: If7b65fd40532a8868463a5d545da5c197676ffe8
2020-02-11 21:34:57 +00:00
Automerger Merge Worker
c1363ad2b9 Merge "Add HomeVisibilityObserver APIs in ActivityManager." am: cb47d86158
Change-Id: Ib48d687e8da2941fa3385aa5066e4d490b1d3ad8
2020-02-11 21:10:48 +00:00
Xiangyu/Malcolm Chen
cb47d86158 Merge "Add HomeVisibilityObserver APIs in ActivityManager." 2020-02-11 21:00:16 +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
Alex Johnston
57ec80939f Rename lockdown admin configured networks API
* Renamed 'isLockdownAdminConfiguredNetworks'
  to 'hasLockdownAdminConfiguredNetworks'
* Renamed 'setLockdownAdminConfiguredNetworks'
  to 'setConfiguredNetworksLockdownState'

Bug: 148853269
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAdminConfiguredNetworks
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testAdminConfiguredNetworks

Change-Id: I6bef862b4ef7e5a7997378efcff08477da9de6dc
2020-02-11 12:43:21 +00: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