Commit Graph

20694 Commits

Author SHA1 Message Date
Louis Chang
ba6bf9dad3 Merge "Remove WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY" into sc-dev 2021-05-04 23:42:51 +00:00
Alex Buynytskyy
1e5cf8f1ff Customer API feedback.
Use two separate interfaces for flags and single value. This produces
correct API documentation.

Bug: 160605420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I9a7eaf86af558d8dcfd1636a4baf6a28e2ee79b1
2021-05-04 15:24:02 +00:00
Anna Zappone
8315904e81 Merge "Handle work profile, DND state, app pauses" into sc-dev 2021-05-04 15:16:52 +00:00
Stanislav Zholnin
3476ed1d68 Merge "Add more explanation on difference between aggregate and discrete information." into sc-dev 2021-05-04 11:23:40 +00:00
Alex Johnston
345ff0cc74 Merge "DPM Check for unaffiliated secondary users" into sc-dev 2021-05-04 10:23:39 +00:00
Louis Chang
3100c1e4f4 Merge "Do not relaunch bg activities when application info changes" into sc-dev 2021-05-04 04:06:48 +00:00
Svetoslav Ganov
70e272de83 Merge "Use the correct switch for AR bypass" into sc-dev 2021-05-03 19:13:09 +00:00
Stanislav Zholnin
dd60f56455 Add more explanation on difference between aggregate and discrete
information.

Bug: 185226805
Test: Change limited to docs, no tests.
Change-Id: If041bad776d60dcfe018ef4d095f3e68e33a9e8d
2021-05-03 19:08:32 +01:00
Anna Zappone
1b12d3d473 Handle work profile, DND state, app pauses
Listen and respond to changes in state on background thread. Store in-memory to avoid
requerying frequently

Test: PeopleSpaceWidgetManagerTest, PeopleTileViewHelperTest,
PeopleSpaceUtilsTest
Bug: 182891880
Change-Id: Id0142b02bb549275c77d8940cda4eb1f0bf4e947

Change-Id: I65712a7a43d8956499533689fe77afbeeac5bd6e
2021-05-03 17:23:28 +01:00
Eran Messeri
84b3b6fb99 Merge "Document access to device identifiers on managed devices" into sc-dev 2021-05-03 07:27:22 +00:00
Ruslan Tkhakokhov
bdd1f279c5 Merge "Make changes guarding the new opt-out scheme overridable" into sc-dev 2021-05-01 13:22:21 +00:00
Svet Ganov
05d15ce5ad Use the correct switch for AR bypass
bug: 182204957

Test: atest CtsPermissionTestCases

Change-Id: Ic43106ced06bcca2a9abded299671ce92aacf938
2021-05-01 01:25:51 +00:00
Florian Mayer
748c3a8040 Merge changes from topic "playprofileable" into sc-dev
* changes:
  Add packageInstaller to packages.list.
  Add profileable opt-out to packages.list.
2021-04-30 20:42:16 +00:00
Kurt Dresner
3a4ecbf88f Merge "Make PROJECTION_TYPE_ALL=-1 so that all bits are on." into sc-dev 2021-04-30 18:23:24 +00:00
TreeHugger Robot
78a91deb5e Merge "Change streaming policy implementations" into sc-dev 2021-04-30 13:34:01 +00:00
Florian Mayer
6ea939f3bf Add profileable opt-out to packages.list.
We now have two notions of profileable:
 * profileable from shell: the user can profile the app using ADB-based
   tools (e.g. Android Studio or shell) . This is off unless the app
   opts in.
 * profileable from platform services: trusted platform services can,
   in accordance to the app installer's Terms Of Service profile the
   app. This is the default unless the app opts out. This is enforced
   by the profilers with information provided by the framework.

A new flag <profileable android:enable="false"/> can be used to opt out
of profiling in general. If this is not given, the app is considered
profilable by the platform, but the data will *not* be exposed to the
user via shell or adb. If profiles of the app should be given to the
user (e.g. for using Android Studio), <profileable
android:shell="true"/> can can still be used.

