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

Commit 4e30df7d authored by Dave Mankoff's avatar Dave Mankoff
Browse files

Mkae SysUIPlugins its own gradle target.

Breaks the dependency of SystemUIPlugins on ThresholdSensor
by introducing an intermediate interface.

Fixes: 186781915
Test: manual
Change-Id: Ib2633f8f2acaa1d21f1e8968317b4a4e63d3af32
parent 9693ec26
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -50,13 +50,6 @@ java_library {
    srcs: ["src/com/android/systemui/EventLogTags.logtags"],
}

java_library {
    name: "SystemUI-sensors",
    srcs: [
        "src/com/android/systemui/util/sensors/ThresholdSensor.java",
    ],
}

android_library {
    name: "SystemUI-core",
    srcs: [
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ android_library {

    static_libs: [
        "PluginCoreLib",
        "SystemUI-sensors",
    ],

    manifest: "AndroidManifest.xml",
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ java_library {
    static_libs: [
        "androidx.annotation_annotation",
        "PluginCoreLib",
        "SystemUI-sensors",
        "SystemUIAnimationLib",
    ],

+10 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.net.Uri;
import android.view.MotionEvent;

import com.android.systemui.plugins.annotations.ProvidesInterface;
import com.android.systemui.util.sensors.ThresholdSensor;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -118,7 +117,7 @@ public interface FalsingManager {
    void cleanup();

    /** Call to report a ProximityEvent to the FalsingManager. */
    void onProximityEvent(ThresholdSensor.ThresholdSensorEvent proximityEvent);
    void onProximityEvent(ProximityEvent proximityEvent);

    /** Adds a {@link FalsingBeliefListener}. */
    void addFalsingBeliefListener(FalsingBeliefListener listener);
@@ -141,4 +140,13 @@ public interface FalsingManager {
    interface FalsingTapListener {
        void onDoubleTapRequired();
    }

    /** Passed to {@link FalsingManager#onProximityEvent}. */
    interface ProximityEvent {
        /** Returns true when the proximity sensor was covered. */
        boolean getCovered();

        /** Returns when the proximity sensor was covered in nanoseconds. */
        long getTimestampNs();
    }
}
+1 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import com.android.systemui.dagger.qualifiers.TestHarness;
import com.android.systemui.dock.DockManager;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.util.sensors.ThresholdSensor;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -317,7 +316,7 @@ public class BrightLineFalsingManager implements FalsingManager {
    }

    @Override
    public void onProximityEvent(ThresholdSensor.ThresholdSensorEvent proximityEvent) {
    public void onProximityEvent(ProximityEvent proximityEvent) {
        // TODO: some of these classifiers might allow us to abort early, meaning we don't have to
        // make these calls.
        mClassifiers.forEach((classifier) -> classifier.onProximityEvent(proximityEvent));
Loading