App close auto shred not working [Tablet] (#34702)
Fixed the `On App Closed` auto-shred option to trigger only when the app is fully closed, not when the user switches apps or presses the Home button. Resolves: https://github.com/brave/brave-browser/issues/53441 --------- Signed-off-by: Vadym Struts <vstruts@brave.com>
This commit is contained in:
@@ -1098,12 +1098,6 @@ public abstract class BraveActivity extends ChromeActivity
|
||||
ApplicationStatus.registerApplicationStateListener(mApplicationStateListener);
|
||||
}
|
||||
|
||||
Profile profile = getCurrentProfile();
|
||||
if (profile != null) {
|
||||
// Triggers notification of current app state on Android.
|
||||
BraveFirstPartyStorageCleanerUtils.triggerCurrentAppStateNotification(profile);
|
||||
}
|
||||
|
||||
super.onStartWithNative();
|
||||
}
|
||||
|
||||
@@ -3031,4 +3025,14 @@ public abstract class BraveActivity extends ChromeActivity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabStateInitializedHandler() {
|
||||
Profile profile = getCurrentProfile();
|
||||
if (profile != null) {
|
||||
// Triggers current app state notification to make sure the first-party storage cleanup
|
||||
// is scheduled on startup if needed.
|
||||
BraveFirstPartyStorageCleanerUtils.triggerCurrentAppStateNotification(profile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user