[Settings/Archive] remove all checks for the archiving system property

No longer needed

BUG: 331165939
Test: builds
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6ae958abd26ed77ecd4d3fb1720bb912553da2ea)
Merged-In: I24bc9a3d7503da1606d29eb3dfa963b0e6bf9d3e
Change-Id: I24bc9a3d7503da1606d29eb3dfa963b0e6bf9d3e
This commit is contained in:
Song Chun Fan
2024-04-08 18:16:11 +00:00
committed by Cherrypicker Worker
parent f6e0b08fc6
commit 844d2f4c67
4 changed files with 4 additions and 8 deletions

View File

@@ -72,8 +72,7 @@ public abstract class AppCounter extends AsyncTask<Void, Void, Integer> {
}
private boolean isArchivingEnabled() {
return mFf.archiving() || SystemProperties.getBoolean("pm.archiving.enabled", false)
|| Flags.appArchiving();
return mFf.archiving() || Flags.appArchiving();
}
@Override

View File

@@ -183,5 +183,4 @@ private fun AppInfoSettings(packageInfoPresenter: PackageInfoPresenter) {
}
fun isArchivingEnabled(featureFlags: PmFeatureFlags) =
featureFlags.archiving() || SystemProperties.getBoolean("pm.archiving.enabled", false)
|| Flags.appArchiving()
featureFlags.archiving() || Flags.appArchiving()

View File

@@ -93,8 +93,7 @@ fun HibernationSwitchPreference(
}
private fun isArchivingEnabled() =
PmFlags.archiving() || SystemProperties.getBoolean("pm.archiving.enabled", false)
|| Flags.appArchiving()
PmFlags.archiving() || Flags.appArchiving()
private class HibernationSwitchPresenter(context: Context, private val app: ApplicationInfo) {
private val appOpsManager = context.appOpsManager

View File

@@ -163,8 +163,7 @@ class HibernationSwitchPreferenceTest {
}
private fun isArchivingEnabled() =
PmFlags.archiving() || SystemProperties.getBoolean("pm.archiving.enabled", false)
|| Flags.appArchiving()
PmFlags.archiving() || Flags.appArchiving()
@Test
fun `An app targets Q with ops mode default when hibernation targets pre S - not exempted`() {
mockOpsMode(MODE_DEFAULT)