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 /** 2266dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292dWale Ogunwale * Value for {@link #flags}: true when the application can be displayed for all users 2276dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292dWale Ogunwale * regardless of if the user of the application is the current user. Set from the 2286dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292dWale Ogunwale * {@link android.R.attr#showForAllUsers} attribute. 2295962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner * @hide 2305962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner */ 2316dfdfd6741c5a3dd8d8a49ddbd6ee5dfe2fd292dWale Ogunwale public static final int FLAG_SHOW_FOR_ALL_USERS = 0x0400; 2325962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner /** 233322d77185d6e8fe79642f27b653bb51677873cbaJohn Spurlock * Bit in {@link #flags} corresponding to an immersive activity 234613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * that wishes not to be interrupted by notifications. 235613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * Applications that hide the system notification bar with 236613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * {@link android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN} 237613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * may still be interrupted by high-priority notifications; for example, an 238613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * incoming phone call may use 2398091ca5015b2a9f591ad7d3ee5ec832c16cf5548Daniel Sandler * {@link android.app.Notification#fullScreenIntent fullScreenIntent} 240613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * to present a full-screen in-call activity to the user, pausing the 241613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * current activity as a side-effect. An activity with 242613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * {@link #FLAG_IMMERSIVE} set, however, will not be interrupted; the 243613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * notification may be shown in some other way (such as a small floating 244613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * "toast" window). 24573c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * 24673c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * Note that this flag will always reflect the Activity's 24773c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * <code>android:immersive</code> manifest definition, even if the Activity's 24873c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * immersive state is changed at runtime via 24973c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * {@link android.app.Activity#setImmersive(boolean)}. 25073c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * 25173c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * @see android.app.Notification#FLAG_HIGH_PRIORITY 25273c2aee40a0e0ab2e8bd2bbbc560aa31c38eaac2Christopher Tate * @see android.app.Activity#setImmersive(boolean) 253613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler */ 2545962b12bedc4a1d0354816c1cd6b06ba04f6d807Craig Mautner public static final int FLAG_IMMERSIVE = 0x0800; 255529b60a3b16ac3dff24f2403d760ab8ebc9670ffRomain Guy /** 2569d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner * Bit in {@link #flags}: If set, a task rooted at this activity will have its 2579d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner * baseIntent replaced by the activity immediately above this. Each activity may further 2589d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner * relinquish its identity to the activity above it using this flag. Set from the 259a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn * {@link android.R.attr#relinquishTaskIdentity} attribute. 2609d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner */ 2619d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner public static final int FLAG_RELINQUISH_TASK_IDENTITY = 0x1000; 2629d4e9bcebbd97ad51daa0ef15cfba5aabb399bbbCraig Mautner /** 2632dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner * Bit in {@link #flags} indicating that tasks started with this activity are to be 2642dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner * removed from the recent list of tasks when the last activity in the task is finished. 265a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn * Corresponds to {@link android.R.attr#autoRemoveFromRecents} 2662dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner */ 2672dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner public static final int FLAG_AUTO_REMOVE_FROM_RECENTS = 0x2000; 2682dac05617952e1341f9c522e4c05936d7ef07399Craig Mautner /** 269a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn * Bit in {@link #flags} indicating that this activity can start is creation/resume 270a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn * while the previous activity is still pausing. Corresponds to 271a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn * {@link android.R.attr#resumeWhilePausing} 272a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn */ 273a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn public static final int FLAG_RESUME_WHILE_PAUSING = 0x4000; 274a4e102ee580282dc7abeb22f4a025813e53b9431Dianne Hackborn /** 275d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn * @hide Bit in {@link #flags}: If set, this component will only be seen 276d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn * by the primary user. Only works with broadcast receivers. Set from the 277ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner * android.R.attr#primaryUserOnly attribute. 278d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn */ 279d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn public static final int FLAG_PRIMARY_USER_ONLY = 0x20000000; 280d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn /** 2817d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn * Bit in {@link #flags}: If set, a single instance of the receiver will 2827d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn * run for all users on the device. Set from the 2837d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn * {@link android.R.attr#singleUser} attribute. Note that this flag is 284d4ac8d7b3de27a9f0e4c6af2496ca71d794e42d1Dianne Hackborn * only relevant for ActivityInfo structures that are describing receiver 2857d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn * components; it is not applied to activities. 2867d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn */ 2877d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn public static final int FLAG_SINGLE_USER = 0x40000000; 2887d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn /** 289ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner * @hide Bit in {@link #flags}: If set, this activity may be launched into an 290ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner * owned ActivityContainer such as that within an ActivityView. If not set and 291ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner * this activity is launched into such a container a SecurityExcception will be 292ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner * thrown. Set from the {@link android.R.attr#allowEmbedded} attribute. 293ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner */ 294ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner public static final int FLAG_ALLOW_EMBEDDED = 0x80000000; 295ffd14a13ce7425562777152256ea7760d95f254dCraig Mautner /** 2969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Options that have been set in the activity declaration in the 297613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * manifest. 298613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * These include: 299613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * {@link #FLAG_MULTIPROCESS}, 3009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #FLAG_FINISH_ON_TASK_LAUNCH}, {@link #FLAG_CLEAR_TASK_ON_LAUNCH}, 3019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #FLAG_ALWAYS_RETAIN_TASK_STATE}, 3029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #FLAG_STATE_NOT_NEEDED}, {@link #FLAG_EXCLUDE_FROM_RECENTS}, 303ffa424800d0338b8b894aef2ea1e3e3344cbda7aDianne Hackborn * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY}, 304613dde4aa651e11dac3db859723cc6faf8fc0a82Daniel Sandler * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS}, 3057d19e0242faac8017033dabb872cdf1542fa184cDianne Hackborn * {@link #FLAG_HARDWARE_ACCELERATED}, {@link #FLAG_SINGLE_USER}. 3069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int flags; 3089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 309d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye /** @hide */ 310d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye @IntDef({ 311d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_UNSPECIFIED, 312d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_LANDSCAPE, 313d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_PORTRAIT, 314d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_USER, 315d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_BEHIND, 316d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_SENSOR, 317d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_NOSENSOR, 318d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_SENSOR_LANDSCAPE, 319d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_SENSOR_PORTRAIT, 320d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_REVERSE_LANDSCAPE, 321d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_REVERSE_PORTRAIT, 322d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_FULL_SENSOR, 323d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_USER_LANDSCAPE, 324d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_USER_PORTRAIT, 325d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_FULL_USER, 326d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye SCREEN_ORIENTATION_LOCKED 327d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye }) 328d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye @Retention(RetentionPolicy.SOURCE) 329d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye public @interface ScreenOrientation {} 330d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye 3319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Constant corresponding to <code>unspecified</code> in 3339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_UNSPECIFIED = -1; 3369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Constant corresponding to <code>landscape</code> in 3389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_LANDSCAPE = 0; 3419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Constant corresponding to <code>portrait</code> in 3439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_PORTRAIT = 1; 3469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Constant corresponding to <code>user</code> in 3489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_USER = 2; 3519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Constant corresponding to <code>behind</code> in 3539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_BEHIND = 3; 3569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Constant corresponding to <code>sensor</code> in 3589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_SENSOR = 4; 3619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 363e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * Constant corresponding to <code>nosensor</code> in 3649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the {@link android.R.attr#screenOrientation} attribute. 3659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int SCREEN_ORIENTATION_NOSENSOR = 5; 367e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn 368e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn /** 369e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * Constant corresponding to <code>sensorLandscape</code> in 370e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 371e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn */ 372e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn public static final int SCREEN_ORIENTATION_SENSOR_LANDSCAPE = 6; 373e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn 374e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn /** 375e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * Constant corresponding to <code>sensorPortrait</code> in 376e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 377e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn */ 378e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn public static final int SCREEN_ORIENTATION_SENSOR_PORTRAIT = 7; 379e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn 380e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn /** 381e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * Constant corresponding to <code>reverseLandscape</code> in 382e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 383e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn */ 384e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn public static final int SCREEN_ORIENTATION_REVERSE_LANDSCAPE = 8; 385e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn 386e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn /** 387e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * Constant corresponding to <code>reversePortrait</code> in 388e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 389e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn */ 390e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn public static final int SCREEN_ORIENTATION_REVERSE_PORTRAIT = 9; 391e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn 392e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn /** 393e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * Constant corresponding to <code>fullSensor</code> in 394e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 395e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn */ 396e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn public static final int SCREEN_ORIENTATION_FULL_SENSOR = 10; 397e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn 3989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 399b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * Constant corresponding to <code>userLandscape</code> in 400b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 401b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn */ 402b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn public static final int SCREEN_ORIENTATION_USER_LANDSCAPE = 11; 403b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn 404b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn /** 405b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * Constant corresponding to <code>userPortrait</code> in 406b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 407b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn */ 408b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn public static final int SCREEN_ORIENTATION_USER_PORTRAIT = 12; 409b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn 410b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn /** 411b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * Constant corresponding to <code>fullUser</code> in 412b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 413b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn */ 414b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn public static final int SCREEN_ORIENTATION_FULL_USER = 13; 415b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn 416b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn /** 417b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * Constant corresponding to <code>locked</code> in 418b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * the {@link android.R.attr#screenOrientation} attribute. 419b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn */ 420b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn public static final int SCREEN_ORIENTATION_LOCKED = 14; 421b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn 422b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn /** 4239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The preferred screen orientation this activity would like to run in. 4249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * From the {@link android.R.attr#screenOrientation} attribute, one of 4259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #SCREEN_ORIENTATION_UNSPECIFIED}, 4269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #SCREEN_ORIENTATION_LANDSCAPE}, 4279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #SCREEN_ORIENTATION_PORTRAIT}, 4289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #SCREEN_ORIENTATION_USER}, 4299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #SCREEN_ORIENTATION_BEHIND}, 4309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #SCREEN_ORIENTATION_SENSOR}, 431e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * {@link #SCREEN_ORIENTATION_NOSENSOR}, 432e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * {@link #SCREEN_ORIENTATION_SENSOR_LANDSCAPE}, 433e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * {@link #SCREEN_ORIENTATION_SENSOR_PORTRAIT}, 434e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * {@link #SCREEN_ORIENTATION_REVERSE_LANDSCAPE}, 435e5439f228f603f60febe058f633d91d5af2fff76Dianne Hackborn * {@link #SCREEN_ORIENTATION_REVERSE_PORTRAIT}, 436b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * {@link #SCREEN_ORIENTATION_FULL_SENSOR}, 437b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * {@link #SCREEN_ORIENTATION_USER_LANDSCAPE}, 438b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * {@link #SCREEN_ORIENTATION_USER_PORTRAIT}, 439b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * {@link #SCREEN_ORIENTATION_FULL_USER}, 440b9ec1ac51b631c4efc9b7a7e7a2b28882105ffa3Dianne Hackborn * {@link #SCREEN_ORIENTATION_LOCKED}, 4419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 442d9273d6f289d9b55da3fd0db2f659fdfb48106a8Tor Norbye @ScreenOrientation 4439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED; 4449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the IMSI MCC. Set from the 4489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_MCC = 0x0001; 4519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the IMSI MNC. Set from the 4549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_MNC = 0x0002; 4579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the locale. Set from the 4609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_LOCALE = 0x0004; 4639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the touchscreen type. Set from the 4669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_TOUCHSCREEN = 0x0008; 4699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the keyboard type. Set from the 4729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_KEYBOARD = 0x0010; 4759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 47793e462b79d6896da10e15e74c5aec6beb098dddfDianne Hackborn * can itself handle changes to the keyboard or navigation being hidden/exposed. 47893e462b79d6896da10e15e74c5aec6beb098dddfDianne Hackborn * Note that inspite of the name, this applies to the changes to any 47993e462b79d6896da10e15e74c5aec6beb098dddfDianne Hackborn * hidden states: keyboard or navigation. 4809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Set from the {@link android.R.attr#configChanges} attribute. 4819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_KEYBOARD_HIDDEN = 0x0020; 4839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the navigation type. Set from the 4869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_NAVIGATION = 0x0040; 4899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 4919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the screen orientation. Set from the 4929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. 4939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_ORIENTATION = 0x0080; 4959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit in {@link #configChanges} that indicates that the activity 497723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * can itself handle changes to the screen layout. Set from the 498723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.attr#configChanges} attribute. 499723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 500723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int CONFIG_SCREEN_LAYOUT = 0x0100; 501723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 502723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Bit in {@link #configChanges} that indicates that the activity 50327b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel * can itself handle the ui mode. Set from the 50427b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel * {@link android.R.attr#configChanges} attribute. 50527b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel */ 50627b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel public static final int CONFIG_UI_MODE = 0x0200; 50727b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel /** 50827b28b3f62bd3b54fa13acd5d035940b9be464f3Tobias Haamel * Bit in {@link #configChanges} that indicates that the activity 509ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn * can itself handle the screen size. Set from the 510e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * {@link android.R.attr#configChanges} attribute. This will be 511e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * set by default for applications that target an earlier version 512e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}... 513e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * <b>however</b>, you will not see the bit set here becomes some 514e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * applications incorrectly compare {@link #configChanges} against 515e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * an absolute value rather than correctly masking out the bits 516e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * they are interested in. Please don't do that, thanks. 517ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn */ 518ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn public static final int CONFIG_SCREEN_SIZE = 0x0400; 519ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn /** 520ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn * Bit in {@link #configChanges} that indicates that the activity 52169cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn * can itself handle the smallest screen size. Set from the 522e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * {@link android.R.attr#configChanges} attribute. This will be 523e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * set by default for applications that target an earlier version 524e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}... 525e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * <b>however</b>, you will not see the bit set here becomes some 526e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * applications incorrectly compare {@link #configChanges} against 527e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * an absolute value rather than correctly masking out the bits 528e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * they are interested in. Please don't do that, thanks. 52969cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn */ 53069cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn public static final int CONFIG_SMALLEST_SCREEN_SIZE = 0x0800; 53169cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn /** 53269cb87576ba163b61bb0e6477a3b7c57a9b11d40Dianne Hackborn * Bit in {@link #configChanges} that indicates that the activity 533908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn * can itself handle density changes. Set from the 534908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn * {@link android.R.attr#configChanges} attribute. 535908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn */ 536908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn public static final int CONFIG_DENSITY = 0x1000; 537908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn /** 538908aecc3a63c5520d5b11da14a9383f885b7d126Dianne Hackborn * Bit in {@link #configChanges} that indicates that the activity 5395f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio * can itself handle the change to layout direction. Set from the 5405f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio * {@link android.R.attr#configChanges} attribute. 5415f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio */ 5425f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio public static final int CONFIG_LAYOUT_DIRECTION = 0x2000; 5435f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio /** 5445f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio * Bit in {@link #configChanges} that indicates that the activity 5459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can itself handle changes to the font scaling factor. Set from the 5469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.R.attr#configChanges} attribute. This is 547dc25d25333d3fac96dccfb9bd31d2474d6bc2d78Fabrice Di Meglio * not a core resource configuration, but a higher-level value, so its 5489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * constant starts at the high bits. 5499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int CONFIG_FONT_SCALE = 0x40000000; 5519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 552ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn /** @hide 553ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn * Unfortunately the constants for config changes in native code are 554ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn * different from ActivityInfo. :( Here are the values we should use for the 555ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn * native side given the bit we have assigned in ActivityInfo. 556ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn */ 557ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn public static int[] CONFIG_NATIVE_BITS = new int[] { 5581d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_MNC, // MNC 5591d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_MCC, // MCC 5601d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_LOCALE, // LOCALE 5611d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_TOUCHSCREEN, // TOUCH SCREEN 5621d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_KEYBOARD, // KEYBOARD 5631d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_KEYBOARD_HIDDEN, // KEYBOARD HIDDEN 5641d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_NAVIGATION, // NAVIGATION 5651d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_ORIENTATION, // ORIENTATION 5661d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_SCREEN_LAYOUT, // SCREEN LAYOUT 5671d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_UI_MODE, // UI MODE 5681d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_SCREEN_SIZE, // SCREEN SIZE 5691d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_SMALLEST_SCREEN_SIZE, // SMALLEST SCREEN SIZE 5701d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_DENSITY, // DENSITY 5711d0b177754c81a20e272b91c6f703a634fe5c856Dianne Hackborn Configuration.NATIVE_CONFIG_LAYOUTDIR, // LAYOUT DIRECTION 572ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn }; 573c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette 574c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette /** 575ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn * Convert Java change bits to native. 576c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette * 577c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette * @hide 578ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn */ 579ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn public static int activityInfoConfigToNative(int input) { 580ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn int output = 0; 581c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) { 582c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette if ((input & (1 << i)) != 0) { 583ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn output |= CONFIG_NATIVE_BITS[i]; 584ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn } 585ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn } 586ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn return output; 587ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn } 588ebff8f92f13513ce37bd74759eb1db63f2220590Dianne Hackborn 5899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 590c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette * Convert native change bits to Java. 591c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette * 592c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette * @hide 593c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette */ 594c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette public static int activityInfoConfigNativeToJava(int input) { 595c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette int output = 0; 596c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette for (int i = 0; i < CONFIG_NATIVE_BITS.length; i++) { 597c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette if ((input & CONFIG_NATIVE_BITS[i]) != 0) { 598c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette output |= (1 << i); 599c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette } 600c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette } 601c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette return output; 602c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette } 603c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette 604c1d527926e1c82828e42bdc0c7abf50f6decc0a7Alan Viverette /** 605e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * @hide 606e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * Unfortunately some developers (OpenFeint I am looking at you) have 607e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * compared the configChanges bit field against absolute values, so if we 608e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * introduce a new bit they break. To deal with that, we will make sure 609e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * the public field will not have a value that breaks them, and let the 610e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * framework call here to get the real value. 611e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn */ 612e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn public int getRealConfigChanged() { 613e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn return applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2 614e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn ? (configChanges | ActivityInfo.CONFIG_SCREEN_SIZE 615e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE) 616e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn : configChanges; 617e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn } 618e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn 619e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn /** 6209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Bit mask of kinds of configuration changes that this activity 6219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * can handle itself (without being restarted by the system). 6229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Contains any combination of {@link #CONFIG_FONT_SCALE}, 6239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #CONFIG_MCC}, {@link #CONFIG_MNC}, 6249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link #CONFIG_LOCALE}, {@link #CONFIG_TOUCHSCREEN}, 625723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link #CONFIG_KEYBOARD}, {@link #CONFIG_NAVIGATION}, 6265f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio * {@link #CONFIG_ORIENTATION}, {@link #CONFIG_SCREEN_LAYOUT} and 6275f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio * {@link #CONFIG_LAYOUT_DIRECTION}. Set from the {@link android.R.attr#configChanges} 6285f7979993979466c79ab4f38d83c6f2aca361662Fabrice Di Meglio * attribute. 6299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 6309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int configChanges; 63115df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner 6329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 6339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The desired soft input mode for this activity's main window. 6349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Set from the {@link android.R.attr#windowSoftInputMode} attribute 6359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * in the activity's manifest. May be any of the same values allowed 6369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * for {@link android.view.WindowManager.LayoutParams#softInputMode 6379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * WindowManager.LayoutParams.softInputMode}. If 0 (unspecified), 6389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the mode from the theme will be used. 6399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 6409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int softInputMode; 641269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell 642269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell /** 643269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * The desired extra UI options for this activity and its main window. 644269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * Set from the {@link android.R.attr#uiOptions} attribute in the 645269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * activity's manifest. 646269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell */ 647269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell public int uiOptions = 0; 648269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell 649269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell /** 650e797ed6a74593630219faf7f0ba5dc8235586bceScott Main * Flag for use with {@link #uiOptions}. 651e797ed6a74593630219faf7f0ba5dc8235586bceScott Main * Indicates that the action bar should put all action items in a separate bar when 652e797ed6a74593630219faf7f0ba5dc8235586bceScott Main * the screen is narrow. 653e797ed6a74593630219faf7f0ba5dc8235586bceScott Main * <p>This value corresponds to "splitActionBarWhenNarrow" for the {@link #uiOptions} XML 654e797ed6a74593630219faf7f0ba5dc8235586bceScott Main * attribute. 655269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell */ 656269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell public static final int UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW = 1; 657269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell 658dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell /** 659dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell * If defined, the activity named here is the logical parent of this activity. 660dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell */ 661dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell public String parentActivityName; 662dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell 6639d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale /** 6649d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale * Value indicating if the activity is resizeable to any dimension. 6659d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale * See {@link android.R.attr#resizeableActivity}. 6664aab1bba6975b0447ad7435120edb5a90c8506f8Wale Ogunwale * @hide 6679d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale */ 6689d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale public boolean resizeable; 6699d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale 67015df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner /** @hide */ 67115df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner public static final int LOCK_TASK_LAUNCH_MODE_DEFAULT = 0; 67215df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner /** @hide */ 67315df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner public static final int LOCK_TASK_LAUNCH_MODE_NEVER = 1; 67415df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner /** @hide */ 67515df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner public static final int LOCK_TASK_LAUNCH_MODE_ALWAYS = 2; 67615df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner /** @hide */ 67715df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner public static final int LOCK_TASK_LAUNCH_MODE_IF_WHITELISTED = 3; 67815df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner 67915df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner /** @hide */ 68015df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner public static final String lockTaskLaunchModeToString(int lockTaskLaunchMode) { 68115df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner switch (lockTaskLaunchMode) { 68215df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner case LOCK_TASK_LAUNCH_MODE_DEFAULT: 68315df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner return "LOCK_TASK_LAUNCH_MODE_DEFAULT"; 68415df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner case LOCK_TASK_LAUNCH_MODE_NEVER: 68515df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner return "LOCK_TASK_LAUNCH_MODE_NEVER"; 68615df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner case LOCK_TASK_LAUNCH_MODE_ALWAYS: 68715df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner return "LOCK_TASK_LAUNCH_MODE_ALWAYS"; 68815df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner case LOCK_TASK_LAUNCH_MODE_IF_WHITELISTED: 68915df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner return "LOCK_TASK_LAUNCH_MODE_IF_WHITELISTED"; 69015df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner default: 69115df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner return "unknown=" + lockTaskLaunchMode; 69215df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner } 69315df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner } 69415df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner /** 69515df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner * Value indicating if the activity is to be locked at startup. Takes on the values from 69615df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner * {@link android.R.attr#lockTaskMode}. 69715df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner * @hide 69815df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner */ 69915df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner public int lockTaskLaunchMode; 70015df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner 7019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ActivityInfo() { 7029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ActivityInfo(ActivityInfo orig) { 7059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(orig); 7069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = orig.theme; 7079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project launchMode = orig.launchMode; 7089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = orig.permission; 7099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = orig.taskAffinity; 7109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project targetActivity = orig.targetActivity; 7119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = orig.flags; 7129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project screenOrientation = orig.screenOrientation; 7139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project configChanges = orig.configChanges; 7149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project softInputMode = orig.softInputMode; 715269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = orig.uiOptions; 716dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell parentActivityName = orig.parentActivityName; 7178307ea701c8a06378bd31148bcbe4d312af2b31aCraig Mautner maxRecents = orig.maxRecents; 71815df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner resizeable = orig.resizeable; 71915df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner lockTaskLaunchMode = orig.lockTaskLaunchMode; 7209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 72115df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner 7229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 7239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Return the theme resource identifier to use for this activity. If 7249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the activity defines a theme, that is used; else, the application 7259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * theme is used. 72615df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner * 7279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return The theme associated with this activity. 7289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 7299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public final int getThemeResource() { 7309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return theme != 0 ? theme : applicationInfo.theme; 7319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 73343e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner private String persistableModeToString() { 73443e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner switch(persistableMode) { 73543e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner case PERSIST_ROOT_ONLY: return "PERSIST_ROOT_ONLY"; 7367f72f53704cbee26dc2a0be429b8446b2493226cCraig Mautner case PERSIST_NEVER: return "PERSIST_NEVER"; 73743e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner case PERSIST_ACROSS_REBOOTS: return "PERSIST_ACROSS_REBOOTS"; 73843e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner default: return "UNKNOWN=" + persistableMode; 73943e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner } 74043e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner } 74143e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner 7429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void dump(Printer pw, String prefix) { 7439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpFront(pw, prefix); 74412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (permission != null) { 74512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "permission=" + permission); 74612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 7479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "taskAffinity=" + taskAffinity 74843e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner + " targetActivity=" + targetActivity 74943e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner + " persistableMode=" + persistableModeToString()); 75012527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (launchMode != 0 || flags != 0 || theme != 0) { 75112527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "launchMode=" + launchMode 75212527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn + " flags=0x" + Integer.toHexString(flags) 75312527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn + " theme=0x" + Integer.toHexString(theme)); 75412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 75512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (screenOrientation != SCREEN_ORIENTATION_UNSPECIFIED 75612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn || configChanges != 0 || softInputMode != 0) { 75712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "screenOrientation=" + screenOrientation 75812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn + " configChanges=0x" + Integer.toHexString(configChanges) 75912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn + " softInputMode=0x" + Integer.toHexString(softInputMode)); 76012527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 761269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell if (uiOptions != 0) { 762269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell pw.println(prefix + " uiOptions=0x" + Integer.toHexString(uiOptions)); 763269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell } 76415df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner pw.println(prefix + "resizeable=" + resizeable + " lockTaskLaunchMode=" 76515df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner + lockTaskLaunchModeToString(lockTaskLaunchMode)); 7669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpBack(pw, prefix); 7679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String toString() { 7709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return "ActivityInfo{" 7719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + Integer.toHexString(System.identityHashCode(this)) 7729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + " " + name + "}"; 7739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int describeContents() { 7769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return 0; 7779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void writeToParcel(Parcel dest, int parcelableFlags) { 7809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.writeToParcel(dest, parcelableFlags); 7819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(theme); 7829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(launchMode); 7839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(permission); 7849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(taskAffinity); 7859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(targetActivity); 7869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(flags); 7879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(screenOrientation); 7889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(configChanges); 7899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(softInputMode); 790269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell dest.writeInt(uiOptions); 791dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell dest.writeString(parentActivityName); 79243e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner dest.writeInt(persistableMode); 7938307ea701c8a06378bd31148bcbe4d312af2b31aCraig Mautner dest.writeInt(maxRecents); 7949d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale dest.writeInt(resizeable ? 1 : 0); 79515df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner dest.writeInt(lockTaskLaunchMode); 7969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final Parcelable.Creator<ActivityInfo> CREATOR 7999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project = new Parcelable.Creator<ActivityInfo>() { 8009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ActivityInfo createFromParcel(Parcel source) { 8019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ActivityInfo(source); 8029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ActivityInfo[] newArray(int size) { 8049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ActivityInfo[size]; 8059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project }; 8079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private ActivityInfo(Parcel source) { 8099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(source); 8109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = source.readInt(); 8119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project launchMode = source.readInt(); 8129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = source.readString(); 8139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = source.readString(); 8149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project targetActivity = source.readString(); 8159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = source.readInt(); 8169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project screenOrientation = source.readInt(); 8179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project configChanges = source.readInt(); 8189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project softInputMode = source.readInt(); 819269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = source.readInt(); 820dd8fab2629131b09367df747afd9a61e42dd1992Adam Powell parentActivityName = source.readString(); 82143e52ed32e2d55ef4aee18c4b4bc13b7fdef9cc4Craig Mautner persistableMode = source.readInt(); 8228307ea701c8a06378bd31148bcbe4d312af2b31aCraig Mautner maxRecents = source.readInt(); 8239d3de4cfb42519fefe9d8b03c38ba440bd6bc886Wale Ogunwale resizeable = (source.readInt() == 1); 82415df08abd8190353e1430f88c2ed6462d72a5b25Craig Mautner lockTaskLaunchMode = source.readInt(); 8259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 827