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

Commit 104e1453 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am f894cad0: Merge "Some tweaks to improve document task creation." into lmp-preview-dev

* commit 'f894cad093c1a3083f4aca099babc4677977a12f':
  Some tweaks to improve document task creation.
parents 61516663 e4ad633a
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2707,7 +2707,8 @@
                android:theme="@style/Theme.Holo.Dialog.Alert"
                android:theme="@style/Theme.Holo.Dialog.Alert"
                android:finishOnCloseSystemDialogs="true"
                android:finishOnCloseSystemDialogs="true"
                android:excludeFromRecents="true"
                android:excludeFromRecents="true"
                android:multiprocess="true">
                android:multiprocess="true"
                android:documentLaunchMode="never">
            <intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.CHOOSER" />
                <action android:name="android.intent.action.CHOOSER" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.DEFAULT" />
+3 −0
Original line number Original line Diff line number Diff line
@@ -906,6 +906,9 @@ final class ActivityRecord {
            }
            }
            startTime = 0;
            startTime = 0;
            finishLaunchTickingLocked();
            finishLaunchTickingLocked();
            if (task != null) {
                task.hasBeenVisible = true;
            }
        }
        }
    }
    }


+9 −3
Original line number Original line Diff line number Diff line
@@ -73,6 +73,7 @@ final class TaskRecord extends ThumbnailHolder {
    boolean rootWasReset;   // True if the intent at the root of the task had
    boolean rootWasReset;   // True if the intent at the root of the task had
                            // the FLAG_ACTIVITY_RESET_TASK_IF_NEEDED flag.
                            // the FLAG_ACTIVITY_RESET_TASK_IF_NEEDED flag.
    boolean askedCompatMode;// Have asked the user about compat mode for this task.
    boolean askedCompatMode;// Have asked the user about compat mode for this task.
    boolean hasBeenVisible; // Set if any activities in the task have been visible to the user.


    String stringName;      // caching of toString() result.
    String stringName;      // caching of toString() result.
    int userId;             // user for which this task was created
    int userId;             // user for which this task was created
@@ -328,8 +329,12 @@ final class TaskRecord extends ThumbnailHolder {
    }
    }


    boolean autoRemoveFromRecents() {
    boolean autoRemoveFromRecents() {
        return intent != null &&
        // We will automatically remove the task either if it has explicitly asked for
                (intent.getFlags() & Intent.FLAG_ACTIVITY_AUTO_REMOVE_FROM_RECENTS) != 0;
        // this, or it is empty and has never contained an activity that got shown to
        // the user.
        return (intent != null &&
                (intent.getFlags() & Intent.FLAG_ACTIVITY_AUTO_REMOVE_FROM_RECENTS) != 0) ||
                (mActivities.isEmpty() && !hasBeenVisible);
    }
    }


    /**
    /**
@@ -800,7 +805,8 @@ final class TaskRecord extends ThumbnailHolder {
        }
        }
        pw.print(prefix); pw.print("lastThumbnail="); pw.print(lastThumbnail);
        pw.print(prefix); pw.print("lastThumbnail="); pw.print(lastThumbnail);
                pw.print(" lastDescription="); pw.println(lastDescription);
                pw.print(" lastDescription="); pw.println(lastDescription);
        pw.print(prefix); pw.print("lastActiveTime="); pw.print(lastActiveTime);
        pw.print(prefix); pw.print("hasBeenVisible="); pw.print(hasBeenVisible);
                pw.print(" lastActiveTime="); pw.print(lastActiveTime);
                pw.print(" (inactive for ");
                pw.print(" (inactive for ");
                pw.print((getInactiveDuration()/1000)); pw.println("s)");
                pw.print((getInactiveDuration()/1000)); pw.println("s)");
    }
    }
+1 −0
Original line number Original line Diff line number Diff line
@@ -4991,6 +4991,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                    mResolveActivity.packageName = mAndroidApplication.packageName;
                    mResolveActivity.packageName = mAndroidApplication.packageName;
                    mResolveActivity.processName = "system:ui";
                    mResolveActivity.processName = "system:ui";
                    mResolveActivity.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
                    mResolveActivity.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
                    mResolveActivity.documentLaunchMode = ActivityInfo.DOCUMENT_LAUNCH_NEVER;
                    mResolveActivity.flags = ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS;
                    mResolveActivity.flags = ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS;
                    mResolveActivity.theme = R.style.Theme_Holo_Dialog_Alert;
                    mResolveActivity.theme = R.style.Theme_Holo_Dialog_Alert;
                    mResolveActivity.exported = true;
                    mResolveActivity.exported = true;