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

Commit 1bd60bda authored by d34d's avatar d34d Committed by Clark Scheff
Browse files

Themes: Refactor themes to CMSDK [1/6]

Change-Id: I3688b37342eddcfceeabaae982085884e9bc63ee
TICKET: CYNGNOS-2126
parent 8ff13dea
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -146,9 +146,6 @@ LOCAL_SRC_FILES += \
	core/java/android/content/pm/IPackageMoveObserver.aidl \
	core/java/android/content/pm/IPackageStatsObserver.aidl \
	core/java/android/content/pm/IOnPermissionsChangeListener.aidl \
    core/java/android/content/res/IThemeChangeListener.aidl \
	core/java/android/content/res/IThemeProcessingListener.aidl \
	core/java/android/content/res/IThemeService.aidl \
	core/java/android/database/IContentObserver.aidl \
	core/java/android/hardware/ICameraService.aidl \
	core/java/android/hardware/ICameraServiceListener.aidl \
@@ -425,6 +422,7 @@ LOCAL_SRC_FILES += \
	packages/services/PacProcessor/com/android/net/IProxyService.aidl \
	packages/services/Proxy/com/android/net/IProxyCallback.aidl \
	packages/services/Proxy/com/android/net/IProxyPortListener.aidl \
	../../vendor/cmsdk/src/java/org/cyanogenmod/internal/themes/IIconCacheManager.aidl \

# FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk
LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_STATIC_JAVA_LIBRARIES := org.cyanogenmod.platform.internal
LOCAL_MODULE := tm
include $(BUILD_JAVA_LIBRARY)

+8 −5
Original line number Diff line number Diff line
@@ -21,17 +21,19 @@ package com.android.commands.tm;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
import android.content.pm.ParceledListSlice;
import android.content.pm.ThemeUtils;
import android.content.res.IThemeService;
import android.content.res.ThemeChangeRequest;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.util.AndroidException;
import com.android.internal.os.BaseCommand;

import cyanogenmod.app.CMContextConstants;
import cyanogenmod.themes.IThemeService;
import cyanogenmod.themes.ThemeChangeRequest;

import org.cyanogenmod.internal.util.ThemeUtils;

import java.io.PrintStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@@ -81,7 +83,8 @@ public class Tm extends BaseCommand {
    }

    public void onRun() throws Exception {
        mTs = IThemeService.Stub.asInterface(ServiceManager.getService("themes"));
        mTs = IThemeService.Stub.asInterface(ServiceManager
                .getService(CMContextConstants.CM_THEME_SERVICE));
        if (mTs == null) {
            System.err.println(NO_SYSTEM_ERROR_CODE);
            throw new AndroidException("Can't connect to theme service; is the system running?");
+0 −10
Original line number Diff line number Diff line
@@ -2456,16 +2456,6 @@ public final class ActivityThread {
        return activity;
    }

    private void sendAppLaunchFailureBroadcast(ActivityClientRecord r) {
        String pkg = null;
        if (r.packageInfo != null && !TextUtils.isEmpty(r.packageInfo.getPackageName())) {
            pkg = r.packageInfo.getPackageName();
        }
        Intent intent = new Intent(Intent.ACTION_APP_FAILURE,
                (pkg != null)? Uri.fromParts("package", pkg, null) : null);
        getSystemContext().sendBroadcast(intent);
    }

    private Context createBaseContextForActivity(ActivityClientRecord r, final Activity activity) {
        int displayId = Display.DEFAULT_DISPLAY;
        try {
+0 −2
Original line number Diff line number Diff line
@@ -40,8 +40,6 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.AssetManager;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.content.res.IThemeService;
import android.content.res.ThemeManager;
import android.content.res.Resources;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
Loading