Skip to content

Commit 25b0c7f

Browse files
Chris LiAndroid Build Coastguard Worker
authored andcommitted
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
1 parent e69abde commit 25b0c7f

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

core/api/test-current.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,7 @@ package android.window {
34523452

34533453
public class WindowOrganizer {
34543454
ctor public WindowOrganizer();
3455-
method @RequiresPermission(value=android.Manifest.permission.MANAGE_ACTIVITY_TASKS, conditional=true) public int applySyncTransaction(@NonNull android.window.WindowContainerTransaction, @NonNull android.window.WindowContainerTransactionCallback);
3455+
method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public int applySyncTransaction(@NonNull android.window.WindowContainerTransaction, @NonNull android.window.WindowContainerTransactionCallback);
34563456
method @RequiresPermission(value=android.Manifest.permission.MANAGE_ACTIVITY_TASKS, conditional=true) public void applyTransaction(@NonNull android.window.WindowContainerTransaction);
34573457
}
34583458

core/java/android/window/WindowOrganizer.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ public void applyTransaction(@NonNull WindowContainerTransaction t) {
6161
* Apply multiple WindowContainer operations at once.
6262
*
6363
* Note that using this API requires the caller to hold
64-
* {@link android.Manifest.permission#MANAGE_ACTIVITY_TASKS}, unless the caller is using
65-
* {@link TaskFragmentOrganizer}, in which case it is allowed to change TaskFragment that is
66-
* created by itself.
64+
* {@link android.Manifest.permission#MANAGE_ACTIVITY_TASKS}.
6765
*
6866
* @param t The transaction to apply.
6967
* @param callback This transaction will use the synchronization scheme described in
@@ -72,8 +70,7 @@ public void applyTransaction(@NonNull WindowContainerTransaction t) {
7270
* @return An ID for the sync operation which will later be passed to transactionReady callback.
7371
* This lets the caller differentiate overlapping sync operations.
7472
*/
75-
@RequiresPermission(value = android.Manifest.permission.MANAGE_ACTIVITY_TASKS,
76-
conditional = true)
73+
@RequiresPermission(value = android.Manifest.permission.MANAGE_ACTIVITY_TASKS)
7774
public int applySyncTransaction(@NonNull WindowContainerTransaction t,
7875
@NonNull WindowContainerTransactionCallback callback) {
7976
try {

0 commit comments

Comments
 (0)