ActivityInfo.java revision 4aab1bba6975b0447ad7435120edb5a90c8506f8
115a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root/*
215a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Copyright (C) 2007 The Android Open Source Project
315a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *
415a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Licensed under the Apache License, Version 2.0 (the "License");
515a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * you may not use this file except in compliance with the License.
615a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * You may obtain a copy of the License at
715a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *
815a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *      http://www.apache.org/licenses/LICENSE-2.0
915a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root *
1015a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Unless required by applicable law or agreed to in writing, software
1115a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * distributed under the License is distributed on an "AS IS" BASIS,
1215a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1315a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * See the License for the specific language governing permissions and
1415a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * limitations under the License.
1515a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root */
1615a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root
179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage android.content.pm;
189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
19d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbyeimport android.annotation.IntDef;
201d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackbornimport android.content.res.Configuration;
219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Parcel;
229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Parcelable;
239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.util.Printer;
249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
25d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbyeimport java.lang.annotation.Retention;
26d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbyeimport java.lang.annotation.RetentionPolicy;
27d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye
289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/**
299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Information you can retrieve about a particular application
309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * activity or receiver. This corresponds to information collected
319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from the AndroidManifest.xml's <activity> and
329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <receiver> tags.
339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */
349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic class ActivityInfo extends ComponentInfo
359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        implements Parcelable {
369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * A style resource identifier (in the package's resources) of this
389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * activity's theme.  From the "theme" attribute or, if not set, 0.
399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int theme;
419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>standard</code> in
449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#launchMode} attribute.
459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int LAUNCH_MULTIPLE = 0;
479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>singleTop</code> in
499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#launchMode} attribute.
509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int LAUNCH_SINGLE_TOP = 1;
529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>singleTask</code> in
549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#launchMode} attribute.
559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int LAUNCH_SINGLE_TASK = 2;
579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>singleInstance</code> in
599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#launchMode} attribute.
609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int LAUNCH_SINGLE_INSTANCE = 3;
629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * The launch mode style requested by the activity.  From the
649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#launchMode} attribute, one of
659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #LAUNCH_MULTIPLE},
669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #LAUNCH_SINGLE_TOP}, {@link #LAUNCH_SINGLE_TASK}, or
679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #LAUNCH_SINGLE_INSTANCE}.
689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int launchMode;
702dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner
712dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    /**
722dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * Constant corresponding to <code>none</code> in
732dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * the {@link android.R.attr#documentLaunchMode} attribute.
742dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     */
752dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    public static final int DOCUMENT_LAUNCH_NONE = 0;
762dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    /**
772dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * Constant corresponding to <code>intoExisting</code> in
782dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * the {@link android.R.attr#documentLaunchMode} attribute.
792dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     */
802dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    public static final int DOCUMENT_LAUNCH_INTO_EXISTING = 1;
812dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    /**
822dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * Constant corresponding to <code>always</code> in
832dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * the {@link android.R.attr#documentLaunchMode} attribute.
842dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     */
852dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    public static final int DOCUMENT_LAUNCH_ALWAYS = 2;
862dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    /**
87f357c0ca514d73273a18b3896e565b2272e608adCraig Mautner     * Constant corresponding to <code>never</code> in
88f357c0ca514d73273a18b3896e565b2272e608adCraig Mautner     * the {@link android.R.attr#documentLaunchMode} attribute.
89f357c0ca514d73273a18b3896e565b2272e608adCraig Mautner     */
90f357c0ca514d73273a18b3896e565b2272e608adCraig Mautner    public static final int DOCUMENT_LAUNCH_NEVER = 3;
91f357c0ca514d73273a18b3896e565b2272e608adCraig Mautner    /**
922dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * The document launch mode style requested by the activity. From the
932dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * {@link android.R.attr#documentLaunchMode} attribute, one of
942dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * {@link #DOCUMENT_LAUNCH_NONE}, {@link #DOCUMENT_LAUNCH_INTO_EXISTING},
952dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * {@link #DOCUMENT_LAUNCH_ALWAYS}.
962dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     *
972dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * <p>Modes DOCUMENT_LAUNCH_ALWAYS
982dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * and DOCUMENT_LAUNCH_INTO_EXISTING are equivalent to {@link
992dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT
1002dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * Intent.FLAG_ACTIVITY_NEW_DOCUMENT} with and without {@link
1012dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK
1022dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * Intent.FLAG_ACTIVITY_MULTIPLE_TASK} respectively.
1032dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     */
1042dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    public int documentLaunchMode;
1052dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner
1069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
10743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * Constant corresponding to <code>persistRootOnly</code> in
10843e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * the {@link android.R.attr#persistableMode} attribute.
10943e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     */
11043e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    public static final int PERSIST_ROOT_ONLY = 0;
11143e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    /**
11243e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * Constant corresponding to <code>doNotPersist</code> in
11343e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * the {@link android.R.attr#persistableMode} attribute.
11443e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     */
1157f72f53704cbee26dc2a0be429b8446b2493226cCraig Mautner    public static final int PERSIST_NEVER = 1;
11643e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    /**
11743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * Constant corresponding to <code>persistAcrossReboots</code> in
11843e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * the {@link android.R.attr#persistableMode} attribute.
11943e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     */
12043e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    public static final int PERSIST_ACROSS_REBOOTS = 2;
12143e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    /**
12243e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * Value indicating how this activity is to be persisted across
12343e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * reboots for restoring in the Recents list.
12443e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     * {@link android.R.attr#persistableMode}
12543e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner     */
12643e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    public int persistableMode;
12743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner
12843e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    /**
129ffcfcaadfefec2fb56f67a0a614a54bf4599d62bCraig Mautner     * The maximum number of tasks rooted at this activity that can be in the recent task list.
130ffcfcaadfefec2fb56f67a0a614a54bf4599d62bCraig Mautner     * Refer to {@link android.R.attr#maxRecents}.
131ffcfcaadfefec2fb56f67a0a614a54bf4599d62bCraig Mautner     */
132ffcfcaadfefec2fb56f67a0a614a54bf4599d62bCraig Mautner    public int maxRecents;
133ffcfcaadfefec2fb56f67a0a614a54bf4599d62bCraig Mautner
134ffcfcaadfefec2fb56f67a0a614a54bf4599d62bCraig Mautner    /**
1359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Optional name of a permission required to be able to access this
1369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Activity.  From the "permission" attribute.
1379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public String permission;
1399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * The affinity this activity has for another task in the system.  The
1429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * string here is the name of the task, often the package name of the
1439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * overall package.  If null, the activity has no affinity.  Set from the
1449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#taskAffinity} attribute.
1459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public String taskAffinity;
1479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * If this is an activity alias, this is the real activity class to run
1509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * for it.  Otherwise, this is null.
1519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public String targetActivity;
1539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} indicating whether this activity is able to
1569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * run in multiple processes.  If
1579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * true, the system may instantiate it in the some process as the
1589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * process starting it in order to conserve resources.  If false, the
1599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * default, it always runs in {@link #processName}.  Set from the
1609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#multiprocess} attribute.
1619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_MULTIPROCESS = 0x0001;
1639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} indicating that, when the activity's task is
1659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * relaunched from home, this activity should be finished.
1669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Set from the
1679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#finishOnTaskLaunch} attribute.
1689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_FINISH_ON_TASK_LAUNCH = 0x0002;
1709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} indicating that, when the activity is the root
1729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * of a task, that task's stack should be cleared each time the user
1739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * re-launches it from home.  As a result, the user will always
1749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * return to the original activity at the top of the task.
1759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * This flag only applies to activities that
1769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * are used to start the root of a new task.  Set from the
1779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#clearTaskOnLaunch} attribute.
1789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_CLEAR_TASK_ON_LAUNCH = 0x0004;
1809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} indicating that, when the activity is the root
1829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * of a task, that task's stack should never be cleared when it is
1839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * relaunched from home.  Set from the
1849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#alwaysRetainTaskState} attribute.
1859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_ALWAYS_RETAIN_TASK_STATE = 0x0008;
1879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} indicating that the activity's state
1899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * is not required to be saved, so that if there is a failure the
1909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * activity will not be removed from the activity stack.  Set from the
1919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#stateNotNeeded} attribute.
1929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_STATE_NOT_NEEDED = 0x0010;
1949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} that indicates that the activity should not
1969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * appear in the list of recently launched activities.  Set from the
1979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#excludeFromRecents} attribute.
1989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_EXCLUDE_FROM_RECENTS = 0x0020;
2009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
2019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} that indicates that the activity can be moved
2029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * between tasks based on its task affinity.  Set from the
2039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#allowTaskReparenting} attribute.
2049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
2059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_ALLOW_TASK_REPARENTING = 0x0040;
2069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
2079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #flags} indicating that, when the user navigates away
2089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * from an activity, it should be finished.
2099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Set from the
2109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#noHistory} attribute.
2119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
2129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int FLAG_NO_HISTORY = 0x0080;
2139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
214ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn     * Bit in {@link #flags} indicating that, when a request to close system
215ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn     * windows happens, this activity is finished.
216ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn     * Set from the
217ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn     * {@link android.R.attr#finishOnCloseSystemDialogs} attribute.
218ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn     */
219ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn    public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS = 0x0100;
220327fbd2c8fa294b919475feb4c74a74ee1981e02Dianne Hackborn    /**
221327fbd2c8fa294b919475feb4c74a74ee1981e02Dianne Hackborn     * Value for {@link #flags}: true when the application's rendering should
222327fbd2c8fa294b919475feb4c74a74ee1981e02Dianne Hackborn     * be hardware accelerated.
223327fbd2c8fa294b919475feb4c74a74ee1981e02Dianne Hackborn     */
224327fbd2c8fa294b919475feb4c74a74ee1981e02Dianne Hackborn    public static final int FLAG_HARDWARE_ACCELERATED = 0x0200;
225327fbd2c8fa294b919475feb4c74a74ee1981e02Dianne Hackborn    /**
2265962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner     * Value for {@link #flags}: true when the application can be displayed over the lockscreen
2275962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner     * and consequently over all users' windows.
2285962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner     * @hide
2295962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner     */
2305962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner    public static final int FLAG_SHOW_ON_LOCK_SCREEN = 0x0400;
2315962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner    /**
232322d77185d6e8fe79642f27b653bb51677873cbaJohn Spurlock     * Bit in {@link #flags} corresponding to an immersive activity
233613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * that wishes not to be interrupted by notifications.
234613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * Applications that hide the system notification bar with
235613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * {@link android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN}
236613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * may still be interrupted by high-priority notifications; for example, an
237613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * incoming phone call may use
2388091ca5015b2a9f591ad7d3ee5ec832c16cf5548Daniel Sandler     * {@link android.app.Notification#fullScreenIntent fullScreenIntent}
239613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * to present a full-screen in-call activity to the user, pausing the
240613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * current activity as a side-effect. An activity with
241613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * {@link #FLAG_IMMERSIVE} set, however, will not be interrupted; the
242613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * notification may be shown in some other way (such as a small floating
243613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * "toast" window).
24473c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     *
24573c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     * Note that this flag will always reflect the Activity's
24673c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     * <code>android:immersive</code> manifest definition, even if the Activity's
24773c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     * immersive state is changed at runtime via
24873c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     * {@link android.app.Activity#setImmersive(boolean)}.
24973c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     *
25073c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     * @see android.app.Notification#FLAG_HIGH_PRIORITY
25173c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate     * @see android.app.Activity#setImmersive(boolean)
252613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     */
2535962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner    public static final int FLAG_IMMERSIVE = 0x0800;
254529b60a3b16ac3dff24f2403d760ab8ebc9670ffRomain Guy    /**
2559d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner     * Bit in {@link #flags}: If set, a task rooted at this activity will have its
2569d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner     * baseIntent replaced by the activity immediately above this. Each activity may further
2579d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner     * relinquish its identity to the activity above it using this flag. Set from the
258a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn     * {@link android.R.attr#relinquishTaskIdentity} attribute.
2599d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner     */
2609d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner    public static final int FLAG_RELINQUISH_TASK_IDENTITY = 0x1000;
2619d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner    /**
2622dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * Bit in {@link #flags} indicating that tasks started with this activity are to be
2632dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     * removed from the recent list of tasks when the last activity in the task is finished.
264a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn     * Corresponds to {@link android.R.attr#autoRemoveFromRecents}
2652dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner     */
2662dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    public static final int FLAG_AUTO_REMOVE_FROM_RECENTS = 0x2000;
2672dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner    /**
268a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn     * Bit in {@link #flags} indicating that this activity can start is creation/resume
269a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn     * while the previous activity is still pausing.  Corresponds to
270a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn     * {@link android.R.attr#resumeWhilePausing}
271a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn     */
272a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn    public static final int FLAG_RESUME_WHILE_PAUSING = 0x4000;
273a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn    /**
274d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn     * @hide Bit in {@link #flags}: If set, this component will only be seen
275d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn     * by the primary user.  Only works with broadcast receivers.  Set from the
276ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner     * android.R.attr#primaryUserOnly attribute.
277d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn     */
278d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn    public static final int FLAG_PRIMARY_USER_ONLY = 0x20000000;
279d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn    /**
2807d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn     * Bit in {@link #flags}: If set, a single instance of the receiver will
2817d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn     * run for all users on the device.  Set from the
2827d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn     * {@link android.R.attr#singleUser} attribute.  Note that this flag is
283d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn     * only relevant for ActivityInfo structures that are describing receiver
2847d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn     * components; it is not applied to activities.
2857d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn     */
2867d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn    public static final int FLAG_SINGLE_USER = 0x40000000;
2877d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn    /**
288ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner     * @hide Bit in {@link #flags}: If set, this activity may be launched into an
289ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner     * owned ActivityContainer such as that within an ActivityView. If not set and
290ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner     * this activity is launched into such a container a SecurityExcception will be
291ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner     * thrown. Set from the {@link android.R.attr#allowEmbedded} attribute.
292ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner     */
293ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner    public static final int FLAG_ALLOW_EMBEDDED = 0x80000000;
294ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner    /**
2959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Options that have been set in the activity declaration in the
296613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * manifest.
297613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * These include:
298613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * {@link #FLAG_MULTIPROCESS},
2999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #FLAG_FINISH_ON_TASK_LAUNCH}, {@link #FLAG_CLEAR_TASK_ON_LAUNCH},
3009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #FLAG_ALWAYS_RETAIN_TASK_STATE},
3019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #FLAG_STATE_NOT_NEEDED}, {@link #FLAG_EXCLUDE_FROM_RECENTS},
302ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn     * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY},
303613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler     * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS},
3047d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn     * {@link #FLAG_HARDWARE_ACCELERATED}, {@link #FLAG_SINGLE_USER}.
3059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int flags;
3079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
308d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye    /** @hide */
309d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye    @IntDef({
310d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_UNSPECIFIED,
311d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_LANDSCAPE,
312d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_PORTRAIT,
313d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_USER,
314d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_BEHIND,
315d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_SENSOR,
316d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_NOSENSOR,
317d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
318d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_SENSOR_PORTRAIT,
319d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_REVERSE_LANDSCAPE,
320d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_REVERSE_PORTRAIT,
321d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_FULL_SENSOR,
322d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_USER_LANDSCAPE,
323d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_USER_PORTRAIT,
324d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_FULL_USER,
325d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye            SCREEN_ORIENTATION_LOCKED
326d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye    })
327d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye    @Retention(RetentionPolicy.SOURCE)
328d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye    public @interface ScreenOrientation {}
329d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye
3309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>unspecified</code> in
3329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_UNSPECIFIED = -1;
3359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>landscape</code> in
3379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_LANDSCAPE = 0;
3409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>portrait</code> in
3429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_PORTRAIT = 1;
3459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>user</code> in
3479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_USER = 2;
3509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>behind</code> in
3529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_BEHIND = 3;
3559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Constant corresponding to <code>sensor</code> in
3579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_SENSOR = 4;
3609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
362e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * Constant corresponding to <code>nosensor</code> in
3639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the {@link android.R.attr#screenOrientation} attribute.
3649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int SCREEN_ORIENTATION_NOSENSOR = 5;
366e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn
367e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    /**
368e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * Constant corresponding to <code>sensorLandscape</code> in
369e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
370e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     */
371e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    public static final int SCREEN_ORIENTATION_SENSOR_LANDSCAPE = 6;
372e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn
373e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    /**
374e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * Constant corresponding to <code>sensorPortrait</code> in
375e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
376e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     */
377e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    public static final int SCREEN_ORIENTATION_SENSOR_PORTRAIT = 7;
378e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn
379e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    /**
380e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * Constant corresponding to <code>reverseLandscape</code> in
381e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
382e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     */
383e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    public static final int SCREEN_ORIENTATION_REVERSE_LANDSCAPE = 8;
384e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn
385e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    /**
386e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * Constant corresponding to <code>reversePortrait</code> in
387e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
388e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     */
389e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    public static final int SCREEN_ORIENTATION_REVERSE_PORTRAIT = 9;
390e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn
391e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    /**
392e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * Constant corresponding to <code>fullSensor</code> in
393e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
394e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     */
395e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn    public static final int SCREEN_ORIENTATION_FULL_SENSOR = 10;
396e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn
3979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
398b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * Constant corresponding to <code>userLandscape</code> in
399b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
400b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     */
401b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    public static final int SCREEN_ORIENTATION_USER_LANDSCAPE = 11;
402b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn
403b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    /**
404b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * Constant corresponding to <code>userPortrait</code> in
405b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
406b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     */
407b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    public static final int SCREEN_ORIENTATION_USER_PORTRAIT = 12;
408b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn
409b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    /**
410b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * Constant corresponding to <code>fullUser</code> in
411b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
412b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     */
413b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    public static final int SCREEN_ORIENTATION_FULL_USER = 13;
414b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn
415b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    /**
416b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * Constant corresponding to <code>locked</code> in
417b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * the {@link android.R.attr#screenOrientation} attribute.
418b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     */
419b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    public static final int SCREEN_ORIENTATION_LOCKED = 14;
420b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn
421b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn    /**
4229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * The preferred screen orientation this activity would like to run in.
4239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * From the {@link android.R.attr#screenOrientation} attribute, one of
4249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #SCREEN_ORIENTATION_UNSPECIFIED},
4259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #SCREEN_ORIENTATION_LANDSCAPE},
4269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #SCREEN_ORIENTATION_PORTRAIT},
4279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #SCREEN_ORIENTATION_USER},
4289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #SCREEN_ORIENTATION_BEHIND},
4299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #SCREEN_ORIENTATION_SENSOR},
430e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * {@link #SCREEN_ORIENTATION_NOSENSOR},
431e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * {@link #SCREEN_ORIENTATION_SENSOR_LANDSCAPE},
432e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * {@link #SCREEN_ORIENTATION_SENSOR_PORTRAIT},
433e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * {@link #SCREEN_ORIENTATION_REVERSE_LANDSCAPE},
434e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn     * {@link #SCREEN_ORIENTATION_REVERSE_PORTRAIT},
435b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * {@link #SCREEN_ORIENTATION_FULL_SENSOR},
436b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * {@link #SCREEN_ORIENTATION_USER_LANDSCAPE},
437b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * {@link #SCREEN_ORIENTATION_USER_PORTRAIT},
438b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * {@link #SCREEN_ORIENTATION_FULL_USER},
439b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn     * {@link #SCREEN_ORIENTATION_LOCKED},
4409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
441d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye    @ScreenOrientation
4429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED;
4439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
4449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the IMSI MCC.  Set from the
4479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_MCC = 0x0001;
4509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the IMSI MNC.  Set from the
4539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_MNC = 0x0002;
4569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the locale.  Set from the
4599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_LOCALE = 0x0004;
4629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the touchscreen type.  Set from the
4659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_TOUCHSCREEN = 0x0008;
4689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the keyboard type.  Set from the
4719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_KEYBOARD = 0x0010;
4749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
47693e462b79d6896da10e15e74c5aec6beb098dddfDianne Hackborn     * can itself handle changes to the keyboard or navigation being hidden/exposed.
47793e462b79d6896da10e15e74c5aec6beb098dddfDianne Hackborn     * Note that inspite of the name, this applies to the changes to any
47893e462b79d6896da10e15e74c5aec6beb098dddfDianne Hackborn     * hidden states: keyboard or navigation.
4799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Set from the {@link android.R.attr#configChanges} attribute.
4809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_KEYBOARD_HIDDEN = 0x0020;
4829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the navigation type.  Set from the
4859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_NAVIGATION = 0x0040;
4889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
4909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the screen orientation.  Set from the
4919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.
4929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
4939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_ORIENTATION = 0x0080;
4949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
4959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit in {@link #configChanges} that indicates that the activity
496723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn     * can itself handle changes to the screen layout.  Set from the
497723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn     * {@link android.R.attr#configChanges} attribute.
498723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn     */
499723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn    public static final int CONFIG_SCREEN_LAYOUT = 0x0100;
500723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn    /**
501723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn     * Bit in {@link #configChanges} that indicates that the activity
50227b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel     * can itself handle the ui mode. Set from the
50327b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel     * {@link android.R.attr#configChanges} attribute.
50427b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel     */
50527b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel    public static final int CONFIG_UI_MODE = 0x0200;
50627b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel    /**
50727b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel     * Bit in {@link #configChanges} that indicates that the activity
508ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     * can itself handle the screen size. Set from the
509e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * {@link android.R.attr#configChanges} attribute.  This will be
510e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * set by default for applications that target an earlier version
511e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}...
512e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * <b>however</b>, you will not see the bit set here becomes some
513e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * applications incorrectly compare {@link #configChanges} against
514e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * an absolute value rather than correctly masking out the bits
515e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * they are interested in.  Please don't do that, thanks.
516ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     */
517ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    public static final int CONFIG_SCREEN_SIZE = 0x0400;
518ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    /**
519ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     * Bit in {@link #configChanges} that indicates that the activity
52069cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn     * can itself handle the smallest screen size. Set from the
521e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * {@link android.R.attr#configChanges} attribute.  This will be
522e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * set by default for applications that target an earlier version
523e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}...
524e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * <b>however</b>, you will not see the bit set here becomes some
525e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * applications incorrectly compare {@link #configChanges} against
526e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * an absolute value rather than correctly masking out the bits
527e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * they are interested in.  Please don't do that, thanks.
52869cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn     */
52969cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn    public static final int CONFIG_SMALLEST_SCREEN_SIZE = 0x0800;
53069cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn    /**
53169cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn     * Bit in {@link #configChanges} that indicates that the activity
532908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn     * can itself handle density changes. Set from the
533908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn     * {@link android.R.attr#configChanges} attribute.
534908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn     */
535908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn    public static final int CONFIG_DENSITY = 0x1000;
536908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn    /**
537908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn     * Bit in {@link #configChanges} that indicates that the activity
5385f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     * can itself handle the change to layout direction. Set from the
5395f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     * {@link android.R.attr#configChanges} attribute.
5405f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     */
5415f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio    public static final int CONFIG_LAYOUT_DIRECTION = 0x2000;
5425f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio    /**
5435f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     * Bit in {@link #configChanges} that indicates that the activity
5449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can itself handle changes to the font scaling factor.  Set from the
5459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link android.R.attr#configChanges} attribute.  This is
546dc25d25333d3fac96dccfb9bd31d2474d6bc2d78Fabrice Di Meglio     * not a core resource configuration, but a higher-level value, so its
5479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * constant starts at the high bits.
5489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
5499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final int CONFIG_FONT_SCALE = 0x40000000;
5509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
551ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    /** @hide
552ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     * Unfortunately the constants for config changes in native code are
553ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     * different from ActivityInfo. :(  Here are the values we should use for the
554ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     * native side given the bit we have assigned in ActivityInfo.
555ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     */
556ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    public static int[] CONFIG_NATIVE_BITS = new int[] {
5571d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_MNC,                    // MNC
5581d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_MCC,                    // MCC
5591d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_LOCALE,                 // LOCALE
5601d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_TOUCHSCREEN,            // TOUCH SCREEN
5611d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_KEYBOARD,               // KEYBOARD
5621d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_KEYBOARD_HIDDEN,        // KEYBOARD HIDDEN
5631d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_NAVIGATION,             // NAVIGATION
5641d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_ORIENTATION,            // ORIENTATION
5651d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_SCREEN_LAYOUT,          // SCREEN LAYOUT
5661d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_UI_MODE,                // UI MODE
5671d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_SCREEN_SIZE,            // SCREEN SIZE
5681d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_SMALLEST_SCREEN_SIZE,   // SMALLEST SCREEN SIZE
5691d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_DENSITY,                // DENSITY
5701d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn        Configuration.NATIVE_CONFIG_LAYOUTDIR,              // LAYOUT DIRECTION
571ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    };
572ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    /** @hide
573ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     * Convert Java change bits to native.
574ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn     */
575ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    public static int activityInfoConfigToNative(int input) {
576ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn        int output = 0;
577ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn        for (int i=0; i<CONFIG_NATIVE_BITS.length; i++) {
578ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn            if ((input&(1<<i)) != 0) {
579ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn                output |= CONFIG_NATIVE_BITS[i];
580ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn            }
581ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn        }
582ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn        return output;
583ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn    }
584ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn
5859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
586e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * @hide
587e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * Unfortunately some developers (OpenFeint I am looking at you) have
588e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * compared the configChanges bit field against absolute values, so if we
589e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * introduce a new bit they break.  To deal with that, we will make sure
590e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * the public field will not have a value that breaks them, and let the
591e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     * framework call here to get the real value.
592e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn     */
593e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn    public int getRealConfigChanged() {
594e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn        return applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2
595e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn                ? (configChanges | ActivityInfo.CONFIG_SCREEN_SIZE
596e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn                        | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE)
597e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn                : configChanges;
598e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn    }
599e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn
600e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn    /**
6019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Bit mask of kinds of configuration changes that this activity
6029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * can handle itself (without being restarted by the system).
6039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Contains any combination of {@link #CONFIG_FONT_SCALE},
6049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #CONFIG_MCC}, {@link #CONFIG_MNC},
6059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * {@link #CONFIG_LOCALE}, {@link #CONFIG_TOUCHSCREEN},
606723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn     * {@link #CONFIG_KEYBOARD}, {@link #CONFIG_NAVIGATION},
6075f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     * {@link #CONFIG_ORIENTATION}, {@link #CONFIG_SCREEN_LAYOUT} and
6085f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     * {@link #CONFIG_LAYOUT_DIRECTION}.  Set from the {@link android.R.attr#configChanges}
6095f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio     * attribute.
6109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
6119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int configChanges;
6129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
6139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
6149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * The desired soft input mode for this activity's main window.
6159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Set from the {@link android.R.attr#windowSoftInputMode} attribute
6169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * in the activity's manifest.  May be any of the same values allowed
6179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * for {@link android.view.WindowManager.LayoutParams#softInputMode
6189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * WindowManager.LayoutParams.softInputMode}.  If 0 (unspecified),
6199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the mode from the theme will be used.
6209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
6219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int softInputMode;
622269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell
623269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell    /**
624269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell     * The desired extra UI options for this activity and its main window.
625269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell     * Set from the {@link android.R.attr#uiOptions} attribute in the
626269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell     * activity's manifest.
627269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell     */
628269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell    public int uiOptions = 0;
629269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell
630269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell    /**
631e797ed6a74593630219faf7f0ba5dc8235586bceScott Main     * Flag for use with {@link #uiOptions}.
632e797ed6a74593630219faf7f0ba5dc8235586bceScott Main     * Indicates that the action bar should put all action items in a separate bar when
633e797ed6a74593630219faf7f0ba5dc8235586bceScott Main     * the screen is narrow.
634e797ed6a74593630219faf7f0ba5dc8235586bceScott Main     * <p>This value corresponds to "splitActionBarWhenNarrow" for the {@link #uiOptions} XML
635e797ed6a74593630219faf7f0ba5dc8235586bceScott Main     * attribute.
636269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell     */
637269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell    public static final int UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW = 1;
638269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell
639dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell    /**
640dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell     * If defined, the activity named here is the logical parent of this activity.
641dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell     */
642dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell    public String parentActivityName;
643dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell
6449d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale    /**
6459d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale     * Value indicating if the activity is resizeable to any dimension.
6469d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale     * See {@link android.R.attr#resizeableActivity}.
6474aab1bba6975b0447ad7435120edb5a90c8506f8Wale Ogunwale     * @hide
6489d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale     */
6499d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale    public boolean resizeable;
6509d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale
6519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public ActivityInfo() {
6529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
6539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
6549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public ActivityInfo(ActivityInfo orig) {
6559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        super(orig);
6569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        theme = orig.theme;
6579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        launchMode = orig.launchMode;
6589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        permission = orig.permission;
6599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        taskAffinity = orig.taskAffinity;
6609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        targetActivity = orig.targetActivity;
6619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        flags = orig.flags;
6629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        screenOrientation = orig.screenOrientation;
6639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        configChanges = orig.configChanges;
6649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        softInputMode = orig.softInputMode;
665269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell        uiOptions = orig.uiOptions;
666dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell        parentActivityName = orig.parentActivityName;
6678307ea701c8a06378bd31148bcbe4d312af2b31aCraig Mautner        maxRecents = orig.maxRecents;
6689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
6699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
6709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
6719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Return the theme resource identifier to use for this activity.  If
6729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the activity defines a theme, that is used; else, the application
6739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * theme is used.
6749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
6759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return The theme associated with this activity.
6769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
6779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public final int getThemeResource() {
6789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        return theme != 0 ? theme : applicationInfo.theme;
6799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
6809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
68143e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    private String persistableModeToString() {
68243e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner        switch(persistableMode) {
68343e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner            case PERSIST_ROOT_ONLY: return "PERSIST_ROOT_ONLY";
6847f72f53704cbee26dc2a0be429b8446b2493226cCraig Mautner            case PERSIST_NEVER: return "PERSIST_NEVER";
68543e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner            case PERSIST_ACROSS_REBOOTS: return "PERSIST_ACROSS_REBOOTS";
68643e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner            default: return "UNKNOWN=" + persistableMode;
68743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner        }
68843e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner    }
68943e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner
6909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public void dump(Printer pw, String prefix) {
6919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        super.dumpFront(pw, prefix);
69212527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn        if (permission != null) {
69312527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn            pw.println(prefix + "permission=" + permission);
69412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn        }
6959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        pw.println(prefix + "taskAffinity=" + taskAffinity
69643e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner                + " targetActivity=" + targetActivity
69743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner                + " persistableMode=" + persistableModeToString());
69812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn        if (launchMode != 0 || flags != 0 || theme != 0) {
69912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn            pw.println(prefix + "launchMode=" + launchMode
70012527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn                    + " flags=0x" + Integer.toHexString(flags)
70112527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn                    + " theme=0x" + Integer.toHexString(theme));
70212527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn        }
70312527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn        if (screenOrientation != SCREEN_ORIENTATION_UNSPECIFIED
70412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn                || configChanges != 0 || softInputMode != 0) {
70512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn            pw.println(prefix + "screenOrientation=" + screenOrientation
70612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn                    + " configChanges=0x" + Integer.toHexString(configChanges)
70712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn                    + " softInputMode=0x" + Integer.toHexString(softInputMode));
70812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn        }
709269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell        if (uiOptions != 0) {
710269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell            pw.println(prefix + " uiOptions=0x" + Integer.toHexString(uiOptions));
711269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell        }
7129d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale        pw.println(prefix + "resizeable=" + resizeable);
7139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        super.dumpBack(pw, prefix);
7149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
7159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
7169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public String toString() {
7179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        return "ActivityInfo{"
7189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project            + Integer.toHexString(System.identityHashCode(this))
7199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project            + " " + name + "}";
7209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
7219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
7229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public int describeContents() {
7239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        return 0;
7249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
7259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
7269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public void writeToParcel(Parcel dest, int parcelableFlags) {
7279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        super.writeToParcel(dest, parcelableFlags);
7289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeInt(theme);
7299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeInt(launchMode);
7309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeString(permission);
7319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeString(taskAffinity);
7329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeString(targetActivity);
7339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeInt(flags);
7349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeInt(screenOrientation);
7359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeInt(configChanges);
7369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        dest.writeInt(softInputMode);
737269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell        dest.writeInt(uiOptions);
738dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell        dest.writeString(parentActivityName);
73943e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner        dest.writeInt(persistableMode);
7408307ea701c8a06378bd31148bcbe4d312af2b31aCraig Mautner        dest.writeInt(maxRecents);
7419d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale        dest.writeInt(resizeable ? 1 : 0);
7429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
7439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
7449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    public static final Parcelable.Creator<ActivityInfo> CREATOR
7459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project            = new Parcelable.Creator<ActivityInfo>() {
7469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        public ActivityInfo createFromParcel(Parcel source) {
7479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project            return new ActivityInfo(source);
7489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        }
7499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        public ActivityInfo[] newArray(int size) {
7509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project            return new ActivityInfo[size];
7519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        }
7529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    };
7539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
7549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    private ActivityInfo(Parcel source) {
7559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        super(source);
7569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        theme = source.readInt();
7579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        launchMode = source.readInt();
7589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        permission = source.readString();
7599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        taskAffinity = source.readString();
7609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        targetActivity = source.readString();
7619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        flags = source.readInt();
7629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        screenOrientation = source.readInt();
7639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        configChanges = source.readInt();
7649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project        softInputMode = source.readInt();
765269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell        uiOptions = source.readInt();
766dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell        parentActivityName = source.readString();
76743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner        persistableMode = source.readInt();
7688307ea701c8a06378bd31148bcbe4d312af2b31aCraig Mautner        maxRecents = source.readInt();
7699d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale        resizeable = (source.readInt() == 1);
7709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    }
7719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project}
772