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

Commit 8dd4a32e authored by Ben Murdoch's avatar Ben Murdoch
Browse files

To support loading display_settings.xml on treblized builds, include

the product directory on the search path for the file. If not found,
fallback to the vendor directory.

Bug: 198411988
Test: Manual

Change-Id: I542d68fa9fcb8ebf19c3c193377e11257e1f4e9a
parent 028e367a
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -264,8 +264,14 @@ class DisplayWindowSettingsProvider implements SettingsProvider {


    @NonNull
    @NonNull
    private static AtomicFile getVendorSettingsFile() {
    private static AtomicFile getVendorSettingsFile() {
        final File vendorFile = new File(Environment.getVendorDirectory(),
        // First look under product path for treblized builds.
        File vendorFile = new File(Environment.getProductDirectory(),
                VENDOR_DISPLAY_SETTINGS_FILE_PATH);
                VENDOR_DISPLAY_SETTINGS_FILE_PATH);
        if (!vendorFile.exists()) {
            // Try and look in vendor path.
            vendorFile = new File(Environment.getVendorDirectory(),
                VENDOR_DISPLAY_SETTINGS_FILE_PATH);
        }
        return new AtomicFile(vendorFile, WM_DISPLAY_COMMIT_TAG);
        return new AtomicFile(vendorFile, WM_DISPLAY_COMMIT_TAG);
    }
    }