Commit Graph

17469 Commits

Author SHA1 Message Date
TreeHugger Robot
777531511f Merge "Rename get/setProtectedPackages methods" into rvc-dev 2020-03-15 23:05:42 +00:00
Stanislav Zholnin
48811ee600 Add logging operation ids.
Add operation ids which are used only for logging. They will
allow to reduce bandwidth required for logging. Mapping between
operation string ids (OPSTR_, public API) and Logging ids
is enforced by statsd CTS test.

Bug:143519689
Test: android.cts.statsd.atom.UidAtomTests#testAppOps
Test: android.cts.statsd.atom.UidAtomTests#testForegroundServiceAccessAppOp
Exempt-From-Owner-Approval: discussed  with moltmann@ in chat.

Change-Id: I2f85d6889e946219557d26b28334d4bacde06b12
Merged-In: I2f85d6889e946219557d26b28334d4bacde06b12
2020-03-15 14:29:32 +00:00
Eugene Susla
1d7a7910e4 Add missing OPSTR for OPSTR_AUTO_REVOKE_MANAGED_BY_INSTALLER
Fixes: 151506845
Test: Ensure no error on boot
Change-Id: I912fb0c2058ef8db4a58b2c05a1d142a7d7d22cc
2020-03-14 09:16:43 -07:00
Eugene Susla
922cd08f62 Introduce per-app API for installer whitelisting
Test: presubmit
Bug: 146513245
Change-Id: I5a4502aeb78d2e35209ed88312d24bcafbb4ba7c
2020-03-13 22:09:22 -07:00
Eugene Susla
2ac02b0d3e Add public API to check if current app is auto-revoke exempt
Test: presubmit
Bug: 146513245
Change-Id: I18ac5957eb9ae1ea0d7de2daf407e6d797079937
2020-03-13 22:44:00 +00:00
Selim Cinek
5f003f4e10 Merge changes I69b33b0c,If904c85e,I28444df4,I3bfa4580,I88d9667d, ... into rvc-dev
* changes:
  Decrease avatar and sender name sizes in MessagingStyle
  Fixed various conversation layout appearences
  Implemented FacePile if no group icon is present
  Fixed the behavior of headers in conversation groups
  Ensured correct coloring of badge in dark mode
  Fixed an issue where the bubble badge was visible independent of the icon
  Improved transitions for expanding messaging notifications
  Adjusted single line representation to include a colon
  Made the expand button positioning conditional on expanded state
  Ensured that the sender of the first message is hidden
  Baseline for the new ConversationLayout
2020-03-13 21:01:24 +00:00
Selim Cinek
83cf855163 Merge "Made sure that templated views support RTL" into rvc-dev 2020-03-13 20:58:52 +00:00
Shuo Qian
aa49e5b750 Merge "Add updateMccMncConfiguration as @TestApi for CTS" into rvc-dev 2020-03-13 20:40:31 +00:00
Hall Liu
1b243291f4 Merge "Hide RoleManager#getDefaultSmsPackage" into rvc-dev 2020-03-13 20:28:36 +00:00
Jerome Gaillard
f9fe6f87a9 Rename AutoTime and AutoTimeZone APIs part 2
Some usages were forgotten.

Bug: 150958098
Test: m docs
Change-Id: I1d3dc332942638160e35c9f5c224f51b47e71bb3
2020-03-13 16:34:23 +00:00
Pavel Grafov
75e2ea6bb4 Merge "Clarify time units for setManagedProfileMaximumTimeOff argument." into rvc-dev 2020-03-13 14:30:07 +00:00
Philip P. Moltmann
d7a823623f Merge "Rename featureId -> attributionTag" into rvc-dev 2020-03-13 14:26:31 +00:00
Alex Johnston
1dbdcbc689 Merge "Rename AutoTime and AutoTimeZone APIs" into rvc-dev 2020-03-13 10:00:43 +00:00
Philip P. Moltmann
767ef39c1a Add docs for users, permissions, appops.
Test: Only docs changes
Change-Id: I2115b32c41a500d3a9847a5ea3c1d8b82dd5112c
Fixes: 151379035
2020-03-13 00:52:22 +00:00
Selim Cinek
2f7f7b8803 Fixed various conversation layout appearences
Previously the layout would break if the developer
specified empty names or no avatars. Similarly if
a developer specified a conversationtitle in a
one to one chat, it would break badly as well.