We write whether the app opted out or not to packages.list, to be
consumed by the profilers.

CTS-Coverage-Bug: 186720347

Test: m
Test: on userdebug: /data/system/packages.list for preinstalled, Play
      Store installed app and sideloaded app.
Test: on user: atest CtsPerfettoTestCases.
Bug: 170284829

Change-Id: I8d4bbedc043976fd11a95a511bd95a05c7ced7b9
2021-04-30 11:52:31 +00:00
Ruslan Tkhakokhov
a40ec3b70a Make changes guarding the new opt-out scheme overridable
Mark app compat changes guarding the new opt-out rules for D2D transfers
as @Overridable. This allows enabdling / disabling the behaviour without
code changes.

Bug: 186833084
Test: m -j
Change-Id: I97396bd2a27c86ffccffec364cf57d9647bb760d
2021-04-30 11:15:08 +01:00
Alex Johnston
9bedbd28b8 DPM Check for unaffiliated secondary users
* Add authorization check in DPMS for API
  methods to set the private DNS mode and
  the recommended global proxy.
* When there is a unaffiliated user, it is
  assumed that it is managed separately.
* These are device-wide policies that affect
  all users, so should only be set when it is
  the same managing entity and all users on
  the device are affiliated.

Bug: 177926343
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.DeviceOwnerTest#testProxyPacProxyTest
      atest com.android.cts.devicepolicy.DeviceOwnerTest#testProxyStaticProxyTest
Change-Id: I119a84988ad3cda42b709dbc6d63acf76b0031d6
2021-04-30 10:09:51 +01:00
Hui Yu
e37fdc9e8a Merge "Do not allow FGS start when temp allowlist reasonCode is REASON_PUSH_MESSAGING_OVER_QUOTA" into sc-dev 2021-04-30 06:26:39 +00:00
Richard Ho
de8fe06dfa Change streaming policy implementations
- Use userId in streaming policy getters.
- Check if PO or DO exist
- Return NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY if DPC is not
present.

Bug: 179910174
Bug: 179910177
Test: Builds successfully
Change-Id: I49191a4ddea45925772d39614f5d7f82657b26ee
2021-04-29 19:31:56 -07:00
Nate Myren
4399632290 Merge "Add RECORD_INCOMING_PHONE_AUDIO app op" into sc-dev 2021-04-30 00:30:20 +00:00
Hui Yu
a6b92260d3 Do not allow FGS start when temp allowlist reasonCode is REASON_PUSH_MESSAGING_OVER_QUOTA
If temp allowlist reasonCode is REASON_PUSH_MESSAGING_OVER_QUOTA, check
DeviceConfig key "push_messaging_over_quota_behavior" to decide if
temp allowlist and FGS start are allowed. Three options:
1. -1, temp allowlist not allowed, FGS start not allowed.
2. 0, temp allowlist allowed, FGS start allowed.
3. 1, temp allowlist allowed, FGS start not allowed. This is default.

The device config command to change the behavior:
adb shell device_config set activity_manager push_messaging_over_quota_behavior <-1|0|1>

If temp allowlist reasonCode is REASON_DENIED, do not allow temp allowlist
at all.

Also, in DeviceIdleController.addPowerSaveTempAllowlistAppInternal(),
there used to be a check if the callingUid is on the mPowerSaveWhitelistSystemAppIds list,
this is unnecessary because upstream callers already checked if callingUid has
 permission CHANGE_DEVICE_IDLE_TEMP_WHITELIST, and this permission is a privileged permission,
so removing the check of mPowerSaveWhitelistSystemAppIds should be safe.

Bug: 182796372
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testPushMessagingOverQuota
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testTempAllowListReasonCode

Change-Id: Id34b1c26c819dc4fe07838eb2e3a8f0138cbcf8f
2021-04-29 16:27:41 -07:00
Hyunyoung Song
ce5f5faab8 Merge "API council review for SearchUiManager" into sc-dev 2021-04-29 15:52:12 +00:00
Eran Messeri
e192379833 Document access to device identifiers on managed devices
Document when, on a managed device or profile, the DPC can
read hardware identifiers, and when it must use the new
enrollment-specific ID.

