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

Commit ae7b44eb authored by Dave Mankoff's avatar Dave Mankoff Committed by Android (Google) Code Review
Browse files

Merge "Remove #createScreenshotNotificationSmartActionsProvider from SystemUIFactory"

parents 569927d6 c5b5b503
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -28,14 +28,12 @@ import com.android.systemui.dagger.DaggerGlobalRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.SysUIComponent;
import com.android.systemui.dagger.SysUIComponent;
import com.android.systemui.dagger.WMComponent;
import com.android.systemui.dagger.WMComponent;
import com.android.systemui.screenshot.ScreenshotNotificationSmartActionsProvider;
import com.android.wm.shell.dagger.WMShellConcurrencyModule;
import com.android.wm.shell.dagger.WMShellConcurrencyModule;
import com.android.wm.shell.transition.ShellTransitions;
import com.android.wm.shell.transition.ShellTransitions;


import java.util.Map;
import java.util.Map;
import java.util.Optional;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;


import javax.inject.Provider;
import javax.inject.Provider;


@@ -239,14 +237,4 @@ public class SystemUIFactory {
    public Map<Class<?>, Provider<CoreStartable>> getStartableComponentsPerUser() {
    public Map<Class<?>, Provider<CoreStartable>> getStartableComponentsPerUser() {
        return mSysUIComponent.getPerUserStartables();
        return mSysUIComponent.getPerUserStartables();
    }
    }

    /**
     * Creates an instance of ScreenshotNotificationSmartActionsProvider.
     * This method is overridden in vendor specific implementation of Sys UI.
     */
    public ScreenshotNotificationSmartActionsProvider
                createScreenshotNotificationSmartActionsProvider(
                        Context context, Executor executor, Handler uiHandler) {
        return new ScreenshotNotificationSmartActionsProvider();
    }
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@ import com.android.systemui.qs.dagger.QSModule;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsImplementation;
import com.android.systemui.recents.RecentsImplementation;
import com.android.systemui.screenshot.ReferenceScreenshotModule;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl;
import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl;
@@ -99,6 +100,7 @@ import dagger.Provides;
        MediaModule.class,
        MediaModule.class,
        PowerModule.class,
        PowerModule.class,
        QSModule.class,
        QSModule.class,
        ReferenceScreenshotModule.class,
        StartCentralSurfacesModule.class,
        StartCentralSurfacesModule.class,
        VolumeModule.class
        VolumeModule.class
})
})
+1 −1
Original line number Original line Diff line number Diff line
@@ -102,7 +102,7 @@ public class ActionProxyReceiver extends BroadcastReceiver {
                    ? ACTION_TYPE_EDIT
                    ? ACTION_TYPE_EDIT
                    : ACTION_TYPE_SHARE;
                    : ACTION_TYPE_SHARE;
            mScreenshotSmartActions.notifyScreenshotAction(
            mScreenshotSmartActions.notifyScreenshotAction(
                    context, intent.getStringExtra(EXTRA_ID), actionType, false, null);
                    intent.getStringExtra(EXTRA_ID), actionType, false, null);
        }
        }
    }
    }
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -62,7 +62,7 @@ public class DeleteScreenshotReceiver extends BroadcastReceiver {
        });
        });
        if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
        if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
            mScreenshotSmartActions.notifyScreenshotAction(
            mScreenshotSmartActions.notifyScreenshotAction(
                    context, intent.getStringExtra(EXTRA_ID), ACTION_TYPE_DELETE, false, null);
                    intent.getStringExtra(EXTRA_ID), ACTION_TYPE_DELETE, false, null);
        }
        }
    }
    }
}
}
+32 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2022 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.screenshot;

import dagger.Module;
import dagger.Provides;

/**
 *
 */
@Module
public interface ReferenceScreenshotModule {
    /** */
    @Provides
    static ScreenshotNotificationSmartActionsProvider providesScrnshtNotifSmartActionsProvider() {
        return new ScreenshotNotificationSmartActionsProvider();
    }
}
Loading