Loading core/java/android/widget/RemoteViews.java +19 −14 Original line number Diff line number Diff line Loading @@ -16,13 +16,7 @@ package android.widget; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; import java.util.ArrayList; import android.app.ActivityOptions; import android.app.PendingIntent; import android.appwidget.AppWidgetHostView; import android.content.Context; Loading @@ -40,13 +34,20 @@ import android.os.Parcelable; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.LayoutInflater.Filter; import android.view.RemotableViewMethod; import android.view.View; import android.view.ViewGroup; import android.view.LayoutInflater.Filter; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AdapterView.OnItemClickListener; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; import java.util.ArrayList; /** * A class that describes a view hierarchy that can be displayed in Loading Loading @@ -140,14 +141,18 @@ public class RemoteViews implements Parcelable, Filter { return; } protected boolean startIntentSafely(Context context, PendingIntent pendingIntent, protected boolean startIntentSafely(View view, PendingIntent pendingIntent, Intent fillInIntent) { try { // TODO: Unregister this handler if PendingIntent.FLAG_ONE_SHOT? Context context = view.getContext(); ActivityOptions opts = ActivityOptions.makeScaleUpAnimation(view, 0, 0, view.getMeasuredWidth(), view.getMeasuredHeight()); context.startIntentSender( pendingIntent.getIntentSender(), fillInIntent, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_NEW_TASK, 0); Intent.FLAG_ACTIVITY_NEW_TASK, 0, opts.toBundle()); } catch (IntentSender.SendIntentException e) { android.util.Log.e(LOG_TAG, "Cannot send pending intent: ", e); return false; Loading Loading @@ -263,7 +268,7 @@ public class RemoteViews implements Parcelable, Filter { rect.bottom = (int) ((pos[1] + v.getHeight()) * appScale + 0.5f); fillInIntent.setSourceBounds(rect); startIntentSafely(v.getContext(), pendingIntent, fillInIntent); startIntentSafely(v, pendingIntent, fillInIntent); } }; Loading Loading @@ -341,7 +346,7 @@ public class RemoteViews implements Parcelable, Filter { final Intent intent = new Intent(); intent.setSourceBounds(rect); startIntentSafely(view.getContext(), pendingIntentTemplate, fillInIntent); startIntentSafely(view, pendingIntentTemplate, fillInIntent); } } }; Loading Loading @@ -479,7 +484,7 @@ public class RemoteViews implements Parcelable, Filter { final Intent intent = new Intent(); intent.setSourceBounds(rect); startIntentSafely(v.getContext(), pendingIntent, intent); startIntentSafely(v, pendingIntent, intent); } }; } Loading core/res/res/anim/activity_close_enter.xml +1 −8 Original line number Diff line number Diff line Loading @@ -20,12 +20,5 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale=".95" android:toXScale="1.0" android:fromYScale=".95" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/accelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file core/res/res/anim/activity_close_exit.xml +5 −5 Original line number Diff line number Diff line Loading @@ -22,11 +22,11 @@ <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale="1.0" android:toXScale="1.1" android:fromYScale="1.0" android:toYScale="1.1" android:duration="300"/> <scale android:fromXScale="1.0" android:toXScale=".8" android:fromYScale="1.0" android:toYScale=".8" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file core/res/res/anim/activity_open_enter.xml +5 −5 Original line number Diff line number Diff line Loading @@ -24,12 +24,12 @@ android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale="1.1" android:toXScale="1.0" android:fromYScale="1.1" android:toYScale="1.0" android:duration="300"/> <scale android:fromXScale=".8" android:toXScale="1.0" android:fromYScale=".8" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file core/res/res/anim/activity_open_exit.xml +2 −9 Original line number Diff line number Diff line Loading @@ -18,15 +18,8 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale="1.0" android:toXScale=".95" android:fromYScale="1.0" android:toYScale=".95" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file Loading
core/java/android/widget/RemoteViews.java +19 −14 Original line number Diff line number Diff line Loading @@ -16,13 +16,7 @@ package android.widget; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; import java.util.ArrayList; import android.app.ActivityOptions; import android.app.PendingIntent; import android.appwidget.AppWidgetHostView; import android.content.Context; Loading @@ -40,13 +34,20 @@ import android.os.Parcelable; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.LayoutInflater.Filter; import android.view.RemotableViewMethod; import android.view.View; import android.view.ViewGroup; import android.view.LayoutInflater.Filter; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AdapterView.OnItemClickListener; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; import java.util.ArrayList; /** * A class that describes a view hierarchy that can be displayed in Loading Loading @@ -140,14 +141,18 @@ public class RemoteViews implements Parcelable, Filter { return; } protected boolean startIntentSafely(Context context, PendingIntent pendingIntent, protected boolean startIntentSafely(View view, PendingIntent pendingIntent, Intent fillInIntent) { try { // TODO: Unregister this handler if PendingIntent.FLAG_ONE_SHOT? Context context = view.getContext(); ActivityOptions opts = ActivityOptions.makeScaleUpAnimation(view, 0, 0, view.getMeasuredWidth(), view.getMeasuredHeight()); context.startIntentSender( pendingIntent.getIntentSender(), fillInIntent, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_NEW_TASK, 0); Intent.FLAG_ACTIVITY_NEW_TASK, 0, opts.toBundle()); } catch (IntentSender.SendIntentException e) { android.util.Log.e(LOG_TAG, "Cannot send pending intent: ", e); return false; Loading Loading @@ -263,7 +268,7 @@ public class RemoteViews implements Parcelable, Filter { rect.bottom = (int) ((pos[1] + v.getHeight()) * appScale + 0.5f); fillInIntent.setSourceBounds(rect); startIntentSafely(v.getContext(), pendingIntent, fillInIntent); startIntentSafely(v, pendingIntent, fillInIntent); } }; Loading Loading @@ -341,7 +346,7 @@ public class RemoteViews implements Parcelable, Filter { final Intent intent = new Intent(); intent.setSourceBounds(rect); startIntentSafely(view.getContext(), pendingIntentTemplate, fillInIntent); startIntentSafely(view, pendingIntentTemplate, fillInIntent); } } }; Loading Loading @@ -479,7 +484,7 @@ public class RemoteViews implements Parcelable, Filter { final Intent intent = new Intent(); intent.setSourceBounds(rect); startIntentSafely(v.getContext(), pendingIntent, intent); startIntentSafely(v, pendingIntent, intent); } }; } Loading
core/res/res/anim/activity_close_enter.xml +1 −8 Original line number Diff line number Diff line Loading @@ -20,12 +20,5 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale=".95" android:toXScale="1.0" android:fromYScale=".95" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/accelerate_quint" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file
core/res/res/anim/activity_close_exit.xml +5 −5 Original line number Diff line number Diff line Loading @@ -22,11 +22,11 @@ <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale="1.0" android:toXScale="1.1" android:fromYScale="1.0" android:toYScale="1.1" android:duration="300"/> <scale android:fromXScale="1.0" android:toXScale=".8" android:fromYScale="1.0" android:toYScale=".8" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file
core/res/res/anim/activity_open_enter.xml +5 −5 Original line number Diff line number Diff line Loading @@ -24,12 +24,12 @@ android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale="1.1" android:toXScale="1.0" android:fromYScale="1.1" android:toYScale="1.0" android:duration="300"/> <scale android:fromXScale=".8" android:toXScale="1.0" android:fromYScale=".8" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:interpolator="@interpolator/decelerate_cubic" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file
core/res/res/anim/activity_open_exit.xml +2 −9 Original line number Diff line number Diff line Loading @@ -18,15 +18,8 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> <scale android:fromXScale="1.0" android:toXScale=".95" android:fromYScale="1.0" android:toYScale=".95" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" android:duration="@android:integer/config_shortAnimTime"/> android:duration="300"/> </set> No newline at end of file