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

Commit e83fc37b authored by Julia Reynolds's avatar Julia Reynolds Committed by Automerger Merge Worker
Browse files

Merge "unregister FileCleanupReceiver when disableHistory" am: cfd9af45 am: 90427985

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

Change-Id: Ieec273ea4a0f96594a7cd1458cb3bbbafe204eb5
parents 2ec3177f 90427985
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -354,6 +354,12 @@ public class NotificationHistoryDatabase {
        }
    }

    public void unregisterFileCleanupReceiver() {
        if(mContext != null) {
            mContext.unregisterReceiver(mFileCleanupReceiver);
        }
    }

    private static long safeParseLong(String fileName) {
        // AtomicFile will create copies of the numeric files with ".new" and ".bak"
        // over the course of its processing. If these files still exist on boot we need to clean
+1 −0
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@ public class NotificationHistoryManager {

    private void disableHistory(NotificationHistoryDatabase userHistory, @UserIdInt int userId) {
        userHistory.disableHistory();
        userHistory.unregisterFileCleanupReceiver();

        mUserPendingHistoryDisables.put(userId, false);
        mHistoryEnabled.put(userId, false);