summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2016-02-23 14:44:08 -0800
committerClark Scheff <clark@cyngn.com>2016-03-04 14:01:06 -0800
commit1bd60bda797443e029846ef340b2083638b5e554 (patch)
treeb852a5e9ac5584640ab338cd827f629445e0f414
parent8ff13dea571cefa0197d71b37d69adbe2908ad55 (diff)
downloadframeworks_base-1bd60bda797443e029846ef340b2083638b5e554.zip
frameworks_base-1bd60bda797443e029846ef340b2083638b5e554.tar.gz
frameworks_base-1bd60bda797443e029846ef340b2083638b5e554.tar.bz2
Themes: Refactor themes to CMSDK [1/6]
Change-Id: I3688b37342eddcfceeabaae982085884e9bc63ee TICKET: CYNGNOS-2126
-rw-r--r--Android.mk4
-rw-r--r--cmds/tm/Android.mk1
-rw-r--r--cmds/tm/src/com/android/commands/tm/Tm.java13
-rw-r--r--core/java/android/app/ActivityThread.java10
-rw-r--r--core/java/android/app/ContextImpl.java2
-rw-r--r--core/java/android/app/IconPackHelper.java23
-rw-r--r--core/java/android/app/ResourcesManager.java8
-rw-r--r--core/java/android/app/SystemServiceRegistry.java11
-rw-r--r--core/java/android/content/Context.java10
-rw-r--r--core/java/android/content/Intent.java23
-rw-r--r--core/java/android/content/pm/ThemeUtils.java605
-rw-r--r--core/java/android/content/res/IThemeChangeListener.aidl22
-rw-r--r--core/java/android/content/res/IThemeProcessingListener.aidl21
-rw-r--r--core/java/android/content/res/IThemeService.aidl43
-rw-r--r--core/java/android/content/res/ThemeChangeRequest.aidl19
-rw-r--r--core/java/android/content/res/ThemeChangeRequest.java307
-rw-r--r--core/java/android/content/res/ThemeConfig.java52
-rw-r--r--core/java/android/content/res/ThemeManager.java316
-rw-r--r--core/java/android/provider/ThemesContract.java731
-rw-r--r--core/java/com/android/internal/util/cm/ImageUtils.java332
-rw-r--r--core/res/AndroidManifest.xml24
-rw-r--r--core/res/res/values-af/cm_strings.xml10
-rw-r--r--core/res/res/values-ar/cm_strings.xml11
-rw-r--r--core/res/res/values-ast-rES/cm_strings.xml10
-rw-r--r--core/res/res/values-az-rAZ/cm_strings.xml10
-rw-r--r--core/res/res/values-be/cm_strings.xml12
-rw-r--r--core/res/res/values-bg/cm_strings.xml10
-rw-r--r--core/res/res/values-bn-rBD/cm_strings.xml8
-rw-r--r--core/res/res/values-ca/cm_strings.xml10
-rw-r--r--core/res/res/values-cs/cm_strings.xml10
-rw-r--r--core/res/res/values-da/cm_strings.xml10
-rw-r--r--core/res/res/values-de/cm_strings.xml10
-rw-r--r--core/res/res/values-el/cm_strings.xml10
-rw-r--r--core/res/res/values-en-rAU/cm_strings.xml12
-rw-r--r--core/res/res/values-en-rIN/cm_strings.xml12
-rw-r--r--core/res/res/values-eo/cm_strings.xml10
-rw-r--r--core/res/res/values-es/cm_strings.xml10
-rw-r--r--core/res/res/values-et-rEE/cm_strings.xml12
-rw-r--r--core/res/res/values-eu-rES/cm_strings.xml10
-rw-r--r--core/res/res/values-fa/cm_strings.xml12
-rw-r--r--core/res/res/values-fi/cm_strings.xml10
-rw-r--r--core/res/res/values-fr/cm_strings.xml10
-rw-r--r--core/res/res/values-gl-rES/cm_strings.xml12
-rw-r--r--core/res/res/values-hi/cm_strings.xml12
-rw-r--r--core/res/res/values-hr/cm_strings.xml10
-rw-r--r--core/res/res/values-hu/cm_strings.xml10
-rw-r--r--core/res/res/values-in/cm_strings.xml10
-rw-r--r--core/res/res/values-it/cm_strings.xml10
-rw-r--r--core/res/res/values-iw/cm_strings.xml10
-rw-r--r--core/res/res/values-ja/cm_strings.xml10
-rw-r--r--core/res/res/values-kn-rIN/cm_strings.xml12
-rw-r--r--core/res/res/values-ko/cm_strings.xml10
-rw-r--r--core/res/res/values-ku/cm_strings.xml10
-rw-r--r--core/res/res/values-lb/cm_strings.xml10
-rw-r--r--core/res/res/values-lt/cm_strings.xml10
-rw-r--r--core/res/res/values-lv/cm_strings.xml10
-rw-r--r--core/res/res/values-nb/cm_strings.xml10
-rw-r--r--core/res/res/values-nl/cm_strings.xml10
-rw-r--r--core/res/res/values-pl/cm_strings.xml10
-rw-r--r--core/res/res/values-pt-rBR/cm_strings.xml10
-rw-r--r--core/res/res/values-pt-rPT/cm_strings.xml10
-rw-r--r--core/res/res/values-ro/cm_strings.xml10
-rw-r--r--core/res/res/values-ru/cm_strings.xml10
-rw-r--r--core/res/res/values-si-rLK/cm_strings.xml8
-rw-r--r--core/res/res/values-sk/cm_strings.xml10
-rw-r--r--core/res/res/values-sl/cm_strings.xml12
-rw-r--r--core/res/res/values-sr/cm_strings.xml10
-rw-r--r--core/res/res/values-sv/cm_strings.xml12
-rw-r--r--core/res/res/values-th/cm_strings.xml10
-rw-r--r--core/res/res/values-tr/cm_strings.xml12
-rw-r--r--core/res/res/values-ug/cm_strings.xml10
-rw-r--r--core/res/res/values-uk/cm_strings.xml12
-rw-r--r--core/res/res/values-vi/cm_strings.xml10
-rw-r--r--core/res/res/values-zh-rCN/cm_strings.xml10
-rw-r--r--core/res/res/values-zh-rHK/cm_strings.xml10
-rw-r--r--core/res/res/values-zh-rTW/cm_strings.xml10
-rw-r--r--core/res/res/values/cm_strings.xml25
-rw-r--r--core/res/res/values/cm_symbols.xml8
-rw-r--r--packages/Shell/AndroidManifest.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java39
-rw-r--r--services/core/java/com/android/server/ThemeService.java1277
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java5
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java52
-rw-r--r--services/core/java/com/android/server/policy/GlobalActions.java3
-rw-r--r--services/core/java/com/android/server/power/ShutdownThread.java3
-rw-r--r--services/java/com/android/server/AppsFailureReceiver.java118
-rw-r--r--services/java/com/android/server/SystemServer.java38
87 files changed, 123 insertions, 4595 deletions
diff --git a/Android.mk b/Android.mk
index 9684271..ba8e891 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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)
diff --git a/cmds/tm/Android.mk b/cmds/tm/Android.mk
index 34a41dd..97e8ee4 100644
--- a/cmds/tm/Android.mk
+++ b/cmds/tm/Android.mk
@@ -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)
diff --git a/cmds/tm/src/com/android/commands/tm/Tm.java b/cmds/tm/src/com/android/commands/tm/Tm.java
index af1ac75..0ba5cb9 100644
--- a/cmds/tm/src/com/android/commands/tm/Tm.java
+++ b/cmds/tm/src/com/android/commands/tm/Tm.java
@@ -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?");
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 7d3b572..f08390f 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -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 {
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 479010d..d443d80 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -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;
diff --git a/core/java/android/app/IconPackHelper.java b/core/java/android/app/IconPackHelper.java
index 627330f..80fb401 100644
--- a/core/java/android/app/IconPackHelper.java
+++ b/core/java/android/app/IconPackHelper.java
@@ -25,7 +25,6 @@ import java.util.Map;
import java.util.Random;
import android.content.pm.PackageInfo;
-import android.content.res.IThemeService;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -44,7 +43,10 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Log;
import android.util.TypedValue;
+
import com.android.internal.util.cm.palette.Palette;
+
+import org.cyanogenmod.internal.themes.IIconCacheManager;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
@@ -103,6 +105,12 @@ public class IconPackHelper {
private static final float DEFAULT_SCALE = 1.0f;
private static final int COMPOSED_ICON_COOKIE = 128;
+ private static final String ICON_CACHE_SERVICE = "cmiconcache";
+
+ public static final String SYSTEM_THEME_PATH = "/data/system/theme";
+ public static final String SYSTEM_THEME_ICON_CACHE_DIR = SYSTEM_THEME_PATH
+ + File.separator + "icons";
+
private final Context mContext;
private Map<ComponentName, String> mIconPackResourceMap;
private String mLoadedIconPackName;
@@ -410,15 +418,12 @@ public class IconPackHelper {
String prefixPath;
String iconApkPath;
- String iconResPath;
if (info.isLegacyIconPackApk) {
- iconResPath = "";
iconApkPath = "";
prefixPath = "";
} else {
prefixPath = ThemeUtils.ICONS_PATH; //path inside APK
iconApkPath = ThemeUtils.getIconPackApkPath(packageName);
- iconResPath = ThemeUtils.getIconPackResPath(packageName);
}
AssetManager assets = new AssetManager();
@@ -587,11 +592,11 @@ public class IconPackHelper {
public static class IconCustomizer {
private static final Random sRandom = new Random();
- private static final IThemeService sThemeService;
+ private static final IIconCacheManager sIconCacheManager;
static {
- sThemeService = IThemeService.Stub.asInterface(
- ServiceManager.getService(Context.THEME_SERVICE));
+ sIconCacheManager = IIconCacheManager.Stub.asInterface(
+ ServiceManager.getService(ICON_CACHE_SERVICE));
}
public static Drawable getComposedIconDrawable(Drawable icon, Context context,
@@ -802,7 +807,7 @@ public class IconPackHelper {
private static boolean cacheComposedIcon(Bitmap bmp, String path) {
try {
- return sThemeService.cacheComposedIcon(bmp, path);
+ return sIconCacheManager.cacheComposedIcon(bmp, path);
} catch (RemoteException e) {
Log.e(TAG, "Unable to cache icon.", e);
}
@@ -811,7 +816,7 @@ public class IconPackHelper {
}
private static String getCachedIconPath(String pkgName, int resId, int density) {
- return String.format("%s/%s", ThemeUtils.SYSTEM_THEME_ICON_CACHE_DIR,
+ return String.format("%s/%s", SYSTEM_THEME_ICON_CACHE_DIR,
getCachedIconName(pkgName, resId, density));
}
diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java
index 7492cd0..e2d0537 100644
--- a/core/java/android/app/ResourcesManager.java
+++ b/core/java/android/app/ResourcesManager.java
@@ -625,7 +625,8 @@ public class ResourcesManager {
String targetPackagePath = piTarget.applicationInfo.sourceDir;
String prefixPath = ThemeUtils.getOverlayPathToTarget(basePackageName);
- String resCachePath = ThemeUtils.getTargetCacheDir(piTarget.packageName, piTheme);
+ String resCachePath = ThemeUtils.getTargetCacheDir(piTarget.packageName,
+ piTheme.packageName);
String resApkPath = resCachePath + "/resources.apk";
String idmapPath = ThemeUtils.getIdmapPath(piTarget.packageName, piTheme.packageName);
int cookie = assets.addOverlayPath(idmapPath, themePath, resApkPath,
@@ -639,7 +640,8 @@ public class ResourcesManager {
if (!piTarget.isThemeApk && !"android".equals(basePackageName) &&
piTheme.mOverlayTargets.contains("android")) {
- String resCachePath= ThemeUtils.getTargetCacheDir(piAndroid.packageName, piTheme);
+ String resCachePath= ThemeUtils.getTargetCacheDir(piAndroid.packageName,
+ piTheme.packageName);
String prefixPath = ThemeUtils.getOverlayPathToTarget(piAndroid.packageName);
String targetPackagePath = piAndroid.applicationInfo.publicSourceDir;
String resApkPath = resCachePath + "/resources.apk";
@@ -742,7 +744,7 @@ public class ResourcesManager {
String themePath = piTheme.applicationInfo.publicSourceDir;
String prefixPath = ThemeUtils.COMMON_RES_PATH;
String resCachePath =
- ThemeUtils.getTargetCacheDir(ThemeUtils.COMMON_RES_TARGET, piTheme);
+ ThemeUtils.getTargetCacheDir(ThemeUtils.COMMON_RES_TARGET, piTheme.packageName);
String resApkPath = resCachePath + "/resources.apk";
int cookie = assets.addCommonOverlayPath(themePath, resApkPath,
prefixPath);
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 08f4efd..3d264c6 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -37,9 +37,7 @@ import android.content.IRestrictionsManager;
import android.content.RestrictionsManager;
import android.content.pm.ILauncherApps;
import android.content.pm.LauncherApps;
-import android.content.res.IThemeService;
import android.content.res.Resources;
-import android.content.res.ThemeManager;
import android.hardware.ConsumerIrManager;
import android.hardware.ISerialManager;
import android.hardware.SensorManager;
@@ -706,15 +704,6 @@ final class SystemServiceRegistry {
public RadioManager createService(ContextImpl ctx) {
return new RadioManager(ctx);
}});
-
- registerService(Context.THEME_SERVICE, ThemeManager.class,
- new CachedServiceFetcher<ThemeManager>() {
- public ThemeManager createService(ContextImpl ctx) {
- IBinder b = ServiceManager.getService(Context.THEME_SERVICE);
- IThemeService service = IThemeService.Stub.asInterface(b);
- return new ThemeManager(ctx.getOuterContext(),
- service);
- }});
}
/**
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index fc40a73..7ddda11 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3152,16 +3152,6 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a
- * {@link android.content.res.ThemeManager} for accessing theme service.
- *
- * @see #getSystemService
- * @see android.content.res.ThemeManager
- * @hide
- */
- public static final String THEME_SERVICE = "themes";
-
- /**
- * Use with {@link #getSystemService} to retrieve a
* {@link android.nfc.NfcManager} for using NFC.
*
* @see #getSystemService
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 2a24fe3..d063454 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2881,21 +2881,6 @@ public class Intent implements Parcelable, Cloneable {
"android.intent.action.QUICK_CLOCK";
/**
- * Broadcast Action: Indicate that unrecoverable error happened during app launch.
- * Could indicate that curently applied theme is malicious.
- * @hide
- */
- public static final String ACTION_APP_FAILURE =
- "com.tmobile.intent.action.APP_FAILURE";
-
- /**
- * Broadcast Action: Request to reset the unrecoverable errors count to 0.
- * @hide
- */
- public static final String ACTION_APP_FAILURE_RESET =
- "com.tmobile.intent.action.APP_FAILURE_RESET";
-
- /**
* Activity Action: Shows the brightness setting dialog.
* @hide
*/
@@ -3282,14 +3267,6 @@ public class Intent implements Parcelable, Cloneable {
@SdkConstant(SdkConstantType.INTENT_CATEGORY)
public static final String CATEGORY_CAR_MODE = "android.intent.category.CAR_MODE";
- /**
- * Used to indicate that a theme package has been installed or un-installed.
- *
- * @hide
- */
- public static final String CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE =
- "com.tmobile.intent.category.THEME_PACKAGE_INSTALL_STATE_CHANGE";
-
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Application launch intent categories (see addCategory()).
diff --git a/core/java/android/content/pm/ThemeUtils.java b/core/java/android/content/pm/ThemeUtils.java
index e41523c..07e73b5 100644
--- a/core/java/android/content/pm/ThemeUtils.java
+++ b/core/java/android/content/pm/ThemeUtils.java
@@ -15,112 +15,30 @@
*/
package android.content.pm;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.ContextWrapper;
-import android.content.IntentFilter;
-import android.content.res.AssetManager;
-import android.content.res.Configuration;
import android.content.res.ThemeConfig;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteDatabase;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.FileUtils;
-import android.os.SystemProperties;
-import android.provider.MediaStore;
-import android.provider.Settings;
-import android.provider.ThemesContract;
-import android.provider.ThemesContract.ThemesColumns;
import android.text.TextUtils;
-import android.util.DisplayMetrics;
-import android.util.Log;
-import android.view.WindowManager;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
import java.io.File;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.InputStreamReader;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
import java.util.jar.StrictJarFile;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.CRC32;
import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
-
-import static android.content.res.ThemeConfig.SYSTEM_DEFAULT;
/**
* @hide
*/
public class ThemeUtils {
- private static final String TAG = "ThemeUtils";
+ private static final String TAG = ThemeUtils.class.getSimpleName();
/* Path inside a theme APK to the overlay folder */
public static final String OVERLAY_PATH = "assets/overlays/";
public static final String ICONS_PATH = "assets/icons/";
public static final String COMMON_RES_PATH = "assets/overlays/common/";
- public static final String FONT_XML = "fonts.xml";
public static final String RESOURCE_CACHE_DIR = "/data/resource-cache/";
- public static final String IDMAP_SUFFIX = "@idmap";
- public static final String COMMON_RES_SUFFIX = ".common";
public static final String COMMON_RES_TARGET = "common";
- public static final String ICON_HASH_FILENAME = "hash";
-
- // path to external theme resources, i.e. bootanimation.zip
- public static final String SYSTEM_THEME_PATH = "/data/system/theme";
- public static final String SYSTEM_THEME_FONT_PATH = SYSTEM_THEME_PATH + File.separator + "fonts";
- public static final String SYSTEM_THEME_RINGTONE_PATH = SYSTEM_THEME_PATH
- + File.separator + "ringtones";
- public static final String SYSTEM_THEME_NOTIFICATION_PATH = SYSTEM_THEME_PATH
- + File.separator + "notifications";
- public static final String SYSTEM_THEME_ALARM_PATH = SYSTEM_THEME_PATH
- + File.separator + "alarms";
- public static final String SYSTEM_THEME_ICON_CACHE_DIR = SYSTEM_THEME_PATH
- + File.separator + "icons";
- // internal path to bootanimation.zip inside theme apk
- public static final String THEME_BOOTANIMATION_PATH = "assets/bootanimation/bootanimation.zip";
-
- public static final String SYSTEM_MEDIA_PATH = "/system/media/audio";
- public static final String SYSTEM_ALARMS_PATH = SYSTEM_MEDIA_PATH + File.separator
- + "alarms";
- public static final String SYSTEM_RINGTONES_PATH = SYSTEM_MEDIA_PATH + File.separator
- + "ringtones";
- public static final String SYSTEM_NOTIFICATIONS_PATH = SYSTEM_MEDIA_PATH + File.separator
- + "notifications";
-
- // path to asset lockscreen and wallpapers directory
- public static final String LOCKSCREEN_WALLPAPER_PATH = "lockscreen";
- public static final String WALLPAPER_PATH = "wallpapers";
-
- private static final String MEDIA_CONTENT_URI = "content://media/internal/audio/media";
-
- // Constants for theme change broadcast
- public static final String ACTION_THEME_CHANGED = "org.cyanogenmod.intent.action.THEME_CHANGED";
- public static final String CATEGORY_THEME_COMPONENT_PREFIX = "org.cyanogenmod.intent.category.";
- public static final String EXTRA_COMPONENTS = "components";
- public static final String EXTRA_REQUEST_TYPE = "request_type";
- public static final String EXTRA_UPDATE_TIME = "update_time";
-
- public static final int SYSTEM_TARGET_API = 0;
// Package name for any app which does not have a specific theme applied
private static final String DEFAULT_PKG = "default";
- private static final String SETTINGS_DB =
- "/data/data/com.android.providers.settings/databases/settings.db";
- private static final String SETTINGS_SECURE_TABLE = "secure";
private static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
/**
@@ -156,18 +74,10 @@ public class ThemeUtils {
/**
* Get the path of the resource cache for the given target and theme
- * @param targetPkgName
- * @param themePkg
+ * @param targetPkgName Target app package name
+ * @param themePkgName Theme package name
* @return Path to the resource cache for this target and theme
*/
- public static String getTargetCacheDir(String targetPkgName, PackageInfo themePkg) {
- return getTargetCacheDir(targetPkgName, themePkg.packageName);
- }
-
- public static String getTargetCacheDir(String targetPkgName, PackageParser.Package themePkg) {
- return getTargetCacheDir(targetPkgName, themePkg.packageName);
- }
-
public static String getTargetCacheDir(String targetPkgName, String themePkgName) {
return getOverlayResourceCacheDir(themePkgName) + File.separator + targetPkgName;
}
@@ -181,18 +91,10 @@ public class ThemeUtils {
return getOverlayResourceCacheDir(pkgName) + File.separator + "icons";
}
- public static String getIconHashFile(String pkgName) {
- return getIconPackDir(pkgName) + File.separator + ICON_HASH_FILENAME;
- }
-
public static String getIconPackApkPath(String pkgName) {
return getIconPackDir(pkgName) + "/resources.apk";
}
- public static String getIconPackResPath(String pkgName) {
- return getIconPackDir(pkgName) + "/resources.arsc";
- }
-
public static String getIdmapPath(String targetPkgName, String overlayPkgName) {
return getTargetCacheDir(targetPkgName, overlayPkgName) + File.separator + "idmap";
}
@@ -211,507 +113,6 @@ public class ThemeUtils {
return COMMON_RES_TARGET;
}
- public static void createCacheDirIfNotExists() throws IOException {
- File file = new File(RESOURCE_CACHE_DIR);
- if (!file.exists() && !file.mkdir()) {
- throw new IOException("Could not create dir: " + file.toString());
- }
- FileUtils.setPermissions(file, FileUtils.S_IRWXU
- | FileUtils.S_IRWXG | FileUtils.S_IROTH | FileUtils.S_IXOTH, -1, -1);
- }
-
- public static void createResourcesDirIfNotExists(String targetPkgName, String overlayPkgName)
- throws IOException {
- createDirIfNotExists(getOverlayResourceCacheDir(overlayPkgName));
- File file = new File(getTargetCacheDir(targetPkgName, overlayPkgName));
- if (!file.exists() && !file.mkdir()) {
- throw new IOException("Could not create dir: " + file.toString());
- }
- FileUtils.setPermissions(file, FileUtils.S_IRWXU
- | FileUtils.S_IRWXG | FileUtils.S_IROTH | FileUtils.S_IXOTH, -1, -1);
- }
-
- public static void createIconDirIfNotExists(String pkgName) throws IOException {
- createDirIfNotExists(getOverlayResourceCacheDir(pkgName));
- File file = new File(getIconPackDir(pkgName));
- if (!file.exists() && !file.mkdir()) {
- throw new IOException("Could not create dir: " + file.toString());
- }
- FileUtils.setPermissions(file, FileUtils.S_IRWXU
- | FileUtils.S_IRWXG | FileUtils.S_IROTH | FileUtils.S_IXOTH, -1, -1);
- }
-
- private static boolean dirExists(String dirPath) {
- final File dir = new File(dirPath);
- return dir.exists() && dir.isDirectory();
- }
-
- private static void createDirIfNotExists(String dirPath) {
- if (!dirExists(dirPath)) {
- File dir = new File(dirPath);
- if (dir.mkdir()) {
- FileUtils.setPermissions(dir, FileUtils.S_IRWXU |
- FileUtils.S_IRWXG| FileUtils.S_IROTH | FileUtils.S_IXOTH, -1, -1);
- }
- }
- }
-
- /**
- * Create SYSTEM_THEME_PATH directory if it does not exist
- */
- public static void createThemeDirIfNotExists() {
- createDirIfNotExists(SYSTEM_THEME_PATH);
- }
-
- /**
- * Create SYSTEM_FONT_PATH directory if it does not exist
- */
- public static void createFontDirIfNotExists() {
- createDirIfNotExists(SYSTEM_THEME_FONT_PATH);
- }
-
- /**
- * Create SYSTEM_THEME_RINGTONE_PATH directory if it does not exist
- */
- public static void createRingtoneDirIfNotExists() {
- createDirIfNotExists(SYSTEM_THEME_RINGTONE_PATH);
- }
-
- /**
- * Create SYSTEM_THEME_NOTIFICATION_PATH directory if it does not exist
- */
- public static void createNotificationDirIfNotExists() {
- createDirIfNotExists(SYSTEM_THEME_NOTIFICATION_PATH);
- }
-
- /**
- * Create SYSTEM_THEME_ALARM_PATH directory if it does not exist
- */
- public static void createAlarmDirIfNotExists() {
- createDirIfNotExists(SYSTEM_THEME_ALARM_PATH);
- }
-
- /**
- * Create SYSTEM_THEME_ICON_CACHE_DIR directory if it does not exist
- */
- public static void createIconCacheDirIfNotExists() {
- createDirIfNotExists(SYSTEM_THEME_ICON_CACHE_DIR);
- }
-
- public static void clearIconCache() {
- FileUtils.deleteContents(new File(SYSTEM_THEME_ICON_CACHE_DIR));
- }
-
- public static InputStream getInputStreamFromAsset(Context ctx, String path) throws IOException {
- if (ctx == null || path == null)
- return null;
- InputStream is = null;
- String ASSET_BASE = "file:///android_asset/";
- path = path.substring(ASSET_BASE.length());
- AssetManager assets = ctx.getAssets();
- is = assets.open(path);
- return is;
- }
-
- public static void closeQuietly(InputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- }
- }
-
- public static void closeQuietly(OutputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- }
- }
-
- /**
- * Scale the boot animation to better fit the device by editing the desc.txt found
- * in the bootanimation.zip
- * @param context Context to use for getting an instance of the WindowManager
- * @param input InputStream of the original bootanimation.zip
- * @param dst Path to store the newly created bootanimation.zip
- * @throws IOException
- */
- public static void copyAndScaleBootAnimation(Context context, InputStream input, String dst)
- throws IOException {
- final OutputStream os = new FileOutputStream(dst);
- final ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(os));
- final ZipInputStream bootAni = new ZipInputStream(new BufferedInputStream(input));
- ZipEntry ze;
-
- zos.setMethod(ZipOutputStream.STORED);
- final byte[] bytes = new byte[4096];
- int len;
- while ((ze = bootAni.getNextEntry()) != null) {
- ZipEntry entry = new ZipEntry(ze.getName());
- entry.setMethod(ZipEntry.STORED);
- entry.setCrc(ze.getCrc());
- entry.setSize(ze.getSize());
- entry.setCompressedSize(ze.getSize());
- if (!ze.getName().equals("desc.txt")) {
- // just copy this entry straight over into the output zip
- zos.putNextEntry(entry);
- while ((len = bootAni.read(bytes)) > 0) {
- zos.write(bytes, 0, len);
- }
- } else {
- String line;
- BufferedReader reader = new BufferedReader(new InputStreamReader(bootAni));
- final String[] info = reader.readLine().split(" ");
-
- int scaledWidth;
- int scaledHeight;
- WindowManager wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
- DisplayMetrics dm = new DisplayMetrics();
- wm.getDefaultDisplay().getRealMetrics(dm);
- // just in case the device is in landscape orientation we will
- // swap the values since most (if not all) animations are portrait
- if (dm.widthPixels > dm.heightPixels) {
- scaledWidth = dm.heightPixels;
- scaledHeight = dm.widthPixels;
- } else {
- scaledWidth = dm.widthPixels;
- scaledHeight = dm.heightPixels;
- }
-
- int width = Integer.parseInt(info[0]);
- int height = Integer.parseInt(info[1]);
-
- if (width == height)
- scaledHeight = scaledWidth;
- else {
- // adjust scaledHeight to retain original aspect ratio
- float scale = (float)scaledWidth / (float)width;
- int newHeight = (int)((float)height * scale);
- if (newHeight < scaledHeight)
- scaledHeight = newHeight;
- }
-
- CRC32 crc32 = new CRC32();
- int size = 0;
- ByteBuffer buffer = ByteBuffer.wrap(bytes);
- line = String.format("%d %d %s\n", scaledWidth, scaledHeight, info[2]);
- buffer.put(line.getBytes());
- size += line.getBytes().length;
- crc32.update(line.getBytes());
- while ((line = reader.readLine()) != null) {
- line = String.format("%s\n", line);
- buffer.put(line.getBytes());
- size += line.getBytes().length;
- crc32.update(line.getBytes());
- }
- entry.setCrc(crc32.getValue());
- entry.setSize(size);
- entry.setCompressedSize(size);
- zos.putNextEntry(entry);
- zos.write(buffer.array(), 0, size);
- }
- zos.closeEntry();
- }
- zos.close();
- }
-
- public static boolean isValidAudible(String fileName) {
- return (fileName != null &&
- (fileName.endsWith(".mp3") || fileName.endsWith(".ogg")));
- }
-
- public static boolean setAudible(Context context, File ringtone, int type, String name) {
- final String path = ringtone.getAbsolutePath();
- final String mimeType = name.endsWith(".ogg") ? "audio/ogg" : "audio/mp3";
- ContentValues values = new ContentValues();
- values.put(MediaStore.MediaColumns.DATA, path);
- values.put(MediaStore.MediaColumns.TITLE, name);
- values.put(MediaStore.MediaColumns.MIME_TYPE, mimeType);
- values.put(MediaStore.MediaColumns.SIZE, ringtone.length());
- values.put(MediaStore.Audio.Media.IS_RINGTONE, type == RingtoneManager.TYPE_RINGTONE);
- values.put(MediaStore.Audio.Media.IS_NOTIFICATION,
- type == RingtoneManager.TYPE_NOTIFICATION);
- values.put(MediaStore.Audio.Media.IS_ALARM, type == RingtoneManager.TYPE_ALARM);
- values.put(MediaStore.Audio.Media.IS_MUSIC, false);
-
- Uri uri = MediaStore.Audio.Media.getContentUriForPath(path);
- Uri newUri = null;
- Cursor c = context.getContentResolver().query(uri,
- new String[] {MediaStore.MediaColumns._ID},
- MediaStore.MediaColumns.DATA + "='" + path + "'",
- null, null);
- if (c != null && c.getCount() > 0) {
- c.moveToFirst();
- long id = c.getLong(0);
- c.close();
- newUri = Uri.withAppendedPath(Uri.parse(MEDIA_CONTENT_URI), "" + id);
- context.getContentResolver().update(uri, values,
- MediaStore.MediaColumns._ID + "=" + id, null);
- }
- if (newUri == null)
- newUri = context.getContentResolver().insert(uri, values);
- try {
- RingtoneManager.setActualDefaultRingtoneUri(context, type, newUri);
- } catch (Exception e) {
- return false;
- }
- return true;
- }
-
- public static boolean setDefaultAudible(Context context, int type) {
- final String audiblePath = getDefaultAudiblePath(type);
- if (audiblePath != null) {
- Uri uri = MediaStore.Audio.Media.getContentUriForPath(audiblePath);
- Cursor c = context.getContentResolver().query(uri,
- new String[] {MediaStore.MediaColumns._ID},
- MediaStore.MediaColumns.DATA + "='" + audiblePath + "'",
- null, null);
- if (c != null && c.getCount() > 0) {
- c.moveToFirst();
- long id = c.getLong(0);
- c.close();
- uri = Uri.withAppendedPath(
- Uri.parse(MEDIA_CONTENT_URI), "" + id);
- }
- if (uri != null)
- RingtoneManager.setActualDefaultRingtoneUri(context, type, uri);
- } else {
- return false;
- }
- return true;
- }
-
- public static String getDefaultAudiblePath(int type) {
- final String name;
- final String path;
- switch (type) {
- case RingtoneManager.TYPE_ALARM:
- name = SystemProperties.get("ro.config.alarm_alert", null);
- path = name != null ? SYSTEM_ALARMS_PATH + File.separator + name : null;
- break;
- case RingtoneManager.TYPE_NOTIFICATION:
- name = SystemProperties.get("ro.config.notification_sound", null);
- path = name != null ? SYSTEM_NOTIFICATIONS_PATH + File.separator + name : null;
- break;
- case RingtoneManager.TYPE_RINGTONE:
- name = SystemProperties.get("ro.config.ringtone", null);
- path = name != null ? SYSTEM_RINGTONES_PATH + File.separator + name : null;
- break;
- default:
- path = null;
- break;
- }
- return path;
- }
-
- public static void clearAudibles(Context context, String audiblePath) {
- final File audibleDir = new File(audiblePath);
- if (audibleDir.exists()) {
- String[] files = audibleDir.list();
- final ContentResolver resolver = context.getContentResolver();
- for (String s : files) {
- final String filePath = audiblePath + File.separator + s;
- Uri uri = MediaStore.Audio.Media.getContentUriForPath(filePath);
- resolver.delete(uri, MediaStore.MediaColumns.DATA + "=\""
- + filePath + "\"", null);
- (new File(filePath)).delete();
- }
- }
- }
-
- public static Context createUiContext(final Context context) {
- try {
- Context uiContext = context.createPackageContext("com.android.systemui",
- Context.CONTEXT_RESTRICTED);
- return new ThemedUiContext(uiContext, context.getApplicationContext());
- } catch (PackageManager.NameNotFoundException e) {
- }
-
- return null;
- }
-
- public static void registerThemeChangeReceiver(final Context context,
- final BroadcastReceiver receiver) {
- IntentFilter filter = new IntentFilter(ACTION_THEME_CHANGED);
-
- context.registerReceiver(receiver, filter);
- }
-
- public static String getLockscreenWallpaperPath(AssetManager assetManager) throws IOException {
- String[] assets = assetManager.list(LOCKSCREEN_WALLPAPER_PATH);
- String asset = getFirstNonEmptyAsset(assets);
- if (asset == null) return null;
- return LOCKSCREEN_WALLPAPER_PATH + File.separator + asset;
- }
-
- public static String getWallpaperPath(AssetManager assetManager) throws IOException {
- String[] assets = assetManager.list(WALLPAPER_PATH);
- String asset = getFirstNonEmptyAsset(assets);
- if (asset == null) return null;
- return WALLPAPER_PATH + File.separator + asset;
- }
-
- public static List<String> getWallpaperPathList(AssetManager assetManager)
- throws IOException {
- List<String> wallpaperList = new ArrayList<String>();
- String[] assets = assetManager.list(WALLPAPER_PATH);
- for (String asset : assets) {
- if (!TextUtils.isEmpty(asset)) {
- wallpaperList.add(WALLPAPER_PATH + File.separator + asset);
- }
- }
- return wallpaperList;
- }
-
- // Returns the first non-empty asset name. Empty assets can occur if the APK is built
- // with folders included as zip entries in the APK. Searching for files inside "folderName" via
- // assetManager.list("folderName") can cause these entries to be included as empty strings.
- private static String getFirstNonEmptyAsset(String[] assets) {
- if (assets == null) return null;
- String filename = null;
- for(String asset : assets) {
- if (!TextUtils.isEmpty(asset)) {
- filename = asset;
- break;
- }
- }
- return filename;
- }
-
- public static String getDefaultThemePackageName(Context context) {
- final String defaultThemePkg = Settings.Secure.getString(context.getContentResolver(),
- Settings.Secure.DEFAULT_THEME_PACKAGE);
- if (!TextUtils.isEmpty(defaultThemePkg)) {
- PackageManager pm = context.getPackageManager();
- try {
- if (pm.getPackageInfo(defaultThemePkg, 0) != null) {
- return defaultThemePkg;
- }
- } catch (PackageManager.NameNotFoundException e) {
- // doesn't exist so system will be default
- Log.w(TAG, "Default theme " + defaultThemePkg + " not found", e);
- }
- }
-
- return SYSTEM_DEFAULT;
- }
-
- private static class ThemedUiContext extends ContextWrapper {
- private Context mAppContext;
-
- public ThemedUiContext(Context context, Context appContext) {
- super(context);
- mAppContext = appContext;
- }
-
- @Override
- public Context getApplicationContext() {
- return mAppContext;
- }
-
- @Override
- public String getPackageName() {
- return mAppContext.getPackageName();
- }
- }
-
- // Returns a mutable list of all theme components
- public static List<String> getAllComponents() {
- List<String> components = new ArrayList<String>(9);
- components.add(ThemesColumns.MODIFIES_FONTS);
- components.add(ThemesColumns.MODIFIES_LAUNCHER);
- components.add(ThemesColumns.MODIFIES_ALARMS);
- components.add(ThemesColumns.MODIFIES_BOOT_ANIM);
- components.add(ThemesColumns.MODIFIES_ICONS);
- components.add(ThemesColumns.MODIFIES_LOCKSCREEN);
- components.add(ThemesColumns.MODIFIES_NOTIFICATIONS);
- components.add(ThemesColumns.MODIFIES_OVERLAYS);
- components.add(ThemesColumns.MODIFIES_RINGTONES);
- components.add(ThemesColumns.MODIFIES_STATUS_BAR);
- components.add(ThemesColumns.MODIFIES_NAVIGATION_BAR);
- components.add(ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN);
- return components;
- }
-
- /**
- * Returns a mutable list of all the theme components supported by a given package
- * NOTE: This queries the themes content provider. If there isn't a provider installed
- * or if it is too early in the boot process this method will not work.
- */
- public static List<String> getSupportedComponents(Context context, String pkgName) {
- List<String> supportedComponents = new ArrayList<String>();
-
- String selection = ThemesContract.ThemesColumns.PKG_NAME + "= ?";
- String[] selectionArgs = new String[]{ pkgName };
- Cursor c = context.getContentResolver().query(ThemesContract.ThemesColumns.CONTENT_URI,
- null, selection, selectionArgs, null);
-
- if (c != null) {
- if (c.moveToFirst()) {
- List<String> allComponents = getAllComponents();
- for (String component : allComponents) {
- int index = c.getColumnIndex(component);
- if (c.getInt(index) == 1) {
- supportedComponents.add(component);
- }
- }
- }
- c.close();
- }
- return supportedComponents;
- }
-
- /**
- * Get the components from the default theme. If the default theme is not SYSTEM then any
- * components that are not in the default theme will come from SYSTEM to create a complete
- * component map.
- * @param context
- * @return
- */
- public static Map<String, String> getDefaultComponents(Context context) {
- String defaultThemePkg = getDefaultThemePackageName(context);
- List<String> defaultComponents = null;
- List<String> systemComponents = getSupportedComponents(context, SYSTEM_DEFAULT);
- if (!SYSTEM_DEFAULT.equals(defaultThemePkg)) {
- defaultComponents = getSupportedComponents(context, defaultThemePkg);
- }
-
- Map<String, String> componentMap = new HashMap<String, String>(systemComponents.size());
- if (defaultComponents != null) {
- for (String component : defaultComponents) {
- componentMap.put(component, defaultThemePkg);
- }
- }
- for (String component : systemComponents) {
- if (!componentMap.containsKey(component)) {
- componentMap.put(component, SYSTEM_DEFAULT);
- }
- }
-
- return componentMap;
- }
-
- /**
- * Takes an existing component map and adds any missing components from the default
- * map of components.
- * @param context
- * @param componentMap An existing component map
- */
- public static void completeComponentMap(Context context,
- Map<String, String> componentMap) {
- if (componentMap == null) return;
-
- Map<String, String> defaultComponents = getDefaultComponents(context);
- for (String component : defaultComponents.keySet()) {
- if (!componentMap.containsKey(component)) {
- componentMap.put(component, defaultComponents.get(component));
- }
- }
- }
-
/**
* Convenience method to determine if a theme component is a per app theme and not a standard
* component.
diff --git a/core/java/android/content/res/IThemeChangeListener.aidl b/core/java/android/content/res/IThemeChangeListener.aidl
deleted file mode 100644
index a2e2abd..0000000
--- a/core/java/android/content/res/IThemeChangeListener.aidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2014 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.content.res;
-
-/** {@hide} */
-oneway interface IThemeChangeListener {
- void onProgress(int progress);
- void onFinish(boolean isSuccess);
-}
diff --git a/core/java/android/content/res/IThemeProcessingListener.aidl b/core/java/android/content/res/IThemeProcessingListener.aidl
deleted file mode 100644
index 2e1c16e..0000000
--- a/core/java/android/content/res/IThemeProcessingListener.aidl
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2014 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.content.res;
-
-/** {@hide} */
-oneway interface IThemeProcessingListener {
- void onFinishedProcessing(String pkgName);
-}
diff --git a/core/java/android/content/res/IThemeService.aidl b/core/java/android/content/res/IThemeService.aidl
deleted file mode 100644
index 90cb9fb..0000000
--- a/core/java/android/content/res/IThemeService.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2014 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.content.res;
-
-import android.content.res.IThemeChangeListener;
-import android.content.res.IThemeProcessingListener;
-import android.content.res.ThemeChangeRequest;
-import android.graphics.Bitmap;
-
-import java.util.Map;
-
-/** {@hide} */
-interface IThemeService {
- void requestThemeChangeUpdates(in IThemeChangeListener listener);
- void removeUpdates(in IThemeChangeListener listener);
-
- void requestThemeChange(in ThemeChangeRequest request, boolean removePerAppThemes);
- void applyDefaultTheme();
- boolean isThemeApplying();
- int getProgress();
-
- boolean cacheComposedIcon(in Bitmap icon, String path);
-
- boolean processThemeResources(String themePkgName);
- boolean isThemeBeingProcessed(String themePkgName);
- void registerThemeProcessingListener(in IThemeProcessingListener listener);
- void unregisterThemeProcessingListener(in IThemeProcessingListener listener);
-
- void rebuildResourceCache();
-}
diff --git a/core/java/android/content/res/ThemeChangeRequest.aidl b/core/java/android/content/res/ThemeChangeRequest.aidl
deleted file mode 100644
index e6cf115..0000000
--- a/core/java/android/content/res/ThemeChangeRequest.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2015 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.content.res;
-
-/** @hide */
-parcelable ThemeChangeRequest;
diff --git a/core/java/android/content/res/ThemeChangeRequest.java b/core/java/android/content/res/ThemeChangeRequest.java
deleted file mode 100644
index 1d13bb0..0000000
--- a/core/java/android/content/res/ThemeChangeRequest.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (C) 2015 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.content.res;
-
-import android.content.pm.ThemeUtils;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-
-import static android.provider.ThemesContract.ThemesColumns.*;
-
-/** @hide */
-public final class ThemeChangeRequest implements Parcelable {
- public static final int DEFAULT_WALLPAPER_ID = -1;
-
- private final Map<String, String> mThemeComponents = new HashMap<String, String>();
- private final Map<String, String> mPerAppOverlays = new HashMap<String, String>();
- private RequestType mRequestType;
- private long mWallpaperId = -1;
-
- public String getOverlayThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_OVERLAYS);
- }
-
- public String getStatusBarThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_STATUS_BAR);
- }
-
- public String getNavBarThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_NAVIGATION_BAR);
- }
-
- public String getFontThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_FONTS);
- }
-
- public String getIconsThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_ICONS);
- }
-
- public String getBootanimationThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_BOOT_ANIM);
- }
-
- public String getWallpaperThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_LAUNCHER);
- }
-
- public String getLockWallpaperThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_LOCKSCREEN);
- }
-
- public String getAlarmThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_ALARMS);
- }
-
- public String getNotificationThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_NOTIFICATIONS);
- }
-
- public String getRingtoneThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_RINGTONES);
- }
-
- public String getLiveLockScreenThemePackageName() {
- return getThemePackageNameForComponent(MODIFIES_LIVE_LOCK_SCREEN);
- }
-
- public final Map<String, String> getThemeComponentsMap() {
- return Collections.unmodifiableMap(mThemeComponents);
- }
-
- public long getWallpaperId() {
- return mWallpaperId;
- }
-
- /**
- * Get the mapping for per app themes
- * @return A mapping of apps and the theme to apply for each one. or null if none set.
- */
- public final Map<String, String> getPerAppOverlays() {
- return Collections.unmodifiableMap(mPerAppOverlays);
- }
-
- public int getNumChangesRequested() {
- return mThemeComponents.size() + mPerAppOverlays.size();
- }
-
- public RequestType getReqeustType() {
- return mRequestType;
- }
-
- private String getThemePackageNameForComponent(String componentName) {
- return mThemeComponents.get(componentName);
- }
-
- private ThemeChangeRequest(Map<String, String> components, Map<String, String> perAppThemes,
- RequestType requestType, long wallpaperId) {
- if (components != null) {
- mThemeComponents.putAll(components);
- }
- if (perAppThemes != null) {
- mPerAppOverlays.putAll(perAppThemes);
- }
- mRequestType = requestType;
- mWallpaperId = wallpaperId;
- }
-
- private ThemeChangeRequest(Parcel source) {
- int numComponents = source.readInt();
- for (int i = 0; i < numComponents; i++) {
- mThemeComponents.put(source.readString(), source.readString());
- }
-
- numComponents = source.readInt();
- for (int i = 0 ; i < numComponents; i++) {
- mPerAppOverlays.put(source.readString(), source.readString());
- }
- mRequestType = RequestType.values()[source.readInt()];
- mWallpaperId = source.readLong();
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeInt(mThemeComponents.size());
- for (String component : mThemeComponents.keySet()) {
- dest.writeString(component);
- dest.writeString(mThemeComponents.get(component));
- }
- dest.writeInt((mPerAppOverlays.size()));
- for (String appPkgName : mPerAppOverlays.keySet()) {
- dest.writeString(appPkgName);
- dest.writeString(mPerAppOverlays.get(appPkgName));
- }
- dest.writeInt(mRequestType.ordinal());
- dest.writeLong(mWallpaperId);
- }
-
- public static final Parcelable.Creator<ThemeChangeRequest> CREATOR =
- new Parcelable.Creator<ThemeChangeRequest>() {
- @Override
- public ThemeChangeRequest createFromParcel(Parcel source) {
- return new ThemeChangeRequest(source);
- }
-
- @Override
- public ThemeChangeRequest[] newArray(int size) {
- return new ThemeChangeRequest[size];
- }
- };
-
- public enum RequestType {
- USER_REQUEST,
- USER_REQUEST_MIXNMATCH,
- THEME_UPDATED,
- THEME_REMOVED,
- THEME_RESET;
- }
-
- public static class Builder {
- Map<String, String> mThemeComponents = new HashMap<String, String>();
- Map<String, String> mPerAppOverlays = new HashMap<String, String>();
- RequestType mRequestType = RequestType.USER_REQUEST;
- long mWallpaperId;
-
- public Builder() {}
-
- public Builder(ThemeConfig themeConfig) {
- if (themeConfig != null) {
- buildChangeRequestFromThemeConfig(themeConfig);
- }
- }
-
- public Builder setOverlay(String pkgName) {
- return setComponent(MODIFIES_OVERLAYS, pkgName);
- }
-
- public Builder setStatusBar(String pkgName) {
- return setComponent(MODIFIES_STATUS_BAR, pkgName);
- }
-
- public Builder setNavBar(String pkgName) {
- return setComponent(MODIFIES_NAVIGATION_BAR, pkgName);
- }
-
- public Builder setFont(String pkgName) {
- return setComponent(MODIFIES_FONTS, pkgName);
- }
-
- public Builder setIcons(String pkgName) {
- return setComponent(MODIFIES_ICONS, pkgName);
- }
-
- public Builder setBootanimation(String pkgName) {
- return setComponent(MODIFIES_BOOT_ANIM, pkgName);
- }
-
- public Builder setWallpaper(String pkgName) {
- return setComponent(MODIFIES_LAUNCHER, pkgName);
- }
-
- // Used in the case that more than one wallpaper exists for a given pkg name
- public Builder setWallpaperId(long id) {
- mWallpaperId = id;
- return this;
- }
-
- public Builder setLockWallpaper(String pkgName) {
- return setComponent(MODIFIES_LOCKSCREEN, pkgName);
- }
-
- public Builder setAlarm(String pkgName) {
- return setComponent(MODIFIES_ALARMS, pkgName);
- }
-
- public Builder setNotification(String pkgName) {
- return setComponent(MODIFIES_NOTIFICATIONS, pkgName);
- }
-
- public Builder setRingtone(String pkgName) {
- return setComponent(MODIFIES_RINGTONES, pkgName);
- }
-
- public Builder setLiveLockScreen(String pkgName) {
- return setComponent(MODIFIES_LIVE_LOCK_SCREEN, pkgName);
- }
-
- public Builder setComponent(String component, String pkgName) {
- if (pkgName != null) {
- mThemeComponents.put(component, pkgName);
- } else {
- mThemeComponents.remove(component);
- }
- return this;
- }
-
- public Builder setAppOverlay(String appPkgName, String themePkgName) {
- if (appPkgName != null) {
- if (themePkgName != null) {
- mPerAppOverlays.put(appPkgName, themePkgName);
- } else {
- mPerAppOverlays.remove(appPkgName);
- }
- }
-
- return this;
- }
-
- public Builder setRequestType(RequestType requestType) {
- mRequestType = requestType != null ? requestType : RequestType.USER_REQUEST;
- return this;
- }
-
- public ThemeChangeRequest build() {
- return new ThemeChangeRequest(mThemeComponents, mPerAppOverlays,
- mRequestType, mWallpaperId);
- }
-
- private void buildChangeRequestFromThemeConfig(ThemeConfig themeConfig) {
- if (themeConfig.getFontPkgName() != null) {
- this.setFont(themeConfig.getFontPkgName());
- }
- if (themeConfig.getIconPackPkgName() != null) {
- this.setIcons(themeConfig.getIconPackPkgName());
- }
- if (themeConfig.getOverlayPkgName() != null) {
- this.setOverlay(themeConfig.getOverlayPkgName());
- }
- if (themeConfig.getOverlayForStatusBar() != null) {
- this.setStatusBar(themeConfig.getOverlayForStatusBar());
- }
- if (themeConfig.getOverlayForNavBar() != null) {
- this.setNavBar(themeConfig.getOverlayForNavBar());
- }
-
- // Check if there are any per-app overlays using this theme
- final Map<String, ThemeConfig.AppTheme> themes = themeConfig.getAppThemes();
- for (String appPkgName : themes.keySet()) {
- if (ThemeUtils.isPerAppThemeComponent(appPkgName)) {
- this.setAppOverlay(appPkgName, themes.get(appPkgName).getOverlayPkgName());
- }
- }
- }
- }
-}
diff --git a/core/java/android/content/res/ThemeConfig.java b/core/java/android/content/res/ThemeConfig.java
index ac95d6b..f304801 100644
--- a/core/java/android/content/res/ThemeConfig.java
+++ b/core/java/android/content/res/ThemeConfig.java
@@ -1,12 +1,12 @@
/*
- * Copyright (C) 2014 The CyanogenMod Project
+ * Copyright (C) 2016 The CyanogenMod Project
* Portions copyright (C) 2014, T-Mobile USA, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,12 +17,13 @@
package android.content.res;
import android.content.ContentResolver;
-import android.content.res.ThemeChangeRequest.RequestType;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
+import android.util.ArrayMap;
+import android.util.ArraySet;
import android.util.JsonReader;
import android.util.JsonToken;
import android.util.JsonWriter;
@@ -34,8 +35,6 @@ import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
/**
@@ -61,9 +60,7 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
private static final SystemAppTheme mSystemAppTheme = new SystemAppTheme();
// Maps pkgname to theme (ex com.angry.birds -> red theme)
- protected final Map<String, AppTheme> mThemes = new HashMap<String, AppTheme>();
-
- private RequestType mLastThemeChangeRequestType = RequestType.USER_REQUEST;
+ protected final Map<String, AppTheme> mThemes = new ArrayMap<>();
public ThemeConfig(Map<String, AppTheme> appThemes) {
mThemes.putAll(appThemes);
@@ -111,10 +108,6 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
return Collections.unmodifiableMap(mThemes);
}
- public RequestType getLastThemeChangeRequestType() {
- return mLastThemeChangeRequestType;
- }
-
private AppTheme getThemeFor(String pkgName) {
AppTheme theme = mThemes.get(pkgName);
if (theme == null) theme = getDefaultTheme();
@@ -136,12 +129,11 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
ThemeConfig o = (ThemeConfig) object;
Map<String, AppTheme> currThemes = (mThemes == null) ?
- new HashMap<String, AppTheme>() : mThemes;
+ new ArrayMap<String, AppTheme>() : mThemes;
Map<String, AppTheme> newThemes = (o.mThemes == null) ?
- new HashMap<String, AppTheme>() : o.mThemes;
+ new ArrayMap<String, AppTheme>() : o.mThemes;
- return (currThemes.equals(newThemes) &&
- mLastThemeChangeRequestType == o.mLastThemeChangeRequestType);
+ return currThemes.equals(newThemes);
}
return false;
}
@@ -160,8 +152,6 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
public int hashCode() {
int hash = 17;
hash = 31 * hash + mThemes.hashCode();
- hash = 31 * hash + (mLastThemeChangeRequestType == null ? 0 :
- mLastThemeChangeRequestType.ordinal());
return hash;
}
@@ -227,7 +217,6 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
public void writeToParcel(Parcel dest, int flags) {
String json = JsonSerializer.toJson(this);
dest.writeString(json);
- dest.writeInt(mLastThemeChangeRequestType.ordinal());
}
public static final Parcelable.Creator<ThemeConfig> CREATOR =
@@ -235,7 +224,6 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
public ThemeConfig createFromParcel(Parcel source) {
String json = source.readString();
ThemeConfig themeConfig = JsonSerializer.fromJson(json);
- themeConfig.mLastThemeChangeRequestType = RequestType.values()[source.readInt()];
return themeConfig;
}
@@ -351,10 +339,9 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
public static class Builder {
- private HashMap<String, String> mOverlays = new HashMap<String, String>();
- private HashMap<String, String> mIcons = new HashMap<String, String>();
- private HashMap<String, String> mFonts = new HashMap<String, String>();
- private RequestType mLastThemeChangeRequestType = RequestType.USER_REQUEST;
+ private Map<String, String> mOverlays = new ArrayMap<>();
+ private Map<String, String> mIcons = new ArrayMap<>();
+ private Map<String, String> mFonts = new ArrayMap<>();
public Builder() {}
@@ -366,7 +353,6 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
mIcons.put(key, appTheme.getIconPackPkgName());
mOverlays.put(key, appTheme.getOverlayPkgName());
}
- mLastThemeChangeRequestType = theme.mLastThemeChangeRequestType;
}
/**
@@ -427,18 +413,13 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
return this;
}
- public Builder setLastThemeChangeRequestType(RequestType requestType) {
- mLastThemeChangeRequestType = requestType;
- return this;
- }
-
public ThemeConfig build() {
- HashSet<String> appPkgSet = new HashSet<String>();
+ ArraySet<String> appPkgSet = new ArraySet<>();
appPkgSet.addAll(mOverlays.keySet());
appPkgSet.addAll(mIcons.keySet());
appPkgSet.addAll(mFonts.keySet());
- HashMap<String, AppTheme> appThemes = new HashMap<String, AppTheme>();
+ Map<String, AppTheme> appThemes = new ArrayMap<>();
for(String appPkgName : appPkgSet) {
String icon = mIcons.get(appPkgName);
String overlay = mOverlays.get(appPkgName);
@@ -455,7 +436,6 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
}
}
ThemeConfig themeConfig = new ThemeConfig(appThemes);
- themeConfig.mLastThemeChangeRequestType = mLastThemeChangeRequestType;
return themeConfig;
}
}
@@ -506,7 +486,7 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
public static ThemeConfig fromJson(String json) {
if (json == null) return null;
- HashMap<String, AppTheme> map = new HashMap<String, AppTheme>();
+ Map<String, AppTheme> map = new ArrayMap<>();
StringReader reader = null;
JsonReader jsonReader = null;
try {
@@ -582,7 +562,7 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
public static class SystemConfig extends ThemeConfig {
public SystemConfig() {
- super(new HashMap<String, AppTheme>());
+ super(new ArrayMap<String, AppTheme>());
}
}
@@ -593,7 +573,7 @@ public class ThemeConfig implements Cloneable, Parcelable, Comparable<ThemeConfi
@Override
public String toString() {
- return "No Theme Applied (Holo)";
+ return "No Theme Applied (System)";
}
}
}
diff --git a/core/java/android/content/res/ThemeManager.java b/core/java/android/content/res/ThemeManager.java
deleted file mode 100644
index fd05f1e..0000000
--- a/core/java/android/content/res/ThemeManager.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (C) 2014 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.content.res;
-
-import android.content.Context;
-import android.content.pm.ThemeUtils;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.RemoteException;
-import android.util.Log;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * {@hide}
- */
-public class ThemeManager {
- private static final String TAG = ThemeManager.class.getName();
- private Context mContext;
- private IThemeService mService;
- private Handler mHandler;
-
- private Set<ThemeChangeListener> mChangeListeners =
- new HashSet<ThemeChangeListener>();
-
- private Set<ThemeProcessingListener> mProcessingListeners =
- new HashSet<ThemeProcessingListener>();
-
- public ThemeManager(Context context, IThemeService service) {
- mContext = context;
- mService = service;
- mHandler = new Handler(Looper.getMainLooper());
- }
-
- private final IThemeChangeListener mThemeChangeListener = new IThemeChangeListener.Stub() {
- @Override
- public void onProgress(final int progress) throws RemoteException {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- synchronized (mChangeListeners) {
- List<ThemeChangeListener> listenersToRemove = new ArrayList
- <ThemeChangeListener>();
- for (ThemeChangeListener listener : mChangeListeners) {
- try {
- listener.onProgress(progress);
- } catch (Throwable e) {
- Log.w(TAG, "Unable to update theme change progress", e);
- listenersToRemove.add(listener);
- }
- }
- if (listenersToRemove.size() > 0) {
- for (ThemeChangeListener listener : listenersToRemove) {
- mChangeListeners.remove(listener);
- }
- }
- }
- }
- });
- }
-
- @Override
- public void onFinish(final boolean isSuccess) throws RemoteException {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- synchronized (mChangeListeners) {
- List<ThemeChangeListener> listenersToRemove = new ArrayList
- <ThemeChangeListener>();
- for (ThemeChangeListener listener : mChangeListeners) {
- try {
- listener.onFinish(isSuccess);
- } catch (Throwable e) {
- Log.w(TAG, "Unable to update theme change listener", e);
- listenersToRemove.add(listener);
- }
- }
- if (listenersToRemove.size() > 0) {
- for (ThemeChangeListener listener : listenersToRemove) {
- mChangeListeners.remove(listener);
- }
- }
- }
- }
- });
- }
- };
-
- private final IThemeProcessingListener mThemeProcessingListener =
- new IThemeProcessingListener.Stub() {
- @Override
- public void onFinishedProcessing(final String pkgName) throws RemoteException {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- synchronized (mProcessingListeners) {
- List<ThemeProcessingListener> listenersToRemove = new ArrayList
- <ThemeProcessingListener>();
- for (ThemeProcessingListener listener : mProcessingListeners) {
- try {
- listener.onFinishedProcessing(pkgName);
- } catch (Throwable e) {
- Log.w(TAG, "Unable to update theme change progress", e);
- listenersToRemove.add(listener);
- }
- }
- if (listenersToRemove.size() > 0) {
- for (ThemeProcessingListener listener : listenersToRemove) {
- mProcessingListeners.remove(listener);
- }
- }
- }
- }
- });
- }
- };
-
-
- public void addClient(ThemeChangeListener listener) {
- synchronized (mChangeListeners) {
- if (mChangeListeners.contains(listener)) {
- throw new IllegalArgumentException("Client was already added ");
- }
- if (mChangeListeners.size() == 0) {
- try {
- mService.requestThemeChangeUpdates(mThemeChangeListener);
- } catch (RemoteException e) {
- Log.w(TAG, "Unable to register listener", e);
- }
- }
- mChangeListeners.add(listener);
- }
- }
-
- public void removeClient(ThemeChangeListener listener) {
- synchronized (mChangeListeners) {
- mChangeListeners.remove(listener);
- if (mChangeListeners.size() == 0) {
- try {
- mService.removeUpdates(mThemeChangeListener);
- } catch (RemoteException e) {
- Log.w(TAG, "Unable to remove listener", e);
- }
- }
- }
- }
-
- public void onClientPaused(ThemeChangeListener listener) {
- removeClient(listener);
- }
-
- public void onClientResumed(ThemeChangeListener listener) {
- addClient(listener);
- }
-
- public void onClientDestroyed(ThemeChangeListener listener) {
- removeClient(listener);
- }
-
- /**
- * Register a ThemeProcessingListener to be notified when a theme is done being processed.
- * @param listener ThemeChangeListener to register
- */
- public void registerProcessingListener(ThemeProcessingListener listener) {
- synchronized (mProcessingListeners) {
- if (mProcessingListeners.contains(listener)) {
- throw new IllegalArgumentException("Listener was already added ");
- }
- if (mProcessingListeners.size() == 0) {
- try {
- mService.registerThemeProcessingListener(mThemeProcessingListener);
- } catch (RemoteException e) {
- Log.w(TAG, "Unable to register listener", e);
- }
- }
- mProcessingListeners.add(listener);
- }
- }
-
- /**
- * Unregister a ThemeChangeListener.
- * @param listener ThemeChangeListener to unregister
- */
- public void unregisterProcessingListener(ThemeChangeListener listener) {
- synchronized (mProcessingListeners) {
- mProcessingListeners.remove(listener);
- if (mProcessingListeners.size() == 0) {
- try {
- mService.unregisterThemeProcessingListener(mThemeProcessingListener);
- } catch (RemoteException e) {
- Log.w(TAG, "Unable to remove listener", e);
- }
- }
- }
- }
-
- /**
- * Convenience method. Applies the entire theme.
- */
- public void requestThemeChange(String pkgName) {
- //List<String> components = ThemeUtils.getSupportedComponents(mContext, pkgName);
- //requestThemeChange(pkgName, components);
- }
-
- public void requestThemeChange(String pkgName, List<String> components) {
- requestThemeChange(pkgName, components, true);
- }
-
- public void requestThemeChange(String pkgName, List<String> components,
- boolean removePerAppThemes) {
- Map<String, String> componentMap = new HashMap<String, String>(components.size());
- for (String component : components) {
- componentMap.put(component, pkgName);
- }
- requestThemeChange(componentMap, removePerAppThemes);
- }
-
- public void requestThemeChange(Map<String, String> componentMap) {
- requestThemeChange(componentMap, true);
- }
-
- public void requestThemeChange(Map<String, String> componentMap, boolean removePerAppThemes) {
- ThemeChangeRequest.Builder builder = new ThemeChangeRequest.Builder();
- for (String component : componentMap.keySet()) {
- builder.setComponent(component, componentMap.get(component));
- }
-
- requestThemeChange(builder.build(), removePerAppThemes);
- }
-
- public void requestThemeChange(ThemeChangeRequest request, boolean removePerAppThemes) {
- try {
- mService.requestThemeChange(request, removePerAppThemes);
- } catch (RemoteException e) {
- logThemeServiceException(e);
- }
- }
-
- public void applyDefaultTheme() {
- try {
- mService.applyDefaultTheme();
- } catch (RemoteException e) {
- logThemeServiceException(e);
- }
- }
-
- public boolean isThemeApplying() {
- try {
- return mService.isThemeApplying();
- } catch (RemoteException e) {
- logThemeServiceException(e);
- }
-
- return false;
- }
-
- public boolean isThemeBeingProcessed(String themePkgName) {
- try {
- return mService.isThemeBeingProcessed(themePkgName);
- } catch (RemoteException e) {
- logThemeServiceException(e);
- }
- return false;
- }
-
- public int getProgress() {
- try {
- return mService.getProgress();
- } catch (RemoteException e) {
- logThemeServiceException(e);
- }
- return -1;
- }
-
- public boolean processThemeResources(String themePkgName) {
- try {
- return mService.processThemeResources(themePkgName);
- } catch (RemoteException e) {
- logThemeServiceException(e);
- }
- return false;
- }
-
- private void logThemeServiceException(Exception e) {
- Log.w(TAG, "Unable to access ThemeService", e);
- }
-
- public interface ThemeChangeListener {
- void onProgress(int progress);
- void onFinish(boolean isSuccess);
- }
-
- public interface ThemeProcessingListener {
- void onFinishedProcessing(String pkgName);
- }
-}
-
diff --git a/core/java/android/provider/ThemesContract.java b/core/java/android/provider/ThemesContract.java
deleted file mode 100644
index af7ab26..0000000
--- a/core/java/android/provider/ThemesContract.java
+++ /dev/null
@@ -1,731 +0,0 @@
-package android.provider;
-
-import android.net.Uri;
-
-/**
- * @hide
- */
-public class ThemesContract {
- public static final String AUTHORITY = "com.cyanogenmod.themes";
- public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
-
- public static class ThemesColumns {
- public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "themes");
-
- /**
- * The unique ID for a row.
- * <P>Type: INTEGER (long)</P>
- */
- public static final String _ID = "_id";
-
- /**
- * The user visible title.
- * <P>Type: TEXT</P>
- */
- public static final String TITLE = "title";
-
- /**
- * Unique text to identify the apk pkg. ie "com.foo.bar"
- * <P>Type: TEXT</P>
- */
- public static final String PKG_NAME = "pkg_name";
-
- /**
- * A 32 bit RRGGBB color representative of the themes color scheme
- * <P>Type: INTEGER</P>
- */
- public static final String PRIMARY_COLOR = "primary_color";
-
- /**
- * A 2nd 32 bit RRGGBB color representative of the themes color scheme
- * <P>Type: INTEGER</P>
- */
- public static final String SECONDARY_COLOR = "secondary_color";
-
- /**
- * Name of the author of the theme
- * <P>Type: TEXT</P>
- */
- public static final String AUTHOR = "author";
-
- /**
- * The time that this row was created on its originating client (msecs
- * since the epoch).
- * <P>Type: INTEGER</P>
- */
- public static final String DATE_CREATED = "created";
-
- /**
- * URI to an image that shows the homescreen with the theme applied
- * since the epoch).
- * <P>Type: TEXT</P>
- */
- public static final String HOMESCREEN_URI = "homescreen_uri";
-
- /**
- * URI to an image that shows the lockscreen with theme applied
- * <P>Type: TEXT</P>
- */
- public static final String LOCKSCREEN_URI = "lockscreen_uri";
-
- /**
- * URI to an image that shows the style (aka skin) with theme applied
- * <P>Type: TEXT</P>
- */
- public static final String STYLE_URI = "style_uri";
-
- /**
- * TODO: Figure structure for actual animation instead of static
- * URI to an image of the boot_anim.
- * <P>Type: TEXT</P>
- */
- public static final String BOOT_ANIM_URI = "bootanim_uri";
-
- /**
- * URI to an image of the status bar for this theme.
- * <P>Type: TEXT</P>
- */
- public static final String STATUSBAR_URI = "status_uri";
-
- /**
- * URI to an image of the fonts in this theme.
- * <P>Type: TEXT</P>
- */
- public static final String FONT_URI = "font_uri";
-
- /**
- * URI to an image of the fonts in this theme.
- * <P>Type: TEXT</P>
- */
- public static final String ICON_URI = "icon_uri";
-
- /**
- * URI to an image of the fonts in this theme.
- * <P>Type: TEXT</P>
- */
- public static final String OVERLAYS_URI = "overlays_uri";
-
- /**
- * 1 if theme modifies the launcher/homescreen else 0
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_LAUNCHER = "mods_homescreen";
-
- /**
- * 1 if theme modifies the lockscreen else 0
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_LOCKSCREEN = "mods_lockscreen";
-
- /**
- * 1 if theme modifies icons else 0
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_ICONS = "mods_icons";
-
- /**
- * 1 if theme modifies fonts
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_FONTS = "mods_fonts";
-
- /**
- * 1 if theme modifies boot animation
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_BOOT_ANIM = "mods_bootanim";
-
- /**
- * 1 if theme modifies notifications
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_NOTIFICATIONS = "mods_notifications";
-
- /**
- * 1 if theme modifies alarm sounds
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_ALARMS = "mods_alarms";
-
- /**
- * 1 if theme modifies ringtones
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_RINGTONES = "mods_ringtones";
-
- /**
- * 1 if theme has overlays
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_OVERLAYS = "mods_overlays";
-
- /**
- * 1 if theme has an overlay for SystemUI/StatusBar
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_STATUS_BAR = "mods_status_bar";
-
- /**
- * 1 if theme has an overlay for SystemUI/NavBar
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_NAVIGATION_BAR = "mods_navigation_bar";
-
- /**
- * 1 if theme has a live lock screen
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String MODIFIES_LIVE_LOCK_SCREEN = "mods_live_lock_screen";
-
- /**
- * URI to the theme's wallpaper. We should support multiple wallpaper
- * but for now we will just have 1.
- * <P>Type: TEXT</P>
- */
- public static final String WALLPAPER_URI = "wallpaper_uri";
-
- /**
- * 1 if this row should actually be presented as a theme to the user.
- * For example if a "theme" only modifies one component (ex icons) then
- * we do not present it to the user under the themes table.
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String PRESENT_AS_THEME = "present_as_theme";
-
- /**
- * 1 if this theme is a legacy theme.
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String IS_LEGACY_THEME = "is_legacy_theme";
-
- /**
- * 1 if this theme is the system default theme.
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String IS_DEFAULT_THEME = "is_default_theme";
-
- /**
- * 1 if this theme is a legacy iconpack. A legacy icon pack is an APK that was written
- * for Trebuchet or a 3rd party launcher.
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String IS_LEGACY_ICONPACK = "is_legacy_iconpack";
-
- /**
- * install/update time in millisecs. When the row is inserted this column
- * is populated by the PackageInfo. It is used for syncing to PM
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String LAST_UPDATE_TIME = "updateTime";
-
- /**
- * install time in millisecs. When the row is inserted this column
- * is populated by the PackageInfo.
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String INSTALL_TIME = "install_time";
-
- /**
- * The target API this theme supports
- * is populated by the PackageInfo.
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String TARGET_API = "target_api";
-
- /**
- * The install state of the theme.
- * Can be one of the following:
- * {@link InstallState#UNKNOWN}
- * {@link InstallState#INSTALLING}
- * {@link InstallState#UPDATING}
- * {@link InstallState#INSTALLED}
- * <P>Type: INTEGER</P>
- * <P>Default: 0</P>
- */
- public static final String INSTALL_STATE = "install_state";
-
- public static class InstallState {
- public static final int UNKNOWN = 0;
- public static final int INSTALLING = 1;
- public static final int UPDATING = 2;
- public static final int INSTALLED = 3;
- }
- }
-
- /**
- * Key-value table which assigns a component (ex wallpaper) to a theme's package
- */
- public static class MixnMatchColumns {
- public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "mixnmatch");
-
- /**
- * The unique key for a row. See the KEY_* constants
- * for valid examples
- * <P>Type: TEXT</P>
- */
- public static final String COL_KEY = "key";
-
- /**
- * The package name that corresponds to a given component.
- * <P>Type: String</P>
- */
- public static final String COL_VALUE = "value";
-
- /**
- * The package name that corresponds to where this component was applied from previously
- * <P>Type: String</P>
- */
- public static final String COL_PREV_VALUE = "previous_value";
-
- /**
- * Time when this entry was last updated
- * <P>Type: INTEGER</P>
- */
- public static final String COL_UPDATE_TIME = "update_time";
-
- /*
- * The unique ID for the component within a theme.
- * Always 0 unless multiples of a component exist.
- * <P>Type: INTEGER (long)</P>
- */
- public static final String COL_COMPONENT_ID = "component_id";
-
- /**
- * Valid keys
- */
- public static final String KEY_HOMESCREEN = "mixnmatch_homescreen";
- public static final String KEY_LOCKSCREEN = "mixnmatch_lockscreen";
- public static final String KEY_ICONS = "mixnmatch_icons";
- public static final String KEY_STATUS_BAR = "mixnmatch_status_bar";
- public static final String KEY_BOOT_ANIM = "mixnmatch_boot_anim";
- public static final String KEY_FONT = "mixnmatch_font";
- public static final String KEY_ALARM = "mixnmatch_alarm";
- public static final String KEY_NOTIFICATIONS = "mixnmatch_notifications";
- public static final String KEY_RINGTONE = "mixnmatch_ringtone";
- public static final String KEY_OVERLAYS = "mixnmatch_overlays";
- public static final String KEY_NAVIGATION_BAR = "mixnmatch_navigation_bar";
- public static final String KEY_LIVE_LOCK_SCREEN = "mixnmatch_live_lock_screen";
-
- public static final String[] ROWS = { KEY_HOMESCREEN,
- KEY_LOCKSCREEN,
- KEY_ICONS,
- KEY_STATUS_BAR,
- KEY_BOOT_ANIM,
- KEY_FONT,
- KEY_NOTIFICATIONS,
- KEY_RINGTONE,
- KEY_ALARM,
- KEY_OVERLAYS,
- KEY_NAVIGATION_BAR,
- KEY_LIVE_LOCK_SCREEN
- };
-
- /**
- * For a given key value in the MixNMatch table, return the column
- * associated with it in the Themes Table. This is useful for URI based
- * elements like wallpaper where the caller wishes to determine the
- * wallpaper URI.
- */
- public static String componentToImageColName(String component) {
- if (component.equals(MixnMatchColumns.KEY_HOMESCREEN)) {
- return ThemesColumns.HOMESCREEN_URI;
- } else if (component.equals(MixnMatchColumns.KEY_LOCKSCREEN)) {
- return ThemesColumns.LOCKSCREEN_URI;
- } else if (component.equals(MixnMatchColumns.KEY_BOOT_ANIM)) {
- return ThemesColumns.BOOT_ANIM_URI;
- } else if (component.equals(MixnMatchColumns.KEY_FONT)) {
- return ThemesColumns.FONT_URI;
- } else if (component.equals(MixnMatchColumns.KEY_ICONS)) {
- return ThemesColumns.ICON_URI;
- } else if (component.equals(MixnMatchColumns.KEY_STATUS_BAR)) {
- return ThemesColumns.STATUSBAR_URI;
- } else if (component.equals(MixnMatchColumns.KEY_NOTIFICATIONS)) {
- throw new IllegalArgumentException("Notifications mixnmatch component does not have a related column");
- } else if (component.equals(MixnMatchColumns.KEY_RINGTONE)) {
- throw new IllegalArgumentException("Ringtone mixnmatch component does not have a related column");
- } else if (component.equals(MixnMatchColumns.KEY_OVERLAYS)) {
- return ThemesColumns.OVERLAYS_URI;
- } else if (component.equals(MixnMatchColumns.KEY_STATUS_BAR)) {
- throw new IllegalArgumentException(
- "Status bar mixnmatch component does not have a related column");
- } else if (component.equals(MixnMatchColumns.KEY_NAVIGATION_BAR)) {
- throw new IllegalArgumentException(
- "Navigation bar mixnmatch component does not have a related column");
- } else if (component.equals(MixnMatchColumns.KEY_LIVE_LOCK_SCREEN)) {
- throw new IllegalArgumentException(
- "Live lock screen mixnmatch component does not have a related column");
- }
- return null;
- }
-
- /**
- * A component in the themes table (IE "mods_wallpaper") has an
- * equivalent key in mixnmatch table
- */
- public static String componentToMixNMatchKey(String component) {
- if (component.equals(ThemesColumns.MODIFIES_LAUNCHER)) {
- return MixnMatchColumns.KEY_HOMESCREEN;
- } else if (component.equals(ThemesColumns.MODIFIES_ICONS)) {
- return MixnMatchColumns.KEY_ICONS;
- } else if (component.equals(ThemesColumns.MODIFIES_LOCKSCREEN)) {
- return MixnMatchColumns.KEY_LOCKSCREEN;
- } else if (component.equals(ThemesColumns.MODIFIES_FONTS)) {
- return MixnMatchColumns.KEY_FONT;
- } else if (component.equals(ThemesColumns.MODIFIES_BOOT_ANIM)) {
- return MixnMatchColumns.KEY_BOOT_ANIM;
- } else if (component.equals(ThemesColumns.MODIFIES_ALARMS)) {
- return MixnMatchColumns.KEY_ALARM;
- } else if (component.equals(ThemesColumns.MODIFIES_NOTIFICATIONS)) {
- return MixnMatchColumns.KEY_NOTIFICATIONS;
- } else if (component.equals(ThemesColumns.MODIFIES_RINGTONES)) {
- return MixnMatchColumns.KEY_RINGTONE;
- } else if (component.equals(ThemesColumns.MODIFIES_OVERLAYS)) {
- return MixnMatchColumns.KEY_OVERLAYS;
- } else if (component.equals(ThemesColumns.MODIFIES_STATUS_BAR)) {
- return MixnMatchColumns.KEY_STATUS_BAR;
- } else if (component.equals(ThemesColumns.MODIFIES_NAVIGATION_BAR)) {
- return MixnMatchColumns.KEY_NAVIGATION_BAR;
- } else if (component.equals(ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN)) {
- return MixnMatchColumns.KEY_LIVE_LOCK_SCREEN;
- }
- return null;
- }
-
- /**
- * A mixnmatch key in has an
- * equivalent value in the themes table
- */
- public static String mixNMatchKeyToComponent(String mixnmatchKey) {
- if (mixnmatchKey.equals(MixnMatchColumns.KEY_HOMESCREEN)) {
- return ThemesColumns.MODIFIES_LAUNCHER;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_ICONS)) {
- return ThemesColumns.MODIFIES_ICONS;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_LOCKSCREEN)) {
- return ThemesColumns.MODIFIES_LOCKSCREEN;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_FONT)) {
- return ThemesColumns.MODIFIES_FONTS;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_BOOT_ANIM)) {
- return ThemesColumns.MODIFIES_BOOT_ANIM;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_ALARM)) {
- return ThemesColumns.MODIFIES_ALARMS;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_NOTIFICATIONS)) {
- return ThemesColumns.MODIFIES_NOTIFICATIONS;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_RINGTONE)) {
- return ThemesColumns.MODIFIES_RINGTONES;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_OVERLAYS)) {
- return ThemesColumns.MODIFIES_OVERLAYS;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_STATUS_BAR)) {
- return ThemesColumns.MODIFIES_STATUS_BAR;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_NAVIGATION_BAR)) {
- return ThemesColumns.MODIFIES_NAVIGATION_BAR;
- } else if (mixnmatchKey.equals(MixnMatchColumns.KEY_LIVE_LOCK_SCREEN)) {
- return ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN;
- }
- return null;
- }
- }
-
- /**
- * Table containing cached preview files for a given theme
- */
- public static class PreviewColumns {
- /**
- * Uri for retrieving the previews table.
- * Querying the themes provider using this URI will return a cursor with a key and value
- * columns, and a row for each component.
- */
- public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "previews");
-
- /**
- * Uri for retrieving the previews for the currently applied components.
- * Querying the themes provider using this URI will return a cursor with a single row
- * containing all the previews for the components that are currently applied.
- */
- public static final Uri APPLIED_URI = Uri.withAppendedPath(AUTHORITY_URI,
- "applied_previews");
-
- /**
- * Uri for retrieving the default previews for the theme.
- * Querying the themes provider using this URI will return a cursor with a single row
- * containing all the previews for the default components of the current theme.
- */
- public static final Uri COMPONENTS_URI = Uri.withAppendedPath(AUTHORITY_URI,
- "components_previews");
-
- /**
- * The unique ID for a row.
- * <P>Type: INTEGER (long)</P>
- */
- public static final String _ID = "_id";
-
- /**
- * The unique ID for the theme these previews belong to.
- * <P>Type: INTEGER (long)</P>
- */
- public static final String THEME_ID = "theme_id";
-
- /**
- * The unique ID for the component within a theme.
- * <P>Type: INTEGER (long)</P>
- */
- public static final String COMPONENT_ID = "component_id";
-
- /**
- * The unique key for a row. See the Valid key constants section below
- * for valid examples
- * <P>Type: TEXT</P>
- */
- public static final String COL_KEY = "key";
-
- /**
- * The package name that corresponds to a given component.
- * <P>Type: String</P>
- */
- public static final String COL_VALUE = "value";
-
- /**
- * Valid keys
- */
-
- /**
- * Cached image of the themed status bar background.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_BACKGROUND = "statusbar_background";
-
- /**
- * Cached image of the themed bluetooth status icon.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_BLUETOOTH_ICON = "statusbar_bluetooth_icon";
-
- /**
- * Cached image of the themed wifi status icon.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_WIFI_ICON = "statusbar_wifi_icon";
-
- /**
- * Cached image of the themed cellular signal status icon.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_SIGNAL_ICON = "statusbar_signal_icon";
-
- /**
- * Cached image of the themed battery using portrait style.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_BATTERY_PORTRAIT = "statusbar_battery_portrait";
-
- /**
- * Cached image of the themed battery using landscape style.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_BATTERY_LANDSCAPE = "statusbar_battery_landscape";
-
- /**
- * Cached image of the themed battery using circle style.
- * <P>Type: String (file path)</P>
- */
- public static final String STATUSBAR_BATTERY_CIRCLE = "statusbar_battery_circle";
-
- /**
- * The themed color used for clock text in the status bar.
- * <P>Type: INTEGER (int)</P>
- */
- public static final String STATUSBAR_CLOCK_TEXT_COLOR = "statusbar_clock_text_color";
-
- /**
- * The themed margin value between the wifi and rssi signal icons.
- * <P>Type: INTEGER (int)</P>
- */
- public static final String STATUSBAR_WIFI_COMBO_MARGIN_END = "wifi_combo_margin_end";
-
- /**
- * Cached image of the themed navigation bar background.
- * <P>Type: String (file path)</P>
- */
- public static final String NAVBAR_BACKGROUND = "navbar_background";
-
- /**
- * Cached image of the themed back button.
- * <P>Type: String (file path)</P>
- */
- public static final String NAVBAR_BACK_BUTTON = "navbar_back_button";
-
- /**
- * Cached image of the themed home button.
- * <P>Type: String (file path)</P>
- */
- public static final String NAVBAR_HOME_BUTTON = "navbar_home_button";
-
- /**
- * Cached image of the themed recents button.
- * <P>Type: String (file path)</P>
- */
- public static final String NAVBAR_RECENT_BUTTON = "navbar_recent_button";
-
- /**
- * Cached image of the 1/3 icons
- * <P>Type: String (file path)</P>
- */
- public static final String ICON_PREVIEW_1 = "icon_preview_1";
-
- /**
- * Cached image of the 2/3 icons
- * <P>Type: String (file path)</P>
- */
- public static final String ICON_PREVIEW_2 = "icon_preview_2";
-
- /**
- * Cached image of the 3/3 icons
- * <P>Type: String (file path)</P>
- */
- public static final String ICON_PREVIEW_3 = "icon_preview_3";
-
- /**
- * Full path to the theme's wallpaper asset.
- * <P>Type: String (file path)</P>
- */
- public static final String WALLPAPER_FULL = "wallpaper_full";
-
- /**
- * Cached preview of the theme's wallpaper which is larger than the thumbnail
- * but smaller than the full sized wallpaper.
- * <P>Type: String (file path)</P>
- */
- public static final String WALLPAPER_PREVIEW = "wallpaper_preview";
-
- /**
- * Cached thumbnail of the theme's wallpaper
- * <P>Type: String (file path)</P>
- */
- public static final String WALLPAPER_THUMBNAIL = "wallpaper_thumbnail";
-
- /**
- * Cached preview of the theme's lockscreen wallpaper which is larger than the thumbnail
- * but smaller than the full sized lockscreen wallpaper.
- * <P>Type: String (file path)</P>
- */
- public static final String LOCK_WALLPAPER_PREVIEW = "lock_wallpaper_preview";
-
- /**
- * Cached thumbnail of the theme's lockscreen wallpaper
- * <P>Type: String (file path)</P>
- */
- public static final String LOCK_WALLPAPER_THUMBNAIL = "lock_wallpaper_thumbnail";
-
- /**
- * Cached preview of UI controls representing the theme's style
- * <P>Type: String (file path)</P>
- */
- public static final String STYLE_PREVIEW = "style_preview";
-
- /**
- * Cached thumbnail preview of UI controls representing the theme's style
- * <P>Type: String (file path)</P>
- */
- public static final String STYLE_THUMBNAIL = "style_thumbnail";
-
- /**
- * Cached thumbnail of the theme's boot animation
- * <P>Type: String (file path)</P>
- */
- public static final String BOOTANIMATION_THUMBNAIL = "bootanimation_thumbnail";
-
- /**
- * Cached preview of live lock screen
- * <P>Type: String (file path)</P>
- */
- public static final String LIVE_LOCK_SCREEN_PREVIEW = "live_lock_screen_preview";
-
- /**
- * Cached thumbnail preview of live lock screen
- * <P>Type: String (file path)</P>
- */
- public static final String LIVE_LOCK_SCREEN_THUMBNAIL = "live_lock_screen_thumbnail";
-
- public static final String[] VALID_KEYS = {
- STATUSBAR_BACKGROUND,
- STATUSBAR_BLUETOOTH_ICON,
- STATUSBAR_WIFI_ICON,
- STATUSBAR_SIGNAL_ICON,
- STATUSBAR_BATTERY_PORTRAIT,
- STATUSBAR_BATTERY_LANDSCAPE,
- STATUSBAR_BATTERY_CIRCLE,
- STATUSBAR_CLOCK_TEXT_COLOR,
- STATUSBAR_WIFI_COMBO_MARGIN_END,
- NAVBAR_BACKGROUND,
- NAVBAR_BACK_BUTTON,
- NAVBAR_HOME_BUTTON,
- NAVBAR_RECENT_BUTTON,
- ICON_PREVIEW_1,
- ICON_PREVIEW_2,
- ICON_PREVIEW_3,
- WALLPAPER_FULL,
- WALLPAPER_PREVIEW,
- WALLPAPER_THUMBNAIL,
- LOCK_WALLPAPER_PREVIEW,
- LOCK_WALLPAPER_THUMBNAIL,
- STYLE_PREVIEW,
- STYLE_THUMBNAIL,
- BOOTANIMATION_THUMBNAIL,
- LIVE_LOCK_SCREEN_PREVIEW,
- LIVE_LOCK_SCREEN_THUMBNAIL,
- };
- }
-
- public static class Intent {
- /**
- * Action sent from the provider when a theme has been fully installed. Fully installed
- * means that the apk was installed by PackageManager and the theme resources were
- * processed and cached by {@link com.android.server.ThemeService}
- * Requires the {@link android.Manifest.permission#READ_THEMES} permission to receive
- * this broadcast.
- */
- public static final String ACTION_THEME_INSTALLED =
- "themescontract.intent.action.THEME_INSTALLED";
-
- /**
- * Action sent from the provider when a theme has been updated.
- * Requires the {@link android.Manifest.permission#READ_THEMES} permission to receive
- * this broadcast.
- */
- public static final String ACTION_THEME_UPDATED =
- "themescontract.intent.action.THEME_UPDATED";
-
- /**
- * Action sent from the provider when a theme has been removed.
- * Requires the {@link android.Manifest.permission#READ_THEMES} permission to receive
- * this broadcast.
- */
- public static final String ACTION_THEME_REMOVED =
- "themescontract.intent.action.THEME_REMOVED";
-
- /**
- * Uri scheme used to broadcast the theme's package name when broadcasting
- * {@link android.provider.ThemesContract.Intent#ACTION_THEME_INSTALLED} or
- * {@link android.provider.ThemesContract.Intent#ACTION_THEME_REMOVED}
- */
- public static final String URI_SCHEME_PACKAGE = "package";
- }
-}
diff --git a/core/java/com/android/internal/util/cm/ImageUtils.java b/core/java/com/android/internal/util/cm/ImageUtils.java
deleted file mode 100644
index 73189a3..0000000
--- a/core/java/com/android/internal/util/cm/ImageUtils.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Copyright (C) 2013-2014 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.util.cm;
-
-import android.app.WallpaperManager;
-import android.content.Context;
-import android.content.pm.ThemeUtils;
-import android.content.res.AssetManager;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Point;
-import android.net.Uri;
-import android.provider.ThemesContract;
-import android.provider.ThemesContract.ThemesColumns;
-import android.text.TextUtils;
-import android.util.Log;
-import android.webkit.URLUtil;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-
-import libcore.io.IoUtils;
-
-public class ImageUtils {
- private static final String TAG = ImageUtils.class.getSimpleName();
-
- private static final String ASSET_URI_PREFIX = "file:///android_asset/";
- private static final int DEFAULT_IMG_QUALITY = 100;
-
- /**
- * Gets the Width and Height of the image
- *
- * @param inputStream The input stream of the image
- *
- * @return A point structure that holds the Width and Height (x and y)/*"
- */
- public static Point getImageDimension(InputStream inputStream) {
- if (inputStream == null) {
- throw new IllegalArgumentException("'inputStream' cannot be null!");
- }
- BitmapFactory.Options options = new BitmapFactory.Options();
- options.inJustDecodeBounds = true;
- BitmapFactory.decodeStream(inputStream, null, options);
- Point point = new Point(options.outWidth,options.outHeight);
- return point;
- }
-
- /**
- * Crops the input image and returns a new InputStream of the cropped area
- *
- * @param inputStream The input stream of the image
- * @param imageWidth Width of the input image
- * @param imageHeight Height of the input image
- * @param inputStream Desired Width
- * @param inputStream Desired Width
- *
- * @return a new InputStream of the cropped area/*"
- */
- public static InputStream cropImage(InputStream inputStream, int imageWidth, int imageHeight,
- int outWidth, int outHeight) throws IllegalArgumentException {
- if (inputStream == null){
- throw new IllegalArgumentException("inputStream cannot be null");
- }
-
- if (imageWidth <= 0 || imageHeight <= 0) {
- throw new IllegalArgumentException(
- String.format("imageWidth and imageHeight must be > 0: imageWidth=%d" +
- " imageHeight=%d", imageWidth, imageHeight));
- }
-
- if (outWidth <= 0 || outHeight <= 0) {
- throw new IllegalArgumentException(
- String.format("outWidth and outHeight must be > 0: outWidth=%d" +
- " outHeight=%d", imageWidth, outHeight));
- }
-
- int scaleDownSampleSize = Math.min(imageWidth / outWidth, imageHeight / outHeight);
- if (scaleDownSampleSize > 0) {
- imageWidth /= scaleDownSampleSize;
- imageHeight /= scaleDownSampleSize;
- } else {
- float ratio = (float) outWidth / outHeight;
- if (imageWidth < imageHeight * ratio) {
- outWidth = imageWidth;
- outHeight = (int) (outWidth / ratio);
- } else {
- outHeight = imageHeight;
- outWidth = (int) (outHeight * ratio);
- }
- }
- int left = (imageWidth - outWidth) / 2;
- int top = (imageHeight - outHeight) / 2;
- InputStream compressed = null;
- try {
- BitmapFactory.Options options = new BitmapFactory.Options();
- if (scaleDownSampleSize > 1) {
- options.inSampleSize = scaleDownSampleSize;
- }
- Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options);
- if (bitmap == null) {
- return null;
- }
- Bitmap cropped = Bitmap.createBitmap(bitmap, left, top, outWidth, outHeight);
- ByteArrayOutputStream tmpOut = new ByteArrayOutputStream(2048);
- if (cropped.compress(Bitmap.CompressFormat.PNG, DEFAULT_IMG_QUALITY, tmpOut)) {
- byte[] outByteArray = tmpOut.toByteArray();
- compressed = new ByteArrayInputStream(outByteArray);
- }
- } catch (Exception e) {
- Log.e(TAG, "Exception " + e);
- }
- return compressed;
- }
-
- /**
- * Crops the lock screen image and returns a new InputStream of the cropped area
- *
- * @param pkgName Name of the theme package
- * @param context The context
- *
- * @return a new InputStream of the cropped image/*"
- */
- public static InputStream getCroppedKeyguardStream(String pkgName, Context context)
- throws IllegalArgumentException {
- if (TextUtils.isEmpty(pkgName)) {
- throw new IllegalArgumentException("'pkgName' cannot be null or empty!");
- }
- if (context == null) {
- throw new IllegalArgumentException("'context' cannot be null!");
- }
-
- InputStream cropped = null;
- InputStream stream = null;
- try {
- stream = getOriginalKeyguardStream(pkgName, context);
- if (stream == null) {
- return null;
- }
- Point point = getImageDimension(stream);
- IoUtils.closeQuietly(stream);
- if (point == null || point.x == 0 || point.y == 0) {
- return null;
- }
- WallpaperManager wm = WallpaperManager.getInstance(context);
- int outWidth = wm.getDesiredMinimumWidth();
- int outHeight = wm.getDesiredMinimumHeight();
- stream = getOriginalKeyguardStream(pkgName, context);
- if (stream == null) {
- return null;
- }
- cropped = cropImage(stream, point.x, point.y, outWidth, outHeight);
- } catch (Exception e) {
- Log.e(TAG, "Exception " + e);
- } finally {
- IoUtils.closeQuietly(stream);
- }
- return cropped;
- }
-
- /**
- * Crops the wallpaper image and returns a new InputStream of the cropped area
- *
- * @param pkgName Name of the theme package
- * @param context The context
- *
- * @return a new InputStream of the cropped image/*"
- */
- public static InputStream getCroppedWallpaperStream(String pkgName, long wallpaperId,
- Context context) {
- if (TextUtils.isEmpty(pkgName)) {
- throw new IllegalArgumentException("'pkgName' cannot be null or empty!");
- }
- if (context == null) {
- throw new IllegalArgumentException("'context' cannot be null!");
- }
-
- InputStream cropped = null;
- InputStream stream = null;
- try {
- stream = getOriginalWallpaperStream(pkgName, wallpaperId, context);
- if (stream == null) {
- return null;
- }
- Point point = getImageDimension(stream);
- IoUtils.closeQuietly(stream);
- if (point == null || point.x == 0 || point.y == 0) {
- return null;
- }
- WallpaperManager wm = WallpaperManager.getInstance(context);
- int outWidth = wm.getDesiredMinimumWidth();
- int outHeight = wm.getDesiredMinimumHeight();
- stream = getOriginalWallpaperStream(pkgName, wallpaperId, context);
- if (stream == null) {
- return null;
- }
- cropped = cropImage(stream, point.x, point.y, outWidth, outHeight);
- } catch (Exception e) {
- Log.e(TAG, "Exception " + e);
- } finally {
- IoUtils.closeQuietly(stream);
- }
- return cropped;
- }
-
- private static InputStream getOriginalKeyguardStream(String pkgName, Context context) {
- if (TextUtils.isEmpty(pkgName) || context == null) {
- return null;
- }
-
- InputStream inputStream = null;
- try {
- //Get input WP stream from the theme
- Context themeCtx = context.createPackageContext(pkgName,
- Context.CONTEXT_IGNORE_SECURITY);
- AssetManager assetManager = themeCtx.getAssets();
- String wpPath = ThemeUtils.getLockscreenWallpaperPath(assetManager);
- if (wpPath == null) {
- Log.w(TAG, "Not setting lockscreen wp because wallpaper file was not found.");
- } else {
- inputStream = ThemeUtils.getInputStreamFromAsset(themeCtx,
- ASSET_URI_PREFIX + wpPath);
- }
- } catch (Exception e) {
- Log.e(TAG, "There was an error setting lockscreen wp for pkg " + pkgName, e);
- }
- return inputStream;
- }
-
- private static InputStream getOriginalWallpaperStream(String pkgName, long componentId,
- Context context) {
- String wpPath;
- if (TextUtils.isEmpty(pkgName) || context == null) {
- return null;
- }
-
- InputStream inputStream = null;
- String selection = ThemesContract.ThemesColumns.PKG_NAME + "= ?";
- String[] selectionArgs = {pkgName};
- Cursor c = context.getContentResolver().query(ThemesColumns.CONTENT_URI,
- null, selection,
- selectionArgs, null);
- if (c == null || c.getCount() < 1) {
- if (c != null) c.close();
- return null;
- } else {
- c.moveToFirst();
- }
-
- try {
- Context themeContext = context.createPackageContext(pkgName,
- Context.CONTEXT_IGNORE_SECURITY);
- boolean isLegacyTheme = c.getInt(
- c.getColumnIndex(ThemesColumns.IS_LEGACY_THEME)) == 1;
- String wallpaper = c.getString(
- c.getColumnIndex(ThemesColumns.WALLPAPER_URI));
- if (wallpaper != null) {
- if (URLUtil.isAssetUrl(wallpaper)) {
- inputStream = ThemeUtils.getInputStreamFromAsset(themeContext, wallpaper);
- } else {
- inputStream = context.getContentResolver().openInputStream(
- Uri.parse(wallpaper));
- }
- } else {
- // try and get the wallpaper directly from the apk if the URI was null
- Context themeCtx = context.createPackageContext(pkgName,
- Context.CONTEXT_IGNORE_SECURITY);
- AssetManager assetManager = themeCtx.getAssets();
- wpPath = queryWpPathFromComponentId(context, pkgName, componentId);
- if (wpPath == null) wpPath = ThemeUtils.getWallpaperPath(assetManager);
- if (wpPath == null) {
- Log.e(TAG, "Not setting wp because wallpaper file was not found.");
- } else {
- inputStream = ThemeUtils.getInputStreamFromAsset(themeCtx,
- ASSET_URI_PREFIX + wpPath);
- }
- }
- } catch (Exception e) {
- Log.e(TAG, "getWallpaperStream: " + e);
- } finally {
- c.close();
- }
-
- return inputStream;
- }
-
- private static String queryWpPathFromComponentId(Context context, String pkgName,
- long componentId) {
- String wpPath = null;
- String[] projection = new String[] { ThemesContract.PreviewColumns.COL_VALUE };
- String selection = ThemesColumns.PKG_NAME + "=? AND " +
- ThemesContract.PreviewColumns.COMPONENT_ID + "=? AND " +
- ThemesContract.PreviewColumns.COL_KEY + "=?";
- String[] selectionArgs = new String[] {
- pkgName,
- Long.toString(componentId),
- ThemesContract.PreviewColumns.WALLPAPER_FULL
- };
-
- Cursor c = context.getContentResolver()
- .query(ThemesContract.PreviewColumns.COMPONENTS_URI,
- projection, selection, selectionArgs, null);
- if (c != null) {
- try {
- if (c.moveToFirst()) {
- int valIdx = c.getColumnIndex(ThemesContract.PreviewColumns.COL_VALUE);
- wpPath = c.getString(valIdx);
- }
- } catch(Exception e) {
- Log.e(TAG, "Could not get wallpaper path", e);
- } finally {
- c.close();
- }
- }
- return wpPath;
- }
-}
-
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index a9ec33b..6ef5bde 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2755,30 +2755,6 @@
confirmation UI for full backup/restore -->
<uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
- <!-- Allows an application to use the Theme Service
- @hide -->
- <permission android:name="android.permission.ACCESS_THEME_MANAGER"
- android:label="@string/permlab_accessThemeService"
- android:description="@string/permdesc_accessThemeService"
- android:protectionLevel="system|signature" />
-
- <!-- Allows an application to read the current theme configuration and
- get information about the various themes currently installed
- @hide -->
- <permission android:name="android.permission.READ_THEMES"
- android:label="@string/permlab_readThemes"
- android:description="@string/permdesc_readThemesDesc"
- android:protectionLevel="normal" />
-
- <!-- Allows an application to write the current theme configuration and
- write information about the various themes currently installed.
- Changing themes should be done through the service ACCESS_THEME_MANAGER
- @hide -->
- <permission android:name="android.permission.WRITE_THEMES"
- android:label="@string/permlab_writeThemes"
- android:description="@string/permdesc_writeThemesDesc"
- android:protectionLevel="system|signature" />
-
<application android:process="system"
android:persistent="true"
android:hasCode="false"
diff --git a/core/res/res/values-af/cm_strings.xml b/core/res/res/values-af/cm_strings.xml
index e56db33..bd245b3 100644
--- a/core/res/res/values-af/cm_strings.xml
+++ b/core/res/res/values-af/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; netwerk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Netwerk</string>
- <string name="permlab_accessThemeService">Toegang tot tema diens</string>
<string name="permlab_interceptPackageLaunch">onderskep program begin</string>
- <string name="permdesc_accessThemeService">Laat \'n program toe om toegang na die tema diens te verkry. Moet nooit nodig wees vir normale programme nie.</string>
- <string name="permlab_readThemes">lees jou tema inligting</string>
- <string name="permdesc_readThemesDesc">Laat die program toe om jou temas te lees en bepaal watter tema jy toegepas het.</string>
- <string name="permlab_writeThemes">verander jou temas</string>
- <string name="permdesc_writeThemesDesc">Laat die program toe om nuwe temas by te voeg en verander die tema wat jy toegepas het.</string>
- <string name="theme_install_error_title">Kon nie tema installeer</string>
- <string name="theme_install_error_message">%s kon nie geïnstalleer word nie</string>
<string name="stylus_app_not_installed">%s is nie geïnstalleer nie</string>
- <string name="theme_reset_notification_title">Tema herstel</string>
- <string name="theme_reset_notification_body">Stelsel tema is herstel a.g.v. baie program foute.</string>
<string name="silent_mode_priority">Prioriteit</string>
<string name="silent_mode_none">Geen</string>
<string name="subscription_change_disabled_wifi_ap">Deaktiveer Wi-Fi warmkol weens SIM inskrywing verandering</string>
diff --git a/core/res/res/values-ar/cm_strings.xml b/core/res/res/values-ar/cm_strings.xml
index deded1b..8d7187d 100644
--- a/core/res/res/values-ar/cm_strings.xml
+++ b/core/res/res/values-ar/cm_strings.xml
@@ -49,19 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; الشبكة</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">الشبكة</string>
- <string name="permlab_accessThemeService">الوصول إلى خدمة السمة</string>
<string name="permlab_interceptPackageLaunch">مقاطعة تشغيل التطبيق</string>
- <string name="permdesc_accessThemeService">يسمح للتطبيق بالوصول إلى خدمة السمة. ينبغي أن لا تكون ضرورية ابدأ للتطبيقات العادية.</string>
- <string name="permlab_readThemes">قراءة معلومات السمة لديك</string>
- <string name="permdesc_readThemesDesc">يسمح للتطبيق بقراءة السمات الخاصة بك وتحديد السمة التي قمت بتطبيقها.</string>
- <string name="permlab_writeThemes">تعديل السمات الخاصة بك</string>
- <string name="permdesc_writeThemesDesc">السماح للتطبيق بإدخال سمات جديدة
-وتعديل السمة التي قمت بتطبيقها.</string>
- <string name="theme_install_error_title">فشل تثبيت السمة</string>
- <string name="theme_install_error_message">فشل تثبيت %s</string>
<string name="stylus_app_not_installed">%s لم يتم تثبيته</string>
- <string name="theme_reset_notification_title">إعادة تعيين السمة</string>
- <string name="theme_reset_notification_body">تم استرداد سمة النظام بسبب عمليات تعطيل متعددة للتطبيق.</string>
<string name="silent_mode_priority">الأولوية</string>
<string name="silent_mode_none">بلا</string>
<string name="subscription_change_disabled_wifi_ap">ايقاف بث تقنية واي فاي بسبب تغيير اشتراك SIM</string>
diff --git a/core/res/res/values-ast-rES/cm_strings.xml b/core/res/res/values-ast-rES/cm_strings.xml
index 6aa7a83..d254bbf 100644
--- a/core/res/res/values-ast-rES/cm_strings.xml
+++ b/core/res/res/values-ast-rES/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB y rede</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Rede</string>
- <string name="permlab_accessThemeService">Accesu al serviciu de temes</string>
<string name="permlab_interceptPackageLaunch">interceutar la execución d\'aplicaciones</string>
- <string name="permdesc_accessThemeService">Permite l\'accesu a una aplicación al Servicio de temes. Enxamás tendría de facer falta p\'aplicaciones normales.</string>
- <string name="permlab_readThemes">lleer información del tema</string>
- <string name="permdesc_readThemesDesc">Permite que l\'aplicación llea los temes instalaos y determine qué tema ta aplicáu.</string>
- <string name="permlab_writeThemes">modificar los temes</string>
- <string name="permdesc_writeThemesDesc">Permite que l\'aplicación amieste temes nuevos y modifique\'l tema aplicáu.</string>
- <string name="theme_install_error_title">Falló al instalar el tema</string>
- <string name="theme_install_error_message">%s falló al instalar</string>
<string name="stylus_app_not_installed">%s nun ta instalada</string>
- <string name="theme_reset_notification_title">Reaniciu de tema</string>
- <string name="theme_reset_notification_body">Tema de sistema restauráu por mor de múltiples zarros de d\'app</string>
<string name="silent_mode_priority">Prioridá</string>
<string name="silent_mode_none">Dengún</string>
<string name="subscription_change_disabled_wifi_ap">Deshabilitóse\'l puntu Wi-Fi pola mor del cambéu de la soscripción de la SIM</string>
diff --git a/core/res/res/values-az-rAZ/cm_strings.xml b/core/res/res/values-az-rAZ/cm_strings.xml
index 43d2dcd..cde10dc 100644
--- a/core/res/res/values-az-rAZ/cm_strings.xml
+++ b/core/res/res/values-az-rAZ/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; şəbəkə</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Şəbəkə</string>
- <string name="permlab_accessThemeService">tema xidmətinə müraciət</string>
<string name="permlab_interceptPackageLaunch">tətbiqetmə başlatmanın qarşısını al</string>
- <string name="permdesc_accessThemeService">Tətbiqetmənin tema xidmətinə müraciətinə icazə verər. Normal tətbiqlər üçün buna ehtiyac yoxdur.</string>
- <string name="permlab_readThemes">tema məlumatını oxu</string>
- <string name="permdesc_readThemesDesc">Tətbiqetmənin temalarınızı oxumasına və hansı temanı tətbiq etdiyinizi müəyyən etməyə icazə verər.</string>
- <string name="permlab_writeThemes">temaları dəyişin</string>
- <string name="permdesc_writeThemesDesc">Tətbiqetmənin yeni temalar əlavə etməsinə və tətbiq etdiyiniz temanı dəyişdirməsinə icazə verər.</string>
- <string name="theme_install_error_title">Tema yüklənə bilmədi</string>
- <string name="theme_install_error_message">%s yüklənə bilmədi</string>
<string name="stylus_app_not_installed">%s quraşdırılmayıb</string>
- <string name="theme_reset_notification_title">Tema sıfırlandı</string>
- <string name="theme_reset_notification_body">Tətbiqetmə çökmələrinə görə sistem teması bərpa edildi.</string>
<string name="silent_mode_priority">Üstünlük</string>
<string name="silent_mode_none">Yoxdur</string>
<string name="subscription_change_disabled_wifi_ap">SIM abunəliyini dəyişmə ilə əlaqədar Wi-Fi internet paylaşma ləğv edildi</string>
diff --git a/core/res/res/values-be/cm_strings.xml b/core/res/res/values-be/cm_strings.xml
index 8f5d91e..0c83b38 100644
--- a/core/res/res/values-be/cm_strings.xml
+++ b/core/res/res/values-be/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">па сетцы &amp; USB</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Па сетцы</string>
- <string name="permlab_accessThemeService">Доступ да службы тэм</string>
<string name="permlab_interceptPackageLaunch">Перахоп запуску дадаткаў</string>
- <string name="permdesc_accessThemeService">Дадатак зможа атрымваць доступ да службы тым. Гэты дазвол не выкарыстоўваецца звычайнымі дадаткамі.</string>
- <string name="permlab_readThemes">Чытанне інфармацыі пра тэму</string>
- <string name="permdesc_readThemesDesc">Дадатак зможа счытваць тэмы афармлення і
- вызначаць, якая тэма цяпер выкарыстоўваецца.</string>
- <string name="permlab_writeThemes">Змена тэм</string>
- <string name="permdesc_writeThemesDesc">Дадатак зможа ўжыццяўляць усталёўку новых тэм афармлення і
- змяняць бягучую тэму.</string>
- <string name="theme_install_error_title">Не атрымалася ўсталяваць тэму</string>
- <string name="theme_install_error_message">Збой пры ўсталёўцы %s</string>
<string name="stylus_app_not_installed">%s не ўсталявана</string>
- <string name="theme_reset_notification_title">Тэма адключаная</string>
- <string name="theme_reset_notification_body">З-за збояў дадаткаў адноўлена стандартная тэма.</string>
<string name="silent_mode_priority">Важныя</string>
<string name="silent_mode_none">Не</string>
<string name="subscription_change_disabled_wifi_ap">Выключаныя Wi-Fi кропкі доступу ў сувязі са зменай падпіскі SIM</string>
diff --git a/core/res/res/values-bg/cm_strings.xml b/core/res/res/values-bg/cm_strings.xml
index fa69a9a..384826d 100644
--- a/core/res/res/values-bg/cm_strings.xml
+++ b/core/res/res/values-bg/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; мрежа</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Мрежа</string>
- <string name="permlab_accessThemeService">достъп до темите</string>
<string name="permlab_interceptPackageLaunch">Прихвани стартиращите приложения</string>
- <string name="permdesc_accessThemeService">Разрешение на едно приложение за достъп до темите. Никога не трябва да бъде необходимо за обикновените приложения.</string>
- <string name="permlab_readThemes">прочетете информацията за темите</string>
- <string name="permdesc_readThemesDesc">Разрешава на приложението да чете вашите теми и да определя коя тема сте приложили.</string>
- <string name="permlab_writeThemes">Модифициране на темите</string>
- <string name="permdesc_writeThemesDesc">Разрешава на приложението да вмъкне нови теми и да модифицира темата, която сте приложили.</string>
- <string name="theme_install_error_title">Провалено инсталиране на тема</string>
- <string name="theme_install_error_message">%s не успя да се инсталира</string>
<string name="stylus_app_not_installed">%s не е инсталиран</string>
- <string name="theme_reset_notification_title">Нулиране на темата</string>
- <string name="theme_reset_notification_body">Стандартната тема е възстановена поради множество грешки.</string>
<string name="silent_mode_priority">Приоритет</string>
<string name="silent_mode_none">Без</string>
<string name="subscription_change_disabled_wifi_ap">Изключена Wi-Fi точка за достъп, поради промяна в абонаментна на СИМ</string>
diff --git a/core/res/res/values-bn-rBD/cm_strings.xml b/core/res/res/values-bn-rBD/cm_strings.xml
index 80360b5..dd7686b 100644
--- a/core/res/res/values-bn-rBD/cm_strings.xml
+++ b/core/res/res/values-bn-rBD/cm_strings.xml
@@ -41,14 +41,6 @@
<string name="adb_net_active_notification_title">নেটওয়ার্কের উপর এডিবি সক্রিয়</string>
<string name="adb_both_active_notification_title">এডিবির উপর ইউএসবি &amp; নেটওয়ার্ক সক্রিয়</string>
<string name="adb_active_generic_notification_message">ডিবাগ নিষ্ক্রিয় করতে স্পর্শ করুন।</string>
- <string name="permlab_accessThemeService">থীম সেবায় প্রবেশাধিকার</string>
- <string name="permdesc_accessThemeService">একটি অ্যাপকে থীম সেবায় প্রবেশাধিকাররে অনুমতি দিন। স্বাভাবিক অ্যাপগুলির জন্য কখনো প্রয়োজন হবে না।</string>
- <string name="permlab_readThemes">আপনার থীমের তথ্য নির্ণয়</string>
- <string name="permdesc_readThemesDesc">একটি অ্যাপকে আপনার থীম নির্ণয়ের এবং আপনি কোন থীম প্রয়োগ করেছেন তা নির্ধারণের অনুমতি দিন।</string>
- <string name="permlab_writeThemes">আপনার থীমের কিছুটা রূপান্তর</string>
- <string name="permdesc_writeThemesDesc">অ্যাপটিকে নতুন থীমের সন্নিবেশ করার এবং আপনি যে থীমটি প্রয়োগ করেছেন তার কিছুটা রূপান্তর করার অনুমতি প্রদান করুন।</string>
- <string name="theme_install_error_title">থিম ইনস্টল করতে ব্যর্থ হয়েছে</string>
- <string name="theme_install_error_message">%s ইনস্টল করতে ব্যর্থ হয়েছে</string>
<string name="silent_mode_priority">অগ্রাধিকার</string>
<string name="notify_turn_wifi_off_title">ওয়াইফাই বন্ধ করুন</string>
<string name="permlab_changePrivacyGuardState">গোপনীয়তা রক্ষাকারী সক্রিয় বা নিস্ক্রিয় করুন</string>
diff --git a/core/res/res/values-ca/cm_strings.xml b/core/res/res/values-ca/cm_strings.xml
index bf65313..a229976 100644
--- a/core/res/res/values-ca/cm_strings.xml
+++ b/core/res/res/values-ca/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; xarxa</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Xarxa</string>
- <string name="permlab_accessThemeService">accés al servei de temes</string>
<string name="permlab_interceptPackageLaunch">interceptar el llançament d\'una aplicació</string>
- <string name="permdesc_accessThemeService">Permet a una aplicació accedir al servei de temes. No s\'hauria de necessitar mai en les aplicacions normals.</string>
- <string name="permlab_readThemes">Llegeix la informació del teu tema</string>
- <string name="permdesc_readThemesDesc">Permet a l\'aplicació llegir els teus temes i determinar quin tema has aplicat.</string>
- <string name="permlab_writeThemes">modifica els teus temes</string>
- <string name="permdesc_writeThemesDesc">Permet a l\'aplicació introduir temes nous i modificar quin tema has aplicat.</string>
- <string name="theme_install_error_title">No ha pogut instal·lar el tema</string>
- <string name="theme_install_error_message">%s no s\'ha pogut instal·lar</string>
<string name="stylus_app_not_installed">%s no està instal·lat</string>
- <string name="theme_reset_notification_title">Reinici de tema</string>
- <string name="theme_reset_notification_body">El tema del sistema s\'ha restaurat degut a múltiples fallades d\'aplicacions.</string>
<string name="silent_mode_priority">Prioritat</string>
<string name="silent_mode_none">Cap</string>
<string name="subscription_change_disabled_wifi_ap">S\'ha deshabilitat el punt d\'accés Wi-Fi degut a un canvi en la subscripció de la SIM</string>
diff --git a/core/res/res/values-cs/cm_strings.xml b/core/res/res/values-cs/cm_strings.xml
index 859bc6e..9395ff9 100644
--- a/core/res/res/values-cs/cm_strings.xml
+++ b/core/res/res/values-cs/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB a síť</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Síť</string>
- <string name="permlab_accessThemeService">přístup ke službě motivu</string>
<string name="permlab_interceptPackageLaunch">zachytit spuštění aplikace</string>
- <string name="permdesc_accessThemeService">Umožňuje přistupovat ke službě motivu. Toto oprávnění by neměla vyžadovat žádná normální aplikace.</string>
- <string name="permlab_readThemes">čtení informace o motivu</string>
- <string name="permdesc_readThemesDesc">Umožňuje načíst motivy a určit, který motiv je použit.</string>
- <string name="permlab_writeThemes">změnit motiv</string>
- <string name="permdesc_writeThemesDesc">Umožňuje vložit nový motiv a změnit informaci o tom, který motiv je použit.</string>
- <string name="theme_install_error_title">Instalace motivu selhala</string>
- <string name="theme_install_error_message">Instalace „%s“ selhala</string>
<string name="stylus_app_not_installed">Aplikace %s není nainstalována</string>
- <string name="theme_reset_notification_title">Obnovit motiv</string>
- <string name="theme_reset_notification_body">Kvůli pádům aplikací byl obnoven výchozí systémový motiv.</string>
<string name="silent_mode_priority">Priorita</string>
<string name="silent_mode_none">Žádný</string>
<string name="subscription_change_disabled_wifi_ap">Hotspot Wi\u2011Fi byl kvůli změně připojení SIM vypnut</string>
diff --git a/core/res/res/values-da/cm_strings.xml b/core/res/res/values-da/cm_strings.xml
index a7a3e77..f901c9d 100644
--- a/core/res/res/values-da/cm_strings.xml
+++ b/core/res/res/values-da/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; netværk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Netværk</string>
- <string name="permlab_accessThemeService">tilgå tematjenesten</string>
<string name="permlab_interceptPackageLaunch">afbryd app-opstart</string>
- <string name="permdesc_accessThemeService">Tillader en app at tilgå tematjenesten. Bør aldrig være nødvendig for alm. apps.</string>
- <string name="permlab_readThemes">læse din temainformation</string>
- <string name="permdesc_readThemesDesc">Tillader appen at læse dine temaer og afgøre, hvilket tema du anvender.</string>
- <string name="permlab_writeThemes">ændre dine temaer</string>
- <string name="permdesc_writeThemesDesc">Tillader appen at indsætte nye temaer og ændre, hvilket tema du anvender.</string>
- <string name="theme_install_error_title">Det lykkedes ikke at installere temaet</string>
- <string name="theme_install_error_message">%s kunne ikke installeres</string>
<string name="stylus_app_not_installed">%s er ikke installeret</string>
- <string name="theme_reset_notification_title">Nulstil tema</string>
- <string name="theme_reset_notification_body">System-tema er gendannet på grund af flere app nedbrud.</string>
<string name="silent_mode_priority">Prioritet</string>
<string name="silent_mode_none">Ingen</string>
<string name="subscription_change_disabled_wifi_ap">Deaktiverede Wi-Fi hotspot på grund af en ændring af dit SIM abonnement</string>
diff --git a/core/res/res/values-de/cm_strings.xml b/core/res/res/values-de/cm_strings.xml
index 35b5a90..6854614 100644
--- a/core/res/res/values-de/cm_strings.xml
+++ b/core/res/res/values-de/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB und Netzwerk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Netzwerk</string>
- <string name="permlab_accessThemeService">auf den Design-Dienst zugreifen</string>
<string name="permlab_interceptPackageLaunch">App-Start verhindern</string>
- <string name="permdesc_accessThemeService">Ermöglicht der App, auf den Design-Dienst zuzugreifen. Wird für normale Apps nicht benötigt.</string>
- <string name="permlab_readThemes">Design-Informationen lesen</string>
- <string name="permdesc_readThemesDesc">Ermöglicht der App, auszulesen, welche Designs Sie installiert und aktiviert haben.</string>
- <string name="permlab_writeThemes">aktive Designs ändern</string>
- <string name="permdesc_writeThemesDesc">Ermöglicht der App, neue Designs zu installieren und das aktive Design zu wählen.</string>
- <string name="theme_install_error_title">Design konnte nicht installiert werden</string>
- <string name="theme_install_error_message">%s konnte nicht installiert werden</string>
<string name="stylus_app_not_installed">%s ist nicht installiert</string>
- <string name="theme_reset_notification_title">Design zurückgesetzt</string>
- <string name="theme_reset_notification_body">Das Systemdesign wurde aufgrund mehrer App-Abstürze wiederhergestellt.</string>
<string name="silent_mode_priority">Wichtig</string>
<string name="silent_mode_none">Keine</string>
<string name="subscription_change_disabled_wifi_ap">Der WLAN-Hotspot wurde aufgrund einer SIM-Abonnementänderung deaktiviert.</string>
diff --git a/core/res/res/values-el/cm_strings.xml b/core/res/res/values-el/cm_strings.xml
index 2a4504e..931c58a 100644
--- a/core/res/res/values-el/cm_strings.xml
+++ b/core/res/res/values-el/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; δίκτυο</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Δίκτυο</string>
- <string name="permlab_accessThemeService">πρόσβαση στην υπηρεσία θεμάτων</string>
<string name="permlab_interceptPackageLaunch">παρεμπόδιση έναρξης εφαρμογών</string>
- <string name="permdesc_accessThemeService">Επιτρέπει σε μια εφαρμογή την πρόσβαση στην υπηρεσία θεμάτων. Δεν πρέπει να απαιτείται από κανονικές εφαρμογές.</string>
- <string name="permlab_readThemes">ανάγνωση πληροφοριών του θέματος σας</string>
- <string name="permdesc_readThemesDesc">Επιτρέπει στην εφαρμογή να διαβάζει τα θέματα σας και να προσδιορίσει ποιο θέμα έχετε εφαρμόσει.</string>
- <string name="permlab_writeThemes">τροποποίηση των θεμάτων σας</string>
- <string name="permdesc_writeThemesDesc">Επιτρέπει στην εφαρμογή να εισάγει νέα θέματα και να τροποποιήσει το θέμα που έχετε εφαρμόσει.</string>
- <string name="theme_install_error_title">Αποτυχία εγκατάστασης του θέματος</string>
- <string name="theme_install_error_message">Αποτυχία εγκατάστασης του %s</string>
<string name="stylus_app_not_installed">Το %s δεν είναι εγκατεστημένο</string>
- <string name="theme_reset_notification_title">Επαναφορά θέματος</string>
- <string name="theme_reset_notification_body">Έγινε επαναφορά του θέματος συστήματος λόγω πολλαπλών σφαλμάτων εφαρμογών.</string>
<string name="silent_mode_priority">Προτεραιότητα</string>
<string name="silent_mode_none">Κανένα</string>
<string name="subscription_change_disabled_wifi_ap">Το Wi-Fi hotspot απενεργοποιήθηκε λόγω αλλαγής συνδρομής SIM</string>
diff --git a/core/res/res/values-en-rAU/cm_strings.xml b/core/res/res/values-en-rAU/cm_strings.xml
index 16f9cbf..8eb89c6 100644
--- a/core/res/res/values-en-rAU/cm_strings.xml
+++ b/core/res/res/values-en-rAU/cm_strings.xml
@@ -45,20 +45,8 @@
<string name="adb_net_active_notification_title">ADB over network enabled</string>
<string name="adb_both_active_notification_title">ADB over USB &amp; network enabled</string>
<string name="adb_active_generic_notification_message">Touch to disable debugging.</string>
- <string name="permlab_accessThemeService">access theme service</string>
<string name="permlab_interceptPackageLaunch">intercept app launch</string>
- <string name="permdesc_accessThemeService">Allows an app to access the theme service. Should never be needed for normal apps.</string>
- <string name="permlab_readThemes">read your theme info</string>
- <string name="permdesc_readThemesDesc">Allows the app to read your themes and
- determine which theme you have applied.</string>
- <string name="permlab_writeThemes">modify your themes</string>
- <string name="permdesc_writeThemesDesc">Allows the app to insert new themes and
- modify which theme you have applied.</string>
- <string name="theme_install_error_title">Failed to install theme</string>
- <string name="theme_install_error_message">%s failed to install</string>
<string name="stylus_app_not_installed">%s is not installed</string>
- <string name="theme_reset_notification_title">Theme reset</string>
- <string name="theme_reset_notification_body">System theme restored due to multiple app crashes.</string>
<string name="permlab_changePrivacyGuardState">enable or disable Privacy Guard</string>
<string name="permdesc_changePrivacyGuardState">Allows the app to change whether another app runs with Privacy Guard. When an app is running with Privacy Guard, it will not have access to personal data such as contacts, call logs, or messages.</string>
<string name="privacy_guard_notification">Privacy Guard active</string>
diff --git a/core/res/res/values-en-rIN/cm_strings.xml b/core/res/res/values-en-rIN/cm_strings.xml
index 41836b4..e5dadee 100644
--- a/core/res/res/values-en-rIN/cm_strings.xml
+++ b/core/res/res/values-en-rIN/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; network</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Network</string>
- <string name="permlab_accessThemeService">access theme service</string>
<string name="permlab_interceptPackageLaunch">intercept app launch</string>
- <string name="permdesc_accessThemeService">Allows an app to access the theme service. Should never be needed for normal apps.</string>
- <string name="permlab_readThemes">read your theme info</string>
- <string name="permdesc_readThemesDesc">Allows the app to read your themes and
- determine which theme you have applied.</string>
- <string name="permlab_writeThemes">modify your themes</string>
- <string name="permdesc_writeThemesDesc">Allows the app to insert new themes and
- modify which theme you have applied.</string>
- <string name="theme_install_error_title">Failed to install theme</string>
- <string name="theme_install_error_message">%s failed to install</string>
<string name="stylus_app_not_installed">%s is not installed</string>
- <string name="theme_reset_notification_title">Theme reset</string>
- <string name="theme_reset_notification_body">System theme restored due to multiple app crashes.</string>
<string name="silent_mode_priority">Priority</string>
<string name="silent_mode_none">None</string>
<string name="subscription_change_disabled_wifi_ap">Disabled Wi-Fi hotspot due to SIM subscription change</string>
diff --git a/core/res/res/values-eo/cm_strings.xml b/core/res/res/values-eo/cm_strings.xml
index 88c4fb8..3c9f036 100644
--- a/core/res/res/values-eo/cm_strings.xml
+++ b/core/res/res/values-eo/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; reto</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Reto</string>
- <string name="permlab_accessThemeService">aliri la servon pri etosoj</string>
<string name="permlab_interceptPackageLaunch">interkapti lanĉadon de aplikaĵo</string>
- <string name="permdesc_accessThemeService">Permesas al la aplikaĵo aliri la servon pri etosoj. Ĝi neniam estu bezonata por normalaj aplikaĵoj.</string>
- <string name="permlab_readThemes">legi informon de via etoso</string>
- <string name="permdesc_readThemesDesc">Permesas al la aplikaĵo legi viajn etosojn kaj eltrovi kiun etoson vi aplikis.</string>
- <string name="permlab_writeThemes">ŝanĝi viajn etosojn</string>
- <string name="permdesc_writeThemesDesc">Permesas al la aplikaĵo enmeti novajn etosojn kaj ŝanĝi kiun etoson vi aplikis.</string>
- <string name="theme_install_error_title">Instalado de etoso fiaskis</string>
- <string name="theme_install_error_message">instalado de %s fiaskis</string>
<string name="stylus_app_not_installed">%s ne estas instalita</string>
- <string name="theme_reset_notification_title">Restartigi etoson</string>
- <string name="theme_reset_notification_body">La sistema etoso estis restarigita pro multaj kolapsoj de la aplikaĵo.</string>
<string name="permlab_changePrivacyGuardState">ŝalti aŭ malsălti protektadon de datumoj</string>
<string name="permdesc_changePrivacyGuardState">Permesas al la aplikaĵo ŝanĝi ĉu alia aplikaĵo funkcias kun protektado de datumoj. Kiam aplikaĵo funkcias kun protektado de datumoj, ĝi ne rajtos aliri al personaj datumoj kiel kontaktuloj, protokoloj de alvokoj, aŭ mesaĝoj.</string>
<string name="privacy_guard_notification">Protektado de datumoj aktiva</string>
diff --git a/core/res/res/values-es/cm_strings.xml b/core/res/res/values-es/cm_strings.xml
index 93fb350..eba3ba5 100644
--- a/core/res/res/values-es/cm_strings.xml
+++ b/core/res/res/values-es/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB y red</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Red</string>
- <string name="permlab_accessThemeService">acceso al servicio de temas</string>
<string name="permlab_interceptPackageLaunch">interceptar la ejecución de aplicaciones</string>
- <string name="permdesc_accessThemeService">Permite que la aplicación acceda al servicio de temas. Nunca debería ser necesario para aplicaciones normales.</string>
- <string name="permlab_readThemes">leer información de los temas</string>
- <string name="permdesc_readThemesDesc">Permite que la aplicación lea los temas instalados y determine cual es el que has aplicado.</string>
- <string name="permlab_writeThemes">modificar los temas</string>
- <string name="permdesc_writeThemesDesc">Permite que la aplicación añada nuevos temas y modifique el tema aplicado actualmente.</string>
- <string name="theme_install_error_title">Error al instalar el tema</string>
- <string name="theme_install_error_message">Error al instalar %s</string>
<string name="stylus_app_not_installed">%s no está instalada</string>
- <string name="theme_reset_notification_title">Tema restablecido</string>
- <string name="theme_reset_notification_body">Tema del sistema restablecido debido a múltiples cierres de la aplicación.</string>
<string name="silent_mode_priority">Prioridad</string>
<string name="silent_mode_none">Ninguno</string>
<string name="subscription_change_disabled_wifi_ap">Zona Wi-Fi desactivada debido a un cambio de suscripción en la SIM</string>
diff --git a/core/res/res/values-et-rEE/cm_strings.xml b/core/res/res/values-et-rEE/cm_strings.xml
index 88adad0..c0843d8 100644
--- a/core/res/res/values-et-rEE/cm_strings.xml
+++ b/core/res/res/values-et-rEE/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; võrk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Võrk</string>
- <string name="permlab_accessThemeService">pääseda ligi teema teenusele</string>
<string name="permlab_interceptPackageLaunch">rakenduse käivitamise katkestamine</string>
- <string name="permdesc_accessThemeService">Annab rakendusele ligipääsu teema teenusele. Tavarakenduste puhul ei peaks kunagi vaja minema.</string>
- <string name="permlab_readThemes">lugeda teavet teema kohta</string>
- <string name="permdesc_readThemesDesc">Lubab rakendusel lugeda teemasid ja
-kindlaks teha, millise teema sa oled lubanud.</string>
- <string name="permlab_writeThemes">muuta teie teemasid</string>
- <string name="permdesc_writeThemesDesc">Lubab rakendusel lisada uusi teemasid ja
-muuta juba olemasolevaid.</string>
- <string name="theme_install_error_title">Ei saanud paigaldada teemat</string>
- <string name="theme_install_error_message">%s paigaldamine nurjus</string>
<string name="stylus_app_not_installed">%s ei ole installitud</string>
- <string name="theme_reset_notification_title">Teema lähtestus</string>
- <string name="theme_reset_notification_body">Süsteemi teema taastati paljude rakenduste kokkujooksmise tõttu.</string>
<string name="silent_mode_priority">Prioriteet</string>
<string name="silent_mode_none">Puudub</string>
<string name="subscription_change_disabled_wifi_ap">WiFi hotspot lülitati välja kuna muutus SIM kaardi teenused</string>
diff --git a/core/res/res/values-eu-rES/cm_strings.xml b/core/res/res/values-eu-rES/cm_strings.xml
index fb234db..e902e97 100644
--- a/core/res/res/values-eu-rES/cm_strings.xml
+++ b/core/res/res/values-eu-rES/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB eta sarea</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Sarea</string>
- <string name="permlab_accessThemeService">Gaien zerbitzurako sarbidea</string>
<string name="permlab_interceptPackageLaunch">Eragotzi aplikazioak abiaraztea</string>
- <string name="permdesc_accessThemeService">Aplikazioa gaien zerbitzurako sarbidea izatera baimentzen du. Aplikazio arruntentzako ez luke beharrezkoa izan behar.</string>
- <string name="permlab_readThemes">Gaiei buruzko informazioa irakurri</string>
- <string name="permdesc_readThemesDesc">Aplikazioa instalaturiko gaiak irakurtzera baimentzen du, baita momentuan aplikaturikoa zein den determinatzera ere.</string>
- <string name="permlab_writeThemes">Gaiak aldatu</string>
- <string name="permdesc_writeThemesDesc">Gai berriak sartu eta ezarrita duzun gaia aldatzea ahalbidetzen dio aplikazioari.</string>
- <string name="theme_install_error_title">Ezin izan da gaia instalatu</string>
- <string name="theme_install_error_message">%s ez da instalatu</string>
<string name="stylus_app_not_installed">%s ez dago instalatuta</string>
- <string name="theme_reset_notification_title">Gaia leheneratu da</string>
- <string name="theme_reset_notification_body">Sistemaren gaia berrezarri da hainbat aplikazio kraskatu direlako.</string>
<string name="silent_mode_priority">Lehentasuna</string>
<string name="silent_mode_none">Bat ere ez</string>
<string name="subscription_change_disabled_wifi_ap">Wi-Fi gunea desgaitu da SIM harpidetza aldatu delako</string>
diff --git a/core/res/res/values-fa/cm_strings.xml b/core/res/res/values-fa/cm_strings.xml
index 47c5270..81d51c3 100644
--- a/core/res/res/values-fa/cm_strings.xml
+++ b/core/res/res/values-fa/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">شبکه و یواس‌بی</string>
<string name="adb_active_custom_tile_usb">یواس‌بی</string>
<string name="adb_active_custom_tile_net">شبکه</string>
- <string name="permlab_accessThemeService">دسترسی به سرویس تم</string>
<string name="permlab_interceptPackageLaunch">جلوگیری از اجرا شدن برنامه</string>
- <string name="permdesc_accessThemeService">به برنامه مجوز دسترسی به سرویس تم را می‌دهد. این مجوز هرگز برای برنامه‌های معمول لازم نیست.</string>
- <string name="permlab_readThemes">مشاهده اطلاعات تم شما</string>
- <string name="permdesc_readThemesDesc">به برنامه اجازه می‌دهد تا تم‌های شما را مشاهده کرده و
- بفهمد شما کدام تم را انتخاب کرده‌اید.</string>
- <string name="permlab_writeThemes">ویرایش تم‌های شما</string>
- <string name="permdesc_writeThemesDesc">به برنامه اجازه می‌دهد تا تم‌های جدید ایجاد کرده و
- تم انتخابی شما را ویرایش کند.</string>
- <string name="theme_install_error_title">موفق به نصب تم نشد</string>
- <string name="theme_install_error_message">%s نصب نشد</string>
<string name="stylus_app_not_installed">%s نصب نیست</string>
- <string name="theme_reset_notification_title">تنظیم مجدد تم</string>
- <string name="theme_reset_notification_body">به دلیل از کار افتادن چند برنامه تم اصلی برگردانده شد.</string>
<string name="silent_mode_priority">اولویت‌دار</string>
<string name="silent_mode_none">هیچ‌کدام</string>
<string name="subscription_change_disabled_wifi_ap">نقطه اتصال قابل حمل وای‌فای به دلیل تغییر تعرفه سیم کارت، غیرفعال شد</string>
diff --git a/core/res/res/values-fi/cm_strings.xml b/core/res/res/values-fi/cm_strings.xml
index eaff9f7..1df6487 100644
--- a/core/res/res/values-fi/cm_strings.xml
+++ b/core/res/res/values-fi/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; verkko</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Verkko</string>
- <string name="permlab_accessThemeService">pääsy teemapalveluun</string>
<string name="permlab_interceptPackageLaunch">keskeytä sovelluksen käynnistys</string>
- <string name="permdesc_accessThemeService">Sallii sovelluksen päästä teemapalveluun. Tavalliset sovellukset ei koskaan tarvitse tätä.</string>
- <string name="permlab_readThemes">lue teeman tiedot</string>
- <string name="permdesc_readThemesDesc">Sallii sovelluksen lukea teemojasi, ja tunnistaa käytössä olevan teeman.</string>
- <string name="permlab_writeThemes">muokkaa teemoja</string>
- <string name="permdesc_writeThemesDesc">Sallii sovelluksen asettaa uusia teemoja ja muokata käytössä olevaa teemaa.</string>
- <string name="theme_install_error_title">Teeman asennus epäonnistui</string>
- <string name="theme_install_error_message">Teeman \"%s\" asennus epäonnistui</string>
<string name="stylus_app_not_installed">%s ei ole asennettu</string>
- <string name="theme_reset_notification_title">Teeman resetointi</string>
- <string name="theme_reset_notification_body">Järjestelmän teema palautettu lukuisten sovellusvirheiden vuoksi.</string>
<string name="silent_mode_priority">Prioriteetti</string>
<string name="silent_mode_none">Ei mitään</string>
<string name="subscription_change_disabled_wifi_ap">Wi-Fi-tukiasema poistettiin käytöstä SIMin vaihdon vuoksi</string>
diff --git a/core/res/res/values-fr/cm_strings.xml b/core/res/res/values-fr/cm_strings.xml
index 451cd53..c8af1ac 100644
--- a/core/res/res/values-fr/cm_strings.xml
+++ b/core/res/res/values-fr/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB et réseau</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Réseau</string>
- <string name="permlab_accessThemeService">accéder au service de thèmes</string>
<string name="permlab_interceptPackageLaunch">intercepter le lancement d\'application</string>
- <string name="permdesc_accessThemeService">Permet à l\'application d\'accéder au service de thèmes. Une application normale ne devrait pas en avoir besoin.</string>
- <string name="permlab_readThemes">lire les informations de votre thème</string>
- <string name="permdesc_readThemesDesc">Permet à une application de lire et déterminer quel thème vous avez appliqué.</string>
- <string name="permlab_writeThemes">modifier vos thèmes</string>
- <string name="permdesc_writeThemesDesc">Permet à une application d\'installer de nouveaux thèmes et modifier le thème que vous avez appliqué.</string>
- <string name="theme_install_error_title">Impossible d\'installer le thème</string>
- <string name="theme_install_error_message">Impossible d\'installer %s</string>
<string name="stylus_app_not_installed">%s n\'est pas installé</string>
- <string name="theme_reset_notification_title">Réinitialisation du thème</string>
- <string name="theme_reset_notification_body">Thème système restauré en raison de multiples problèmes sur l\'application.</string>
<string name="silent_mode_priority">Priorité</string>
<string name="silent_mode_none">Aucun</string>
<string name="subscription_change_disabled_wifi_ap">Point d\'accès Wi-Fi désactivé en raison d\'un changement d\'abonnement SIM</string>
diff --git a/core/res/res/values-gl-rES/cm_strings.xml b/core/res/res/values-gl-rES/cm_strings.xml
index 2794d3f..13986eb 100644
--- a/core/res/res/values-gl-rES/cm_strings.xml
+++ b/core/res/res/values-gl-rES/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB e rede</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Rede</string>
- <string name="permlab_accessThemeService">acceder aos temas</string>
<string name="permlab_interceptPackageLaunch">Interromper o inicio de aplicacións</string>
- <string name="permdesc_accessThemeService">Permitir que unha aplicación acceda aos temas. Non debería ser necesario para aplicacións normais.</string>
- <string name="permlab_readThemes">ler a información do seu tema</string>
- <string name="permdesc_readThemesDesc">Permitir que a aplicación lea os seus temas e
- determine cal deles está en uso.</string>
- <string name="permlab_writeThemes">modificar os seus temas</string>
- <string name="permdesc_writeThemesDesc">Permitir que a aplicación insira novos temas e
- modifique o que estea en uso.</string>
- <string name="theme_install_error_title">Non se puido instalar o tema</string>
- <string name="theme_install_error_message">Non se puido instalar %s</string>
<string name="stylus_app_not_installed">%s non está instalada</string>
- <string name="theme_reset_notification_title">Restabelecer o tema</string>
- <string name="theme_reset_notification_body">Restableceuse o tema debido a varios fallos da aplicación.</string>
<string name="silent_mode_priority">Prioridade</string>
<string name="silent_mode_none">Ningún</string>
<string name="subscription_change_disabled_wifi_ap">Hotspot Wi-Fi desactivado debido ao cambio da subscrición da SIM</string>
diff --git a/core/res/res/values-hi/cm_strings.xml b/core/res/res/values-hi/cm_strings.xml
index a8aebc2..8fbbcbc 100644
--- a/core/res/res/values-hi/cm_strings.xml
+++ b/core/res/res/values-hi/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">यूएसबी और नेटवर्क</string>
<string name="adb_active_custom_tile_usb">यूएसबी</string>
<string name="adb_active_custom_tile_net">नेटवर्क</string>
- <string name="permlab_accessThemeService">थीम सेवा में पहुँचें</string>
<string name="permlab_interceptPackageLaunch">ऐप लॉन्च का अंतररोधन करें</string>
- <string name="permdesc_accessThemeService">ऐप को थीम सेवा में पहुँचने दाता है। सामान्य ऐपों के लिए इसकी कभी भी आवश्यकता नहीं होनी चाहिए।</string>
- <string name="permlab_readThemes">अपनी थीम जानकारी पढ़ें</string>
- <string name="permdesc_readThemesDesc">ऐप को आपके थीमों को पढ़ने और
- यह निर्धारित करने देता है कि आपने किस थीम को लागू किया है।</string>
- <string name="permlab_writeThemes">अपने थीमों को संशोधित करें</string>
- <string name="permdesc_writeThemesDesc">ऐप को नए थीम डालने और आपने
- जिस थीम को लागू किया है, उसे संशोधित करने देता है।</string>
- <string name="theme_install_error_title">थीम स्थापित नहीं कर सके</string>
- <string name="theme_install_error_message">%s स्थापन विफल हुआ</string>
<string name="stylus_app_not_installed">%s स्थापित नहीं है</string>
- <string name="theme_reset_notification_title">थीम रीसेट</string>
- <string name="theme_reset_notification_body">अनेक ऐप बैठ जाने के कारण सिस्टम थीम को बहाल किया गया।</string>
<string name="silent_mode_priority">वरीयता</string>
<string name="silent_mode_none">कुछ नहीं</string>
<string name="permlab_changePrivacyGuardState">गोपनीयता रक्षक को सक्षम या अक्षम करें</string>
diff --git a/core/res/res/values-hr/cm_strings.xml b/core/res/res/values-hr/cm_strings.xml
index 22347f6..8c04191 100644
--- a/core/res/res/values-hr/cm_strings.xml
+++ b/core/res/res/values-hr/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB i mrežni</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Mreža</string>
- <string name="permlab_accessThemeService">pristupiti servisu tema</string>
<string name="permlab_interceptPackageLaunch">Presresti pokretanje aplikacija</string>
- <string name="permdesc_accessThemeService">Dopušta aplikaciji pristup servisu tema. Za obične aplikacije nikada ne bi trebao biti potreban.</string>
- <string name="permlab_readThemes">pročitati informacije vaše teme</string>
- <string name="permdesc_readThemesDesc">Dopušta aplikaciji čitanje vaših tema i određivanje teme koju koristite.</string>
- <string name="permlab_writeThemes">urediti vaše teme</string>
- <string name="permdesc_writeThemesDesc">Dopušta aplikaciji dodavati nove teme i urediti temu koju ste primjenili.</string>
- <string name="theme_install_error_title">Instalacija teme nije uspjela</string>
- <string name="theme_install_error_message">%s Instalacija nije uspjela</string>
<string name="stylus_app_not_installed">%s nije instalirano</string>
- <string name="theme_reset_notification_title">Vraćanje početne teme</string>
- <string name="theme_reset_notification_body">Tema sustava je vraćana na početnu zbog višestrukih rušenja aplikacija.</string>
<string name="silent_mode_priority">Prioritet</string>
<string name="silent_mode_none">Ništa</string>
<string name="subscription_change_disabled_wifi_ap">Wi- Fi Hotspot onemogućen zbog SIM promjene</string>
diff --git a/core/res/res/values-hu/cm_strings.xml b/core/res/res/values-hu/cm_strings.xml
index 983a61f..99e1062 100644
--- a/core/res/res/values-hu/cm_strings.xml
+++ b/core/res/res/values-hu/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; hálózat</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Hálózat</string>
- <string name="permlab_accessThemeService">hozzáférés a témaszolgáltatáshoz</string>
<string name="permlab_interceptPackageLaunch">alkalmazás indításának feltartóztatása</string>
- <string name="permdesc_accessThemeService">Lehetővé teszi az alkalmazás számára, hogy hozzáférjen a témaszolgáltatáshoz. Általános alkalmazásoknak soha nem kell ilyen engedély.</string>
- <string name="permlab_readThemes">téma információjának megtekintése</string>
- <string name="permdesc_readThemesDesc">Lehetővé teszi az alkalmazás számára, hogy megtekintse a témákat és megállapítsa, melyik téma aktív.</string>
- <string name="permlab_writeThemes">témák módosítása</string>
- <string name="permdesc_writeThemesDesc">Lehetővé teszi az alkalmazás számára, hogy új témákat hozzon létre és módosítsa a jelenleg aktív témát.</string>
- <string name="theme_install_error_title">Téma telepítése sikertelen</string>
- <string name="theme_install_error_message">Sikertelen telepítés: %s</string>
<string name="stylus_app_not_installed">%s nincs telepítve</string>
- <string name="theme_reset_notification_title">Téma viszaállítása</string>
- <string name="theme_reset_notification_body">Több alkalmazás összeomlása miatt a rendszer téma visszaállításra került.</string>
<string name="silent_mode_priority">Prioritás</string>
<string name="silent_mode_none">Nincs</string>
<string name="subscription_change_disabled_wifi_ap">Wi\u2011Fi hotspot kikapcsolva a SIM előfizetés módosítása miatt</string>
diff --git a/core/res/res/values-in/cm_strings.xml b/core/res/res/values-in/cm_strings.xml
index 8497ed0..0b540da 100644
--- a/core/res/res/values-in/cm_strings.xml
+++ b/core/res/res/values-in/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">Jaringan &amp; USB</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Jaringan</string>
- <string name="permlab_accessThemeService">mengakses layanan tema</string>
<string name="permlab_interceptPackageLaunch">Mencegah memulai aplikasi</string>
- <string name="permdesc_accessThemeService">Memungkinkan aplikasi untuk mengakses layanan tema. Seharusnya tidak diperlukan oleh aplikasi biasa.</string>
- <string name="permlab_readThemes">baca info tema Anda</string>
- <string name="permdesc_readThemesDesc">Izinkan aplikasi untuk membaca tema anda dan menentukan tema yang telah anda terapkan.</string>
- <string name="permlab_writeThemes">modifikasi tema anda</string>
- <string name="permdesc_writeThemesDesc">Izinkan aplikasi untuk memasukkan tema baru dan mengubah tema yang telah anda terapkan.</string>
- <string name="theme_install_error_title">Gagal menginstal tema</string>
- <string name="theme_install_error_message">%s gagal untuk di instal</string>
<string name="stylus_app_not_installed">%s tidak terpasang</string>
- <string name="theme_reset_notification_title">Set ulang tema</string>
- <string name="theme_reset_notification_body">Tema sitem dikembalikan karena beberapa aplikasi crash.</string>
<string name="silent_mode_priority">Prioritas</string>
<string name="silent_mode_none">Tidak Ada</string>
<string name="permlab_changePrivacyGuardState">Aktifkan atau nonaktifkan Penjaga Privasi</string>
diff --git a/core/res/res/values-it/cm_strings.xml b/core/res/res/values-it/cm_strings.xml
index fb3f8a5..0c418b7 100644
--- a/core/res/res/values-it/cm_strings.xml
+++ b/core/res/res/values-it/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; rete</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Rete</string>
- <string name="permlab_accessThemeService">accede al servizio tema</string>
<string name="permlab_interceptPackageLaunch">Intercetta lancio app</string>
- <string name="permdesc_accessThemeService">Consente all\'app di accedere al servizio tema. Non dovrebbe mai essere necessario per le app normali.</string>
- <string name="permlab_readThemes">legge le tue informazioni del tema</string>
- <string name="permdesc_readThemesDesc">Consente all\'app di leggere i tuoi temi e determinare quale tema hai applicato.</string>
- <string name="permlab_writeThemes">modifica i tuoi temi</string>
- <string name="permdesc_writeThemesDesc">Consente all\'app di inserire nuovi temi e modificare quale tema hai applicato.</string>
- <string name="theme_install_error_title">Impossibile installare il tema</string>
- <string name="theme_install_error_message">Impossibile installare %s</string>
<string name="stylus_app_not_installed">%s non è installato</string>
- <string name="theme_reset_notification_title">Reimposta tema</string>
- <string name="theme_reset_notification_body">Tema di sistema ripristinato a causa di molteplici crash.</string>
<string name="silent_mode_priority">Priorità</string>
<string name="silent_mode_none">Nessuno</string>
<string name="subscription_change_disabled_wifi_ap">Hotspot WiFi disattivato in seguito al cambio di SIM</string>
diff --git a/core/res/res/values-iw/cm_strings.xml b/core/res/res/values-iw/cm_strings.xml
index 5740fdf..42da952 100644
--- a/core/res/res/values-iw/cm_strings.xml
+++ b/core/res/res/values-iw/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB ורשת</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">רשת</string>
- <string name="permlab_accessThemeService">גישה לשירות ערכות העיצוב</string>
<string name="permlab_interceptPackageLaunch">יירוט הפעלת יישום</string>
- <string name="permdesc_accessThemeService">מאפשר ליישום לגשת לשירות ערכות העיצוב. לא אמור להידרש ליישומים רגילים.</string>
- <string name="permlab_readThemes">קריאת פרטי ערכת העיצוב שלך</string>
- <string name="permdesc_readThemesDesc">מאפשר ליישום להיות מודע לערכות העיצוב הקיימות, ולקבוע איזו ערכה החלת.</string>
- <string name="permlab_writeThemes">שינוי ערכות העיצוב שלך</string>
- <string name="permdesc_writeThemesDesc">מאפשר ליישום להוסיף ערכות עיצוב חדשות ולשנות את הערכה המוחלת.</string>
- <string name="theme_install_error_title">התקנת ערכת העיצוב נכשלה</string>
- <string name="theme_install_error_message">התקנת %s נכשלה</string>
<string name="stylus_app_not_installed">%s לא מותקן</string>
- <string name="theme_reset_notification_title">אפס ערכת עיצוב</string>
- <string name="theme_reset_notification_body">ערכת העיצוב של המערכת שוחזרה עקב קריסות תהליכים מרובות.</string>
<string name="silent_mode_priority">עדיפות</string>
<string name="silent_mode_none">ללא</string>
<string name="subscription_change_disabled_wifi_ap">נקודת Wi-Fi חמה הושבתה עקב שינוי מנוי SIM</string>
diff --git a/core/res/res/values-ja/cm_strings.xml b/core/res/res/values-ja/cm_strings.xml
index 922398d..bc6636a 100644
--- a/core/res/res/values-ja/cm_strings.xml
+++ b/core/res/res/values-ja/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USBとネットワーク</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">ネットワーク</string>
- <string name="permlab_accessThemeService">テーマサービスへのアクセス</string>
<string name="permlab_interceptPackageLaunch">アプリの起動の監視</string>
- <string name="permdesc_accessThemeService">テーマサービスへのアクセスをアプリに許可します。通常のアプリで必要とされることはないはずです。</string>
- <string name="permlab_readThemes">テーマ情報の読み取り</string>
- <string name="permdesc_readThemesDesc">テーマの読み取りや適用しているテーマの特定をアプリに許可します。</string>
- <string name="permlab_writeThemes">テーマの変更</string>
- <string name="permdesc_writeThemesDesc">新しいテーマの挿入や適用しているテーマの変更をアプリに許可します。</string>
- <string name="theme_install_error_title">テーマをインストールできませんでした</string>
- <string name="theme_install_error_message">%sをインストールできませんでした</string>
<string name="stylus_app_not_installed">%sはインストールされていません</string>
- <string name="theme_reset_notification_title">テーマのリセット</string>
- <string name="theme_reset_notification_body">複数のアプリのクラッシュによりシステムのテーマが復元されました。</string>
<string name="silent_mode_priority">優先順位</string>
<string name="silent_mode_none">なし</string>
<string name="subscription_change_disabled_wifi_ap">SIMサブスクリプションの変更によってWi-Fiアクセスポイントが無効になりました</string>
diff --git a/core/res/res/values-kn-rIN/cm_strings.xml b/core/res/res/values-kn-rIN/cm_strings.xml
index b904e16..fcb9e94 100644
--- a/core/res/res/values-kn-rIN/cm_strings.xml
+++ b/core/res/res/values-kn-rIN/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">ಯುಎಸ್‍ಬಿ &amp; ನೆಟ್‍ವರ್ಕ್</string>
<string name="adb_active_custom_tile_usb">ಯುಎಸ್‍ಬಿ</string>
<string name="adb_active_custom_tile_net">ನೆಟ್‍ವರ್ಕ್</string>
- <string name="permlab_accessThemeService">ಥೀಮ್ ಸೇವೆಗೆ ಪ್ರವೇಶ</string>
<string name="permlab_interceptPackageLaunch">ಆಪ್ ಆರಂಭ ಪ್ರತಿಬಂಧ</string>
- <string name="permdesc_accessThemeService">ಆಪ್‍ಗೆ ಥೀಮ್ ಸೇವೆಯನ್ನು ಪ್ರವೇಶಿಸಲು ಅನುಮತಿಸು. ಸಾಮಾನ್ಯ ಆಪ್‍ಗಳಿಗೆ ಇದರ ಅವಶ್ಯಕತೆ ಇರುವುದಿಲ್ಲ.</string>
- <string name="permlab_readThemes">ನಿಮ್ಮ ಥೀಮ್‍ನ ಮಾಹಿತಿಯನ್ನು ಓದು</string>
- <string name="permdesc_readThemesDesc">ಆಪ್‍ಗೆ ನಿಮ್ಮ ಥೀಮ್‍ಗಳನ್ನು ಓದಲು ಅನುಮತಿಸುತ್ತದೆ ಮತ್ತು
-       ನೀವು ಯಾವ ಥೀಮ್ ಅನ್ವಯಿಸಿದ್ದೀರಿ ಎಂದು ನಿರ್ಧರಿಸುತ್ತದೆ.</string>
- <string name="permlab_writeThemes">ನಿಮ್ಮ ಥೀಮ್ಸನ್ನು ಮಾರ್ಪಡಿಸು</string>
- <string name="permdesc_writeThemesDesc">ಆಪ್‍ಗೆ ಹೊಸ ಥೀಮ್‍ಗಳನ್ನು ಸೇರಿಸಲು ಅನುಮತಿಸುತ್ತದೆ ಮತ್ತು
-       ನೀವು ಅನ್ವಯಿಸಿರುವ ಥೀಮ್‍ನ್ನು ಮಾರ್ಪಡಿಸುತ್ತದೆ.</string>
- <string name="theme_install_error_title">ಥೀಮ್ ಸ್ಥಾಪಿಸಲು ವಿಫಲವಾಗಿದೆ</string>
- <string name="theme_install_error_message">%s ಸ್ಥಾಪಿಸಲು ವಿಫಲವಾಗಿದೆ</string>
<string name="stylus_app_not_installed">%s ಸ್ಥಾಪಿತವಾಗಿಲ್ಲ</string>
- <string name="theme_reset_notification_title">ಥೀಮ್ ಮರುಹೊಂದಿಕೆ</string>
- <string name="theme_reset_notification_body">ಬಹು ಆಪ್ ಕ್ರಾಶ್‍ನ ಕಾರಣದಿಂದಾಗಿ ಸಿಸ್ಟಂ ಥೀಮನ್ನು ಪುನಃಸ್ಥಾಪಿಸಲಾಗಿದೆ.</string>
<string name="silent_mode_priority">ಆದ್ಯತೆ</string>
<string name="silent_mode_none">ಶೂನ್ಯ</string>
<string name="subscription_change_disabled_wifi_ap">ಸಿಮ್ ಚಂದಾದಾರಿಕೆ ಬದಲಾದ ಕಾರಣ ವೈ-ಫೈ ಹಾಟ್‍ಸ್ಪಾಟನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ</string>
diff --git a/core/res/res/values-ko/cm_strings.xml b/core/res/res/values-ko/cm_strings.xml
index 8d02958..f0b963e 100644
--- a/core/res/res/values-ko/cm_strings.xml
+++ b/core/res/res/values-ko/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB 및 네트워크</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">네트워크</string>
- <string name="permlab_accessThemeService">테마 서비스에 액세스</string>
<string name="permlab_interceptPackageLaunch">앱 실행 차단</string>
- <string name="permdesc_accessThemeService">앱이 테마 서비스에 접근할 수 있도록 허용합니다. 일반 앱에서는 필요없는 권한입니다.</string>
- <string name="permlab_readThemes">테마 정보 읽기</string>
- <string name="permdesc_readThemesDesc">앱이 설치된 테마들을 읽어들이고 현재 적용된 테마를 확인할 수 있도록 허용합니다.</string>
- <string name="permlab_writeThemes">테마 정보 수정</string>
- <string name="permdesc_writeThemesDesc">앱이 새로운 테마를 설치하거나 다른 테마를 적용할 수 있도록 허용합니다.</string>
- <string name="theme_install_error_title">테마 설치 실패</string>
- <string name="theme_install_error_message">%s을(를) 설치하지 못했습니다</string>
<string name="stylus_app_not_installed">%s이(가) 설치되지 않음</string>
- <string name="theme_reset_notification_title">테마 초기화</string>
- <string name="theme_reset_notification_body">잦은 앱 충돌로 인해 시스템 테마가 복원되었습니다.</string>
<string name="silent_mode_priority">우선순위</string>
<string name="silent_mode_none">없음</string>
<string name="subscription_change_disabled_wifi_ap">SIM 구독 변경으로 인해 Wi-Fi 핫스팟 비활성화함</string>
diff --git a/core/res/res/values-ku/cm_strings.xml b/core/res/res/values-ku/cm_strings.xml
index 94502b3..f24a4f0 100644
--- a/core/res/res/values-ku/cm_strings.xml
+++ b/core/res/res/values-ku/cm_strings.xml
@@ -45,17 +45,7 @@
<string name="adb_net_active_notification_title">ABD سه‌روو هێڵ کارده‌کات</string>
<string name="adb_both_active_notification_title">ABD سه‌روو USB و هێڵ کارده‌کات</string>
<string name="adb_active_generic_notification_message">ئێره‌ لێبده‌ بۆ له‌کارخستنی هه‌ڵدۆزینه‌وه‌.</string>
- <string name="permlab_accessThemeService">ڕاژەی ڕێگەی تێم</string>
- <string name="permdesc_accessThemeService">ڕێگەدان بە بارنامە بۆ ڕاژەی تێم. کە پێویست ناکا بۆ بەرنامەی ئاسایی.</string>
- <string name="permlab_readThemes">خوێندنه‌وه‌ی زانیاری له‌باره‌ی باکگراوه‌نده‌که‌ت</string>
- <string name="permdesc_readThemesDesc">ڕێگه‌دان به‌ به‌رنامه‌کان بۆ خوێندنه‌وه‌ی باکگراوه‌نده‌کانت وه‌ بڕیاردانی باکگراوه‌ندێک که‌ خۆت په‌سه‌ندته‌.</string>
- <string name="permlab_writeThemes">گۆڕینی باکگراوه‌نده‌کانت</string>
- <string name="permdesc_writeThemesDesc">ڕێگه‌دان به‌ به‌رنامه‌کان بۆ هێنانی باکگراوه‌ندی نوێ و
- گۆڕینی باکگراوه‌ندێک که‌ خۆت لات په‌سه‌نده‌.</string>
- <string name="theme_install_error_title">دابەزاندنی ڕووکار سەرکەوتو نەبوو</string>
- <string name="theme_install_error_message">%s دانەبەزێنرا</string>
<string name="stylus_app_not_installed">%s دانەمەزراوە</string>
- <string name="theme_reset_notification_title">ڕێکخستنەوەی ڕووکار</string>
<string name="permlab_changePrivacyGuardState">چالاکردن یان لەکارخستنی بەرگری تایبەتی</string>
<string name="permdesc_changePrivacyGuardState">ڕێگە دان بە بەرنامەکە بۆ گۆڕینی کەشوهەوای بەرنامەیەکی تر لە تایبەتی. کاتێک بەرنامەکە ئەکەوێتە کار لەگەڵ تایبەتی .هیچ ڕێگەیەکی نیە بۆ ئەوەی زانیاری تایبیەتیت بەکاربهێنێت وەکو ،ناوەکان،تەلەفۆن لۆگ یان نامە.</string>
<string name="privacy_guard_notification">پاسەوانی تایبەتی چالاکراوە</string>
diff --git a/core/res/res/values-lb/cm_strings.xml b/core/res/res/values-lb/cm_strings.xml
index cf822a9..5e8dbdf 100644
--- a/core/res/res/values-lb/cm_strings.xml
+++ b/core/res/res/values-lb/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB an Netzwierk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Netzwierk</string>
- <string name="permlab_accessThemeService">Op den Design-Service zougräifen</string>
<string name="permlab_interceptPackageLaunch">App-Start offänken</string>
- <string name="permdesc_accessThemeService">Erlaabt der App, den Accès op den Design-Service. Dat misst fir normal Appen ni néideg sinn.</string>
- <string name="permlab_readThemes">Design-Info liesen</string>
- <string name="permdesc_readThemesDesc">Erlaabt der App, d\'Designen auszeliesen an ze kucke wéi en Design applizéiert ass.</string>
- <string name="permlab_writeThemes">Aktiven Design änneren</string>
- <string name="permdesc_writeThemesDesc">Erlaabt der App, nei Designen dobäizesetzen an den aktiven Design z\'änneren.</string>
- <string name="theme_install_error_title">Design konnt net installéiert ginn</string>
- <string name="theme_install_error_message">%s konnt net installéiert ginn</string>
<string name="stylus_app_not_installed">%s ass net installéiert</string>
- <string name="theme_reset_notification_title">Design-Reset</string>
- <string name="theme_reset_notification_body">De System-Design gouf wéinst App-Ofstierz recuperéiert.</string>
<string name="silent_mode_priority">Prioritéit</string>
<string name="silent_mode_none">Keen</string>
<string name="subscription_change_disabled_wifi_ap">WLAN-Zougrëffspunkt gouf opgrond vun Ännerunge am SIM-Abonnement desaktivéiert</string>
diff --git a/core/res/res/values-lt/cm_strings.xml b/core/res/res/values-lt/cm_strings.xml
index 464f2f5..b4877ac 100644
--- a/core/res/res/values-lt/cm_strings.xml
+++ b/core/res/res/values-lt/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB ir tinklas</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Tinklas</string>
- <string name="permlab_accessThemeService">pasiekti temos paslaugą</string>
<string name="permlab_interceptPackageLaunch">perimti programos paleidimą</string>
- <string name="permdesc_accessThemeService">Leidžia programai pasiekti temos paslaugą. Niekada neturėtų reikėti įprastoms programoms.</string>
- <string name="permlab_readThemes">skaityti jūsų temos informaciją</string>
- <string name="permdesc_readThemesDesc">Leidžia programai skaityti jūsų temas ir nustatyti kurią temą pritaikėte.</string>
- <string name="permlab_writeThemes">pakeisti jūsų temas</string>
- <string name="permdesc_writeThemesDesc">Leidžia programai įdiegti naujas temas ir keisti temą, kurią pritaikėte.</string>
- <string name="theme_install_error_title">Nepavyko įdiegti temos</string>
- <string name="theme_install_error_message">%s nepavyko įdiegti</string>
<string name="stylus_app_not_installed">%s neįdiegta</string>
- <string name="theme_reset_notification_title">Nustatyti iš naujo temą</string>
- <string name="theme_reset_notification_body">Sistemos tema atkurta dėl pasikartojančių programos klaidų.</string>
<string name="silent_mode_priority">Prioritetas</string>
<string name="silent_mode_none">Joks</string>
<string name="subscription_change_disabled_wifi_ap">Wi-Fi saitvietė išjungta dėl SIM prenumeratos kaitos</string>
diff --git a/core/res/res/values-lv/cm_strings.xml b/core/res/res/values-lv/cm_strings.xml
index 0cd973b..b350009 100644
--- a/core/res/res/values-lv/cm_strings.xml
+++ b/core/res/res/values-lv/cm_strings.xml
@@ -44,16 +44,6 @@
<string name="adb_net_active_notification_title">ADB pa tīklu ieslēgts</string>
<string name="adb_both_active_notification_title">ADB pa USB &amp; tīklu ieslēgts</string>
<string name="adb_active_generic_notification_message">Pieskarieties, lai atslēgtu atkļūdošanu.</string>
- <string name="permlab_accessThemeService">piekļūt tēmas servisam</string>
- <string name="permdesc_accessThemeService">Ļauj lietotnei piekļūt tēmu servisam. Normālām lietotnēm to nekad nevajadzētu izmantot.</string>
- <string name="permlab_readThemes">lasīt jūsu tēmas informāciju</string>
- <string name="permdesc_readThemesDesc">Ļauj lietotnei lasīt jūsu tēmas un noteikt, kuru no tām jūs izmantojat.</string>
- <string name="permlab_writeThemes">mainīt jūsu tēmas</string>
- <string name="permdesc_writeThemesDesc">Ļauj lietotnei izveidot jaunas tēmas un mainīt jūsu pielietotās tēmas.</string>
- <string name="theme_install_error_title">Neizdevās uzstādīt tēmu</string>
- <string name="theme_install_error_message">%s neizdevās uzstādīt</string>
- <string name="theme_reset_notification_title">Atstatīt tēmu</string>
- <string name="theme_reset_notification_body">Sakarā ar vairākām lietotņu kļūdām, atjaunota sistēmas tēma.</string>
<string name="permlab_changePrivacyGuardState">Ieslēgt vai atslēgt Privātuma sargu</string>
<string name="permdesc_changePrivacyGuardState">Ļauj lietotnei mainīties pat ja cita lietotne lieto Privātuma Sargu. Kad lietotne darbojas ar privātuma sargu, tai nebūs pieejas personīgajiem datiem, kā kontakti, zvanu saraksts, vai īsziņas.</string>
<string name="privacy_guard_notification">Privātuma Sargs ir aktīvs</string>
diff --git a/core/res/res/values-nb/cm_strings.xml b/core/res/res/values-nb/cm_strings.xml
index 7505a07..791d6ce 100644
--- a/core/res/res/values-nb/cm_strings.xml
+++ b/core/res/res/values-nb/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB og nettverk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Nettverk</string>
- <string name="permlab_accessThemeService">Få tilgang til tematjeneste</string>
<string name="permlab_interceptPackageLaunch">avbryt app start</string>
- <string name="permdesc_accessThemeService">Tillater en app å få tilgang til tematjenesten. Skal aldri være nødvendig for normale apps.</string>
- <string name="permlab_readThemes">les temainformasjon</string>
- <string name="permdesc_readThemesDesc">Tillater apper å lese av hvilket tema du har valgt.</string>
- <string name="permlab_writeThemes">endre temaer</string>
- <string name="permdesc_writeThemesDesc">Lar apper installere nye temaer og endre de temaene du har valgt.</string>
- <string name="theme_install_error_title">Kan ikke installere tema</string>
- <string name="theme_install_error_message">%s ble ikke installert</string>
<string name="stylus_app_not_installed">%s er ikke installert</string>
- <string name="theme_reset_notification_title">Reset tema</string>
- <string name="theme_reset_notification_body">System tema er gjenopprettet pga. flere app krasj.</string>
<string name="silent_mode_priority">Prioritet</string>
<string name="silent_mode_none">Ingen</string>
<string name="subscription_change_disabled_wifi_ap">Deaktivert Wi-Fi hotspot på grunn av endring i SIM-abbonement</string>
diff --git a/core/res/res/values-nl/cm_strings.xml b/core/res/res/values-nl/cm_strings.xml
index 72439f4..6d72bbd 100644
--- a/core/res/res/values-nl/cm_strings.xml
+++ b/core/res/res/values-nl/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; netwerk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Netwerk</string>
- <string name="permlab_accessThemeService">toegang tot themaservice</string>
<string name="permlab_interceptPackageLaunch">Openen van app onderscheppen</string>
- <string name="permdesc_accessThemeService">Hiermee kan de app toegang krijgen tot de themaservice. Nooit vereist voor normale apps.</string>
- <string name="permlab_readThemes">informatie over uw thema\'s lezen</string>
- <string name="permdesc_readThemesDesc">Hiermee kan de app informatie lezen over uw thema\'s en bepalen welk thema u hebt toegepast.</string>
- <string name="permlab_writeThemes">uw thema\'s aanpassen</string>
- <string name="permdesc_writeThemesDesc">Hiermee kan de app nieuwe thema\'s invoegen en wijzigen welk thema u hebt toegepast.</string>
- <string name="theme_install_error_title">Thema installeren mislukt</string>
- <string name="theme_install_error_message">%s kan niet worden geïnstalleerd</string>
<string name="stylus_app_not_installed">%s is niet geïnstalleerd</string>
- <string name="theme_reset_notification_title">Thema opnieuw instellen</string>
- <string name="theme_reset_notification_body">Systeemthema hersteld als gevolg van meerdere gecrashte apps.</string>
<string name="silent_mode_priority">Prioriteit</string>
<string name="silent_mode_none">Geen</string>
<string name="subscription_change_disabled_wifi_ap">Wifi-hotspot uitgeschakeld door een SIM-abonnementwijziging</string>
diff --git a/core/res/res/values-pl/cm_strings.xml b/core/res/res/values-pl/cm_strings.xml
index b920428..f9706fc 100644
--- a/core/res/res/values-pl/cm_strings.xml
+++ b/core/res/res/values-pl/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; sieć</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Sieć</string>
- <string name="permlab_accessThemeService">dostęp do usługi motywów</string>
<string name="permlab_interceptPackageLaunch">przechwytywanie uruchamiania aplikacji</string>
- <string name="permdesc_accessThemeService">Umożliwia aplikacji dostęp do usługi motywów (nie powinno być wymagane przez standardowe aplikacje).</string>
- <string name="permlab_readThemes">odczytanie informacji o motywie</string>
- <string name="permdesc_readThemesDesc">Zezwala aplikacji na dostęp do twoich motywów i decydowanie, który z nich ma zostać użyty.</string>
- <string name="permlab_writeThemes">modyfikowanie Twoich motywów</string>
- <string name="permdesc_writeThemesDesc">Zezwala aplikacji na dodawanie nowych motywów i modyfikowanie tego, którego używasz.</string>
- <string name="theme_install_error_title">Nie udało się zainstalować motywu</string>
- <string name="theme_install_error_message">%s nie udało się zainstalować</string>
<string name="stylus_app_not_installed">Nie zainstalowano aplikacji %s</string>
- <string name="theme_reset_notification_title">Reset motywu</string>
- <string name="theme_reset_notification_body">Domyślny motyw przywrócony z powodu wielu awarii aplikacji.</string>
<string name="silent_mode_priority">Priorytet</string>
<string name="silent_mode_none">Brak</string>
<string name="subscription_change_disabled_wifi_ap">Wyłączono hotspot WiFi z powodu zmiany karty SIM</string>
diff --git a/core/res/res/values-pt-rBR/cm_strings.xml b/core/res/res/values-pt-rBR/cm_strings.xml
index 9b8f9bb..622e01a 100644
--- a/core/res/res/values-pt-rBR/cm_strings.xml
+++ b/core/res/res/values-pt-rBR/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB e rede</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Rede</string>
- <string name="permlab_accessThemeService">acessar o serviço de temas</string>
<string name="permlab_interceptPackageLaunch">interceptar inicialização de app</string>
- <string name="permdesc_accessThemeService">Permite que um aplicativo acesse o serviço de temas. Não deveria ser necessário a aplicativos normais.</string>
- <string name="permlab_readThemes">ler informação de temas</string>
- <string name="permdesc_readThemesDesc">Permite a uma aplicação ler os seus temas e determinar qual o tema que está aplicado.</string>
- <string name="permlab_writeThemes">modificar seus temas</string>
- <string name="permdesc_writeThemesDesc">Permite um aplicativo a inserir novos temas e modificar qual tema aplicado.</string>
- <string name="theme_install_error_title">Falha ao instalar o tema</string>
- <string name="theme_install_error_message">%s falhou ao instalar</string>
<string name="stylus_app_not_installed">%s não está instalado</string>
- <string name="theme_reset_notification_title">Restaurar tema</string>
- <string name="theme_reset_notification_body">O tema do sistema foi restaurado devido a vários problemas nas aplicações.</string>
<string name="silent_mode_priority">Prioridade</string>
<string name="silent_mode_none">Nenhum</string>
<string name="subscription_change_disabled_wifi_ap">Hotspot Wi-Fi desativado devido a mudança de assinatura do SIM</string>
diff --git a/core/res/res/values-pt-rPT/cm_strings.xml b/core/res/res/values-pt-rPT/cm_strings.xml
index 6aeccf9..53f81eb 100644
--- a/core/res/res/values-pt-rPT/cm_strings.xml
+++ b/core/res/res/values-pt-rPT/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB e rede</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Rede</string>
- <string name="permlab_accessThemeService">Aceder ao serviço de temas</string>
<string name="permlab_interceptPackageLaunch">Intercetar a inicialização de uma aplicação</string>
- <string name="permdesc_accessThemeService">Permite a uma aplicação aceder ao serviço de temas. Nunca deverá ser necessário para aplicações normais.</string>
- <string name="permlab_readThemes">ler a informação do tema</string>
- <string name="permdesc_readThemesDesc">Permite a uma aplicação ler os seus temas e determinar qual o tema que tem aplicado.</string>
- <string name="permlab_writeThemes">modificar os seus temas</string>
- <string name="permdesc_writeThemesDesc">Permite a uma aplicação inserir novos temas e modificar o tema que tem aplicado.</string>
- <string name="theme_install_error_title">Falha ao instalar o tema</string>
- <string name="theme_install_error_message">%s não instalou</string>
<string name="stylus_app_not_installed">%s não está instalada</string>
- <string name="theme_reset_notification_title">Restaurar tema</string>
- <string name="theme_reset_notification_body">O tema do sistema foi restaurado devido a vários erros nas aplicações.</string>
<string name="silent_mode_priority">Prioridade</string>
<string name="silent_mode_none">Nenhum</string>
<string name="subscription_change_disabled_wifi_ap">Zona Wi-Fi portátil desligada devido à alteração da assinatura SIM</string>
diff --git a/core/res/res/values-ro/cm_strings.xml b/core/res/res/values-ro/cm_strings.xml
index ecb59f3..2640c3f 100644
--- a/core/res/res/values-ro/cm_strings.xml
+++ b/core/res/res/values-ro/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; rețea</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Rețea</string>
- <string name="permlab_accessThemeService">accesare serviciul pentru teme</string>
<string name="permlab_interceptPackageLaunch">interceptează lansarea aplicației</string>
- <string name="permdesc_accessThemeService">Permite unei aplicații să acceseze serviciul pentru teme. Aplicațiile normale nu au nevoie.</string>
- <string name="permlab_readThemes">citește informații despre temă</string>
- <string name="permdesc_readThemesDesc">Permite aplicației să citească temele dumneavoastră și să determine pe care ați aplicat-o.</string>
- <string name="permlab_writeThemes">modifică teme</string>
- <string name="permdesc_writeThemesDesc">Permite aplicației să adauge teme noi și să le modifice pe cele aplicate.</string>
- <string name="theme_install_error_title">Instalarea temei a eșuat</string>
- <string name="theme_install_error_message">%s au eșuat să fie instalate</string>
<string name="stylus_app_not_installed">%s nu este instalată</string>
- <string name="theme_reset_notification_title">Resetare temă</string>
- <string name="theme_reset_notification_body">Tema de sistem este restaurată datorită unor multiple erori.</string>
<string name="silent_mode_priority">Prioritate</string>
<string name="silent_mode_none">Nimic</string>
<string name="notify_turn_wifi_off_title">Oprește Wi-Fi</string>
diff --git a/core/res/res/values-ru/cm_strings.xml b/core/res/res/values-ru/cm_strings.xml
index 757f05b..34278d0 100644
--- a/core/res/res/values-ru/cm_strings.xml
+++ b/core/res/res/values-ru/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">по сети и USB</string>
<string name="adb_active_custom_tile_usb">по USB</string>
<string name="adb_active_custom_tile_net">по сети</string>
- <string name="permlab_accessThemeService">Доступ к службе тем</string>
<string name="permlab_interceptPackageLaunch">Перехват запуска приложений</string>
- <string name="permdesc_accessThemeService">Приложение сможет получать доступ к службе тем. Это разрешение не используется обычными приложениями.</string>
- <string name="permlab_readThemes">Чтение информации о теме</string>
- <string name="permdesc_readThemesDesc">Приложение сможет считывать темы оформления и определять, какая тема сейчас применена.</string>
- <string name="permlab_writeThemes">Изменение тем</string>
- <string name="permdesc_writeThemesDesc">Приложение сможет осуществлять установку новых тем оформления и изменять текущую тему.</string>
- <string name="theme_install_error_title">Не удалось установить тему</string>
- <string name="theme_install_error_message">Сбой при установке «%s»</string>
<string name="stylus_app_not_installed">«%s» не установлено</string>
- <string name="theme_reset_notification_title">Тема отключена</string>
- <string name="theme_reset_notification_body">Из-за сбоев приложений восстановлена стандартная тема.</string>
<string name="silent_mode_priority">Важные</string>
<string name="silent_mode_none">Нет</string>
<string name="subscription_change_disabled_wifi_ap">Точка доступа Wi-Fi отключена из-за переключения SIM-карты</string>
diff --git a/core/res/res/values-si-rLK/cm_strings.xml b/core/res/res/values-si-rLK/cm_strings.xml
index 6c39478..a7a97b7 100644
--- a/core/res/res/values-si-rLK/cm_strings.xml
+++ b/core/res/res/values-si-rLK/cm_strings.xml
@@ -41,14 +41,6 @@
<string name="adb_net_active_notification_title">ජාලය හරහා ADB සබලයි</string>
<string name="adb_both_active_notification_title">ජාලය &amp; USB හරහා ADB සබලයි</string>
<string name="adb_active_generic_notification_message">නිදොස් කරණය අබල කිරීමට ස්පර්ශ කරන්න.</string>
- <string name="permlab_accessThemeService">තේමා සේවාව පරිශීලනය</string>
- <string name="permdesc_accessThemeService">තේමා සේවාව පරිශීලනය සඳහා යෙදුමකට අවසර දෙන්න. සාමාන්‍ය යෙදුම් සඳහා කවදාවත්ම අවශ්‍ය නොවේ.</string>
- <string name="permlab_readThemes">ඔබගේ තේමා තොරතුරු කියවන්න</string>
- <string name="permdesc_readThemesDesc">ඔබගේ තේමා කියවීමට සහ ඔබ යොදා ඇත්තේ කුමන තේමාව දැයි නිර්ණය කිරීමට, යෙදුමට අවසර දෙන්න.</string>
- <string name="permlab_writeThemes">ඔබගේ තේමා වෙනස් කරන්න</string>
- <string name="permdesc_writeThemesDesc">අලුත් තේමා ඇතුල් කිරීමට සහ ඔබ යොදා ඇති තේමාව වෙනස් කිරීමට, යෙදුමට අවසර දෙන්න.</string>
- <string name="theme_install_error_title">තේමාව ස්ථාපනයට අසමත්විය</string>
- <string name="theme_install_error_message">%s ස්ථාපනයට අසමත්විය</string>
<string name="permlab_changePrivacyGuardState">පෞද්ගලිකත්වයේ මුරකරු සබලනය හෝ අබලනය</string>
<string name="permdesc_changePrivacyGuardState">තවත් යෙදුමක් පෞද්ගලිකත්වයේ මුරකරු සමග ධාවනය විය යුතුද නැද්ද යන්න වෙනස් කිරීම සඳහා යෙදුමට අවසර දෙන්න. යෙදුමක් පෞද්ගලිකත්වයේ මුරකරු සමග ධාවනය වන විට, එයට සම්බන්ධතා, ඇමතුම් ලොග හෝ පණිවිඩ පරිශීලනය කල නොහැක.</string>
<string name="privacy_guard_notification">පෞද්ගලිකත්වයේ මුරකරු සක්‍රීයයි</string>
diff --git a/core/res/res/values-sk/cm_strings.xml b/core/res/res/values-sk/cm_strings.xml
index aac8fb7..62cef0c 100644
--- a/core/res/res/values-sk/cm_strings.xml
+++ b/core/res/res/values-sk/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB a sieť</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Sieť</string>
- <string name="permlab_accessThemeService">prístup k službe tém</string>
<string name="permlab_interceptPackageLaunch">zachytiť spustenie aplikácie</string>
- <string name="permdesc_accessThemeService">Umožňuje aplikácii prístup k službe na správu tém. Toto povolenie nie je bežné pre štandardné aplikácie.</string>
- <string name="permlab_readThemes">čítať informácie vašej témy</string>
- <string name="permdesc_readThemesDesc">Umožňuje aplikácii čítať vaše témy a určiť, ktorú tému ste použili.</string>
- <string name="permlab_writeThemes">upraviť vaše témy</string>
- <string name="permdesc_writeThemesDesc">Umožňuje aplikácii vkladať nové témy a upraviť tému, ktorú ste použili.</string>
- <string name="theme_install_error_title">Inštalácia témy zlyhala</string>
- <string name="theme_install_error_message">Nepodarilo sa nainštalovať tému %s</string>
<string name="stylus_app_not_installed">Aplikácia %s nie je nainštalovaná</string>
- <string name="theme_reset_notification_title">Obnoviť tému</string>
- <string name="theme_reset_notification_body">Systémová téma sa obnovila z dôvodu viacerých pádov aplikácií.</string>
<string name="silent_mode_priority">Priorita</string>
<string name="silent_mode_none">Žiadna</string>
<string name="subscription_change_disabled_wifi_ap">Wi-Fi hotspot bol zakázaný kvôli prepnutiu karty SIM</string>
diff --git a/core/res/res/values-sl/cm_strings.xml b/core/res/res/values-sl/cm_strings.xml
index 2d6d15c..6a1c843 100644
--- a/core/res/res/values-sl/cm_strings.xml
+++ b/core/res/res/values-sl/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB in omrežje</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Omrežje</string>
- <string name="permlab_accessThemeService">dostop do storitev tem</string>
<string name="permlab_interceptPackageLaunch">prestrezanje zagona aplikacije</string>
- <string name="permdesc_accessThemeService">Dovoli aplikaciji dostop do storitve tem. Navadno ni potrebno za običajne aplikacije.</string>
- <string name="permlab_readThemes">branje podatkov o vaši temi</string>
- <string name="permdesc_readThemesDesc">Dovoli aplikaciji branje vaših tem in
-       določanje, katero temo uporabljate.</string>
- <string name="permlab_writeThemes">spreminjanje tem</string>
- <string name="permdesc_writeThemesDesc">Dovoli aplikaciji vstavljanje novih tem in
-       spreminjanje uporabljene teme.</string>
- <string name="theme_install_error_title">Namestitev teme je spodletela</string>
- <string name="theme_install_error_message">Namestitev %s je spodletela</string>
<string name="stylus_app_not_installed">%s ni nameščen</string>
- <string name="theme_reset_notification_title">Ponastavitev theme</string>
- <string name="theme_reset_notification_body">Sistemska tema obnovljena zaradi večkratnih sesutij aplikacije.</string>
<string name="silent_mode_priority">Prednost</string>
<string name="silent_mode_none">Brez</string>
<string name="subscription_change_disabled_wifi_ap">Dostopna točka Wi-Fi je bila onemogočena zaradi spremembe naročnine SIM</string>
diff --git a/core/res/res/values-sr/cm_strings.xml b/core/res/res/values-sr/cm_strings.xml
index e6f5945..3453ce3 100644
--- a/core/res/res/values-sr/cm_strings.xml
+++ b/core/res/res/values-sr/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; мрежа</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Мрежа</string>
- <string name="permlab_accessThemeService">приступај услузи тема</string>
<string name="permlab_interceptPackageLaunch">пресретни подизање апликације</string>
- <string name="permdesc_accessThemeService">Омогућава апликацији да приступи услузи тема. Никада не би требало за нормалне апликације.</string>
- <string name="permlab_readThemes">читај информације о мојој теми</string>
- <string name="permdesc_readThemesDesc">Омогућава апликацији да чита твоје теме и одлучује која тема ће бити примењена.</string>
- <string name="permlab_writeThemes">модификуј моје теме</string>
- <string name="permdesc_writeThemesDesc">Омогућава апликацији да убацује нове теме и модификује коју тему ћеш применити.</string>
- <string name="theme_install_error_title">Инсталирање теме није успело</string>
- <string name="theme_install_error_message">%s инсталирање није успело</string>
<string name="stylus_app_not_installed">%s није инсталирано</string>
- <string name="theme_reset_notification_title">Ресетуј тему</string>
- <string name="theme_reset_notification_body">Системска тема је обновљена због вишеструких падова апликација.</string>
<string name="silent_mode_priority">Приоритет</string>
<string name="silent_mode_none">Ниједан</string>
<string name="subscription_change_disabled_wifi_ap">Онемогућен Wi-Fi hotspot због промене SIM претплате</string>
diff --git a/core/res/res/values-sv/cm_strings.xml b/core/res/res/values-sv/cm_strings.xml
index 97a47f9..88e02b6 100644
--- a/core/res/res/values-sv/cm_strings.xml
+++ b/core/res/res/values-sv/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; nätverk</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Nätverk</string>
- <string name="permlab_accessThemeService">få tillgång till tematjänst</string>
<string name="permlab_interceptPackageLaunch">avbryt app-start</string>
- <string name="permdesc_accessThemeService">Tillåter en app att få tillgång till tematjänsten. Bör aldrig vara nödvändigt för vanliga appar.</string>
- <string name="permlab_readThemes">läsa information om ditt tema</string>
- <string name="permdesc_readThemesDesc">Tillåter appen att läsa dina teman och
-avgöra vilket tema som du har tillämpat.</string>
- <string name="permlab_writeThemes">modifiera dina teman</string>
- <string name="permdesc_writeThemesDesc">Tillåter appen att lägga till nya teman och
-modifiera det tema som du har tillämpat.</string>
- <string name="theme_install_error_title">Kunde inte installera tema</string>
- <string name="theme_install_error_message">%s kunde inte installeras</string>
<string name="stylus_app_not_installed">%s är inte installerad</string>
- <string name="theme_reset_notification_title">Återställning av tema</string>
- <string name="theme_reset_notification_body">Systemtemat kommer återställas på grund av att appen kraschat flera gånger.</string>
<string name="silent_mode_priority">Prioritet</string>
<string name="silent_mode_none">Ingen</string>
<string name="subscription_change_disabled_wifi_ap">Wi\u2011Fi hotspot avaktiverad på grund av ändrat SIM-abonnemang</string>
diff --git a/core/res/res/values-th/cm_strings.xml b/core/res/res/values-th/cm_strings.xml
index 076474b..ca087e8 100644
--- a/core/res/res/values-th/cm_strings.xml
+++ b/core/res/res/values-th/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; เครือข่าย</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">เครือข่าย</string>
- <string name="permlab_accessThemeService">เข้าถึงรูปแบบธีม</string>
<string name="permlab_interceptPackageLaunch">ขัดขวางการเปิดแอป</string>
- <string name="permdesc_accessThemeService">อนุญาตให้แอปเข้าถึงรูปแบบธีมได้ ซึ่งถือว่าไม่จำเป็นในแอปปกติ</string>
- <string name="permlab_readThemes">อ่านข้อมูลรูปแบบธีมของคุณ</string>
- <string name="permdesc_readThemesDesc">อนุญาตให้แอปอ่านข้อมูลรูปแบบธีมและกำหนดหาว่ารูปแบบธีมใดที่คุณใช้</string>
- <string name="permlab_writeThemes">แก้ไขรูปแบบธีมของคุณ</string>
- <string name="permdesc_writeThemesDesc">อณุญาตให้แอปเพิ่มรูปแบบธีมใหม่และแก้ไขรูปแบบธีมที่คุณใช้</string>
- <string name="theme_install_error_title">การติดตั้งรูปแบบธีมล้มเหลว</string>
- <string name="theme_install_error_message">%s ล้มเหลวในการติดตั้ง</string>
<string name="stylus_app_not_installed">%s ไม่ถูกติดตั้ง</string>
- <string name="theme_reset_notification_title">รีเซ็ตรูปแบบธีม</string>
- <string name="theme_reset_notification_body">ระบบกลับมาใช้รูปแบบธีมเดิมเนื่องจากมีหลายปัญหาที่เกิดกับแอป</string>
<string name="silent_mode_priority">ระดับความสำคัญ</string>
<string name="silent_mode_none">ไม่มี</string>
<string name="subscription_change_disabled_wifi_ap">ปิดฮอตสปอต Wi-Fi เนื่องจากการเปลี่ยนแปลงการสมัครซิมการ์ด</string>
diff --git a/core/res/res/values-tr/cm_strings.xml b/core/res/res/values-tr/cm_strings.xml
index f7b777c..1cd22e5 100644
--- a/core/res/res/values-tr/cm_strings.xml
+++ b/core/res/res/values-tr/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; ağ</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Ağ</string>
- <string name="permlab_accessThemeService">tema hizmetine erişim</string>
<string name="permlab_interceptPackageLaunch">uygulama başlangıcını önle</string>
- <string name="permdesc_accessThemeService">Bir uygulamanın tema hizmetine erişimine izin verir. Normal uygulamalar için gerekli değildir.</string>
- <string name="permlab_readThemes">tema bilgisini oku</string>
- <string name="permdesc_readThemesDesc">Uygulamanın temalarınızı okumasına ve hangi
-temayı uyguladığınızı belirlemesine izin verir.</string>
- <string name="permlab_writeThemes">temalarınızı değiştirin</string>
- <string name="permdesc_writeThemesDesc">Uygulamanın yeni temalar eklemesine ve
-uyguladığınız temayı değiştirmesine izin verir.</string>
- <string name="theme_install_error_title">Tema yüklenemedi</string>
- <string name="theme_install_error_message">%s yüklenemedi</string>
<string name="stylus_app_not_installed">%s yüklü değil</string>
- <string name="theme_reset_notification_title">Tema sıfırlandı</string>
- <string name="theme_reset_notification_body">Uygulama çökmelerinden dolayı sistem temasına geri dönüldü.</string>
<string name="silent_mode_priority">Öncelik</string>
<string name="silent_mode_none">Yok</string>
<string name="subscription_change_disabled_wifi_ap">SIM abonelik değişikliği nedeniyle Wi-Fi internet paylaşımı devre dışı bırakıldı</string>
diff --git a/core/res/res/values-ug/cm_strings.xml b/core/res/res/values-ug/cm_strings.xml
index bf42997..5332e1f 100644
--- a/core/res/res/values-ug/cm_strings.xml
+++ b/core/res/res/values-ug/cm_strings.xml
@@ -45,18 +45,8 @@
<string name="adb_net_active_notification_title">تور ھالقىغان ADB قوزغىتىلدى</string>
<string name="adb_both_active_notification_title">USB ۋە تور ADB قوزغىتىلدى</string>
<string name="adb_active_generic_notification_message">چېكىلسە سازلاشنى چەكلەيدۇ.</string>
- <string name="permlab_accessThemeService">ئۆرنەك مۇلازىمىتىنى زىيارەت</string>
<string name="permlab_interceptPackageLaunch">ئەپ قوزغىتىشنى توسىدۇ</string>
- <string name="permdesc_accessThemeService">ئەپنىڭ ئۆرنەك مۇلازىمىتىنى زىيارەت قىلىشىغا يول قويىدۇ. ئادەتتىكى ئەپلەر بۇ ھوقۇققا موھتاج بولمايدۇ.</string>
- <string name="permlab_readThemes">ئۆرنەك ئۇچۇرلىرىڭىزنى ئوقۇيدۇ</string>
- <string name="permdesc_readThemesDesc">ئەپنىڭ ئۆرنەك ئۇچۇرىڭىزنى ئۇقۇپ ۋە جەزملىشىگە يول قويىدۇ.</string>
- <string name="permlab_writeThemes">ئۆرنىكىڭىزنى ئۆزگەرتىدۇ</string>
- <string name="permdesc_writeThemesDesc">ئەپنىڭ يېڭى ئۆرنەك قىستۇرۇشى ۋە قوللانغان ئۆرنەكنى ئۆزگەرتىشىگە يول قويىدۇ.</string>
- <string name="theme_install_error_title">ئۆرنەك ئورنىتالمىدى</string>
- <string name="theme_install_error_message">%s نى ئورنىتالمىدى</string>
<string name="stylus_app_not_installed">%s تېخى ئورنىتىلمىغان</string>
- <string name="theme_reset_notification_title">ئۆرنەكنى ئەسلىگە قايتۇرۇش</string>
- <string name="theme_reset_notification_body">بىر قانچە ئەپ يىمىرىلگەنلىكتىن، سىستېما ئۆرنەكنى ئەسلىگە قايتۇردى.</string>
<string name="permlab_changePrivacyGuardState">شەخسىيەت قوغداشنى قوزغىتىدۇ ياكى چەكلەيدۇ</string>
<string name="permdesc_changePrivacyGuardState">ئەپنىڭ باشقا ئەپنى شەخسىيەت قوغداش ھالىتىدە ئىجرا قىلىشىغا يول قويىدۇ. ئەپ شەخسىيەت قوغداش ھالىتىدە ئىجرا قىلىنسا، ئۇ ئالاقەداشلار، چاقىرىش خاتىرىسى ياكى ئۇچۇرلارغا ئوخشاش شەخسىي سانلىق مەلۇماتلارنى زىيارەت قىلىش ھوقۇقى بولمايدۇ.</string>
<string name="privacy_guard_notification">شەخسىيەت قوغداش ئاكتىپ</string>
diff --git a/core/res/res/values-uk/cm_strings.xml b/core/res/res/values-uk/cm_strings.xml
index 51cd19a..368219f 100644
--- a/core/res/res/values-uk/cm_strings.xml
+++ b/core/res/res/values-uk/cm_strings.xml
@@ -49,20 +49,8 @@
<string name="adb_active_custom_tile_both">USB та мережі</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Мережа</string>
- <string name="permlab_accessThemeService">доступ до служби тем</string>
<string name="permlab_interceptPackageLaunch">Перехоплення запуску додатку</string>
- <string name="permdesc_accessThemeService">Дозволяє програмі отримувати доступ до служби тем. Цей дозвіл не використовується звичайними програмами.</string>
- <string name="permlab_readThemes">читати дані про вашу тему</string>
- <string name="permdesc_readThemesDesc">Дозволяє програмам читати дані про теми і
- виявляти яку тему ви застосували.</string>
- <string name="permlab_writeThemes">змінювати ваші теми</string>
- <string name="permdesc_writeThemesDesc">Дозволяє програмам додавати та
- модифікувати теми які ви застосовуєте.</string>
- <string name="theme_install_error_title">Не вдалося інсталювати тему</string>
- <string name="theme_install_error_message">не вдалося інсталювати %s</string>
<string name="stylus_app_not_installed">%s не встановлено</string>
- <string name="theme_reset_notification_title">Тема відключена</string>
- <string name="theme_reset_notification_body">Через системні збої встановлена системна тема.</string>
<string name="silent_mode_priority">Пріоритет</string>
<string name="silent_mode_none">Немає</string>
<string name="subscription_change_disabled_wifi_ap">Точку доступу Wi-Fi вимкнено через зміну SIM-картки</string>
diff --git a/core/res/res/values-vi/cm_strings.xml b/core/res/res/values-vi/cm_strings.xml
index ac9c3ef..2aab8bc 100644
--- a/core/res/res/values-vi/cm_strings.xml
+++ b/core/res/res/values-vi/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; mạng</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Mạng</string>
- <string name="permlab_accessThemeService">truy cập dịch vụ chủ đề</string>
<string name="permlab_interceptPackageLaunch">chặn ứng dụng khởi chạy</string>
- <string name="permdesc_accessThemeService">Cho phép ứng dụng truy cập dịch vụ chủ đề. Ứng dụng bình thường không bao giờ cần quyền này.</string>
- <string name="permlab_readThemes">đọc thông tin chủ đề của bạn</string>
- <string name="permdesc_readThemesDesc">Cho phép ứng dụng đọc và xác định chủ đề nào bạn đã áp dụng.</string>
- <string name="permlab_writeThemes">sửa đổi chủ đề của bạn</string>
- <string name="permdesc_writeThemesDesc">Cho phép ứng dụng chèn các chủ đề mới và sửa đổi chủ đề bạn đã áp dụng.</string>
- <string name="theme_install_error_title">Không thể cài đặt chủ đề</string>
- <string name="theme_install_error_message">Không thể cài đặt %s</string>
<string name="stylus_app_not_installed">%s chưa được cài đặt</string>
- <string name="theme_reset_notification_title">Đặt lại chủ đề</string>
- <string name="theme_reset_notification_body">Đã khôi phục chủ đề hệ thống vì nhiều ứng dụng bị lỗi.</string>
<string name="silent_mode_priority">Ưu tiên</string>
<string name="silent_mode_none">Không có</string>
<string name="subscription_change_disabled_wifi_ap">Đã vô hiệu hóa điểm truy cập WiFi vì thay đổi đăng ký SIM</string>
diff --git a/core/res/res/values-zh-rCN/cm_strings.xml b/core/res/res/values-zh-rCN/cm_strings.xml
index 7223543..8e8920d 100644
--- a/core/res/res/values-zh-rCN/cm_strings.xml
+++ b/core/res/res/values-zh-rCN/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB &amp; 网络</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">网络</string>
- <string name="permlab_accessThemeService">访问主题服务</string>
<string name="permlab_interceptPackageLaunch">拦截应用启动</string>
- <string name="permdesc_accessThemeService">允许应用访问主题服务。正常应用不应需要此权限。</string>
- <string name="permlab_readThemes">读取您的主题信息</string>
- <string name="permdesc_readThemesDesc">允许应用读取您的主题并确定已应用的主题。</string>
- <string name="permlab_writeThemes">修改您的主题</string>
- <string name="permdesc_writeThemesDesc">允许应用插入新的主题和修改已应用的主题。</string>
- <string name="theme_install_error_title">安装主题失败</string>
- <string name="theme_install_error_message">%s 安装失败</string>
<string name="stylus_app_not_installed">%s 尚未被安装</string>
- <string name="theme_reset_notification_title">重置主题</string>
- <string name="theme_reset_notification_body">由于多个应用崩溃,系统主题已恢复。</string>
<string name="silent_mode_priority">优先级</string>
<string name="silent_mode_none">无</string>
<string name="subscription_change_disabled_wifi_ap">由于 SIM 卡订阅改变,已禁用 Wi-Fi 热点。</string>
diff --git a/core/res/res/values-zh-rHK/cm_strings.xml b/core/res/res/values-zh-rHK/cm_strings.xml
index 0293209..6bbe9b7 100644
--- a/core/res/res/values-zh-rHK/cm_strings.xml
+++ b/core/res/res/values-zh-rHK/cm_strings.xml
@@ -41,17 +41,7 @@
<string name="adb_net_active_notification_title">網絡 ADB 偵錯</string>
<string name="adb_both_active_notification_title">USB &amp; 網絡 ADB 偵錯</string>
<string name="adb_active_generic_notification_message">觸碰以停用調試。</string>
- <string name="permlab_accessThemeService">存取主題服務</string>
- <string name="permdesc_accessThemeService">允許應用程式存取主題服務。一般應用程式並不建議。</string>
- <string name="permlab_readThemes">讀取你的主題資料</string>
- <string name="permdesc_readThemesDesc">允許應用程式讀取您的主題,並判斷您已套用的主題。</string>
- <string name="permlab_writeThemes">修改你的主題</string>
- <string name="permdesc_writeThemesDesc">允許應用程式來插入新的主題,並修改您已應用的主題。</string>
- <string name="theme_install_error_title">安裝主題失敗</string>
- <string name="theme_install_error_message">%s 安裝失敗</string>
<string name="stylus_app_not_installed">未安裝 %s</string>
- <string name="theme_reset_notification_title">重設主題</string>
- <string name="theme_reset_notification_body">基於多個應用程式衝突,已還原至預設主題。</string>
<string name="silent_mode_priority">優先級</string>
<string name="silent_mode_none">無</string>
<string name="permlab_changePrivacyGuardState">啟用或停用私隱守衛</string>
diff --git a/core/res/res/values-zh-rTW/cm_strings.xml b/core/res/res/values-zh-rTW/cm_strings.xml
index dd52e93..0c55eaa 100644
--- a/core/res/res/values-zh-rTW/cm_strings.xml
+++ b/core/res/res/values-zh-rTW/cm_strings.xml
@@ -49,18 +49,8 @@
<string name="adb_active_custom_tile_both">USB和網路</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">網路</string>
- <string name="permlab_accessThemeService">存取主題服務</string>
<string name="permlab_interceptPackageLaunch">限制應用程式執行</string>
- <string name="permdesc_accessThemeService">允許應用程式存取主題服務 (一般應用程式不需使用)。</string>
- <string name="permlab_readThemes">閱讀您的主題資訊</string>
- <string name="permdesc_readThemesDesc">允許應用程式讀取您的主題,並確定您已應用的主題。</string>
- <string name="permlab_writeThemes">修改您的主題</string>
- <string name="permdesc_writeThemesDesc">允許應用程式來插入新的主題和修改您已應用的主題。</string>
- <string name="theme_install_error_title">主題安裝失敗</string>
- <string name="theme_install_error_message">「%s」安裝失敗</string>
<string name="stylus_app_not_installed">未安裝 %s</string>
- <string name="theme_reset_notification_title">重設主題</string>
- <string name="theme_reset_notification_body">基於多個應用程式發生錯誤所以已還原至預設主題</string>
<string name="silent_mode_priority">優先度</string>
<string name="silent_mode_none">無</string>
<string name="permlab_changePrivacyGuardState">啟用或停用隱私守衛</string>
diff --git a/core/res/res/values/cm_strings.xml b/core/res/res/values/cm_strings.xml
index 8c6628f..688b2f9 100644
--- a/core/res/res/values/cm_strings.xml
+++ b/core/res/res/values/cm_strings.xml
@@ -94,37 +94,12 @@
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Network</string>
- <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_accessThemeService">access theme service</string>
-
<!-- Title of an application permission, listed so the user can choose whether they want the application to do this. -->
<string name="permlab_interceptPackageLaunch">intercept app launch</string>
- <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_accessThemeService">Allows an app to access the theme service. Should never be needed for normal apps.</string>
-
- <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_readThemes">read your theme info</string>
- <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_readThemesDesc">Allows the app to read your themes and
- determine which theme you have applied.</string>
-
- <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_writeThemes">modify your themes</string>
- <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_writeThemesDesc">Allows the app to insert new themes and
- modify which theme you have applied.</string>
-
- <!-- Theme installation error notification -->
- <string name="theme_install_error_title">Failed to install theme</string>
- <string name="theme_install_error_message">%s failed to install</string>
-
<!-- stylus gestures support -->
<string name="stylus_app_not_installed">%s is not installed</string>
- <string name="theme_reset_notification_title">Theme reset</string>
- <string name="theme_reset_notification_body">System theme restored due to multiple app crashes.</string>
-
<!-- Zen mode buttons -->
<string name="silent_mode_priority">Priority</string>
<string name="silent_mode_none">None</string>
diff --git a/core/res/res/values/cm_symbols.xml b/core/res/res/values/cm_symbols.xml
index 4c24573..49f9874 100644
--- a/core/res/res/values/cm_symbols.xml
+++ b/core/res/res/values/cm_symbols.xml
@@ -52,18 +52,10 @@
<java-symbol type="string" name="global_action_current_user" />
<java-symbol type="dimen" name="global_actions_avatar_size" />
- <!-- Theme install failure notification -->
- <java-symbol type="string" name="theme_install_error_title" />
- <java-symbol type="string" name="theme_install_error_message" />
-
<!-- Stylus gestures -->
<java-symbol type="bool" name="config_stylusGestures" />
<java-symbol type="string" name="stylus_app_not_installed" />
- <!-- Theme reset notification -->
- <java-symbol type="string" name="theme_reset_notification_title" />
- <java-symbol type="string" name="theme_reset_notification_body" />
-
<!-- global actions (zen mode buttons) -->
<java-symbol type="id" name="option4" />
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index f31b19f..3c90414 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -108,7 +108,7 @@
<uses-permission android:name="android.permission.REGISTER_CONNECTION_MANAGER" />
<uses-permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION" />
<uses-permission android:name="android.permission.GET_APP_OPS_STATS" />
- <uses-permission android:name="android.permission.ACCESS_THEME_MANAGER" />
+ <uses-permission android:name="cyanogenmod.permission.ACCESS_THEME_MANAGER" />
<application android:label="@string/app_label">
<provider
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index b68a8b7..954bd53 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -42,7 +42,6 @@ import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
-import android.content.res.ThemeChangeRequest.RequestType;
import android.content.res.ThemeConfig;
import android.content.res.Resources;
import android.database.ContentObserver;
@@ -188,6 +187,7 @@ import com.android.systemui.statusbar.stack.NotificationStackScrollLayout.OnChil
import com.android.systemui.statusbar.stack.StackStateAnimator;
import com.android.systemui.statusbar.stack.StackViewState;
import com.android.systemui.volume.VolumeComponent;
+import cyanogenmod.app.CMContextConstants;
import cyanogenmod.app.CustomTileListenerService;
import cyanogenmod.app.StatusBarPanelCustomTile;
@@ -216,6 +216,7 @@ import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARE
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_WARNING;
import cyanogenmod.providers.CMSettings;
+import cyanogenmod.themes.IThemeService;
public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
DragDownHelper.DragDownCallback, ActivityStarter, OnUnlockMethodChangedListener,
@@ -419,6 +420,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private int mNavigationIconHints = 0;
private HandlerThread mHandlerThread;
+ private IThemeService mThemeService;
+ private long mLastThemeChangeTime = 0;
+
Runnable mLongPressBrightnessChange = new Runnable() {
@Override
public void run() {
@@ -860,6 +864,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mScreenPinningRequest = new ScreenPinningRequest(mContext);
updateCustomRecentsLongPressHandler(true);
+
+ mThemeService = IThemeService.Stub.asInterface(ServiceManager.getService(
+ CMContextConstants.CM_THEME_SERVICE));
}
// ================================================================================
@@ -3794,6 +3801,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
// this will make sure the keyguard is showing
showKeyguard();
}
+
+ // update mLastThemeChangeTime
+ try {
+ mLastThemeChangeTime = mThemeService.getLastThemeChangeTime();
+ } catch (RemoteException e) {
+ /* ignore */
+ }
}
private void removeAllViews(ViewGroup parent) {
@@ -3847,8 +3861,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
/**
* Determines if we need to recreate the status bar due to a theme change. We currently
- * check if the overlay for the status bar, fonts, or icons, or forced update count have
- * changed.
+ * check if the overlay for the status bar, fonts, or icons, or last theme change time is
+ * greater than mLastThemeChangeTime
*
* @param oldTheme
* @param newTheme
@@ -3861,17 +3875,24 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
final String overlay = newTheme.getOverlayForStatusBar();
final String icons = newTheme.getIconPackPkgName();
final String fonts = newTheme.getFontPkgName();
+ boolean isNewThemeChange = false;
+ try {
+ isNewThemeChange = mLastThemeChangeTime < mThemeService.getLastThemeChangeTime();
+ } catch (RemoteException e) {
+ /* ignore */
+ }
return oldTheme == null ||
(overlay != null && !overlay.equals(oldTheme.getOverlayForStatusBar()) ||
(fonts != null && !fonts.equals(oldTheme.getFontPkgName())) ||
(icons != null && !icons.equals(oldTheme.getIconPackPkgName())) ||
- newTheme.getLastThemeChangeRequestType() == RequestType.THEME_UPDATED);
+ isNewThemeChange);
}
/**
* Determines if we need to update the navbar resources due to a theme change. We currently
- * check if the overlay for the navbar, or request type is {@link RequestType.THEME_UPDATED}.
+ * check if the overlay for the navbar, or last theme change time is greater than
+ * mLastThemeChangeTime
*
* @param oldTheme
* @param newTheme
@@ -3882,10 +3903,16 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
if (newTheme == null) return false;
final String overlay = newTheme.getOverlayForNavBar();
+ boolean isNewThemeChange = false;
+ try {
+ isNewThemeChange = mLastThemeChangeTime < mThemeService.getLastThemeChangeTime();
+ } catch (RemoteException e) {
+ /* ignore */
+ }
return oldTheme == null ||
(overlay != null && !overlay.equals(oldTheme.getOverlayForNavBar()) ||
- newTheme.getLastThemeChangeRequestType() == RequestType.THEME_UPDATED);
+ isNewThemeChange);
}
protected void loadDimens() {
diff --git a/services/core/java/com/android/server/ThemeService.java b/services/core/java/com/android/server/ThemeService.java
deleted file mode 100644
index 96d1c5d..0000000
--- a/services/core/java/com/android/server/ThemeService.java
+++ /dev/null
@@ -1,1277 +0,0 @@
-/*
- * Copyright (C) 2014 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.server;
-
-import android.Manifest;
-import android.app.ActivityManager;
-import android.app.ActivityManagerNative;
-import android.app.IActivityManager;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.WallpaperManager;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.pm.ResolveInfo;
-import android.content.pm.ThemeUtils;
-import android.content.res.AssetManager;
-import android.content.res.Configuration;
-import android.content.res.IThemeProcessingListener;
-import android.content.res.ThemeChangeRequest;
-import android.content.res.ThemeConfig;
-import android.content.res.IThemeChangeListener;
-import android.content.res.IThemeService;
-import android.graphics.Bitmap;
-import android.media.RingtoneManager;
-import android.os.Binder;
-import android.os.Environment;
-import android.os.FileUtils;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Process;
-import android.os.RemoteCallbackList;
-import android.os.RemoteException;
-import android.os.SystemProperties;
-import android.os.UserHandle;
-import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
-import android.provider.ThemesContract;
-import android.provider.ThemesContract.MixnMatchColumns;
-import android.provider.ThemesContract.ThemesColumns;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.R;
-import com.android.internal.util.cm.ImageUtils;
-import cyanogenmod.providers.CMSettings;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import static android.content.pm.ThemeUtils.SYSTEM_THEME_PATH;
-import static android.content.pm.ThemeUtils.THEME_BOOTANIMATION_PATH;
-import static android.content.res.ThemeConfig.SYSTEM_DEFAULT;
-
-import java.util.List;
-
-/**
- * {@hide}
- */
-public class ThemeService extends IThemeService.Stub {
- private static final String TAG = ThemeService.class.getName();
-
- private static final boolean DEBUG = false;
-
- private static final String GOOGLE_SETUPWIZARD_PACKAGE = "com.google.android.setupwizard";
- private static final String CM_SETUPWIZARD_PACKAGE = "com.cyanogenmod.setupwizard";
- private static final String MANAGED_PROVISIONING_PACKAGE = "com.android.managedprovisioning";
-
- private static final long MAX_ICON_CACHE_SIZE = 33554432L; // 32MB
- private static final long PURGED_ICON_CACHE_SIZE = 25165824L; // 24 MB
-
- // Defines a min and max compatible api level for themes on this system.
- private static final int MIN_COMPATIBLE_VERSION = 21;
-
- private HandlerThread mWorker;
- private ThemeWorkerHandler mHandler;
- private ResourceProcessingHandler mResourceProcessingHandler;
- private Context mContext;
- private PackageManager mPM;
- private int mProgress;
- private boolean mWallpaperChangedByUs = false;
- private long mIconCacheSize = 0L;
- private int mCurrentUserId = UserHandle.USER_OWNER;
-
- private boolean mIsThemeApplying = false;
-
- private final RemoteCallbackList<IThemeChangeListener> mClients =
- new RemoteCallbackList<IThemeChangeListener>();
-
- private final RemoteCallbackList<IThemeProcessingListener> mProcessingListeners =
- new RemoteCallbackList<IThemeProcessingListener>();
-
- final private ArrayList<String> mThemesToProcessQueue = new ArrayList<String>(0);
-
- private class ThemeWorkerHandler extends Handler {
- private static final int MESSAGE_CHANGE_THEME = 1;
- private static final int MESSAGE_APPLY_DEFAULT_THEME = 2;
- private static final int MESSAGE_REBUILD_RESOURCE_CACHE = 3;
-
- public ThemeWorkerHandler(Looper looper) {
- super(looper);
- }
-
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MESSAGE_CHANGE_THEME:
- final ThemeChangeRequest request = (ThemeChangeRequest) msg.obj;
- doApplyTheme(request, msg.arg1 == 1);
- break;
- case MESSAGE_APPLY_DEFAULT_THEME:
- doApplyDefaultTheme();
- break;
- case MESSAGE_REBUILD_RESOURCE_CACHE:
- doRebuildResourceCache();
- break;
- default:
- Log.w(TAG, "Unknown message " + msg.what);
- break;
- }
- }
- }
-
- private class ResourceProcessingHandler extends Handler {
- private static final int MESSAGE_QUEUE_THEME_FOR_PROCESSING = 3;
- private static final int MESSAGE_DEQUEUE_AND_PROCESS_THEME = 4;
-
- public ResourceProcessingHandler(Looper looper) {
- super(looper);
- }
-
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MESSAGE_QUEUE_THEME_FOR_PROCESSING:
- String pkgName = (String) msg.obj;
- synchronized (mThemesToProcessQueue) {
- if (!mThemesToProcessQueue.contains(pkgName)) {
- if (DEBUG) Log.d(TAG, "Adding " + pkgName + " for processing");
- mThemesToProcessQueue.add(pkgName);
- if (mThemesToProcessQueue.size() == 1) {
- this.sendEmptyMessage(MESSAGE_DEQUEUE_AND_PROCESS_THEME);
- }
- }
- }
- break;
- case MESSAGE_DEQUEUE_AND_PROCESS_THEME:
- synchronized (mThemesToProcessQueue) {
- pkgName = mThemesToProcessQueue.get(0);
- }
- if (pkgName != null) {
- if (DEBUG) Log.d(TAG, "Processing " + pkgName);
- String name;
- try {
- PackageInfo pi = mPM.getPackageInfo(pkgName, 0);
- name = getThemeName(pi);
- } catch (PackageManager.NameNotFoundException e) {
- name = null;
- }
-
- int result = mPM.processThemeResources(pkgName);
- if (result < 0) {
- postFailedThemeInstallNotification(name != null ? name : pkgName);
- }
- sendThemeResourcesCachedBroadcast(pkgName, result);
-
- synchronized (mThemesToProcessQueue) {
- mThemesToProcessQueue.remove(0);
- if (mThemesToProcessQueue.size() > 0 &&
- !hasMessages(MESSAGE_DEQUEUE_AND_PROCESS_THEME)) {
- this.sendEmptyMessage(MESSAGE_DEQUEUE_AND_PROCESS_THEME);
- }
- }
- postFinishedProcessing(pkgName);
- }
- break;
- default:
- Log.w(TAG, "Unknown message " + msg.what);
- break;
- }
- }
- }
-
- public ThemeService(Context context) {
- super();
- mContext = context;
- mWorker = new HandlerThread("ThemeServiceWorker", Process.THREAD_PRIORITY_BACKGROUND);
- mWorker.start();
- mHandler = new ThemeWorkerHandler(mWorker.getLooper());
- Log.i(TAG, "Spawned worker thread");
-
- HandlerThread processingThread = new HandlerThread("ResourceProcessingThread",
- Process.THREAD_PRIORITY_BACKGROUND);
- processingThread.start();
- mResourceProcessingHandler =
- new ResourceProcessingHandler(processingThread.getLooper());
-
- // create the theme directory if it does not exist
- ThemeUtils.createThemeDirIfNotExists();
- ThemeUtils.createFontDirIfNotExists();
- ThemeUtils.createAlarmDirIfNotExists();
- ThemeUtils.createNotificationDirIfNotExists();
- ThemeUtils.createRingtoneDirIfNotExists();
- ThemeUtils.createIconCacheDirIfNotExists();
- }
-
- public void systemRunning() {
- // listen for wallpaper changes
- IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
- mContext.registerReceiver(mWallpaperChangeReceiver, filter);
-
- filter = new IntentFilter(Intent.ACTION_USER_SWITCHED);
- mContext.registerReceiver(mUserChangeReceiver, filter);
-
- mPM = mContext.getPackageManager();
-
- processInstalledThemes();
-
- if (!isThemeApiUpToDate()) {
- Log.d(TAG, "The system has been upgraded to a theme new api, " +
- "checking if currently set theme is compatible");
- removeObsoleteThemeOverlayIfExists();
- updateThemeApi();
- }
- }
-
- private void removeObsoleteThemeOverlayIfExists() {
- // Get the current overlay theme so we can see it it's overlay should be unapplied
- final IActivityManager am = ActivityManagerNative.getDefault();
- ThemeConfig config = null;
- try {
- if (am != null) {
- config = am.getConfiguration().themeConfig;
- } else {
- Log.e(TAG, "ActivityManager getDefault() " +
- "returned null, cannot remove obsolete theme");
- }
- } catch(RemoteException e) {
- Log.e(TAG, "Failed to get the theme config ", e);
- }
- if (config == null) return; // No need to unapply a theme if one isn't set
-
- // Populate the currentTheme map for the components we care about, we'll look
- // at the compatibility of each pkg below.
- HashMap<String, String> currentThemeMap = new HashMap<String, String>();
- currentThemeMap.put(ThemesColumns.MODIFIES_STATUS_BAR, config.getOverlayForStatusBar());
- currentThemeMap.put(ThemesColumns.MODIFIES_NAVIGATION_BAR,
- config.getOverlayForNavBar());
- currentThemeMap.put(ThemesColumns.MODIFIES_OVERLAYS, config.getOverlayPkgName());
-
- // Look at each component's theme (that we care about at least) and check compatibility
- // of the pkg with the system. If it is not compatible then we will add it to a theme
- // change request.
- Map<String, String> defaults = ThemeUtils.getDefaultComponents(mContext);
- ThemeChangeRequest.Builder builder = new ThemeChangeRequest.Builder();
- for(Map.Entry<String, String> entry : currentThemeMap.entrySet()) {
- String component = entry.getKey();
- String pkgName = entry.getValue();
- String defaultPkg = defaults.get(component);
-
- // Check that the default overlay theme is not currently set
- if (defaultPkg.equals(pkgName)) {
- Log.d(TAG, "Current overlay theme is same as default. " +
- "Not doing anything for " + component);
- continue;
- }
-
- // No need to unapply a system theme since it is always compatible
- if (ThemeConfig.SYSTEM_DEFAULT.equals(pkgName)) {
- Log.d(TAG, "Current overlay theme for "
- + component + " was system. no need to unapply");
- continue;
- }
-
- if (!isThemeCompatibleWithUpgradedApi(pkgName)) {
- Log.d(TAG, pkgName + "is incompatible with latest theme api for component " +
- component + ", Applying " + defaultPkg);
- builder.setComponent(component, pkgName);
- }
- }
-
- // Now actually unapply the incompatible themes
- ThemeChangeRequest request = builder.build();
- if (!request.getThemeComponentsMap().isEmpty()) {
- try {
- requestThemeChange(request, true);
- } catch(RemoteException e) {
- // This cannot happen
- }
- } else {
- Log.d(TAG, "Current theme is compatible with the system. Not unapplying anything");
- }
- }
-
- private boolean isThemeCompatibleWithUpgradedApi(String pkgName) {
- // Note this function does not cover the case of a downgrade. That case is out of scope and
- // would require predicting whether the future API levels will be compatible or not.
- boolean compatible = false;
- try {
- PackageInfo pi = mPM.getPackageInfo(pkgName, 0);
- Log.d(TAG, "Comparing theme target: " + pi.applicationInfo.targetSdkVersion +
- "to " + android.os.Build.VERSION.SDK_INT);
- compatible = pi.applicationInfo.targetSdkVersion >= MIN_COMPATIBLE_VERSION;
- } catch (NameNotFoundException e) {
- Log.e(TAG, "Unable to get package info for " + pkgName, e);
- }
- return compatible;
- }
-
- private boolean isThemeApiUpToDate() {
- // We can't be 100% sure its an upgrade. If the field is undefined it
- // could have been a factory reset.
- final ContentResolver resolver = mContext.getContentResolver();
- int recordedApiLevel = android.os.Build.VERSION.SDK_INT;
- try {
- recordedApiLevel = CMSettings.Secure.getInt(resolver,
- CMSettings.Secure.THEME_PREV_BOOT_API_LEVEL);
- } catch (CMSettings.CMSettingNotFoundException e) {
- recordedApiLevel = -1;
- Log.d(TAG, "Previous api level not found. First time booting?");
- }
- Log.d(TAG, "Prev api level was: " + recordedApiLevel
- + ", api is now: " + android.os.Build.VERSION.SDK_INT);
-
- return recordedApiLevel == android.os.Build.VERSION.SDK_INT;
- }
-
- private void updateThemeApi() {
- final ContentResolver resolver = mContext.getContentResolver();
- boolean success = CMSettings.Secure.putInt(resolver,
- CMSettings.Secure.THEME_PREV_BOOT_API_LEVEL, android.os.Build.VERSION.SDK_INT);
- if (!success) {
- Log.e(TAG, "Unable to store latest API level to secure settings");
- }
- }
-
- private void doApplyTheme(ThemeChangeRequest request, boolean removePerAppTheme) {
- synchronized(this) {
- mProgress = 0;
- }
-
- if (request == null || request.getNumChangesRequested() == 0) {
- postFinish(true, request, 0);
- return;
- }
- mIsThemeApplying = true;
- long updateTime = System.currentTimeMillis();
-
- incrementProgress(5);
-
- // TODO: provide progress updates that reflect the time needed for each component
- final int progressIncrement = 75 / request.getNumChangesRequested();
-
- if (request.getIconsThemePackageName() != null) {
- updateIcons(request.getIconsThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- if (request.getWallpaperThemePackageName() != null) {
- if (updateWallpaper(request.getWallpaperThemePackageName(),
- request.getWallpaperId())) {
- mWallpaperChangedByUs = true;
- }
- incrementProgress(progressIncrement);
- }
-
- if (request.getLockWallpaperThemePackageName() != null) {
- updateLockscreen(request.getLockWallpaperThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- Environment.setUserRequired(false);
- if (request.getNotificationThemePackageName() != null) {
- updateNotifications(request.getNotificationThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- if (request.getAlarmThemePackageName() != null) {
- updateAlarms(request.getAlarmThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- if (request.getRingtoneThemePackageName() != null) {
- updateRingtones(request.getRingtoneThemePackageName());
- incrementProgress(progressIncrement);
- }
- Environment.setUserRequired(true);
-
- if (request.getBootanimationThemePackageName() != null) {
- updateBootAnim(request.getBootanimationThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- if (request.getFontThemePackageName() != null) {
- updateFonts(request.getFontThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- if (request.getLiveLockScreenThemePackageName() != null) {
- updateLiveLockScreen(request.getLiveLockScreenThemePackageName());
- incrementProgress(progressIncrement);
- }
-
- try {
- updateProvider(request, updateTime);
- } catch(IllegalArgumentException e) {
- // Safeguard against provider not being ready yet.
- Log.e(TAG, "Not updating the theme provider since it is unavailable");
- }
-
- if (shouldUpdateConfiguration(request)) {
- updateConfiguration(request, removePerAppTheme);
- }
-
- killLaunchers(request);
-
- postFinish(true, request, updateTime);
- mIsThemeApplying = false;
- }
-
- private void doApplyDefaultTheme() {
- final ContentResolver resolver = mContext.getContentResolver();
- final String defaultThemePkg = CMSettings.Secure.getString(resolver,
- CMSettings.Secure.DEFAULT_THEME_PACKAGE);
- if (!TextUtils.isEmpty(defaultThemePkg)) {
- String defaultThemeComponents = CMSettings.Secure.getString(resolver,
- CMSettings.Secure.DEFAULT_THEME_COMPONENTS);
- List<String> components;
- if (TextUtils.isEmpty(defaultThemeComponents)) {
- components = ThemeUtils.getAllComponents();
- } else {
- components = new ArrayList<String>(
- Arrays.asList(defaultThemeComponents.split("\\|")));
- }
- ThemeChangeRequest.Builder builder = new ThemeChangeRequest.Builder();
- for (String component : components) {
- builder.setComponent(component, defaultThemePkg);
- }
- try {
- requestThemeChange(builder.build(), true);
- } catch (RemoteException e) {
- Log.w(TAG, "Unable to set default theme", e);
- }
- }
- }
-
- private void doRebuildResourceCache() {
- FileUtils.deleteContents(new File(ThemeUtils.RESOURCE_CACHE_DIR));
- processInstalledThemes();
- }
-
- private void updateProvider(ThemeChangeRequest request, long updateTime) {
- ContentValues values = new ContentValues();
- values.put(MixnMatchColumns.COL_UPDATE_TIME, updateTime);
- Map<String, String> componentMap = request.getThemeComponentsMap();
- for (String component : componentMap.keySet()) {
- values.put(ThemesContract.MixnMatchColumns.COL_VALUE, componentMap.get(component));
- String where = ThemesContract.MixnMatchColumns.COL_KEY + "=?";
- String[] selectionArgs = { MixnMatchColumns.componentToMixNMatchKey(component) };
- if (selectionArgs[0] == null) {
- continue; // No equivalence between mixnmatch and theme
- }
-
- // Add component ID for multiwallpaper
- if (ThemesColumns.MODIFIES_LAUNCHER.equals(component)) {
- values.put(MixnMatchColumns.COL_COMPONENT_ID, request.getWallpaperId());
- }
-
- mContext.getContentResolver().update(MixnMatchColumns.CONTENT_URI, values, where,
- selectionArgs);
- }
- }
-
- private boolean updateIcons(String pkgName) {
- ThemeUtils.clearIconCache();
- try {
- if (pkgName.equals(SYSTEM_DEFAULT)) {
- mPM.updateIconMaps(null);
- } else {
- mPM.updateIconMaps(pkgName);
- }
- } catch (Exception e) {
- Log.w(TAG, "Changing icons failed", e);
- return false;
- }
- return true;
- }
-
- private boolean updateFonts(String pkgName) {
- //Clear the font dir
- FileUtils.deleteContents(new File(ThemeUtils.SYSTEM_THEME_FONT_PATH));
-
- if (!pkgName.equals(SYSTEM_DEFAULT)) {
- //Get Font Assets
- Context themeCtx;
- String[] assetList;
- try {
- themeCtx = mContext.createPackageContext(pkgName, Context.CONTEXT_IGNORE_SECURITY);
- AssetManager assetManager = themeCtx.getAssets();
- assetList = assetManager.list("fonts");
- } catch (Exception e) {
- Log.e(TAG, "There was an error getting assets for pkg " + pkgName, e);
- return false;
- }
- if (assetList == null || assetList.length == 0) {
- Log.e(TAG, "Could not find any font assets");
- return false;
- }
-
- //Copy font assets to font dir
- for(String asset : assetList) {
- InputStream is = null;
- OutputStream os = null;
- try {
- is = ThemeUtils.getInputStreamFromAsset(themeCtx,
- "file:///android_asset/fonts/" + asset);
- File outFile = new File(ThemeUtils.SYSTEM_THEME_FONT_PATH, asset);
- FileUtils.copyToFile(is, outFile);
- FileUtils.setPermissions(outFile,
- FileUtils.S_IRWXU|FileUtils.S_IRGRP|FileUtils.S_IRWXO, -1, -1);
- } catch (Exception e) {
- Log.e(TAG, "There was an error installing the new fonts for pkg " + pkgName, e);
- return false;
- } finally {
- ThemeUtils.closeQuietly(is);
- ThemeUtils.closeQuietly(os);
- }
- }
- }
-
- //Notify zygote that themes need a refresh
- SystemProperties.set("sys.refresh_theme", "1");
- return true;
- }
-
- private boolean updateBootAnim(String pkgName) {
- if (SYSTEM_DEFAULT.equals(pkgName)) {
- clearBootAnimation();
- return true;
- }
-
- try {
- final ApplicationInfo ai = mPM.getApplicationInfo(pkgName, 0);
- applyBootAnimation(ai.sourceDir);
- } catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, "Changing boot animation failed", e);
- return false;
- }
- return true;
- }
-
- private boolean updateAlarms(String pkgName) {
- return updateAudible(ThemeUtils.SYSTEM_THEME_ALARM_PATH, "alarms",
- RingtoneManager.TYPE_ALARM, pkgName);
- }
-
- private boolean updateNotifications(String pkgName) {
- return updateAudible(ThemeUtils.SYSTEM_THEME_NOTIFICATION_PATH, "notifications",
- RingtoneManager.TYPE_NOTIFICATION, pkgName);
- }
-
- private boolean updateRingtones(String pkgName) {
- return updateAudible(ThemeUtils.SYSTEM_THEME_RINGTONE_PATH, "ringtones",
- RingtoneManager.TYPE_RINGTONE, pkgName);
- }
-
- private boolean updateAudible(String dirPath, String assetPath, int type, String pkgName) {
- //Clear the dir
- ThemeUtils.clearAudibles(mContext, dirPath);
- if (pkgName.equals(SYSTEM_DEFAULT)) {
- if (!ThemeUtils.setDefaultAudible(mContext, type)) {
- Log.e(TAG, "There was an error installing the default audio file");
- return false;
- }
- return true;
- }
-
- PackageInfo pi = null;
- try {
- pi = mPM.getPackageInfo(pkgName, 0);
- } catch (PackageManager.NameNotFoundException e) {
- Log.e(TAG, "Unable to update audible " + dirPath, e);
- return false;
- }
-
- //Get theme Assets
- Context themeCtx;
- String[] assetList;
- try {
- themeCtx = mContext.createPackageContext(pkgName, Context.CONTEXT_IGNORE_SECURITY);
- AssetManager assetManager = themeCtx.getAssets();
- assetList = assetManager.list(assetPath);
- } catch (Exception e) {
- Log.e(TAG, "There was an error getting assets for pkg " + pkgName, e);
- return false;
- }
- if (assetList == null || assetList.length == 0) {
- Log.e(TAG, "Could not find any audio assets");
- return false;
- }
-
- // TODO: right now we just load the first file but this will need to be changed
- // in the future if multiple audio files are supported.
- final String asset = assetList[0];
- if (!ThemeUtils.isValidAudible(asset)) return false;
-
- InputStream is = null;
- OutputStream os = null;
- try {
- is = ThemeUtils.getInputStreamFromAsset(themeCtx, "file:///android_asset/"
- + assetPath + File.separator + asset);
- File outFile = new File(dirPath, asset);
- FileUtils.copyToFile(is, outFile);
- FileUtils.setPermissions(outFile,
- FileUtils.S_IRWXU|FileUtils.S_IRGRP|FileUtils.S_IRWXO,-1, -1);
- ThemeUtils.setAudible(mContext, outFile, type, pi.themeInfo.name);
- } catch (Exception e) {
- Log.e(TAG, "There was an error installing the new audio file for pkg " + pkgName, e);
- return false;
- } finally {
- ThemeUtils.closeQuietly(is);
- ThemeUtils.closeQuietly(os);
- }
- return true;
- }
-
- private boolean updateLockscreen(String pkgName) {
- boolean success;
- success = setCustomLockScreenWallpaper(pkgName);
-
- if (success) {
- mContext.sendBroadcastAsUser(new Intent(Intent.ACTION_KEYGUARD_WALLPAPER_CHANGED),
- UserHandle.ALL);
- }
- return success;
- }
-
- private boolean setCustomLockScreenWallpaper(String pkgName) {
- WallpaperManager wm = WallpaperManager.getInstance(mContext);
- try {
- if (SYSTEM_DEFAULT.equals(pkgName) || TextUtils.isEmpty(pkgName)) {
- wm.clearKeyguardWallpaper();
- } else {
- InputStream in = ImageUtils.getCroppedKeyguardStream(pkgName, mContext);
- if (in != null) {
- wm.setKeyguardStream(in);
- ThemeUtils.closeQuietly(in);
- }
- }
- } catch (Exception e) {
- Log.e(TAG, "There was an error setting lockscreen wp for pkg " + pkgName, e);
- return false;
- }
- return true;
- }
-
- private boolean updateWallpaper(String pkgName, long id) {
- WallpaperManager wm = WallpaperManager.getInstance(mContext);
- if (SYSTEM_DEFAULT.equals(pkgName)) {
- try {
- wm.clear();
- } catch (IOException e) {
- return false;
- }
- } else if (TextUtils.isEmpty(pkgName)) {
- try {
- wm.clear(false);
- } catch (IOException e) {
- return false;
- }
- } else {
- InputStream in = null;
- try {
- in = ImageUtils.getCroppedWallpaperStream(pkgName, id, mContext);
- if (in != null)
- wm.setStream(in);
- } catch (Exception e) {
- return false;
- } finally {
- ThemeUtils.closeQuietly(in);
- }
- }
- return true;
- }
-
- private boolean updateLiveLockScreen(String pkgName) {
- // TODO: do something meaningful here once ready
- return true;
- }
-
- private boolean updateConfiguration(ThemeChangeRequest request,
- boolean removePerAppThemes) {
- final IActivityManager am = ActivityManagerNative.getDefault();
- if (am != null) {
- final long token = Binder.clearCallingIdentity();
- try {
- Configuration config = am.getConfiguration();
- ThemeConfig.Builder themeBuilder = createBuilderFrom(config, request, null,
- removePerAppThemes);
- ThemeConfig newConfig = themeBuilder.build();
-
- config.themeConfig = newConfig;
- am.updateConfiguration(config);
- } catch (RemoteException e) {
- return false;
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- }
- return true;
- }
-
- private boolean updateConfiguration(ThemeConfig themeConfig) {
- final IActivityManager am = ActivityManagerNative.getDefault();
- if (am != null) {
- final long token = Binder.clearCallingIdentity();
- try {
- Configuration config = am.getConfiguration();
-
- config.themeConfig = themeConfig;
- am.updateConfiguration(config);
- } catch (RemoteException e) {
- return false;
- } finally {
- Binder.restoreCallingIdentity(token);
- }
- }
- return true;
- }
-
- private boolean shouldUpdateConfiguration(ThemeChangeRequest request) {
- return request.getOverlayThemePackageName() != null ||
- request.getFontThemePackageName() != null ||
- request.getIconsThemePackageName() != null ||
- request.getStatusBarThemePackageName() != null ||
- request.getNavBarThemePackageName() != null ||
- request.getPerAppOverlays().size() > 0;
- }
-
- private static ThemeConfig.Builder createBuilderFrom(Configuration config,
- ThemeChangeRequest request, String pkgName, boolean removePerAppThemes) {
- ThemeConfig.Builder builder = new ThemeConfig.Builder(config.themeConfig);
-
- if (removePerAppThemes) removePerAppThemesFromConfig(builder, config.themeConfig);
-
- if (request.getIconsThemePackageName() != null) {
- builder.defaultIcon(pkgName == null ? request.getIconsThemePackageName() : pkgName);
- }
-
- if (request.getOverlayThemePackageName() != null) {
- builder.defaultOverlay(pkgName == null ?
- request.getOverlayThemePackageName() : pkgName);
- }
-
- if (request.getFontThemePackageName() != null) {
- builder.defaultFont(pkgName == null ? request.getFontThemePackageName() : pkgName);
- }
-
- if (request.getStatusBarThemePackageName() != null) {
- builder.overlay(ThemeConfig.SYSTEMUI_STATUS_BAR_PKG, pkgName == null ?
- request.getStatusBarThemePackageName() : pkgName);
- }
-
- if (request.getNavBarThemePackageName() != null) {
- builder.overlay(ThemeConfig.SYSTEMUI_NAVBAR_PKG, pkgName == null ?
- request.getNavBarThemePackageName() : pkgName);
- }
-
- // check for any per app overlays being applied
- Map<String, String> appOverlays = request.getPerAppOverlays();
- for (String appPkgName : appOverlays.keySet()) {
- if (appPkgName != null) {
- builder.overlay(appPkgName, appOverlays.get(appPkgName));
- }
- }
-
- builder.setLastThemeChangeRequestType(request.getReqeustType());
-
- return builder;
- }
-
- private static void removePerAppThemesFromConfig(ThemeConfig.Builder builder,
- ThemeConfig themeConfig) {
- if (themeConfig != null) {
- Map<String, ThemeConfig.AppTheme> themes = themeConfig.getAppThemes();
- for (String appPkgName : themes.keySet()) {
- if (ThemeUtils.isPerAppThemeComponent(appPkgName)) {
- builder.overlay(appPkgName, null);
- }
- }
- }
- }
-
- // Kill the current Home process, they tend to be evil and cache
- // drawable references in all apps
- private void killLaunchers(ThemeChangeRequest request) {
- if (request.getOverlayThemePackageName() == null
- && request.getIconsThemePackageName() == null) {
- return;
- }
-
- final ActivityManager am =
- (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
-
- Intent homeIntent = new Intent();
- homeIntent.setAction(Intent.ACTION_MAIN);
- homeIntent.addCategory(Intent.CATEGORY_HOME);
-
- List<ResolveInfo> infos = mPM.queryIntentActivities(homeIntent, 0);
- List<ResolveInfo> themeChangeInfos = mPM.queryBroadcastReceivers(
- new Intent(ThemeUtils.ACTION_THEME_CHANGED), 0);
- for(ResolveInfo info : infos) {
- if (info.activityInfo != null && info.activityInfo.applicationInfo != null &&
- !isSetupActivity(info) && !handlesThemeChanges(
- info.activityInfo.applicationInfo.packageName, themeChangeInfos)) {
- String pkgToStop = info.activityInfo.applicationInfo.packageName;
- Log.d(TAG, "Force stopping " + pkgToStop + " for theme change");
- try {
- am.forceStopPackage(pkgToStop);
- } catch(Exception e) {
- Log.e(TAG, "Unable to force stop package, did you forget platform signature?",
- e);
- }
- }
- }
- }
-
- private boolean isSetupActivity(ResolveInfo info) {
- return GOOGLE_SETUPWIZARD_PACKAGE.equals(info.activityInfo.packageName) ||
- MANAGED_PROVISIONING_PACKAGE.equals(info.activityInfo.packageName) ||
- CM_SETUPWIZARD_PACKAGE.equals(info.activityInfo.packageName);
- }
-
- private boolean handlesThemeChanges(String pkgName, List<ResolveInfo> infos) {
- if (infos != null && infos.size() > 0) {
- for (ResolveInfo info : infos) {
- if (info.activityInfo.applicationInfo.packageName.equals(pkgName)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private void postProgress() {
- int N = mClients.beginBroadcast();
- for(int i=0; i < N; i++) {
- IThemeChangeListener listener = mClients.getBroadcastItem(0);
- try {
- listener.onProgress(mProgress);
- } catch(RemoteException e) {
- Log.w(TAG, "Unable to post progress to client listener", e);
- }
- }
- mClients.finishBroadcast();
- }
-
- private void postFinish(boolean isSuccess, ThemeChangeRequest request, long updateTime) {
- synchronized(this) {
- mProgress = 0;
- }
-
- int N = mClients.beginBroadcast();
- for(int i=0; i < N; i++) {
- IThemeChangeListener listener = mClients.getBroadcastItem(0);
- try {
- listener.onFinish(isSuccess);
- } catch(RemoteException e) {
- Log.w(TAG, "Unable to post progress to client listener", e);
- }
- }
- mClients.finishBroadcast();
-
- // if successful, broadcast that the theme changed
- if (isSuccess) {
- broadcastThemeChange(request, updateTime);
- }
- }
-
- private void postFinishedProcessing(String pkgName) {
- int N = mProcessingListeners.beginBroadcast();
- for(int i=0; i < N; i++) {
- IThemeProcessingListener listener = mProcessingListeners.getBroadcastItem(0);
- try {
- listener.onFinishedProcessing(pkgName);
- } catch(RemoteException e) {
- Log.w(TAG, "Unable to post progress to listener", e);
- }
- }
- mProcessingListeners.finishBroadcast();
- }
-
- private void broadcastThemeChange(ThemeChangeRequest request, long updateTime) {
- Map<String, String> componentMap = request.getThemeComponentsMap();
- if (componentMap == null || componentMap.size() == 0) return;
-
- final Intent intent = new Intent(ThemeUtils.ACTION_THEME_CHANGED);
- ArrayList componentsArrayList = new ArrayList(componentMap.keySet());
- intent.putStringArrayListExtra(ThemeUtils.EXTRA_COMPONENTS, componentsArrayList);
- intent.putExtra(ThemeUtils.EXTRA_REQUEST_TYPE, request.getReqeustType().ordinal());
- intent.putExtra(ThemeUtils.EXTRA_UPDATE_TIME, updateTime);
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
- }
-
- private void incrementProgress(int increment) {
- synchronized(this) {
- mProgress += increment;
- if (mProgress > 100) mProgress = 100;
- }
- postProgress();
- }
-
- @Override
- public void requestThemeChangeUpdates(IThemeChangeListener listener) throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- mClients.register(listener);
- }
-
- @Override
- public void removeUpdates(IThemeChangeListener listener) throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- mClients.unregister(listener);
- }
-
- @Override
- public void requestThemeChange(ThemeChangeRequest request, boolean removePerAppThemes)
- throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- Message msg;
-
- /**
- * Since the ThemeService handles compiling theme resource we need to make sure that any
- * of the components we are trying to apply are either already processed or put to the
- * front of the queue and handled before the theme change takes place.
- *
- * TODO: create a callback that can be sent to any ThemeChangeListeners to notify them that
- * the theme will be applied once the processing is done.
- */
- synchronized (mThemesToProcessQueue) {
- Map<String, String> componentMap = request.getThemeComponentsMap();
- for (Object key : componentMap.keySet()) {
- if (ThemesColumns.MODIFIES_OVERLAYS.equals(key) ||
- ThemesColumns.MODIFIES_NAVIGATION_BAR.equals(key) ||
- ThemesColumns.MODIFIES_STATUS_BAR.equals(key) ||
- ThemesColumns.MODIFIES_ICONS.equals(key)) {
- String pkgName = (String) componentMap.get(key);
- if (mThemesToProcessQueue.indexOf(pkgName) > 0) {
- mThemesToProcessQueue.remove(pkgName);
- mThemesToProcessQueue.add(0, pkgName);
- // We want to make sure these resources are taken care of first so
- // send the dequeue message and place it in the front of the queue
- msg = mResourceProcessingHandler.obtainMessage(
- ResourceProcessingHandler.MESSAGE_DEQUEUE_AND_PROCESS_THEME);
- mResourceProcessingHandler.sendMessageAtFrontOfQueue(msg);
- }
- }
- }
- }
- msg = Message.obtain();
- msg.what = ThemeWorkerHandler.MESSAGE_CHANGE_THEME;
- msg.obj = request;
- msg.arg1 = removePerAppThemes ? 1 : 0;
- mHandler.sendMessage(msg);
- }
-
- @Override
- public void applyDefaultTheme() {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- Message msg = Message.obtain();
- msg.what = ThemeWorkerHandler.MESSAGE_APPLY_DEFAULT_THEME;
- mHandler.sendMessage(msg);
- }
-
- @Override
- public boolean isThemeApplying() throws RemoteException {
- mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_THEME_MANAGER, null);
- return mIsThemeApplying;
- }
-
- @Override
- public int getProgress() throws RemoteException {
- mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_THEME_MANAGER, null);
- synchronized(this) {
- return mProgress;
- }
- }
-
- @Override
- public boolean cacheComposedIcon(Bitmap icon, String fileName) throws RemoteException {
- final long token = Binder.clearCallingIdentity();
- boolean success;
- FileOutputStream os;
- final File cacheDir = new File(ThemeUtils.SYSTEM_THEME_ICON_CACHE_DIR);
- if (cacheDir.listFiles().length == 0) {
- mIconCacheSize = 0;
- }
- try {
- File outFile = new File(cacheDir, fileName);
- os = new FileOutputStream(outFile);
- icon.compress(Bitmap.CompressFormat.PNG, 90, os);
- os.close();
- FileUtils.setPermissions(outFile,
- FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IROTH,
- -1, -1);
- mIconCacheSize += outFile.length();
- if (mIconCacheSize > MAX_ICON_CACHE_SIZE) {
- purgeIconCache();
- }
- success = true;
- } catch (Exception e) {
- success = false;
- Log.w(TAG, "Unable to cache icon " + fileName, e);
- }
- Binder.restoreCallingIdentity(token);
- return success;
- }
-
- @Override
- public boolean processThemeResources(String themePkgName) throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- try {
- mPM.getPackageInfo(themePkgName, 0);
- } catch (PackageManager.NameNotFoundException e) {
- // Package doesn't exist so nothing to process
- return false;
- }
- // Obtain a message and send it to the handler to process this theme
- Message msg = mResourceProcessingHandler.obtainMessage(
- ResourceProcessingHandler.MESSAGE_QUEUE_THEME_FOR_PROCESSING, 0, 0, themePkgName);
- mResourceProcessingHandler.sendMessage(msg);
- return true;
- }
-
- @Override
- public boolean isThemeBeingProcessed(String themePkgName) throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- synchronized (mThemesToProcessQueue) {
- return mThemesToProcessQueue.contains(themePkgName);
- }
- }
-
- @Override
- public void registerThemeProcessingListener(IThemeProcessingListener listener)
- throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- mProcessingListeners.register(listener);
- }
-
- @Override
- public void unregisterThemeProcessingListener(IThemeProcessingListener listener)
- throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- mProcessingListeners.unregister(listener);
- }
-
- @Override
- public void rebuildResourceCache() throws RemoteException {
- mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- mHandler.sendEmptyMessage(ThemeWorkerHandler.MESSAGE_REBUILD_RESOURCE_CACHE);
- }
-
- private void purgeIconCache() {
- Log.d(TAG, "Purging icon cahe of size " + mIconCacheSize);
- File cacheDir = new File(ThemeUtils.SYSTEM_THEME_ICON_CACHE_DIR);
- File[] files = cacheDir.listFiles();
- Arrays.sort(files, mOldestFilesFirstComparator);
- for (File f : files) {
- if (!f.isDirectory()) {
- final long size = f.length();
- if(f.delete()) mIconCacheSize -= size;
- }
- if (mIconCacheSize <= PURGED_ICON_CACHE_SIZE) break;
- }
- }
-
- private boolean applyBootAnimation(String themePath) {
- boolean success = false;
- try {
- ZipFile zip = new ZipFile(new File(themePath));
- ZipEntry ze = zip.getEntry(THEME_BOOTANIMATION_PATH);
- if (ze != null) {
- clearBootAnimation();
- BufferedInputStream is = new BufferedInputStream(zip.getInputStream(ze));
- final String bootAnimationPath = SYSTEM_THEME_PATH + File.separator
- + "bootanimation.zip";
- ThemeUtils.copyAndScaleBootAnimation(mContext, is, bootAnimationPath);
- FileUtils.setPermissions(bootAnimationPath,
- FileUtils.S_IRWXU|FileUtils.S_IRGRP|FileUtils.S_IROTH, -1, -1);
- }
- zip.close();
- success = true;
- } catch (Exception e) {
- Log.w(TAG, "Unable to load boot animation for " + themePath, e);
- }
-
- return success;
- }
-
- private void clearBootAnimation() {
- File anim = new File(SYSTEM_THEME_PATH + File.separator + "bootanimation.zip");
- if (anim.exists())
- anim.delete();
- }
-
- private BroadcastReceiver mWallpaperChangeReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (!mWallpaperChangedByUs) {
- // In case the mixnmatch table has a mods_launcher entry, we'll clear it
- ThemeChangeRequest.Builder builder = new ThemeChangeRequest.Builder();
- builder.setWallpaper("");
- updateProvider(builder.build(), System.currentTimeMillis());
- } else {
- mWallpaperChangedByUs = false;
- }
- }
- };
-
- private BroadcastReceiver mUserChangeReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
- if (userHandle >= 0 && userHandle != mCurrentUserId) {
- mCurrentUserId = userHandle;
- ThemeConfig config = ThemeConfig.getBootThemeForUser(mContext.getContentResolver(),
- userHandle);
- if (DEBUG) {
- Log.d(TAG,
- "Changing theme for user " + userHandle + " to " + config.toString());
- }
- ThemeChangeRequest request = new ThemeChangeRequest.Builder(config).build();
- try {
- requestThemeChange(request, true);
- } catch (RemoteException e) {
- Log.e(TAG, "Unable to change theme for user change", e);
- }
- }
- }
- };
-
- private Comparator<File> mOldestFilesFirstComparator = new Comparator<File>() {
- @Override
- public int compare(File lhs, File rhs) {
- return (int) (lhs.lastModified() - rhs.lastModified());
- }
- };
-
- private void processInstalledThemes() {
- final String defaultTheme = getDefaultThemePackageName(mContext);
- Message msg;
- // Make sure the default theme is the first to get processed!
- if (!ThemeConfig.SYSTEM_DEFAULT.equals(defaultTheme)) {
- msg = mHandler.obtainMessage(
- ResourceProcessingHandler.MESSAGE_QUEUE_THEME_FOR_PROCESSING,
- 0, 0, defaultTheme);
- mResourceProcessingHandler.sendMessage(msg);
- }
- // Iterate over all installed packages and queue up the ones that are themes or icon packs
- List<PackageInfo> packages = mPM.getInstalledPackages(0);
- for (PackageInfo info : packages) {
- if (!defaultTheme.equals(info.packageName) &&
- (info.isThemeApk || info.isLegacyIconPackApk)) {
- msg = mHandler.obtainMessage(
- ResourceProcessingHandler.MESSAGE_QUEUE_THEME_FOR_PROCESSING,
- 0, 0, info.packageName);
- mResourceProcessingHandler.sendMessage(msg);
- }
- }
- }
-
- private void sendThemeResourcesCachedBroadcast(String themePkgName, int resultCode) {
- final Intent intent = new Intent(Intent.ACTION_THEME_RESOURCES_CACHED);
- intent.putExtra(Intent.EXTRA_THEME_PACKAGE_NAME, themePkgName);
- intent.putExtra(Intent.EXTRA_THEME_RESULT, resultCode);
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
- }
-
- /**
- * Posts a notification to let the user know the theme was not installed.
- * @param name
- */
- private void postFailedThemeInstallNotification(String name) {
- NotificationManager nm =
- (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
- Notification notice = new Notification.Builder(mContext)
- .setAutoCancel(true)
- .setOngoing(false)
- .setContentTitle(
- mContext.getString(R.string.theme_install_error_title))
- .setContentText(String.format(mContext.getString(
- R.string.theme_install_error_message),
- name))
- .setSmallIcon(android.R.drawable.stat_notify_error)
- .setWhen(System.currentTimeMillis())
- .build();
- nm.notify(name.hashCode(), notice);
- }
-
- private String getThemeName(PackageInfo pi) {
- if (pi.themeInfo != null) {
- return pi.themeInfo.name;
- } else if (pi.isLegacyIconPackApk) {
- return pi.applicationInfo.name;
- }
-
- return null;
- }
-
- /**
- * Get the default theme package name
- * Historically this was done using {@link ThemeUtils#getDefaultThemePackageName(Context)} but
- * the setting that is queried in that method uses the AOSP settings provider but the setting
- * is now in CMSettings. Since {@link ThemeUtils} is in the core framework we cannot access
- * CMSettings.
- * @param context
- * @return Default theme package name
- */
- private static String getDefaultThemePackageName(Context context) {
- final String defaultThemePkg = CMSettings.Secure.getString(context.getContentResolver(),
- CMSettings.Secure.DEFAULT_THEME_PACKAGE);
- if (!TextUtils.isEmpty(defaultThemePkg)) {
- PackageManager pm = context.getPackageManager();
- try {
- if (pm.getPackageInfo(defaultThemePkg, 0) != null) {
- return defaultThemePkg;
- }
- } catch (PackageManager.NameNotFoundException e) {
- // doesn't exist so system will be default
- Log.w(TAG, "Default theme " + defaultThemePkg + " not found", e);
- }
- }
-
- return SYSTEM_DEFAULT;
- }
-}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 7313aab..ed7c3a8 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -174,7 +174,6 @@ import android.content.pm.InstrumentationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ParceledListSlice;
-import android.content.pm.ThemeUtils;
import android.content.pm.UserInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PathPermission;
@@ -268,6 +267,8 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.Date;
import java.text.SimpleDateFormat;
+import org.cyanogenmod.internal.util.ThemeUtils;
+
public final class ActivityManagerService extends ActivityManagerNative
implements Watchdog.Monitor, BatteryStatsImpl.BatteryCallback {
@@ -12287,7 +12288,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
private void sendAppFailureBroadcast(String pkgName) {
- Intent intent = new Intent(Intent.ACTION_APP_FAILURE,
+ Intent intent = new Intent(cyanogenmod.content.Intent.ACTION_APP_FAILURE,
(pkgName != null)? Uri.fromParts("package", pkgName, null) : null);
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT_OR_SELF);
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index bfeb1b7..d5c58df 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -17,7 +17,6 @@
package com.android.server.pm;
-import static android.Manifest.permission.ACCESS_THEME_MANAGER;
import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_MEDIA_STORAGE;
@@ -92,6 +91,7 @@ import android.content.res.Configuration;
import android.Manifest;
+import cyanogenmod.app.CMContextConstants;
import cyanogenmod.app.suggest.AppSuggestManager;
import android.app.ActivityManager;
@@ -156,14 +156,12 @@ import android.content.pm.ServiceInfo;
import android.content.pm.Signature;
import android.content.pm.UserInfo;
import android.content.pm.ManifestDigest;
-import android.content.pm.ThemeUtils;
import android.content.pm.VerificationParams;
import android.content.pm.VerifierDeviceIdentity;
import android.content.pm.VerifierInfo;
import android.content.res.Resources;
import android.content.res.AssetManager;
import android.content.res.ThemeConfig;
-import android.content.res.ThemeManager;
import android.hardware.display.DisplayManager;
import android.net.Uri;
import android.os.Debug;
@@ -222,6 +220,8 @@ import android.util.Xml;
import android.view.Display;
import cyanogenmod.providers.CMSettings;
+import cyanogenmod.themes.IThemeService;
+
import dalvik.system.DexFile;
import dalvik.system.VMRuntime;
@@ -254,6 +254,7 @@ import com.android.server.pm.Settings.DatabaseVersion;
import com.android.server.pm.Settings.VersionInfo;
import com.android.server.storage.DeviceStorageMonitorInternal;
+import org.cyanogenmod.internal.util.ThemeUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -303,8 +304,6 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
/**
* Keep track of all those .apks everywhere.
@@ -1465,7 +1464,8 @@ public class PackageManagerService extends IPackageManager.Stub {
}
String category = null;
if(res.pkg.mIsThemeApk) {
- category = Intent.CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE;
+ category = cyanogenmod.content.Intent
+ .CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE;
}
sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED,
packageName, null, extras, null, null, updateUsers);
@@ -8272,7 +8272,8 @@ public class PackageManagerService extends IPackageManager.Stub {
boolean hasCommonResources = (hasCommonResources(pkg) && !COMMON_OVERLAY.equals(target));
PackageParser.Package targetPkg = mPackages.get(target);
- String appPath = targetPkg != null ? targetPkg.baseCodePath : "";
+ String appPath = targetPkg != null ? targetPkg.baseCodePath :
+ Environment.getRootDirectory() + "/framework/framework-res.apk";
if (mInstaller.aapt(pkg.baseCodePath, internalPath, resPath, sharedGid, pkgId,
pkg.applicationInfo.targetSdkVersion,
@@ -13541,7 +13542,8 @@ public class PackageManagerService extends IPackageManager.Stub {
String category = null;
if (info.isThemeApk) {
- category = Intent.CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE;
+ category = cyanogenmod.content.Intent
+ .CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE;
}
sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED, packageName, category,
@@ -13586,7 +13588,8 @@ public class PackageManagerService extends IPackageManager.Stub {
if (removedPackage != null) {
String category = null;
if (isThemeApk) {
- category = Intent.CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE;
+ category = cyanogenmod.content.Intent
+ .CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE;
}
sendPackageBroadcast(Intent.ACTION_PACKAGE_REMOVED, removedPackage, category,
extras, null, null, removedUsers);
@@ -17706,8 +17709,11 @@ public class PackageManagerService extends IPackageManager.Stub {
@Override
public int processThemeResources(String themePkgName) {
mContext.enforceCallingOrSelfPermission(
- Manifest.permission.ACCESS_THEME_MANAGER, null);
- PackageParser.Package pkg = mPackages.get(themePkgName);
+ cyanogenmod.platform.Manifest.permission.ACCESS_THEME_MANAGER, null);
+ PackageParser.Package pkg;
+ synchronized (mPackages) {
+ pkg = mPackages.get(themePkgName);
+ }
if (pkg == null) {
Log.w(TAG, "Unable to get pkg for processing " + themePkgName);
return 0;
@@ -17728,11 +17734,15 @@ public class PackageManagerService extends IPackageManager.Stub {
// Generate Idmaps and res tables if pkg is a theme
Iterator<String> iterator = pkg.mOverlayTargets.iterator();
- while(iterator.hasNext()) {
+ while (iterator.hasNext()) {
String target = iterator.next();
Exception failedException = null;
+ PackageParser.Package targetPkg;
+ synchronized (mPackages) {
+ targetPkg = mPackages.get(target);
+ }
try {
- compileResourcesAndIdmapIfNeeded(mPackages.get(target), pkg);
+ compileResourcesAndIdmapIfNeeded(targetPkg, pkg);
} catch (IdmapException e) {
failedException = e;
} catch (AaptException e) {
@@ -17743,7 +17753,7 @@ public class PackageManagerService extends IPackageManager.Stub {
if (failedException != null) {
Slog.w(TAG, "Unable to process theme " + pkg.packageName + " for " + target,
- failedException);
+ failedException);
// remove target from mOverlayTargets
iterator.remove();
}
@@ -17753,10 +17763,16 @@ public class PackageManagerService extends IPackageManager.Stub {
}
private void processThemeResourcesInThemeService(String pkgName) {
- ThemeManager tm =
- (ThemeManager) mContext.getSystemService(Context.THEME_SERVICE);
- if (tm != null) {
- tm.processThemeResources(pkgName);
+ IThemeService ts = IThemeService.Stub.asInterface(ServiceManager.getService(
+ CMContextConstants.CM_THEME_SERVICE));
+ if (ts == null) {
+ Slog.e(TAG, "Theme service not available");
+ return;
+ }
+ try {
+ ts.processThemeResources(pkgName);
+ } catch (RemoteException e) {
+ /* ignore */
}
}
diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java
index dacbe3b..c7cf7d3 100644
--- a/services/core/java/com/android/server/policy/GlobalActions.java
+++ b/services/core/java/com/android/server/policy/GlobalActions.java
@@ -37,7 +37,6 @@ import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.pm.ThemeUtils;
import android.content.pm.UserInfo;
import android.content.ServiceConnection;
import android.database.ContentObserver;
@@ -102,6 +101,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
+import org.cyanogenmod.internal.util.ThemeUtils;
+
import static com.android.internal.util.cm.PowerMenuConstants.*;
/**
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
index 9b8ea14..34b6e2b 100644
--- a/services/core/java/com/android/server/power/ShutdownThread.java
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
@@ -26,7 +26,6 @@ import android.app.KeyguardManager;
import android.app.ProgressDialog;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.IBluetoothManager;
-import android.content.pm.ThemeUtils;
import android.media.AudioAttributes;
import android.nfc.NfcAdapter;
import android.nfc.INfcAdapter;
@@ -78,6 +77,8 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.io.OutputStreamWriter;
+import org.cyanogenmod.internal.util.ThemeUtils;
+
public final class ShutdownThread extends Thread {
// constants
private static final String TAG = "ShutdownThread";
diff --git a/services/java/com/android/server/AppsFailureReceiver.java b/services/java/com/android/server/AppsFailureReceiver.java
deleted file mode 100644
index e99b7a4..0000000
--- a/services/java/com/android/server/AppsFailureReceiver.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2010, T-Mobile USA, Inc.
- * Copyright (C) 2015 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.server;
-
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.ThemeUtils;
-import android.content.res.ThemeChangeRequest;
-import android.content.res.ThemeChangeRequest.RequestType;
-import android.content.res.ThemeConfig;
-import android.content.res.ThemeManager;
-import android.os.SystemClock;
-
-import com.android.internal.R;
-
-public class AppsFailureReceiver extends BroadcastReceiver {
-
- private static final int FAILURES_THRESHOLD = 3;
- private static final int EXPIRATION_TIME_IN_MILLISECONDS = 30000; // 30 seconds
-
- private static final int THEME_RESET_NOTIFICATION_ID = 0x4641494C;
-
- private int mFailuresCount = 0;
- private long mStartTime = 0;
-
- // This function implements the following logic.
- // If after a theme was applied the number of application launch failures
- // at any moment was equal to FAILURES_THRESHOLD
- // in less than EXPIRATION_TIME_IN_MILLISECONDS
- // the default theme is applied unconditionally.
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (action.equals(Intent.ACTION_APP_FAILURE)) {
- long currentTime = SystemClock.uptimeMillis();
- String pkgName = intent.getStringExtra("package");
- if (currentTime - mStartTime > EXPIRATION_TIME_IN_MILLISECONDS) {
- // reset both the count and the timer
- mStartTime = currentTime;
- mFailuresCount = 0;
- }
- if (mFailuresCount <= FAILURES_THRESHOLD) {
- mFailuresCount++;
- if (mFailuresCount == FAILURES_THRESHOLD) {
- // let the theme manager take care of getting us back on the default theme
- ThemeManager tm =
- (ThemeManager) context.getSystemService(Context.THEME_SERVICE);
- final String themePkgName = ThemeConfig.SYSTEM_DEFAULT;
- ThemeChangeRequest.Builder builder = new ThemeChangeRequest.Builder();
- builder.setOverlay(themePkgName)
- .setStatusBar(themePkgName)
- .setNavBar(themePkgName)
- .setIcons(themePkgName)
- .setFont(themePkgName)
- .setBootanimation(themePkgName)
- .setWallpaper(themePkgName)
- .setLockWallpaper(themePkgName)
- .setAlarm(themePkgName)
- .setNotification(themePkgName)
- .setRingtone(themePkgName)
- .setRequestType(RequestType.THEME_RESET);
- // Since we are resetting everything to the system theme, we can have the
- // theme service remove all per app themes without setting them explicitly :)
- tm.requestThemeChange(builder.build(), true);
- postThemeResetNotification(context);
- }
- }
- } else if (action.equals(Intent.ACTION_APP_FAILURE_RESET)
- || action.equals(ThemeUtils.ACTION_THEME_CHANGED)) {
- mFailuresCount = 0;
- mStartTime = SystemClock.uptimeMillis();
- } else if (action.equals(Intent.ACTION_PACKAGE_ADDED) ||
- action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
- mFailuresCount = 0;
- mStartTime = SystemClock.uptimeMillis();
- }
- }
-
- /**
- * Posts a notification to let the user know their theme was reset
- * @param context
- */
- private void postThemeResetNotification(Context context) {
- NotificationManager nm =
- (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
- String title = context.getString(R.string.theme_reset_notification_title);
- String body = context.getString(R.string.theme_reset_notification_body);
- Notification notice = new Notification.Builder(context)
- .setAutoCancel(true)
- .setOngoing(false)
- .setContentTitle(title)
- .setContentText(body)
- .setStyle(new Notification.BigTextStyle().bigText(body))
- .setSmallIcon(android.R.drawable.stat_notify_error)
- .setWhen(System.currentTimeMillis())
- .setCategory(Notification.CATEGORY_SYSTEM)
- .setPriority(Notification.PRIORITY_MAX)
- .build();
- nm.notify(THEME_RESET_NOTIFICATION_ID, notice);
- }
-}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 3146366..0ea8a51 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -25,15 +25,9 @@ import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
-import android.content.pm.ThemeUtils;
import android.content.res.Configuration;
-import android.content.res.Resources.Theme;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.content.res.ThemeConfig;
import android.database.ContentObserver;
import android.os.Build;
import android.os.Environment;
@@ -47,7 +41,6 @@ import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.storage.IMountService;
-import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Slog;
@@ -570,7 +563,6 @@ public final class SystemServer {
MediaRouterService mediaRouter = null;
GestureService gestureService = null;
EdgeGestureService edgeGestureService = null;
- ThemeService themeService = null;
// Bring up services needed for UI.
if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
@@ -1003,14 +995,6 @@ public final class SystemServer {
mSystemServiceManager.startService(TvInputManagerService.class);
}
- try {
- Slog.i(TAG, "Theme Service");
- themeService = new ThemeService(context);
- ServiceManager.addService(Context.THEME_SERVICE, themeService);
- } catch (Throwable e) {
- reportWtf("starting Theme Service", e);
- }
-
if (!disableNonCoreServices) {
try {
Slog.i(TAG, "Media Router Service");
@@ -1157,16 +1141,6 @@ public final class SystemServer {
}
}
- IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_APP_FAILURE);
- filter.addAction(Intent.ACTION_APP_FAILURE_RESET);
- filter.addAction(Intent.ACTION_PACKAGE_ADDED);
- filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
- filter.addAction(ThemeUtils.ACTION_THEME_CHANGED);
- filter.addCategory(Intent.CATEGORY_THEME_PACKAGE_INSTALLED_STATE_CHANGE);
- filter.addDataScheme("package");
- context.registerReceiver(new AppsFailureReceiver(), filter);
-
// These are needed to propagate to the runnable below.
final NetworkManagementService networkManagementF = networkManagement;
final NetworkStatsService networkStatsF = networkStats;
@@ -1187,7 +1161,6 @@ public final class SystemServer {
final MediaRouterService mediaRouterF = mediaRouter;
final AudioService audioServiceF = audioService;
final MmsServiceBroker mmsServiceF = mmsService;
- final ThemeService themeServiceF = themeService;
// We now tell the activity manager it is okay to run third party
// code. It will call back into us once it has gotten to the state
@@ -1326,17 +1299,6 @@ public final class SystemServer {
} catch (Throwable e) {
reportWtf("Notifying MmsService running", e);
}
-
- try {
- // now that the system is up, apply default theme if applicable
- if (themeServiceF != null) themeServiceF.systemRunning();
- ThemeConfig themeConfig =
- ThemeConfig.getBootTheme(context.getContentResolver());
- String iconPkg = themeConfig.getIconPackPkgName();
- mPackageManagerService.updateIconMapping(iconPkg);
- } catch (Throwable e) {
- reportWtf("Icon Mapping failed", e);
- }
}
});
}