summaryrefslogtreecommitdiff
path: root/packages/SystemUI/plugin/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/plugin/src')
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java3
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java10
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java13
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java4
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java14
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java2
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java7
7 files changed, 52 insertions, 1 deletions
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java
index 1f633da4644a..95ff13b45fb9 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActions.java
@@ -29,6 +29,9 @@ public interface GlobalActions extends Plugin {
default void showShutdownUi(boolean isReboot, String reason) {
}
+ default void destroy() {
+ }
+
@ProvidesInterface(version = GlobalActionsManager.VERSION)
public interface GlobalActionsManager {
int VERSION = 1;
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java
index 903ff7276101..4b3afdc3eb7a 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialogController.java
@@ -99,6 +99,9 @@ public interface VolumeDialogController {
public ComponentName effectsSuppressor;
public String effectsSuppressorName;
public int activeStream = NO_ACTIVE_STREAM;
+ public boolean disallowAlarms;
+ public boolean disallowMedia;
+ public boolean disallowRinger;
public State copy() {
final State rt = new State();
@@ -113,6 +116,9 @@ public interface VolumeDialogController {
}
rt.effectsSuppressorName = effectsSuppressorName;
rt.activeStream = activeStream;
+ rt.disallowAlarms = disallowAlarms;
+ rt.disallowMedia = disallowMedia;
+ rt.disallowRinger = disallowRinger;
return rt;
}
@@ -142,6 +148,9 @@ public interface VolumeDialogController {
sep(sb, indent); sb.append("effectsSuppressor:").append(effectsSuppressor);
sep(sb, indent); sb.append("effectsSuppressorName:").append(effectsSuppressorName);
sep(sb, indent); sb.append("activeStream:").append(activeStream);
+ sep(sb, indent); sb.append("disallowAlarms:").append(disallowAlarms);
+ sep(sb, indent); sb.append("disallowMedia:").append(disallowMedia);
+ sep(sb, indent); sb.append("disallowRinger:").append(disallowRinger);
if (indent > 0) sep(sb, indent);
return sb.append('}').toString();
}
@@ -172,5 +181,6 @@ public interface VolumeDialogController {
void onScreenOff();
void onShowSafetyWarning(int flags);
void onAccessibilityModeChanged(Boolean showA11yStream);
+ void onConnectedDeviceChanged(String deviceName);
}
}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
index a648345e9c04..30d1352c8a01 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QS.java
@@ -14,6 +14,7 @@
package com.android.systemui.plugins.qs;
+import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -65,6 +66,18 @@ public interface QS extends FragmentBase {
default void setHasNotifications(boolean hasNotifications) {
}
+ /**
+ * We need this to handle nested scrolling for QS..
+ * Normally we would do this with requestDisallowInterceptTouchEvent, but when both the
+ * scroll containers are using the same touch slop, they try to start scrolling at the
+ * same time and NotificationPanelView wins, this lets QS win.
+ *
+ * TODO: Do this using NestedScroll capabilities.
+ */
+ default boolean onInterceptTouchEvent(MotionEvent event) {
+ return isCustomizing();
+ }
+
@ProvidesInterface(version = HeightListener.VERSION)
interface HeightListener {
int VERSION = 1;
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
index c52c0aae3556..61f7fe8dc019 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
@@ -108,6 +108,7 @@ public interface QSTile {
public Supplier<Icon> iconSupplier;
public int state = Tile.STATE_ACTIVE;
public CharSequence label;
+ public CharSequence secondaryLabel;
public CharSequence contentDescription;
public CharSequence dualLabelContentDescription;
public boolean disabledByPolicy;
@@ -122,6 +123,7 @@ public interface QSTile {
final boolean changed = !Objects.equals(other.icon, icon)
|| !Objects.equals(other.iconSupplier, iconSupplier)
|| !Objects.equals(other.label, label)
+ || !Objects.equals(other.secondaryLabel, secondaryLabel)
|| !Objects.equals(other.contentDescription, contentDescription)
|| !Objects.equals(other.dualLabelContentDescription,
dualLabelContentDescription)
@@ -135,6 +137,7 @@ public interface QSTile {
other.icon = icon;
other.iconSupplier = iconSupplier;
other.label = label;
+ other.secondaryLabel = secondaryLabel;
other.contentDescription = contentDescription;
other.dualLabelContentDescription = dualLabelContentDescription;
other.expandedAccessibilityClassName = expandedAccessibilityClassName;
@@ -156,6 +159,7 @@ public interface QSTile {
sb.append(",icon=").append(icon);
sb.append(",iconSupplier=").append(iconSupplier);
sb.append(",label=").append(label);
+ sb.append(",secondaryLabel=").append(secondaryLabel);
sb.append(",contentDescription=").append(contentDescription);
sb.append(",dualLabelContentDescription=").append(dualLabelContentDescription);
sb.append(",expandedAccessibilityClassName=").append(expandedAccessibilityClassName);
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java
index 18d27bb419d4..53f7e44bc25a 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java
@@ -26,14 +26,26 @@ import com.android.systemui.plugins.qs.QSTile.State;
@DependsOn(target = QSIconView.class)
@DependsOn(target = QSTile.class)
public abstract class QSTileView extends LinearLayout {
- public static final int VERSION = 1;
+ public static final int VERSION = 2;
public QSTileView(Context context) {
super(context);
}
public abstract View updateAccessibilityOrder(View previousView);
+
+ /**
+ * Returns a {@link QSIconView} containing only the icon for this tile. Use
+ * {@link #getIconWithBackground()} to retrieve the entire tile (background & peripherals
+ * included).
+ */
public abstract QSIconView getIcon();
+
+ /**
+ * Returns a {@link View} containing the icon for this tile along with the accompanying
+ * background circle/peripherals. To retrieve only the inner icon, use {@link #getIcon()}.
+ */
+ public abstract View getIconWithBackground();
public abstract void init(QSTile tile);
public abstract void onStateChanged(State state);
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java
index 56a3ee3a28f7..e25930c18947 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavBarButtonProvider.java
@@ -50,5 +50,7 @@ public interface NavBarButtonProvider extends Plugin {
}
void setDarkIntensity(float intensity);
+
+ void setDelayTouchFeedback(boolean shouldDelay);
}
}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java
index 674ed5a3a480..6131acc91ca5 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/phone/NavGesture.java
@@ -14,6 +14,7 @@
package com.android.systemui.plugins.statusbar.phone;
+import android.graphics.Canvas;
import android.view.MotionEvent;
import com.android.systemui.plugins.Plugin;
@@ -35,6 +36,12 @@ public interface NavGesture extends Plugin {
public void setBarState(boolean vertical, boolean isRtl);
+ public void onDraw(Canvas canvas);
+
+ public void onDarkIntensityChange(float intensity);
+
+ public void onLayout(boolean changed, int left, int top, int right, int bottom);
+
public default void destroy() { }
}