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

Commit 896b15ab authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 27016 into eclair

* changes:
  A variety of work on animations.
parents e9bd4788 3b3e145d
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -16877,6 +16877,21 @@
 visibility="public"
>
</method>
<method name="overridePendingTransition"
 return="void"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="enterAnim" type="int">
</parameter>
<parameter name="exitAnim" type="int">
</parameter>
</method>
<method name="registerForContextMenu"
 return="void"
 abstract="false"
+17 −0
Original line number Diff line number Diff line
@@ -3014,6 +3014,23 @@ public class Activity extends ContextThemeWrapper
                flagsMask, flagsValues, child);
    }

    /**
     * Call immediately after one of the flavors of {@link #startActivity(Intent)}
     * or {@link #finish} to specify an explicit transition animation to
     * perform next.
     * @param enterAnim A resource ID of the animation resource to use for
     * the incoming activity.
     * @param exitAnim A resource ID of the animation resource to use for
     * the outgoing activity.
     */
    public void overridePendingTransition(int enterAnim, int exitAnim) {
        try {
            ActivityManagerNative.getDefault().overridePendingTransition(
                    mToken, getPackageName(), enterAnim, exitAnim);
        } catch (RemoteException e) {
        }
    }
    
    /**
     * Call this to set the result that your activity will return to its
     * caller.
+25 −0
Original line number Diff line number Diff line
@@ -1153,6 +1153,16 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            reply.writeNoException();
            return true;
        }
        
        case OVERRIDE_PENDING_TRANSITION_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            IBinder token = data.readStrongBinder();
            String packageName = data.readString();
            int enterAnim = data.readInt();
            int exitAnim = data.readInt();
            overridePendingTransition(token, packageName, enterAnim, exitAnim);
            return true;
        }
        }
        
        return super.onTransact(code, data, reply, flags);
@@ -2530,5 +2540,20 @@ class ActivityManagerProxy implements IActivityManager
        reply.recycle();
    }
        
    public void overridePendingTransition(IBinder token, String packageName,
            int enterAnim, int exitAnim) throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        data.writeStrongBinder(token);
        data.writeString(packageName);
        data.writeInt(enterAnim);
        data.writeInt(exitAnim);
        mRemote.transact(OVERRIDE_PENDING_TRANSITION_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
        reply.recycle();
    }
    
    private IBinder mRemote;
}
+4 −0
Original line number Diff line number Diff line
@@ -285,6 +285,9 @@ public interface IActivityManager extends IInterface {
    public Debug.MemoryInfo[] getProcessMemoryInfo(int[] pids)
            throws RemoteException;
    
    public void overridePendingTransition(IBinder token, String packageName,
            int enterAnim, int exitAnim) throws RemoteException;
    
    /*
     * Private non-Binder interfaces
     */
@@ -444,4 +447,5 @@ public interface IActivityManager extends IInterface {
    int GET_PROCESS_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+97;
    int KILL_APPLICATION_PROCESS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+98;
    int START_ACTIVITY_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+99;
    int OVERRIDE_PENDING_TRANSITION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+100;
}
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
    public int uid;
    
    /**
     * The minimum SDK version this application targets.  It may run on earilier
     * The minimum SDK version this application targets.  It may run on earlier
     * versions, but it knows how to work with any new behavior added at this
     * version.  Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT}
     * if this is a development build and the app is targeting that.  You should
Loading