Loading quickstep/src/com/android/quickstep/dagger/QuickstepBaseAppComponent.java +0 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import com.android.launcher3.dagger.LauncherAppComponent; import com.android.launcher3.dagger.LauncherBaseAppComponent; import com.android.launcher3.model.WellbeingModel; import com.android.quickstep.util.AsyncClockEventDelegate; import com.android.quickstep.util.ContextualSearchHapticManager; /** * Launcher Quickstep base component for Dagger injection. Loading @@ -35,6 +34,4 @@ public interface QuickstepBaseAppComponent extends LauncherBaseAppComponent { WellbeingModel getWellbeingModel(); AsyncClockEventDelegate getAsyncClockEventDelegate(); ContextualSearchHapticManager getContextualSearchHapticManager(); } quickstep/src/com/android/quickstep/inputconsumers/NavHandleLongPressHandler.java +1 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import android.view.ViewConfiguration; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.android.launcher3.LauncherApplication; import com.android.launcher3.R; import com.android.launcher3.logging.InstanceId; import com.android.launcher3.logging.InstanceIdSequence; Loading Loading @@ -62,8 +61,7 @@ public class NavHandleLongPressHandler implements ResourceBasedOverride { mContext = context; mStatsLogManager = StatsLogManager.newInstance(context); mVibratorWrapper = VibratorWrapper.INSTANCE.get(mContext); mContextualSearchHapticManager = ((LauncherApplication) context.getApplicationContext()) .getAppComponent().getContextualSearchHapticManager(); mContextualSearchHapticManager = ContextualSearchHapticManager.INSTANCE.get(context); mContextualSearchInvoker = ContextualSearchInvoker.newInstance(mContext); } Loading quickstep/src/com/android/quickstep/util/ContextualSearchHapticManager.kt +9 −5 Original line number Diff line number Diff line Loading @@ -21,17 +21,15 @@ import android.os.VibrationEffect import android.os.VibrationEffect.Composition import android.os.Vibrator import com.android.launcher3.dagger.ApplicationContext import com.android.launcher3.dagger.LauncherAppSingleton import com.android.launcher3.util.MainThreadInitializedObject import com.android.launcher3.util.SafeCloseable import com.android.launcher3.util.VibratorWrapper import com.android.quickstep.DeviceConfigWrapper.Companion.get import javax.inject.Inject import kotlin.math.pow /** Manages haptics relating to Contextual Search invocations. */ @LauncherAppSingleton class ContextualSearchHapticManager @Inject internal constructor(@ApplicationContext private val context: Context) { internal constructor(@ApplicationContext private val context: Context) : SafeCloseable { private var searchEffect = createSearchEffect() private var contextualSearchStateManager = ContextualSearchStateManager.INSTANCE[context] Loading Loading @@ -98,4 +96,10 @@ internal constructor(@ApplicationContext private val context: Context) { VibratorWrapper.INSTANCE[context].vibrate(composition.compose()) } } override fun close() {} companion object { @JvmField val INSTANCE = MainThreadInitializedObject { ContextualSearchHapticManager(it) } } } quickstep/src/com/android/quickstep/util/ContextualSearchInvoker.kt +1 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.app.contextualsearch.ContextualSearchManager.FEATURE_CONTEXTUAL_S import android.content.Context import android.util.Log import com.android.internal.app.AssistUtils import com.android.launcher3.LauncherApplication import com.android.launcher3.R import com.android.launcher3.logging.StatsLogManager import com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_LAUNCH_ASSISTANT_FAILED_SERVICE_ERROR Loading Loading @@ -57,9 +56,7 @@ internal constructor( TopTaskTracker.INSTANCE[context], SystemUiProxy.INSTANCE[context], StatsLogManager.newInstance(context), (context.applicationContext as LauncherApplication) .appComponent .contextualSearchHapticManager, ContextualSearchHapticManager.INSTANCE[context], context.getSystemService(ContextualSearchManager::class.java), ) Loading Loading
quickstep/src/com/android/quickstep/dagger/QuickstepBaseAppComponent.java +0 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import com.android.launcher3.dagger.LauncherAppComponent; import com.android.launcher3.dagger.LauncherBaseAppComponent; import com.android.launcher3.model.WellbeingModel; import com.android.quickstep.util.AsyncClockEventDelegate; import com.android.quickstep.util.ContextualSearchHapticManager; /** * Launcher Quickstep base component for Dagger injection. Loading @@ -35,6 +34,4 @@ public interface QuickstepBaseAppComponent extends LauncherBaseAppComponent { WellbeingModel getWellbeingModel(); AsyncClockEventDelegate getAsyncClockEventDelegate(); ContextualSearchHapticManager getContextualSearchHapticManager(); }
quickstep/src/com/android/quickstep/inputconsumers/NavHandleLongPressHandler.java +1 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import android.view.ViewConfiguration; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.android.launcher3.LauncherApplication; import com.android.launcher3.R; import com.android.launcher3.logging.InstanceId; import com.android.launcher3.logging.InstanceIdSequence; Loading Loading @@ -62,8 +61,7 @@ public class NavHandleLongPressHandler implements ResourceBasedOverride { mContext = context; mStatsLogManager = StatsLogManager.newInstance(context); mVibratorWrapper = VibratorWrapper.INSTANCE.get(mContext); mContextualSearchHapticManager = ((LauncherApplication) context.getApplicationContext()) .getAppComponent().getContextualSearchHapticManager(); mContextualSearchHapticManager = ContextualSearchHapticManager.INSTANCE.get(context); mContextualSearchInvoker = ContextualSearchInvoker.newInstance(mContext); } Loading
quickstep/src/com/android/quickstep/util/ContextualSearchHapticManager.kt +9 −5 Original line number Diff line number Diff line Loading @@ -21,17 +21,15 @@ import android.os.VibrationEffect import android.os.VibrationEffect.Composition import android.os.Vibrator import com.android.launcher3.dagger.ApplicationContext import com.android.launcher3.dagger.LauncherAppSingleton import com.android.launcher3.util.MainThreadInitializedObject import com.android.launcher3.util.SafeCloseable import com.android.launcher3.util.VibratorWrapper import com.android.quickstep.DeviceConfigWrapper.Companion.get import javax.inject.Inject import kotlin.math.pow /** Manages haptics relating to Contextual Search invocations. */ @LauncherAppSingleton class ContextualSearchHapticManager @Inject internal constructor(@ApplicationContext private val context: Context) { internal constructor(@ApplicationContext private val context: Context) : SafeCloseable { private var searchEffect = createSearchEffect() private var contextualSearchStateManager = ContextualSearchStateManager.INSTANCE[context] Loading Loading @@ -98,4 +96,10 @@ internal constructor(@ApplicationContext private val context: Context) { VibratorWrapper.INSTANCE[context].vibrate(composition.compose()) } } override fun close() {} companion object { @JvmField val INSTANCE = MainThreadInitializedObject { ContextualSearchHapticManager(it) } } }
quickstep/src/com/android/quickstep/util/ContextualSearchInvoker.kt +1 −4 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.app.contextualsearch.ContextualSearchManager.FEATURE_CONTEXTUAL_S import android.content.Context import android.util.Log import com.android.internal.app.AssistUtils import com.android.launcher3.LauncherApplication import com.android.launcher3.R import com.android.launcher3.logging.StatsLogManager import com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_LAUNCH_ASSISTANT_FAILED_SERVICE_ERROR Loading Loading @@ -57,9 +56,7 @@ internal constructor( TopTaskTracker.INSTANCE[context], SystemUiProxy.INSTANCE[context], StatsLogManager.newInstance(context), (context.applicationContext as LauncherApplication) .appComponent .contextualSearchHapticManager, ContextualSearchHapticManager.INSTANCE[context], context.getSystemService(ContextualSearchManager::class.java), ) Loading