Bug: 150905003
Test: create various edge case chats and observe the layout
Change-Id: If904c85e6d582b4735eb928d66749a7863fbbc06
2020-03-12 13:39:36 -07:00
Selim Cinek
e9714eb0c7 Ensured correct coloring of badge in dark mode
Bug: 6701275011
Test: add conversation in darkmode, observe dark badge background
Change-Id: I88d9667d82a134233ff8c0c19f06dffdd5b16a67
2020-03-12 13:39:36 -07:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Shuo Qian
501a606c11 Add updateMccMncConfiguration as @TestApi for CTS
Test: cts; https://paste.googleplex.com/5930499648258048
Bug: 147897445
Change-Id: I63288be1acd9e898548ced345799ac1ae69ce427
Merged-In: I63288be1acd9e898548ced345799ac1ae69ce427
2020-03-12 16:48:19 +00:00
Philip P. Moltmann
9f0ee82df5 Merge "Call Compatibility.isChangeEnabled in calling app" into rvc-dev 2020-03-12 15:40:38 +00:00
Selim Cinek
20d1ee2402 Baseline for the new ConversationLayout
Introduced a new Layout for Conversation Notifications.
There are still various open issues that will be
fixed in follow up Cls

Bug: 150905003
Test: Add conversations, obverve visuals
Change-Id: I8ab2e2988d3205a4491006df68ec14235109466f
2020-03-11 21:53:03 -07:00
Lucas Dupin
888edd6fdc Merge "Implement wallpaper zoom hooking it to the shade" into rvc-dev 2020-03-12 04:07:51 +00:00
Hall Liu
c732c366c7 Hide RoleManager#getDefaultSmsPackage
Fixes: 151184554
Test: NA
Change-Id: I1e502362d866caea04ce6f1529d8591f6de272d0
2020-03-12 00:25:45 +00:00
Philip P. Moltmann
7641cd0aa6 Call Compatibility.isChangeEnabled in calling app
As this checks the "change-enabled" state of the current app. Hence
calling this in the system server does not make sense.

This change sets a flag if we want to enable the old behavior.

Test: TH
Bug: 148180766
Change-Id: Ic17f8ff9ff7dcf984b55b978f582343286fa67c4
2020-03-11 14:47:43 -07:00
Srinivas Paladugu
8faac83a3f Rename get/setProtectedPackages methods
Based on API council feedback that current method names are ambiguous,
renaming them with
setUserControlDisabledPackages/getUserControlDisabledPackages.

Bug: 150865604
Test: atest DevicePolicyManagerTest
atest com.android.cts.devicepolicy.DeviceOwnerTest#testSetUserControlDisabledPackages

Change-Id: I74f07ae5f0e9b425a6f2e4aa52d2cb8ac42da68e
2020-03-11 11:21:49 -07:00
Julia Reynolds
34621b08e3 Merge "Increase test coverage for NotificationChannel" into rvc-dev 2020-03-11 17:14:42 +00:00
Philip P. Moltmann
093ba7e506 Merge "Allow to exempt apps from restrictions to RECORD_AUDIO" into rvc-dev 2020-03-11 16:11:16 +00:00
Winson Chung
cfdd34adab Merge "Always notify SystemUI when launching activity to existing task" into rvc-dev 2020-03-11 02:28:09 +00:00
Philip P. Moltmann
5892a8f7b0 Rename AppOpsCollector -> OnOpNotedCallback
and annotate time values used by this area of code correctly.

