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

Commit e06d787e authored by Jakob Schneider's avatar Jakob Schneider
Browse files

Add temporary system property checks in addition in addition to flag checks.

This was agreed on to enable dogfood testing on P9 without enabling the full
feature in QPR3. https://docs.google.com/document/d/1ZItkXfyKO2e235-EdisHASE6Dcl2hqATnieo6aJrsbY/edit?tab=t.0#bookmark=id.64wdrt989i3r

Test: manual
Bug: 315461548
Change-Id: I2ef71fd40d4afb83b9b73a977856e2912a5c87be
parent 007ef134
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,
        )
}