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

Commit 671ba743 authored by Ben Murdoch's avatar Ben Murdoch Committed by Automerger Merge Worker
Browse files

Merge "If custom display settings path doesn't exist, fall back to vendor...

Merge "If custom display settings path doesn't exist, fall back to vendor settings." into sc-dev am: ce11d229

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13517148

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic03c9ec78089e45207e83de3880855c241fa8221
parents 1caa9d56 ce11d229
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -109,12 +109,13 @@ class DisplayWindowSettingsProvider implements SettingsProvider {
     */
     */
    void setBaseSettingsFilePath(@Nullable String path) {
    void setBaseSettingsFilePath(@Nullable String path) {
        AtomicFile settingsFile;
        AtomicFile settingsFile;
        if (path != null) {
        File file = path != null ? new File(path) : null;
            settingsFile = new AtomicFile(new File(path), WM_DISPLAY_COMMIT_TAG);
        if (file != null && file.exists()) {
            settingsFile = new AtomicFile(file, WM_DISPLAY_COMMIT_TAG);
        } else {
        } else {
            Slog.w(TAG, "display settings " + path + " does not exist, using vendor defaults");
            settingsFile = getVendorSettingsFile();
            settingsFile = getVendorSettingsFile();
        }
        }

        setBaseSettingsStorage(new AtomicFileStorage(settingsFile));
        setBaseSettingsStorage(new AtomicFileStorage(settingsFile));
    }
    }