Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30eab1f4 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Added TestApi to ActivityInfo.isTranslucentOrFloating

This would be use to determine the right activity state during CTS
test for products that have windowSwipeToDismiss set.

Also, dump ActivityRecord.fullscreen to proto for the same reason.

Bug: 76207986
Bug: 79167358
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAssistantStackTests
Change-Id: Iadc088e9129be088b8a083ebbafd8d20fe26b673
parent 478923bd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ package android.content {
package android.content.pm {

  public class ActivityInfo extends android.content.pm.ComponentInfo implements android.os.Parcelable {
    method public static boolean isTranslucentOrFloating(android.content.res.TypedArray);
    field public static final int RESIZE_MODE_RESIZEABLE = 2; // 0x2
  }

+1 −0
Original line number Diff line number Diff line
@@ -1188,6 +1188,7 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
     * Determines whether the {@link Activity} is considered translucent or floating.
     * @hide
     */
    @TestApi
    public static boolean isTranslucentOrFloating(TypedArray attributes) {
        final boolean isTranslucent =
                attributes.getBoolean(com.android.internal.R.styleable.Window_windowIsTranslucent,
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ message ActivityRecordProto {
    optional bool visible = 4;
    optional bool front_of_task = 5;
    optional int32 proc_id = 6;
    optional bool translucent = 7;
}

message KeyguardControllerProto {
+2 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ import static com.android.server.am.ActivityRecordProto.FRONT_OF_TASK;
import static com.android.server.am.ActivityRecordProto.IDENTIFIER;
import static com.android.server.am.ActivityRecordProto.PROC_ID;
import static com.android.server.am.ActivityRecordProto.STATE;
import static com.android.server.am.ActivityRecordProto.TRANSLUCENT;
import static com.android.server.am.ActivityRecordProto.VISIBLE;
import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_LEFT;
import static com.android.server.wm.IdentifierProto.HASH_CODE;
@@ -2980,6 +2981,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
        if (app != null) {
            proto.write(PROC_ID, app.pid);
        }
        proto.write(TRANSLUCENT, !fullscreen);
        proto.end(token);
    }
}