Fixes: 150699068
Test: Only renames
Change-Id: Ibd5b08900d6855603e7ce59048587d391a5c5410
2020-03-10 11:50:00 -07:00
Lucas Dupin
13f4b8a158 Implement wallpaper zoom hooking it to the shade
This adds a notion of per caller wallpaper zoom, in order to support
simultaneous clients.

The shade might be pulled down while in overview, for example, and we
must coordinate between launcher and systemui.

Bug: 149792636
Bug: 146387434
Test: atest NotificationShadeWindowViewTest
Test: atest WallpaperControllerTests
Test: manual
Change-Id: I588ba56d3d2704845d033ea2a5890ce812b9ee07
2020-03-10 10:52:28 -07:00
Philip P. Moltmann
ad787aa128 Allow to exempt apps from restrictions to RECORD_AUDIO
- Extend the concept if "isPrivilidged" to a generic "RestrictionBypass"
  class so that we can add more variants of bypassing.
- Add a new way of bypassing by using a new permission.
- Always except resolvable UIDs (root, shell, media_uid, audioserver,
  cameraserver, system server) from restrictions.

Fixes: 141210120
Test: atest -m CtsAppOpsTestCases FrameworksMockingServicesTests:AppOpsServiceTest FrameworksMockingServicesTests:AppOpsUpgradeTest
Change-Id: I3ca555e9370aa0003400429ee7ab12e95c62a042
2020-03-10 10:06:02 -07:00
Pavel Grafov
822a7fbdb7 Clarify time units for setManagedProfileMaximumTimeOff argument.
This CL addressess API Review comment.

Bug: 150685276
Test: compiles
Change-Id: I23107617004db7fab19a77331b17fd5dc16d69d8
2020-03-10 13:52:50 +00:00
Eran Messeri
95d44d2c0e Update documentation for settings, affiliation API
Update the documentation for settings-related and affiliation-related
methods:
* The methods for setting a global and secure settings are documented
  to be mostly deprecated, because there are methods for the settings
  that are honoured and some other settings no longer apply.
* The methods for setting affiliation or binding to a service on another
  user can no longer work between a device owner and profile owner
  since this combination is no longer a valid one.

Bug: 147795815
Test: manual, m update-docs
Change-Id: I316148cb1d90fbe94999f9d1c242f08554869e97
2020-03-10 11:52:11 +00:00
Charles Chen
2a77f43bee Merge "Generate WindowInsets with new insets API" into rvc-dev 2020-03-10 08:46:30 +00:00
Winson Chung
e789ff64c8 Always notify SystemUI when launching activity to existing task
- SysUI can determine what to do based on the type of activity launched
  (ie. expand PIP/Bubbles to fullscreen)

Bug: 148977481
Test: atest TaskStackChangedListenerTest
Test: Launch app in split primary, ensure launching app again triggers
      recents
Test: Launch app in PIP, ensure launching app again triggers it to go
      fullscreen
Test: Launch app in bubble, ensure launching app again triggers bubble
      to expand
Change-Id: I754a71a72dd0e660930b19acbf9fe6ccbb453152
2020-03-10 03:46:48 +00:00
Eugene Susla
623468289f Merge "Replace auto-revoke whitelist permission flags with appop" into rvc-dev 2020-03-10 02:53:51 +00:00
Selim Cinek
22afab63bd Made sure that templated views support RTL
Previously templated views would not support RTL
if the underlying app doesn't. We're now supporting it.

Fixes: 151117132
Test: add notification from app that doesn't support RTL, observe normal template
Change-Id: Iec7e3b854989100977efba87c9c2cd98a2759ff9
2020-03-09 18:20:03 -07:00
Julia Reynolds
8cfe3433f9 Increase test coverage for NotificationChannel
Test: cts
Bug: 149361682
Change-Id: I548e42800cf89a225ef1030c53cbbce6ae9a0116
2020-03-10 01:11:39 +00:00
Alex Johnston
2e24529c68 Rename AutoTime and AutoTimeZone APIs
* Rename setAutoTime and getAutoTime to
  setAutoTimeEnabled and getAutoTimeEnabled.
