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

Commit f2a58002 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Annotate remaining shade and notification classes

This fixes all lint baseline errors for classes not defining the scope of their display related classes

StatusBarLongPressGestureDetector is currently not display aware: a todo for it has been added.

Bug: 362719719
Bug: 374267505
Bug: 383125226
Test: presubmits
Flag: com.android.systemui.shade_window_goes_around
Change-Id: Ib6f84d1597ec434607fb9c6f0892ce7651a5ab05
parent d680fe76
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -21,13 +21,18 @@ import android.view.GestureDetector
import android.view.GestureDetector.SimpleOnGestureListener
import android.view.MotionEvent
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import javax.inject.Inject

/** Accepts touch events, detects long press, and calls ShadeViewController#onStatusBarLongPress. */
@SysUISingleton
class StatusBarLongPressGestureDetector
@Inject
constructor(context: Context, val shadeViewController: ShadeViewController) {
constructor(
    // TODO b/383125226 - Make this class per-display
    @Main context: Context,
    val shadeViewController: ShadeViewController,
) {
    val gestureDetector =
        GestureDetector(
            context,
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ public class HeadsUpManagerImpl

    @Inject
    public HeadsUpManagerImpl(
            @NonNull final Context context,
            @NonNull @ShadeDisplayAware final Context context,
            HeadsUpManagerLogger logger,
            StatusBarStateController statusBarStateController,
            KeyguardBypassController bypassController,
+2 −1
Original line number Diff line number Diff line
@@ -18,13 +18,14 @@ package com.android.systemui.statusbar.notification.icon

import android.app.Notification
import android.content.Context
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.statusbar.StatusBarIconView
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.contentDescForNotification
import javax.inject.Inject

/** Testable wrapper around Context. */
class IconBuilder @Inject constructor(private val context: Context) {
class IconBuilder @Inject constructor(@Main private val context: Context) {
    @JvmOverloads
    fun createIconView(
        entry: NotificationEntry,
+2 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.widget.TextView
import com.android.internal.annotations.VisibleForTesting
import com.android.systemui.res.R
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject

private const val TAG = "ChannelDialogController"
@@ -58,11 +59,10 @@ private const val TAG = "ChannelDialogController"
 */
@SysUISingleton
class ChannelEditorDialogController @Inject constructor(
    c: Context,
    @ShadeDisplayAware private val context: Context,
    private val noMan: INotificationManager,
    private val dialogBuilder: ChannelEditorDialog.Builder
) {
    val context: Context = c.applicationContext

    private var prepared = false
    private lateinit var dialog: ChannelEditorDialog