summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java55
2 files changed, 0 insertions, 59 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java
index 59f59aef7e46..ff4570ea0fc5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java
@@ -16,8 +16,6 @@
package com.android.systemui.statusbar;
-import static com.android.systemui.statusbar.RemoteInputController.processForRemoteInput;
-
import android.annotation.NonNull;
import android.annotation.SuppressLint;
import android.app.NotificationChannel;
@@ -142,8 +140,6 @@ public class NotificationListener extends NotificationListenerWithPlugins implem
if (DEBUG) Log.d(TAG, "onNotificationPosted: " + sbn);
if (sbn != null && !onPluginNotificationPosted(sbn, rankingMap)) {
mMainExecutor.execute(() -> {
- processForRemoteInput(sbn.getNotification(), mContext);
-
for (NotificationHandler handler : mNotificationHandlers) {
handler.onNotificationPosted(sbn, rankingMap);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index 58d705417632..ac8001058ef6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -17,11 +17,7 @@
package com.android.systemui.statusbar;
import android.annotation.Nullable;
-import android.app.Notification;
-import android.app.RemoteInput;
-import android.content.Context;
import android.net.Uri;
-import android.os.SystemProperties;
import android.service.notification.StatusBarNotification;
import android.util.ArrayMap;
import android.util.IndentingPrintWriter;
@@ -37,16 +33,12 @@ import com.android.systemui.util.DumpUtilsKt;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
-import java.util.List;
import java.util.Objects;
/**
* Keeps track of the currently active {@link RemoteInputView}s.
*/
public class RemoteInputController {
- private static final boolean ENABLE_REMOTE_INPUT =
- SystemProperties.getBoolean("debug.enable_remote_input", true);
-
private final ArrayList<Pair<WeakReference<NotificationEntry>, Object>> mOpen
= new ArrayList<>();
private final ArrayMap<String, Object> mSpinning = new ArrayMap<>();
@@ -72,53 +64,6 @@ public class RemoteInputController {
}
/**
- * Adds RemoteInput actions from the WearableExtender; to be removed once more apps support this
- * via first-class API.
- *
- * TODO: Remove once enough apps specify remote inputs on their own.
- */
- public static void processForRemoteInput(Notification n, Context context) {
- if (!ENABLE_REMOTE_INPUT) {
- return;
- }
-
- if (n.extras != null && n.extras.containsKey("android.wearable.EXTENSIONS") &&
- (n.actions == null || n.actions.length == 0)) {
- Notification.Action viableAction = null;
- Notification.WearableExtender we = new Notification.WearableExtender(n);
-
- List<Notification.Action> actions = we.getActions();
- final int numActions = actions.size();
-
- for (int i = 0; i < numActions; i++) {
- Notification.Action action = actions.get(i);
- if (action == null) {
- continue;
- }
- RemoteInput[] remoteInputs = action.getRemoteInputs();
- if (remoteInputs == null) {
- continue;
- }
- for (RemoteInput ri : remoteInputs) {
- if (ri.getAllowFreeFormInput()) {
- viableAction = action;
- break;
- }
- }
- if (viableAction != null) {
- break;
- }
- }
-
- if (viableAction != null) {
- Notification.Builder rebuilder = Notification.Builder.recoverBuilder(context, n);
- rebuilder.setActions(viableAction);
- rebuilder.build(); // will rewrite n
- }
- }
- }
-
- /**
* Adds a currently active remote input.
*
* @param entry the entry for which a remote input is now active.