Loading packages/SystemUI/animation/lib/src/com/android/systemui/animation/OriginTransitionSession.java +29 −14 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ public class OriginTransitionSession { throw new IllegalArgumentException( "Entry transition must be supplied if you want to play an exit transition!"); } } /** Loading @@ -97,8 +96,6 @@ public class OriginTransitionSession { return false; } setupTransactionQueues(); RemoteTransition remoteTransition = null; if (hasEntryTransition() && hasExitTransition()) { logD("start: starting with entry and exit transition."); Loading @@ -108,25 +105,43 @@ public class OriginTransitionSession { mOriginTransitions.makeOriginTransition( new RemoteTransition(mEntryTransition, mName + "-entry"), new RemoteTransition(mExitTransition, mName + "-exit")); } catch (RemoteException e) { } catch (Exception e) { logE("Unable to create origin transition!", e); } } else if (hasEntryTransition()) { } if (remoteTransition == null && hasEntryTransition()) { // If we failed to create a full origin transition (entry + exit), fallback to use the // entry transition only. logD("start: starting with entry transition."); remoteTransition = new RemoteTransition(mEntryTransition, mName + "-entry"); } } else { if (remoteTransition == null) { // If both entry and exit transitions are not provided, we will fallback to start the // activity without transition. logD("start: starting without transition."); } try { if (mIntentStarter.test(remoteTransition)) { logD("start: intent launched!"); if (remoteTransition != null) { // If the intent is successfully launched with a remote transition, setup the // transaction queues for the entry and exit transitions. setupTransactionQueues(); } return true; } else { // Animation is cancelled by intent starter. logD("start: cancelled by intent starter!"); } } catch (Exception e) { logE("Unable to launch intent!", e); } // Cancel the session since the intent was not launched. cancel(); return false; } } /** * Cancel the current transition and the registered exit transition if it exists. After this Loading Loading @@ -167,7 +182,7 @@ public class OriginTransitionSession { final IBinder shellApplyToken; try { shellApplyToken = mOriginTransitions.getDefaultTransactionApplyToken(); } catch (RemoteException e) { } catch (Exception e) { Log.e(TAG, "Error getting server side (shell) apply token", e); return; } Loading Loading
packages/SystemUI/animation/lib/src/com/android/systemui/animation/OriginTransitionSession.java +29 −14 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ public class OriginTransitionSession { throw new IllegalArgumentException( "Entry transition must be supplied if you want to play an exit transition!"); } } /** Loading @@ -97,8 +96,6 @@ public class OriginTransitionSession { return false; } setupTransactionQueues(); RemoteTransition remoteTransition = null; if (hasEntryTransition() && hasExitTransition()) { logD("start: starting with entry and exit transition."); Loading @@ -108,25 +105,43 @@ public class OriginTransitionSession { mOriginTransitions.makeOriginTransition( new RemoteTransition(mEntryTransition, mName + "-entry"), new RemoteTransition(mExitTransition, mName + "-exit")); } catch (RemoteException e) { } catch (Exception e) { logE("Unable to create origin transition!", e); } } else if (hasEntryTransition()) { } if (remoteTransition == null && hasEntryTransition()) { // If we failed to create a full origin transition (entry + exit), fallback to use the // entry transition only. logD("start: starting with entry transition."); remoteTransition = new RemoteTransition(mEntryTransition, mName + "-entry"); } } else { if (remoteTransition == null) { // If both entry and exit transitions are not provided, we will fallback to start the // activity without transition. logD("start: starting without transition."); } try { if (mIntentStarter.test(remoteTransition)) { logD("start: intent launched!"); if (remoteTransition != null) { // If the intent is successfully launched with a remote transition, setup the // transaction queues for the entry and exit transitions. setupTransactionQueues(); } return true; } else { // Animation is cancelled by intent starter. logD("start: cancelled by intent starter!"); } } catch (Exception e) { logE("Unable to launch intent!", e); } // Cancel the session since the intent was not launched. cancel(); return false; } } /** * Cancel the current transition and the registered exit transition if it exists. After this Loading Loading @@ -167,7 +182,7 @@ public class OriginTransitionSession { final IBinder shellApplyToken; try { shellApplyToken = mOriginTransitions.getDefaultTransactionApplyToken(); } catch (RemoteException e) { } catch (Exception e) { Log.e(TAG, "Error getting server side (shell) apply token", e); return; } Loading