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

Commit 8ba97871 authored by Stefan Andonian's avatar Stefan Andonian Committed by Android (Google) Code Review
Browse files

Merge "Remove Share Notification after Sharing Issue Recording Traces" into main

parents 6ddc0764 cbc6a906
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.res.Resources
import android.net.Uri
import android.os.Handler
import android.os.UserHandle
import android.util.Log
import com.android.internal.logging.UiEventLogger
import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.dagger.qualifiers.LongRunning
@@ -71,6 +72,7 @@ constructor(
    override fun provideRecordingServiceStrings(): RecordingServiceStrings = IrsStrings(resources)

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        Log.d(getTag(), "handling action: ${intent?.action}")
        when (intent?.action) {
            ACTION_START -> {
                bgExecutor.execute {
@@ -95,7 +97,7 @@ constructor(
                bgExecutor.execute {
                    mNotificationManager.cancelAsUser(
                        null,
                        mNotificationId,
                        intent.getIntExtra(EXTRA_NOTIFICATION_ID, mNotificationId),
                        UserHandle(mUserContextTracker.userContext.userId)
                    )

+3 −1
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList
            "com.android.systemui.screenrecord.STOP_FROM_NOTIF";
    protected static final String ACTION_SHARE = "com.android.systemui.screenrecord.SHARE";
    private static final String PERMISSION_SELF = "com.android.systemui.permission.SELF";
    protected static final String EXTRA_NOTIFICATION_ID = "notification_id";

    private final RecordingController mController;
    protected final KeyguardDismissUtil mKeyguardDismissUtil;
@@ -542,7 +543,8 @@ public class RecordingService extends Service implements ScreenMediaRecorderList

    private Intent getShareIntent(Context context, Uri path) {
        return new Intent(context, this.getClass()).setAction(ACTION_SHARE)
                .putExtra(EXTRA_PATH, path);
                .putExtra(EXTRA_PATH, path)
                .putExtra(EXTRA_NOTIFICATION_ID, mNotificationId);
    }

    @Override