Loading packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java +5 −5 Original line number Diff line number Diff line Loading @@ -123,18 +123,18 @@ public interface BcSmartspaceDataPlugin extends Plugin { /** Interface for launching Intents, which can differ on the lockscreen */ interface IntentStarter { default void startFromAction(SmartspaceAction action, View v) { default void startFromAction(SmartspaceAction action, View v, boolean showOnLockscreen) { if (action.getIntent() != null) { startIntent(v, action.getIntent()); startIntent(v, action.getIntent(), showOnLockscreen); } else if (action.getPendingIntent() != null) { startPendingIntent(action.getPendingIntent()); startPendingIntent(action.getPendingIntent(), showOnLockscreen); } } /** Start the intent */ void startIntent(View v, Intent i); void startIntent(View v, Intent i, boolean showOnLockscreen); /** Start the PendingIntent */ void startPendingIntent(PendingIntent pi); void startPendingIntent(PendingIntent pi, boolean showOnLockscreen); } } packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +20 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.view.View import android.view.ViewGroup import com.android.settingslib.Utils import com.android.systemui.R import com.android.systemui.animation.ActivityLaunchAnimator import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.plugins.ActivityStarter Loading Loading @@ -188,14 +189,29 @@ class LockscreenSmartspaceController @Inject constructor( val ssView = plugin.getView(parent) ssView.registerDataProvider(plugin) val animationController = ActivityLaunchAnimator.Controller.fromView( ssView as View, null /* cujType */ ) ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter { override fun startIntent(v: View?, i: Intent?) { activityStarter.startActivity(i, true /* dismissShade */) override fun startIntent(v: View?, i: Intent?, showOnLockscreen: Boolean) { activityStarter.startActivity( i, true, /* dismissShade */ animationController, showOnLockscreen ) } override fun startPendingIntent(pi: PendingIntent?) { override fun startPendingIntent(pi: PendingIntent?, showOnLockscreen: Boolean) { if (showOnLockscreen) { pi?.send() } else { activityStarter.startPendingIntentDismissingKeyguard(pi) } } }) ssView.setFalsingManager(falsingManager) return (ssView as View).apply { addOnAttachStateChangeListener(stateChangeListener) } Loading Loading
packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java +5 −5 Original line number Diff line number Diff line Loading @@ -123,18 +123,18 @@ public interface BcSmartspaceDataPlugin extends Plugin { /** Interface for launching Intents, which can differ on the lockscreen */ interface IntentStarter { default void startFromAction(SmartspaceAction action, View v) { default void startFromAction(SmartspaceAction action, View v, boolean showOnLockscreen) { if (action.getIntent() != null) { startIntent(v, action.getIntent()); startIntent(v, action.getIntent(), showOnLockscreen); } else if (action.getPendingIntent() != null) { startPendingIntent(action.getPendingIntent()); startPendingIntent(action.getPendingIntent(), showOnLockscreen); } } /** Start the intent */ void startIntent(View v, Intent i); void startIntent(View v, Intent i, boolean showOnLockscreen); /** Start the PendingIntent */ void startPendingIntent(PendingIntent pi); void startPendingIntent(PendingIntent pi, boolean showOnLockscreen); } }
packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +20 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.view.View import android.view.ViewGroup import com.android.settingslib.Utils import com.android.systemui.R import com.android.systemui.animation.ActivityLaunchAnimator import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.plugins.ActivityStarter Loading Loading @@ -188,14 +189,29 @@ class LockscreenSmartspaceController @Inject constructor( val ssView = plugin.getView(parent) ssView.registerDataProvider(plugin) val animationController = ActivityLaunchAnimator.Controller.fromView( ssView as View, null /* cujType */ ) ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter { override fun startIntent(v: View?, i: Intent?) { activityStarter.startActivity(i, true /* dismissShade */) override fun startIntent(v: View?, i: Intent?, showOnLockscreen: Boolean) { activityStarter.startActivity( i, true, /* dismissShade */ animationController, showOnLockscreen ) } override fun startPendingIntent(pi: PendingIntent?) { override fun startPendingIntent(pi: PendingIntent?, showOnLockscreen: Boolean) { if (showOnLockscreen) { pi?.send() } else { activityStarter.startPendingIntentDismissingKeyguard(pi) } } }) ssView.setFalsingManager(falsingManager) return (ssView as View).apply { addOnAttachStateChangeListener(stateChangeListener) } Loading