diff options
author | Chris Li <lihongyu@google.com> | 2023-02-13 14:56:14 +0800 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-28 18:42:00 +0000 |
commit | 25b0c7fb752e15c35241ee42d533d96eecd55f25 (patch) | |
tree | 1a5884d2dd78bfb3a94010157b78c5cc9089f551 | |
parent | e69abde379b9f3104ebeeeeb1e29d96cd22e73d5 (diff) | |
download | base-25b0c7fb752e15c35241ee42d533d96eecd55f25.tar.gz |
Re-enforce MANAGE_ACTIVITY_TASKS for applySyncTransaction
The conditional permission was introduced for TaskFragmentOrganizer, but
not really needed. Remove the conditional check.
Bug: 259938771
Test: pass existing tests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:65ac64c3476f42f8437481bff77485f53ab4f391)
Merged-In: I666b9ee6b6076766513b97e675fdbaa002428601
Change-Id: I666b9ee6b6076766513b97e675fdbaa002428601
-rw-r--r-- | core/api/test-current.txt | 2 | ||||
-rw-r--r-- | core/java/android/window/WindowOrganizer.java | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 70a23cdf106b..650d51ce39f5 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -3452,7 +3452,7 @@ package android.window { public class WindowOrganizer { ctor public WindowOrganizer(); - method @RequiresPermission(value=android.Manifest.permission.MANAGE_ACTIVITY_TASKS, conditional=true) public int applySyncTransaction(@NonNull android.window.WindowContainerTransaction, @NonNull android.window.WindowContainerTransactionCallback); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public int applySyncTransaction(@NonNull android.window.WindowContainerTransaction, @NonNull android.window.WindowContainerTransactionCallback); method @RequiresPermission(value=android.Manifest.permission.MANAGE_ACTIVITY_TASKS, conditional=true) public void applyTransaction(@NonNull android.window.WindowContainerTransaction); } diff --git a/core/java/android/window/WindowOrganizer.java b/core/java/android/window/WindowOrganizer.java index 2a80d021abd6..740fbacbbfcc 100644 --- a/core/java/android/window/WindowOrganizer.java +++ b/core/java/android/window/WindowOrganizer.java @@ -61,9 +61,7 @@ public class WindowOrganizer { * Apply multiple WindowContainer operations at once. * * Note that using this API requires the caller to hold - * {@link android.Manifest.permission#MANAGE_ACTIVITY_TASKS}, unless the caller is using - * {@link TaskFragmentOrganizer}, in which case it is allowed to change TaskFragment that is - * created by itself. + * {@link android.Manifest.permission#MANAGE_ACTIVITY_TASKS}. * * @param t The transaction to apply. * @param callback This transaction will use the synchronization scheme described in @@ -72,8 +70,7 @@ public class WindowOrganizer { * @return An ID for the sync operation which will later be passed to transactionReady callback. * This lets the caller differentiate overlapping sync operations. */ - @RequiresPermission(value = android.Manifest.permission.MANAGE_ACTIVITY_TASKS, - conditional = true) + @RequiresPermission(value = android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public int applySyncTransaction(@NonNull WindowContainerTransaction t, @NonNull WindowContainerTransactionCallback callback) { try { |