Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/ActivityStarter.java +4 −3 Original line number Diff line number Diff line Loading @@ -32,10 +32,11 @@ public interface ActivityStarter { void startPendingIntentDismissingKeyguard(PendingIntent intent); /** * Similar to {@link #startPendingIntentDismissingKeyguard(PendingIntent, Runnable)}, but * allow you to specify the callback that is executed after the intent is sent. * Similar to {@link #startPendingIntentDismissingKeyguard(PendingIntent, Runnable)}, but allows * you to specify the callback that is executed on the UI thread after the intent is sent. */ void startPendingIntentDismissingKeyguard(PendingIntent intent, Runnable intentSentCallback); void startPendingIntentDismissingKeyguard(PendingIntent intent, Runnable intentSentUiThreadCallback); void startActivity(Intent intent, boolean dismissShade); void startActivity(Intent intent, boolean onlyProvisioned, boolean dismissShade); void startActivity(Intent intent, boolean dismissShade, Callback callback); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +9 −3 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; Loading Loading @@ -572,6 +573,7 @@ public class StatusBar extends SystemUI implements DemoMode, mEntryManager.updateNotifications(); } }; private final Handler mMainThreadHandler = new Handler(Looper.getMainLooper()); private HeadsUpAppearanceController mHeadsUpAppearanceController; private boolean mVibrateOnOpening; Loading Loading @@ -4261,7 +4263,7 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void startPendingIntentDismissingKeyguard( final PendingIntent intent, @Nullable final Runnable intentSentCallback) { final PendingIntent intent, @Nullable final Runnable intentSentUiThreadCallback) { final boolean afterKeyguardGone = intent.isActivity() && PreviewInflater.wouldLaunchResolverActivity(mContext, intent.getIntent(), mLockscreenUserManager.getCurrentUserId()); Loading @@ -4280,12 +4282,16 @@ public class StatusBar extends SystemUI implements DemoMode, if (intent.isActivity()) { mAssistManager.hideAssist(); } if (intentSentCallback != null) { intentSentCallback.run(); if (intentSentUiThreadCallback != null) { postOnUiThread(intentSentUiThreadCallback); } }, afterKeyguardGone); } private void postOnUiThread(Runnable runnable) { mMainThreadHandler.post(runnable); } public static Bundle getActivityOptions(@Nullable RemoteAnimationAdapter animationAdapter) { ActivityOptions options; if (animationAdapter != null) { Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java +1 −9 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.RippleDrawable; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.text.Layout; import android.text.TextPaint; import android.text.method.TransformationMethod; Loading Loading @@ -65,7 +63,6 @@ public class SmartReplyView extends ViewGroup { private final SmartReplyConstants mConstants; private final KeyguardDismissUtil mKeyguardDismissUtil; private final NotificationRemoteInputManager mRemoteInputManager; private final Handler mMainThreadHandler = new Handler(Looper.getMainLooper()); /** * The upper bound for the height of this view in pixels. Notifications are automatically Loading Loading @@ -311,8 +308,7 @@ public class SmartReplyView extends ViewGroup { () -> { smartReplyController.smartActionClicked( entry, actionIndex, action, smartActions.fromAssistant); postOnUiThread(() -> headsUpManager.removeNotification(entry.key, true)); headsUpManager.removeNotification(entry.key, true); })); // TODO(b/119010281): handle accessibility Loading @@ -323,10 +319,6 @@ public class SmartReplyView extends ViewGroup { return button; } private void postOnUiThread(Runnable runnable) { mMainThreadHandler.post(runnable); } @Override public LayoutParams generateLayoutParams(AttributeSet attrs) { return new LayoutParams(mContext, attrs); Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/ActivityStarter.java +4 −3 Original line number Diff line number Diff line Loading @@ -32,10 +32,11 @@ public interface ActivityStarter { void startPendingIntentDismissingKeyguard(PendingIntent intent); /** * Similar to {@link #startPendingIntentDismissingKeyguard(PendingIntent, Runnable)}, but * allow you to specify the callback that is executed after the intent is sent. * Similar to {@link #startPendingIntentDismissingKeyguard(PendingIntent, Runnable)}, but allows * you to specify the callback that is executed on the UI thread after the intent is sent. */ void startPendingIntentDismissingKeyguard(PendingIntent intent, Runnable intentSentCallback); void startPendingIntentDismissingKeyguard(PendingIntent intent, Runnable intentSentUiThreadCallback); void startActivity(Intent intent, boolean dismissShade); void startActivity(Intent intent, boolean onlyProvisioned, boolean dismissShade); void startActivity(Intent intent, boolean dismissShade, Callback callback); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +9 −3 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; Loading Loading @@ -572,6 +573,7 @@ public class StatusBar extends SystemUI implements DemoMode, mEntryManager.updateNotifications(); } }; private final Handler mMainThreadHandler = new Handler(Looper.getMainLooper()); private HeadsUpAppearanceController mHeadsUpAppearanceController; private boolean mVibrateOnOpening; Loading Loading @@ -4261,7 +4263,7 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void startPendingIntentDismissingKeyguard( final PendingIntent intent, @Nullable final Runnable intentSentCallback) { final PendingIntent intent, @Nullable final Runnable intentSentUiThreadCallback) { final boolean afterKeyguardGone = intent.isActivity() && PreviewInflater.wouldLaunchResolverActivity(mContext, intent.getIntent(), mLockscreenUserManager.getCurrentUserId()); Loading @@ -4280,12 +4282,16 @@ public class StatusBar extends SystemUI implements DemoMode, if (intent.isActivity()) { mAssistManager.hideAssist(); } if (intentSentCallback != null) { intentSentCallback.run(); if (intentSentUiThreadCallback != null) { postOnUiThread(intentSentUiThreadCallback); } }, afterKeyguardGone); } private void postOnUiThread(Runnable runnable) { mMainThreadHandler.post(runnable); } public static Bundle getActivityOptions(@Nullable RemoteAnimationAdapter animationAdapter) { ActivityOptions options; if (animationAdapter != null) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java +1 −9 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.RippleDrawable; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.text.Layout; import android.text.TextPaint; import android.text.method.TransformationMethod; Loading Loading @@ -65,7 +63,6 @@ public class SmartReplyView extends ViewGroup { private final SmartReplyConstants mConstants; private final KeyguardDismissUtil mKeyguardDismissUtil; private final NotificationRemoteInputManager mRemoteInputManager; private final Handler mMainThreadHandler = new Handler(Looper.getMainLooper()); /** * The upper bound for the height of this view in pixels. Notifications are automatically Loading Loading @@ -311,8 +308,7 @@ public class SmartReplyView extends ViewGroup { () -> { smartReplyController.smartActionClicked( entry, actionIndex, action, smartActions.fromAssistant); postOnUiThread(() -> headsUpManager.removeNotification(entry.key, true)); headsUpManager.removeNotification(entry.key, true); })); // TODO(b/119010281): handle accessibility Loading @@ -323,10 +319,6 @@ public class SmartReplyView extends ViewGroup { return button; } private void postOnUiThread(Runnable runnable) { mMainThreadHandler.post(runnable); } @Override public LayoutParams generateLayoutParams(AttributeSet attrs) { return new LayoutParams(mContext, attrs); Loading