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

Commit 01808e09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "b136279712-daggerize-falsingmanager"

* changes:
  Allow Services to be created through Dagger.
  Pass FalsingManager down through more classes.
parents 8413b675 2ea5a832
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -26,8 +26,8 @@ android_app {
    ],
    ],


    static_libs: [
    static_libs: [
        "CarNotificationLib",
        "SystemUI-core",
        "SystemUI-core",
        "CarNotificationLib",
        "SystemUIPluginLib",
        "SystemUIPluginLib",
        "SystemUISharedLib",
        "SystemUISharedLib",
        "SettingsLib",
        "SettingsLib",
+2 −2
Original line number Original line Diff line number Diff line
@@ -61,9 +61,9 @@ import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.R;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.classifier.FalsingLog;
import com.android.systemui.classifier.FalsingLog;
import com.android.systemui.classifier.FalsingManagerFactory;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.keyguard.ScreenLifecycle;
import com.android.systemui.keyguard.ScreenLifecycle;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.qs.car.CarQSFragment;
import com.android.systemui.qs.car.CarQSFragment;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -877,7 +877,7 @@ public class CarStatusBar extends StatusBar implements
            KeyguardUpdateMonitor.getInstance(mContext).dump(fd, pw, args);
            KeyguardUpdateMonitor.getInstance(mContext).dump(fd, pw, args);
        }
        }


        FalsingManagerFactory.getInstance(mContext).dump(pw);
        Dependency.get(FalsingManager.class).dump(pw);
        FalsingLog.dump(pw);
        FalsingLog.dump(pw);


        pw.println("SharedPreferences:");
        pw.println("SharedPreferences:");
+3 −1
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        package="com.android.systemui"
        package="com.android.systemui"
        android:sharedUserId="android.uid.systemui"
        android:sharedUserId="android.uid.systemui"
        xmlns:tools="http://schemas.android.com/tools"
        coreApp="true">
        coreApp="true">


    <!-- Using OpenGL ES 2.0 -->
    <!-- Using OpenGL ES 2.0 -->
@@ -259,7 +260,8 @@
        android:theme="@style/Theme.SystemUI"
        android:theme="@style/Theme.SystemUI"
        android:defaultToDeviceProtectedStorage="true"
        android:defaultToDeviceProtectedStorage="true"
        android:directBootAware="true"
        android:directBootAware="true"
        android:appComponentFactory="androidx.core.app.CoreComponentFactory">
        tools:replace="android:appComponentFactory"
        android:appComponentFactory=".SystemUIAppComponentFactory">
        <!-- Keep theme in sync with SystemUIApplication.onCreate().
        <!-- Keep theme in sync with SystemUIApplication.onCreate().
             Setting the theme on the application does not affect views inflated by services.
             Setting the theme on the application does not affect views inflated by services.
             The application theme is set again from onCreate to take effect for those views. -->
             The application theme is set again from onCreate to take effect for those views. -->
+8 −1
Original line number Original line Diff line number Diff line
@@ -53,7 +53,7 @@ variants (like other form factors e.g. Car).
### Adding injection to a new SystemUI object
### Adding injection to a new SystemUI object


Anything that depends on any `@Singleton` provider from SystemUIRootComponent
Anything that depends on any `@Singleton` provider from SystemUIRootComponent
should be declared as an `@Subcomponent` of the root component, this requires
should be declared as a `@Subcomponent` of the root component. This requires
declaring your own interface for generating your own modules or just the
declaring your own interface for generating your own modules or just the
object you need injected. The subcomponent also needs to be added to
object you need injected. The subcomponent also needs to be added to
SystemUIRootComponent in SystemUIFactory so it can be acquired.
SystemUIRootComponent in SystemUIFactory so it can be acquired.
@@ -204,6 +204,13 @@ public CustomView(@Named(VIEW_CONTEXT) Context themedViewContext, AttributeSet a
}
}
```
```


## Updating Dagger2

Binaries can be downloaded from https://repo1.maven.org/maven2/com/google/dagger/ and then loaded
into
[/prebuilts/tools/common/m2/repository/com/google/dagger/](http://cs/android/prebuilts/tools/common/m2/repository/com/google/dagger/)


## TODO List
## TODO List


 - Eliminate usages of Dependency#get
 - Eliminate usages of Dependency#get
+7 −4
Original line number Original line Diff line number Diff line
@@ -41,8 +41,10 @@ import android.widget.ScrollView;


import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.Dependency;
import com.android.systemui.Interpolators;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.R;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivity;
import com.android.systemui.recents.RecentsActivity;
import com.android.systemui.recents.RecentsActivityLaunchState;
import com.android.systemui.recents.RecentsActivityLaunchState;
@@ -86,15 +88,15 @@ import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent;
import com.android.systemui.recents.misc.DozeTrigger;
import com.android.systemui.recents.misc.DozeTrigger;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.utilities.AnimationProps;
import com.android.systemui.recents.utilities.AnimationProps;
import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.grid.GridTaskView;
import com.android.systemui.recents.views.grid.GridTaskView;
import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm;
import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm;
import com.android.systemui.recents.views.grid.TaskViewFocusFrame;
import com.android.systemui.recents.views.grid.TaskViewFocusFrame;

import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.ActivityManagerWrapper;

import java.io.PrintWriter;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.RetentionPolicy;
@@ -256,7 +258,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
        mLayoutAlgorithm = new TaskStackLayoutAlgorithm(context, this);
        mLayoutAlgorithm = new TaskStackLayoutAlgorithm(context, this);
        mStableLayoutAlgorithm = new TaskStackLayoutAlgorithm(context, null);
        mStableLayoutAlgorithm = new TaskStackLayoutAlgorithm(context, null);
        mStackScroller = new TaskStackViewScroller(context, this, mLayoutAlgorithm);
        mStackScroller = new TaskStackViewScroller(context, this, mLayoutAlgorithm);
        mTouchHandler = new TaskStackViewTouchHandler(context, this, mStackScroller);
        mTouchHandler = new TaskStackViewTouchHandler(
                context, this, mStackScroller, Dependency.get(FalsingManager.class));
        mAnimationHelper = new TaskStackAnimationHelper(context, this);
        mAnimationHelper = new TaskStackAnimationHelper(context, this);
        mTaskCornerRadiusPx = LegacyRecentsImpl.getConfiguration().isGridEnabled ?
        mTaskCornerRadiusPx = LegacyRecentsImpl.getConfiguration().isGridEnabled ?
                res.getDimensionPixelSize(R.dimen.recents_grid_task_view_rounded_corners_radius) :
                res.getDimensionPixelSize(R.dimen.recents_grid_task_view_rounded_corners_radius) :
Loading