Bug: 172636282
Test: m docs
Change-Id: I783725853d0654d49518a38d8d8d04b3ca7e3ab0
2021-04-29 10:33:07 +01:00
Martijn Coenen
166400b045 Merge "Revert "Revert "Fixup app-private dirs that are not writable.""" into sc-dev 2021-04-29 09:02:45 +00:00
Hyunyoung Song
1717e02ea6 API council review for SearchUiManager
Bug: 184265048
Test: atest CtsSearchUiServiceTestCases

Change-Id: Ib4dd0d3b29438418d4deb31e999a076e5eeff484
2021-04-28 20:57:11 -07:00
Chris Li
328079de27 Merge "Determine whether to support activities in multi window (1/n)" into sc-dev 2021-04-29 01:09:53 +00:00
Felipe Leme
056452001f Merge "Disabled DevicePolicyManager.setLocationEnabled() for automotive." into sc-dev 2021-04-28 16:31:45 +00:00
Martijn Coenen
d6b7b6b3aa Revert "Revert "Fixup app-private dirs that are not writable.""
Fixup non-writable app-private dirs that could have been left around by
an earlier race condition in the setup of the FUSE filesystem.

Bug: 181726193
Bug: 182088154
Test: erase userdata, check Youtube dirs are fixed up correctly

Reason for revert: fixing issue in original CL

Change-Id: Ifacf807f62dec3c9e22b5e5af0f2b00c4423ede4
2021-04-28 15:23:15 +00:00
Adrian Roos
3e7a628f0f Merge "Revert "Fixup app-private dirs that are not writable."" into sc-dev 2021-04-28 15:17:46 +00:00
Adrian Roos
20705fdb10 Revert "Fixup app-private dirs that are not writable."
This reverts commit 13f793aec9.

Reason for revert: Breaks device health checks; crashes if dir is null.

Bug: 181726193
Bug: 182088154

Fixes: 186633787
Change-Id: Ia28df79c6ff4aacd6bdadf1d9c540f49dcace707
2021-04-28 15:16:55 +00:00
Martijn Coenen
8e176d97ae Merge "Fixup app-private dirs that are not writable." into sc-dev 2021-04-28 13:43:51 +00:00
Tom Natan
ba2767ef4a Merge "Document version codes in CompatChanges API" am: d4691f8a31 am: de7b72d03e am: bfc894c34f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1688067

Change-Id: I6bc5d31fa7fc02194fd7e638658f7120f1b68500
2021-04-28 10:26:25 +00:00
Tom Natan
bfc894c34f Merge "Document version codes in CompatChanges API" am: d4691f8a31 am: de7b72d03e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1688067

Change-Id: Ibf988dded00d18d3ceb7e7642e466641eea27862
2021-04-28 10:00:17 +00:00
Stanislav Zholnin
bd45b82617 Merge "Bug fixes and testing support for DiscreteRegistry" into sc-dev 2021-04-28 09:09:35 +00:00
Louis Chang
33a4336877 Do not relaunch bg activities when application info changes
Update the configurations via ActivityTaskManager to prevent the
activities being relaunched while in background. Instead, the
activities will be relaunched after brought to front and being visible.

This also prevents all activities in the system being relaunched
at the same time.

For framework resource updates, the global configuration will be
updated.

For individual package overlay changes, new asset sequence would be
set to the activity's requested configurations to ensure the activity
will be relaunch once visible. The requested asset sequence will be
reset if its parent has a newer asset sequence.

Bug: 185301309
Test: update app info via shell command while activity in background
Test: atest ResourcesLoaderValuesTest
Test: atest RoleManagerTest#requestRoleAndAllowThenIsRoleHolder
Change-Id: Ic7f13b768fb575d6301f05f7fda71b15d1ccf312
2021-04-28 17:00:07 +08:00
Martijn Coenen
13f793aec9 Fixup app-private dirs that are not writable.
Fixup non-writable app-private dirs that could have been left around by
an earlier race condition in the setup of the FUSE filesystem.

