diff options
| author | Daniel Sandler <dsandler@android.com> | 2010-08-26 10:28:46 -0400 |
|---|---|---|
| committer | Daniel Sandler <dsandler@android.com> | 2010-08-27 22:57:39 -0400 |
| commit | d02bdaab495641ab50e2123fdfd99a819cc40540 (patch) | |
| tree | 63b4618d41b340ea2d4f01b98da2ce0ba478c032 /core/java | |
| parent | 7046bd924f77c54585b9e0e0c95e5edd2ceb55a3 (diff) | |
Remove experimental immersive mode support. DO NOT MERGE
Bug: 2949215
Change-Id: I7d998ef571ef7e149bb96261430e92150b80b77d
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/Activity.java | 42 | ||||
| -rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 66 | ||||
| -rw-r--r-- | core/java/android/app/IActivityManager.java | 4 | ||||
| -rw-r--r-- | core/java/android/app/Notification.java | 13 | ||||
| -rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 17 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 6 |
6 files changed, 0 insertions, 148 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 773ff7c58f31..f7a9a1848f8d 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -3740,48 +3740,6 @@ public class Activity extends ContextThemeWrapper return null; } - /** - * Bit indicating that this activity is "immersive" and should not be - * interrupted by notifications if possible. - * - * This value is initially set by the manifest property - * <code>android:immersive</code> but may be changed at runtime by - * {@link #setImmersive}. - * - * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE - * @hide - */ - public boolean isImmersive() { - try { - return ActivityManagerNative.getDefault().isImmersive(mToken); - } catch (RemoteException e) { - return false; - } - } - - /** - * Adjust the current immersive mode setting. - * - * Note that changing this value will have no effect on the activity's - * {@link android.content.pm.ActivityInfo} structure; that is, if - * <code>android:immersive</code> is set to <code>true</code> - * in the application's manifest entry for this activity, the {@link - * android.content.pm.ActivityInfo#flags ActivityInfo.flags} member will - * always have its {@link android.content.pm.ActivityInfo#FLAG_IMMERSIVE - * FLAG_IMMERSIVE} bit set. - * - * @see #isImmersive - * @see android.content.pm.ActivityInfo#FLAG_IMMERSIVE - * @hide - */ - public void setImmersive(boolean i) { - try { - ActivityManagerNative.getDefault().setImmersive(mToken, i); - } catch (RemoteException e) { - // pass - } - } - // ------------------ Internal API ------------------ final void setParent(Activity parent) { diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 1d1b4dc070b6..a1808377c69c 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -1261,32 +1261,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } - case IS_IMMERSIVE_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - IBinder token = data.readStrongBinder(); - boolean isit = isImmersive(token); - reply.writeNoException(); - reply.writeInt(isit ? 1 : 0); - return true; - } - - case SET_IMMERSIVE_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - IBinder token = data.readStrongBinder(); - boolean imm = data.readInt() == 1; - setImmersive(token, imm); - reply.writeNoException(); - return true; - } - - case IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - boolean isit = isTopActivityImmersive(); - reply.writeNoException(); - reply.writeInt(isit ? 1 : 0); - return true; - } - case CRASH_APPLICATION_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); int uid = data.readInt(); @@ -2858,46 +2832,6 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } - public void setImmersive(IBinder token, boolean immersive) - throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - data.writeStrongBinder(token); - data.writeInt(immersive ? 1 : 0); - mRemote.transact(SET_IMMERSIVE_TRANSACTION, data, reply, 0); - reply.readException(); - data.recycle(); - reply.recycle(); - } - - public boolean isImmersive(IBinder token) - throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - data.writeStrongBinder(token); - mRemote.transact(IS_IMMERSIVE_TRANSACTION, data, reply, 0); - reply.readException(); - boolean res = reply.readInt() == 1; - data.recycle(); - reply.recycle(); - return res; - } - - public boolean isTopActivityImmersive() - throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - mRemote.transact(IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION, data, reply, 0); - reply.readException(); - boolean res = reply.readInt() == 1; - data.recycle(); - reply.recycle(); - return res; - } - public void crashApplication(int uid, int initialPid, String packageName, String message) throws RemoteException { Parcel data = Parcel.obtain(); diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index 664cf18b272a..f9bd46134ccb 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -311,10 +311,6 @@ public interface IActivityManager extends IInterface { public void finishHeavyWeightApp() throws RemoteException; - public void setImmersive(IBinder token, boolean immersive) throws RemoteException; - public boolean isImmersive(IBinder token) throws RemoteException; - public boolean isTopActivityImmersive() throws RemoteException; - public void crashApplication(int uid, int initialPid, String packageName, String message) throws RemoteException; diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 83a202409df0..5525ce3d85af 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -112,8 +112,6 @@ public class Notification implements Parcelable * An intent to launch instead of posting the notification to the status bar. Only for use with * extremely high-priority notifications demanding the user's attention, such as an incoming * call (handled in the core Android Phone app with a full-screen Activity). - * Use with {@link #FLAG_HIGH_PRIORITY} to ensure that this notification will reach the user - * even when other notifications are suppressed. */ public PendingIntent fullScreenIntent; @@ -273,14 +271,6 @@ public class Notification implements Parcelable */ public static final int FLAG_FOREGROUND_SERVICE = 0x00000040; - /** - * Bit to be bitwise-ored into the {@link #flags} field that should be set if this notification - * represents a high-priority event that may be shown to the user even if notifications are - * otherwise unavailable (that is, when the status bar is hidden). This flag is ideally used - * in conjunction with {@link #fullScreenIntent}. - */ - public static final int FLAG_HIGH_PRIORITY = 0x00000080; - public int flags; /** @@ -549,9 +539,6 @@ public class Notification implements Parcelable sb.append(Integer.toHexString(this.defaults)); sb.append(",flags=0x"); sb.append(Integer.toHexString(this.flags)); - if ((this.flags & FLAG_HIGH_PRIORITY) != 0) { - sb.append("!!!1!one!"); - } sb.append(")"); return sb.toString(); } diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index 364c91e81d68..395c392b12b2 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -149,22 +149,6 @@ public class ActivityInfo extends ComponentInfo * {@link android.R.attr#finishOnCloseSystemDialogs} attribute. */ public static final int FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS = 0x0100; - /** - * Bit in {@link #flags} corresponding to an immersive activity - * that wishes not to be interrupted by notifications. - * Applications that hide the system notification bar with - * {@link android.view.WindowManager.LayoutParams#FLAG_FULLSCREEN} - * may still be interrupted by high-priority notifications; for example, an - * incoming phone call may use - * {@link android.app.Notification#fullScreenIntent fullScreenIntent} - * to present a full-screen in-call activity to the user, pausing the - * current activity as a side-effect. An activity with - * {@link #FLAG_IMMERSIVE} set, however, will not be interrupted; the - * notification may be shown in some other way (such as a small floating - * "toast" window). - * {@see android.app.Notification#FLAG_HIGH_PRIORITY} - */ - public static final int FLAG_IMMERSIVE = 0x0200; /** * Options that have been set in the activity declaration in the * manifest. @@ -175,7 +159,6 @@ public class ActivityInfo extends ComponentInfo * {@link #FLAG_STATE_NOT_NEEDED}, {@link #FLAG_EXCLUDE_FROM_RECENTS}, * {@link #FLAG_ALLOW_TASK_REPARENTING}, {@link #FLAG_NO_HISTORY}, * {@link #FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS}, - * {@link #FLAG_IMMERSIVE} */ public int flags; diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 2a39dc002eb6..e20cb5ee4134 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -1883,12 +1883,6 @@ public class PackageParser { a.info.flags |= ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS; } - if (sa.getBoolean( - com.android.internal.R.styleable.AndroidManifestActivity_immersive, - false)) { - a.info.flags |= ActivityInfo.FLAG_IMMERSIVE; - } - if (!receiver) { a.info.launchMode = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_launchMode, |
