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

No longer needed

Change-Id: I24bc9a3d7503da1606d29eb3dfa963b0e6bf9d3e
BUG: 331165939
Test: builds
This commit is contained in:
Song Chun Fan
2024-04-08 18:16:11 +00:00
parent 19a5080842
commit 6ae958abd2
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

@@ -179,5 +179,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)