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

Commit 02035929 authored by Song Hu's avatar Song Hu Committed by Automerger Merge Worker
Browse files

Merge "Pass Intent as additional parameter in...

Merge "Pass Intent as additional parameter in ContentSuggestionsServiceClient#notifyAction. This allows QuickShareProcessor to report share event in notifyInteraction. SystemUI side change." into sc-dev am: 6a075b5e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14445477

Change-Id: I1e3923b419ecbc30e218030b7680a91624d8b016
parents 2a4569bb 6a075b5e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class ActionProxyReceiver extends BroadcastReceiver {
                    ? ACTION_TYPE_EDIT
                    : ACTION_TYPE_SHARE;
            mScreenshotSmartActions.notifyScreenshotAction(
                    context, intent.getStringExtra(EXTRA_ID), actionType, false);
                    context, intent.getStringExtra(EXTRA_ID), actionType, false, null);
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public class DeleteScreenshotReceiver extends BroadcastReceiver {
        });
        if (intent.getBooleanExtra(EXTRA_SMART_ACTIONS_ENABLED, false)) {
            mScreenshotSmartActions.notifyScreenshotAction(
                    context, intent.getStringExtra(EXTRA_ID), ACTION_TYPE_DELETE, false);
                    context, intent.getStringExtra(EXTRA_ID), ACTION_TYPE_DELETE, false, null);
        }
    }
}
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static com.android.systemui.screenshot.LogConfig.logTag;

import android.app.Notification;
import android.content.ComponentName;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.UserHandle;
@@ -107,7 +108,8 @@ public class ScreenshotNotificationSmartActionsProvider {
     * @param action        type of notification action invoked.
     * @param isSmartAction whether action invoked was a smart action.
     */
    public void notifyAction(String screenshotId, String action, boolean isSmartAction) {
    public void notifyAction(String screenshotId, String action, boolean isSmartAction,
            Intent intent) {
        if (DEBUG_ACTIONS) {
            Log.d(TAG, "SmartActions: notifyAction: return without notify");
        }
+3 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.app.ActivityManager;
import android.app.Notification;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Handler;
@@ -165,7 +166,7 @@ public class ScreenshotSmartActions {
    }

    void notifyScreenshotAction(Context context, String screenshotId, String action,
            boolean isSmartAction) {
            boolean isSmartAction, Intent intent) {
        try {
            ScreenshotNotificationSmartActionsProvider provider =
                    SystemUIFactory.getInstance().createScreenshotNotificationSmartActionsProvider(
@@ -174,7 +175,7 @@ public class ScreenshotSmartActions {
                Log.d(TAG, String.format("%s notifyAction: %s id=%s, isSmartAction=%b",
                        provider.getClass(), action, screenshotId, isSmartAction));
            }
            provider.notifyAction(screenshotId, action, isSmartAction);
            provider.notifyAction(screenshotId, action, isSmartAction, intent);
        } catch (Throwable e) {
            Log.e(TAG, "Error in notifyScreenshotAction: ", e);
        }
+2 −1
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ public class SmartActionsReceiver extends BroadcastReceiver {
        }

        mScreenshotSmartActions.notifyScreenshotAction(
                context, intent.getStringExtra(EXTRA_ID), actionType, true);
                context, intent.getStringExtra(EXTRA_ID), actionType, true,
                pendingIntent.getIntent());
    }
}
Loading