Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7312406 authored by Michał Brzeziński's avatar Michał Brzeziński Committed by Android (Google) Code Review
Browse files

Merge "Extracting classes from touchpad package and introducing activity for OOBE" into main

parents d5846c23 a2737b13
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -479,6 +479,15 @@
            android:noHistory="true" />

        <activity android:name=".touchpad.tutorial.ui.view.TouchpadTutorialActivity"
            android:exported="true"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action android:name="com.android.systemui.action.TOUCHPAD_TUTORIAL"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

        <activity android:name=".inputdevice.tutorial.ui.view.KeyboardTouchpadTutorialActivity"
            android:exported="true"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
+4 −2
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import com.android.systemui.display.ui.viewmodel.ConnectingDisplayViewModel;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dock.DockManagerImpl;
import com.android.systemui.doze.DozeHost;
import com.android.systemui.inputdevice.tutorial.KeyboardTouchpadTutorialModule;
import com.android.systemui.keyboard.shortcut.ShortcutHelperModule;
import com.android.systemui.keyguard.ui.composable.blueprint.DefaultBlueprintModule;
import com.android.systemui.keyguard.ui.view.layout.blueprints.KeyguardBlueprintModule;
@@ -77,7 +78,7 @@ import com.android.systemui.statusbar.policy.IndividualSensorPrivacyControllerIm
import com.android.systemui.statusbar.policy.SensorPrivacyController;
import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl;
import com.android.systemui.toast.ToastModule;
import com.android.systemui.touchpad.tutorial.TouchpadKeyboardTutorialModule;
import com.android.systemui.touchpad.tutorial.TouchpadTutorialModule;
import com.android.systemui.unfold.SysUIUnfoldStartableModule;
import com.android.systemui.unfold.UnfoldTransitionModule;
import com.android.systemui.util.kotlin.SysUICoroutinesModule;
@@ -122,6 +123,7 @@ import javax.inject.Named;
        KeyboardShortcutsModule.class,
        KeyguardBlueprintModule.class,
        KeyguardSectionsModule.class,
        KeyboardTouchpadTutorialModule.class,
        MediaModule.class,
        MediaMuteAwaitConnectionCli.StartableModule.class,
        MultiUserUtilsModule.class,
@@ -142,7 +144,7 @@ import javax.inject.Named;
        SysUIUnfoldStartableModule.class,
        UnfoldTransitionModule.Startables.class,
        ToastModule.class,
        TouchpadKeyboardTutorialModule.class,
        TouchpadTutorialModule.class,
        VolumeModule.class,
        WallpaperModule.class,
        ShortcutHelperModule.class,
+0 −7
Original line number Diff line number Diff line
@@ -256,13 +256,6 @@ abstract class SystemUICoreStartableModule {
    @ClassKey(StylusUsiPowerStartable::class)
    abstract fun bindStylusUsiPowerStartable(sysui: StylusUsiPowerStartable): CoreStartable

    @Binds
    @IntoMap
    @ClassKey(KeyboardTouchpadTutorialCoreStartable::class)
    abstract fun bindKeyboardTouchpadTutorialCoreStartable(
        listener: KeyboardTouchpadTutorialCoreStartable
    ): CoreStartable

    @Binds
    @IntoMap
    @ClassKey(PhysicalKeyboardCoreStartable::class)
+50 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.inputdevice.tutorial

import android.app.Activity
import com.android.systemui.CoreStartable
import com.android.systemui.inputdevice.tutorial.ui.view.KeyboardTouchpadTutorialActivity
import com.android.systemui.touchpad.tutorial.domain.interactor.TouchpadGesturesInteractor
import dagger.Binds
import dagger.BindsOptionalOf
import dagger.Module
import dagger.multibindings.ClassKey
import dagger.multibindings.IntoMap

@Module
interface KeyboardTouchpadTutorialModule {

    @Binds
    @IntoMap
    @ClassKey(KeyboardTouchpadTutorialCoreStartable::class)
    fun bindKeyboardTouchpadTutorialCoreStartable(
        listener: KeyboardTouchpadTutorialCoreStartable
    ): CoreStartable

    @Binds
    @IntoMap
    @ClassKey(KeyboardTouchpadTutorialActivity::class)
    fun activity(impl: KeyboardTouchpadTutorialActivity): Activity

    // TouchpadModule dependencies below
    // all should be optional to not introduce touchpad dependency in all sysui variants

    @BindsOptionalOf fun touchpadScreensProvider(): TouchpadTutorialScreensProvider

    @BindsOptionalOf fun touchpadGesturesInteractor(): TouchpadGesturesInteractor
}
+6 −13
Original line number Diff line number Diff line
@@ -14,20 +14,13 @@
 * limitations under the License.
 */

package com.android.systemui.touchpad.tutorial
package com.android.systemui.inputdevice.tutorial

import android.app.Activity
import com.android.systemui.touchpad.tutorial.ui.view.TouchpadTutorialActivity
import dagger.Binds
import dagger.Module
import dagger.multibindings.ClassKey
import dagger.multibindings.IntoMap
import androidx.compose.runtime.Composable

@Module
interface TouchpadKeyboardTutorialModule {
interface TouchpadTutorialScreensProvider {

    @Binds
    @IntoMap
    @ClassKey(TouchpadTutorialActivity::class)
    fun activity(impl: TouchpadTutorialActivity): Activity
    @Composable fun BackGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit)

    @Composable fun HomeGesture(onDoneButtonClicked: () -> Unit, onBack: () -> Unit)
}
Loading