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

Commit cbc6a906 authored by Stefan Andonian's avatar Stefan Andonian
Browse files

Remove Share Notification after Sharing Issue Recording Traces

Bug: 357923631
Test: Verified locally this fix works.
Flag: EXEMPT bug fix
Change-Id: Ife6ac2faa09880945af8b9121b8a578423716cf3
parent 30ff6173
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
@@ -78,6 +78,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;
@@ -514,7 +515,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