* Rename setAutoTimeZone and getAutoTimeZone
  to setAutoTimeZoneEnabled and
  getAutoTimeZoneEnabled.

Bug: 150958098
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTime
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetTimeZone
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetAutoTimeEnabled
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetAutoTimeZoneEnabled
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTime
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetTimeZone
      atest com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: I57a220549c33bcbbf2f3e37a1a724965ef2a9546
2020-03-09 13:18:07 +00:00
TreeHugger Robot
1a023125c9 Merge "Add permissions data validation in AppOpsService" into rvc-dev 2020-03-07 00:50:14 +00:00
Julia Reynolds
fd9f8349b8 Fix handling of work profiles in notification history
Test: atest
Fixes: 150336474
Change-Id: I9ebe8986b8b66fd3b79a4be7aa203a8e1f1ad8bb
2020-03-06 12:45:21 -05:00
David Cheung
2ead966e7b Add permissions data validation in AppOpsService
Added functionality to collect noteOp noteProxyOp startOp operations for permissions data validation, this functionality is for
developers and can be enabled by modifying the flag. This data will be utilized to ensure permissions are
requested only when necessary.

Bug: 150890258

Test: Manually tested on crosshatch to ensure files are
written/formatted properly with the necessary data and does not
interfere with normal behavior

Design Document: https://docs.google.com/document/d/1RRs3cPgCzF5S1TkTD11MBKJedUp2DAUEGtCQXtrk0XQ/edit?usp=sharing

Change-Id: Ia7fba6ec5e47b7ddd13ca964ae5f6c1afa1cc186
2020-03-05 23:04:05 +00:00
Muhammad Qureshi
596a1f6f4e Merge "Use FrameworkStatsLog instead of StatsLogInternal" into rvc-dev 2020-03-05 21:41:04 +00:00
Jing Ji
7712b3a92a Merge "Update the categories of app kill reaons" into rvc-dev 2020-03-05 21:16:12 +00:00
TreeHugger Robot
8caff7dc81 Merge "DO NOT MERGE: Remove AppSearch from Android R." into rvc-dev 2020-03-05 21:09:00 +00:00
Muhammad Qureshi
317061ae9d Use FrameworkStatsLog instead of StatsLogInternal
StatsLogInternal will be removed in R as part of statsd becoming a
Mainline mdoule.

Bug: 150630484
Test: m
Change-Id: I67481e85f98f6d84ae1dde28e2eabff485eebb36
2020-03-05 10:21:15 -08:00
Songchun Fan
130b6bec30 Merge "remove proxy binder service IIncrementalManager" into rvc-dev 2020-03-05 16:38:06 +00:00
Galia Peycheva
fc1430a39e Merge "Make ActivityInfo.preferMinimalPostProcessing a flag" into rvc-dev 2020-03-05 15:45:06 +00:00
Charles Chen
b8070fb66e Generate WindowInsets with new insets API
In previous CL[1], WindowMetrics#WindowInsets is provided
with legacy insets, which are stable insets and system
window insets. With the new insets mode enabled, we
should provide insets with new insets API.

[1]: f65e022caa

Bug: 150095967
Test: atest WindowMetricsTests
Change-Id: I251313b4b8c033dbad8b54e58cd166e2e1665d37
2020-03-05 15:25:19 +08:00
Songchun Fan
7f051b5251 remove proxy binder service IIncrementalManager
This is no longer needed because native Incremental Service directly
uses IDataLoaderManager.

BUG: 150406132
Test: atest service.incremental_test
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: Idbde2988883becbf3eb707d42c0558774a6073e8
2020-03-04 19:50:44 -08:00
Eugene Susla
5fc2d767ce Replace auto-revoke whitelist permission flags with appop
Bug: 146513245
Test: presubmit
Change-Id: I6f901b7e5dfe64840e7c3c0ee444730ac6eb4cfc
2020-03-04 18:46:22 -08:00