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

Commit d23d7cc9 authored by Eric Lin's avatar Eric Lin
Browse files

Add LaunchSourceType annotation in ActivityRecord.

BUG: 387193964
Flag: EXEMPT refactor
Test: Local build
Change-Id: I49448abca6849ad5d8ac52245dcd0e36c4cb3985
parent 9c77f4eb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -486,6 +486,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    final String launchedFromPackage; // always the package who started the activity.
    @Nullable
    final String launchedFromFeatureId; // always the feature in launchedFromPackage
    @LaunchSourceType
    int mLaunchSourceType; // latest launch source type
    final Intent intent;    // the original intent that generated us
    final String shortComponentName; // the short component name of the intent
@@ -2333,6 +2334,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        mLaunchSourceType = determineLaunchSourceType(launchFromUid, caller);
    }

    @LaunchSourceType
    private int determineLaunchSourceType(int launchFromUid, WindowProcessController caller) {
        if (launchFromUid == Process.SYSTEM_UID || launchFromUid == Process.ROOT_UID) {
            return LAUNCH_SOURCE_TYPE_SYSTEM;