Bug: 181726193
Bug: 182088154
Test: erase userdata, check Youtube dirs are fixed up correctly
Change-Id: I7972f79d14893571289a2245f98e90e6c8c69f0a
2021-04-28 09:48:50 +02:00
Chris Li
cde271685f Determine whether to support activities in multi window (1/n)
Add a field of supportsMultiWindow to TaskInfo for WM Shell to use.

Because we will change to Task#supportsMultiWindow to check the
support based on the root activity's resizibilty, min widht/height,
and the device settings, using this to replace the check in
ActivityTaskManager, which is pure device settings.

Bug: 176061101
Test: atest WMShellFlickerTests
Change-Id: Iad94b39506e71b6224d923f02bd7fc454cae02c8
2021-04-27 23:59:38 -07:00
Rhed Jao
f4baaf8a8e Merge "Add a synchronized lock into the SplitDependencyLoaderImpl" into sc-dev 2021-04-28 03:42:05 +00:00
Stanislav Zholnin
c5f09f687b Bug fixes and testing support for DiscreteRegistry
Fixed following bugs:
- in certain cases deduplication could fail
- while requesting discrete ops, beginTimeMillis parameter was
  ignored
- device_config parameters above guardrails were
  still applied after reboot

Added support tests (coming in next CL):
- ability to offsetHistory for test
- ability to change quantization parameter to any value for tests

Test: coming in next CL
Bug: 183238944
Bug: 183239281
Bug: 176965672
Change-Id: I838a7897058b38aa0957a3666d4b37a5378e36be
2021-04-27 18:31:30 +01:00
Chavi Weingarten
7131ac5913 Merge "Added takeScreenshot of a Window to UiAutomation" into sc-dev 2021-04-27 17:06:14 +00:00
Benjamin Franz
d6124893c0 Document version codes in CompatChanges API
Bug: 184654568
Test: make docs
Change-Id: Ie3bc5cccefd794cdd75be9c61d707b8679025ad8
2021-04-27 12:29:31 +00:00
Rhed Jao
bf53e16efd Merge "Fix a crash when starting a service in the isolated split" into sc-dev 2021-04-27 06:06:16 +00:00
Louis Chang
9caa70a8d3 Merge "Revert "Do not relaunch bg activities when application info changes"" into sc-dev 2021-04-27 02:23:11 +00:00
Louis Chang
24af61a988 Revert "Do not relaunch bg activities when application info changes"
This reverts commit 8b5afd93b6.

Reason for revert: b/186367826

Bug: 185301309
Change-Id: I7a68f1a32aff194d68af1c3ef55dc60ffbde5df9
2021-04-27 02:21:55 +00:00
Felipe Leme
e3cfe3c7f6 Disabled DevicePolicyManager.setLocationEnabled() for automotive.
Location is a fundamental feature for automotive, which should be
out of reach of device admins (for example, disabling it could
affect the navigation app).

Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testSetLocationEnabled # on automotive and phone

Bug: 186263875
Fixes: 185523465

Change-Id: I8a9d3347080d56c8f064038b66b5b1826e377f64
2021-04-26 18:23:07 -07:00
chaviw
0cad605aa1 Added takeScreenshot of a Window to UiAutomation
Added a way to capture just a window instead of the entire screen
to make tests easier.

Test: Builds
Bug: 185390632

Change-Id: I5138777bc87cdabcd2d8f574b1758509fc887c56
2021-04-26 17:54:54 -05:00
Kurt Dresner
de22e15615 Make PROJECTION_TYPE_ALL=-1 so that all bits are on.
Bug: 175130323
Bug: 186462292
Change-Id: I591c22c36760ea3162928fa4c80726a206e86214
2021-04-26 22:47:26 +00:00
Flavio Fiszman
bf0507b001 Merge "Handling group chat sender" into sc-dev 2021-04-26 17:01:12 +00:00
Alex Johnston
3f716ff7a2 Merge "Remove PasswordMetrics.validatePasswordMetrics isPin param" into sc-dev 2021-04-26 15:24:16 +00:00