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

Commit 3cf98c05 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "For B&R, check whether user aspect ratio settings are enabled." into main

parents 99f53668 d9f9a413
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.backup.BackupAgentHelper;
import android.util.Log;

import com.android.settings.applications.appcompat.UserAspectRatioBackupHelper;
import com.android.settings.applications.appcompat.UserAspectRatioManager;
import com.android.settings.flags.Flags;
import com.android.settings.onboarding.OnboardingFeatureProvider;
import com.android.settings.overlay.FeatureFactory;
@@ -58,8 +59,10 @@ public class SettingsBackupHelper extends BackupAgentHelper {
            }
        }

        // Since the aconfig flag below is read-only, this class would not compile, and tests would
        // fail to find the class, even if they are testing only code beyond the flag-guarded code.
        if (UserAspectRatioManager.isFeatureEnabled(getApplicationContext())) {
            // Since the aconfig flag below is read-only, this class would not compile, and tests
            // would fail to find the class, even if they are testing only code beyond the
            // flag-guarded code.
            final UserAspectRatioBackupHelper userAspectRatioBackupHelper =
                    new UserAspectRatioBackupHelper(this, AppGlobals.getPackageManager(),
                            getBackupRestoreEventLogger());
@@ -67,6 +70,7 @@ public class SettingsBackupHelper extends BackupAgentHelper {
                addHelper(USER_ASPECT_RATIO_BACKUP_HELPER, userAspectRatioBackupHelper);
            }
        }
    }

    @Override
    public void onRestoreFinished() {