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

Commit 5e8a4ab4 authored by Jakob Schneider's avatar Jakob Schneider Committed by Android (Google) Code Review
Browse files

Merge "Add temporary system property checks in addition in addition to flag checks." into main

parents 1ab510bc e06d787e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+4 −1
Original line number Diff line number Diff line
@@ -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")
+1 −1
Original line number Diff line number Diff line
@@ -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,
        )
}