Merge "Add temporary system property checks in addition in addition to flag checks." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
5e8a4ab400
@@ -63,7 +63,7 @@ private class AppButtonsPresenter(
|
||||
|
||||
@Composable
|
||||
private fun getActionButtons(app: ApplicationInfo): List<ActionButton> = listOfNotNull(
|
||||
if (featureFlags.archiving()) {
|
||||
if (isArchivingEnabled(featureFlags)) {
|
||||
if (app.isArchived) {
|
||||
appRestoreButton.getActionButton(app)
|
||||
} else {
|
||||
|
@@ -125,7 +125,7 @@ private fun AppInfoSettings(packageInfoPresenter: PackageInfoPresenter) {
|
||||
title = stringResource(R.string.application_info_label),
|
||||
actions = {
|
||||
packageInfoState.value?.applicationInfo?.let { app ->
|
||||
if (featureFlags.archiving()) TopBarAppLaunchButton(packageInfoPresenter, app)
|
||||
if (isArchivingEnabled(featureFlags)) TopBarAppLaunchButton(packageInfoPresenter, app)
|
||||
AppInfoSettingsMoreOptions(packageInfoPresenter, app)
|
||||
}
|
||||
}
|
||||
@@ -174,3 +174,6 @@ private fun AppInfoSettings(packageInfoPresenter: PackageInfoPresenter) {
|
||||
appInfoProvider.FooterAppVersion()
|
||||
}
|
||||
}
|
||||
|
||||
fun isArchivingEnabled(featureFlags: FeatureFlags) =
|
||||
featureFlags.archiving() || "true" == System.getProperty("pm.archiving.enabled")
|
||||
|
@@ -166,7 +166,7 @@ class PackageInfoPresenter(
|
||||
flags = PackageManager.MATCH_ANY_USER.toLong() or
|
||||
PackageManager.MATCH_DISABLED_COMPONENTS.toLong() or
|
||||
PackageManager.GET_PERMISSIONS.toLong() or
|
||||
if (featureFlags.archiving()) PackageManager.MATCH_ARCHIVED_PACKAGES else 0,
|
||||
if (isArchivingEnabled(featureFlags)) PackageManager.MATCH_ARCHIVED_PACKAGES else 0,
|
||||
userId = userId,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user