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

Commit cc5a731f authored by Jason Monk's avatar Jason Monk
Browse files

Remove "Allow persistent changes to the vendor overlay theme"

This reverts commit 2dc804be.
It also removes the related calls from UiModeManager.

Fixes: 32721178
Test: make & flash
Change-Id: Id371bccec611155cc6910e46b3277c3d27fc1c79
parent ad63bafa
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -52,21 +52,6 @@ interface IUiModeManager {
     */
    int getNightMode();

    /**
     * Sets whith theme overlays to use within /vendor/overlay.
     */
    void setTheme(String theme);

    /**
     * Gets which theme overlays to use within /vendor/overlay.
     */
    String getTheme();

    /**
     * Gets the themes available in /vendor/overlay.
     */
    String[] getAvailableThemes();

    /**
     * Tells if UI mode is locked or not.
     */
+0 −44
Original line number Diff line number Diff line
@@ -241,50 +241,6 @@ public class UiModeManager {
        }
    }

    /**
     * Sets the vendor theme overlay property, then triggers a reboot.
     * @hide
     */
    public void setTheme(String theme) {
        if (mService != null) {
            try {
                mService.setTheme(theme);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
        }
    }

    /**
     * Gets the vendor theme overlay property.
     * @hide
     */
    public String getTheme() {
        if (mService != null) {
            try {
                return mService.getTheme();
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
        }
        return null;
    }

    /**
     * Gets the valid inputs to {@link #setTheme(String)}.
     * @hide
     */
    public String[] getAvailableThemes() {
        if (mService != null) {
            try {
                return mService.getAvailableThemes();
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
        }
        return null;
    }

    /**
     * Returns the currently configured night mode.
     * <p>
+1 −5
Original line number Diff line number Diff line
@@ -178,11 +178,7 @@ static void verifySystemIdmaps()
                // Directories to scan for overlays: if OVERLAY_THEME_DIR_PROPERTY is defined,
                // use OVERLAY_DIR/<value of OVERLAY_THEME_DIR_PROPERTY> in addition to OVERLAY_DIR.
                char subdir[PROP_VALUE_MAX];
                int len = __system_property_get(AssetManager::OVERLAY_THEME_DIR_PERSIST_PROPERTY,
                        subdir);
                if (len == 0) {
                    len = __system_property_get(AssetManager::OVERLAY_THEME_DIR_PROPERTY, subdir);
                }
                int len = __system_property_get(AssetManager::OVERLAY_THEME_DIR_PROPERTY, subdir);
                if (len > 0) {
                    String8 overlayPath = String8(AssetManager::OVERLAY_DIR) + "/" + subdir;
                    if (stat(overlayPath.string(), &st) == 0) {
+0 −1
Original line number Diff line number Diff line
@@ -74,7 +74,6 @@ const char* AssetManager::RESOURCES_FILENAME = "resources.arsc";
const char* AssetManager::IDMAP_BIN = "/system/bin/idmap";
const char* AssetManager::OVERLAY_DIR = "/vendor/overlay";
const char* AssetManager::OVERLAY_THEME_DIR_PROPERTY = "ro.boot.vendor.overlay.theme";
const char* AssetManager::OVERLAY_THEME_DIR_PERSIST_PROPERTY = "persist.vendor.overlay.theme";
const char* AssetManager::TARGET_PACKAGE_NAME = "android";
const char* AssetManager::TARGET_APK_PATH = "/system/framework/framework-res.apk";
const char* AssetManager::IDMAP_DIR = "/data/resource-cache";
+0 −5
Original line number Diff line number Diff line
@@ -66,11 +66,6 @@ public:
     * OVERLAY_DIR.
     */
    static const char* OVERLAY_THEME_DIR_PROPERTY;
    /**
     * If OVERLAY_THEME_DIR_PERSIST_PROPERTY, use it to override
     * OVERLAY_THEME_DIR_PROPERTY.
     */
    static const char* OVERLAY_THEME_DIR_PERSIST_PROPERTY;
    static const char* TARGET_PACKAGE_NAME;
    static const char* TARGET_APK_PATH;
    static const char* IDMAP_DIR;
Loading