diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-10-05 18:07:54 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-10-05 18:07:54 -0700 |
commit | 3c4c2b7e6f0674068d13b42d4dcf0fd009df0c49 (patch) | |
tree | 9fb61197b62350b3c5899fd7357dc8717b0c5425 /core/java/android | |
parent | 5a5fff7101b45bc28f59e72ea4c3e57632ff9ceb (diff) | |
download | frameworks_base-3c4c2b7e6f0674068d13b42d4dcf0fd009df0c49.zip frameworks_base-3c4c2b7e6f0674068d13b42d4dcf0fd009df0c49.tar.gz frameworks_base-3c4c2b7e6f0674068d13b42d4dcf0fd009df0c49.tar.bz2 |
Fix issue #3001368: API REVIEW: android.app.Activity
Bye bye, lots of junk.
Change-Id: Idd72fc525851277362b2a1ff3bb0f7865fe655fd
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/app/Activity.java | 28 | ||||
-rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 23 | ||||
-rw-r--r-- | core/java/android/app/IActivityManager.java | 3 |
3 files changed, 3 insertions, 51 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 72bf825..2c4babb 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -1631,35 +1631,11 @@ public class Activity extends ContextThemeWrapper } /** - * @deprecated This functionality will be removed in the future; please do - * not use. - * - * Control whether this activity is required to be persistent. By default - * activities are not persistent; setting this to true will prevent the - * system from stopping this activity or its process when running low on - * resources. - * - * <p><em>You should avoid using this method</em>, it has severe negative - * consequences on how well the system can manage its resources. A better - * approach is to implement an application service that you control with - * {@link Context#startService} and {@link Context#stopService}. - * - * @param isPersistent Control whether the current activity must be - * persistent, true if so, false for the normal - * behavior. + * @deprecated As of {@link android.os.Build.VERSION_CODES#GINGERBREAD} + * this is a no-op. */ @Deprecated public void setPersistent(boolean isPersistent) { - if (mParent == null) { - try { - ActivityManagerNative.getDefault() - .setPersistent(mToken, isPersistent); - } catch (RemoteException e) { - // Empty - } - } else { - throw new RuntimeException("setPersistent() not yet supported for embedded activities"); - } } /** diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 89812ab..d6231ea 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -345,17 +345,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } - case SET_PERSISTENT_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - IBinder token = data.readStrongBinder(); - boolean isPersistent = data.readInt() != 0; - if (token != null) { - setPersistent(token, isPersistent); - } - reply.writeNoException(); - return true; - } - case ATTACH_APPLICATION_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IApplicationThread app = ApplicationThreadNative.asInterface( @@ -1589,18 +1578,6 @@ class ActivityManagerProxy implements IActivityManager data.recycle(); reply.recycle(); } - public void setPersistent(IBinder token, boolean isPersistent) throws RemoteException - { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - data.writeStrongBinder(token); - data.writeInt(isPersistent ? 1 : 0); - mRemote.transact(SET_PERSISTENT_TRANSACTION, data, reply, 0); - reply.readException(); - data.recycle(); - reply.recycle(); - } public void attachApplication(IApplicationThread app) throws RemoteException { Parcel data = Parcel.obtain(); diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index 28af0d3..83d422e 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -116,7 +116,6 @@ public interface IActivityManager extends IInterface { public void unbroadcastIntent(IApplicationThread caller, Intent intent) throws RemoteException; /* oneway */ public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast) throws RemoteException; - public void setPersistent(IBinder token, boolean isPersistent) throws RemoteException; public void attachApplication(IApplicationThread app) throws RemoteException; /* oneway */ public void activityIdle(IBinder token, Configuration config) throws RemoteException; @@ -444,7 +443,7 @@ public interface IActivityManager extends IInterface { int REPORT_THUMBNAIL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+27; int GET_CONTENT_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28; int PUBLISH_CONTENT_PROVIDERS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+29; - int SET_PERSISTENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+30; + int FINISH_SUB_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+31; int GET_RUNNING_SERVICE_CONTROL_PANEL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+32; int START_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+33; |