summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Guilfoyle <jasta00@gmail.com>2010-11-16 16:25:56 -0800
committerJosh Guilfoyle <jasta00@gmail.com>2010-11-16 16:25:56 -0800
commitfde7da25ce3e433569d86485a1a247e137096eed (patch)
tree47e0ceea76e9c028e8ff55c2f018b1b24815446b
parenteaad09779eb4dc69b8e6b1eb95fcde5638156771 (diff)
downloadframeworks_base-fde7da25ce3e433569d86485a1a247e137096eed.zip
frameworks_base-fde7da25ce3e433569d86485a1a247e137096eed.tar.gz
frameworks_base-fde7da25ce3e433569d86485a1a247e137096eed.tar.bz2
Removed unused sound pack feature.
Change-Id: I8dd546a829881a67e4da41a37f1cb4799f044606
-rw-r--r--core/java/android/content/pm/BaseThemeInfo.java2
-rw-r--r--core/java/android/content/pm/PackageInfo.java8
-rw-r--r--core/java/android/content/pm/PackageParser.java18
-rw-r--r--core/java/android/content/pm/SoundsInfo.java171
4 files changed, 1 insertions, 198 deletions
diff --git a/core/java/android/content/pm/BaseThemeInfo.java b/core/java/android/content/pm/BaseThemeInfo.java
index 2cf26fe..447040a 100644
--- a/core/java/android/content/pm/BaseThemeInfo.java
+++ b/core/java/android/content/pm/BaseThemeInfo.java
@@ -156,7 +156,7 @@ public class BaseThemeInfo implements Parcelable {
*/
public enum InfoObjectType {
TYPE_THEME,
- TYPE_SOUNDPACK,
+ TYPE_SOUNDPACK, /** Currently not supported. */
}
/**
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java
index f241fba..2ce09a7 100644
--- a/core/java/android/content/pm/PackageInfo.java
+++ b/core/java/android/content/pm/PackageInfo.java
@@ -194,12 +194,6 @@ public class PackageInfo implements Parcelable {
*/
public ThemeInfo [] themeInfos;
- // SoundsInfo
- /**
- * {@hide}
- */
- public SoundsInfo [] soundInfos;
-
public PackageInfo() {
}
@@ -290,7 +284,6 @@ public class PackageInfo implements Parcelable {
dest.writeInt((isThemeApk)? 1 : 0);
dest.writeInt((drmProtectedThemeApk)? 1 : 0);
dest.writeTypedArray(themeInfos, parcelableFlags);
- dest.writeTypedArray(soundInfos, parcelableFlags);
dest.writeString(lockedZipFilePath);
}
@@ -332,7 +325,6 @@ public class PackageInfo implements Parcelable {
isThemeApk = (source.readInt() != 0);
drmProtectedThemeApk = (source.readInt() != 0);
themeInfos = source.createTypedArray(ThemeInfo.CREATOR);
- soundInfos = source.createTypedArray(SoundsInfo.CREATOR);
lockedZipFilePath = source.readString();
}
}
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 9d965cb..a59dbc0 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -217,17 +217,6 @@ public class PackageParser {
pi.setLockedZipFilePath(PackageParser.getLockedZipFilePath(p.mPath));
}
}
- N = p.mSoundInfos.size();
- if (N > 0) {
- pi.soundInfos = new SoundsInfo[N];
- for (int i = 0; i < N; i++) {
- pi.soundInfos[i] = p.mSoundInfos.get(i);
- pi.setDrmProtectedThemeApk(pi.isDrmProtectedThemeApk() || pi.soundInfos[i].isDrmProtected);
- }
- if (pi.isDrmProtectedThemeApk()) {
- pi.setLockedZipFilePath(PackageParser.getLockedZipFilePath(p.mPath));
- }
- }
}
pi.applicationInfo = p.applicationInfo;
pi.installLocation = p.installLocation;
@@ -1115,10 +1104,6 @@ public class PackageParser {
// this is a theme apk.
pkg.mIsThemeApk = true;
pkg.mThemeInfos.add(new ThemeInfo(parser, res, attrs));
- } else if (tagName.equals("sounds")) {
- // this is a theme apk.
- pkg.mIsThemeApk = true;
- pkg.mSoundInfos.add(new SoundsInfo(parser, res, attrs));
} else if (RIGID_PARSER) {
outError[0] = "Bad element under <manifest>: "
+ parser.getName();
@@ -2790,9 +2775,6 @@ public class PackageParser {
// Theme info
public final ArrayList<ThemeInfo> mThemeInfos = new ArrayList<ThemeInfo>(0);
- // Sound info
- public final ArrayList<SoundsInfo> mSoundInfos = new ArrayList<SoundsInfo>(0);
-
// Additional data supplied by callers.
public Object mExtras;
diff --git a/core/java/android/content/pm/SoundsInfo.java b/core/java/android/content/pm/SoundsInfo.java
deleted file mode 100644
index 9ebe133..0000000
--- a/core/java/android/content/pm/SoundsInfo.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package android.content.pm;
-
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlPullParser;
-
-import android.os.Parcelable;
-import android.os.Parcel;
-import android.util.AttributeSet;
-import android.content.res.Resources;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * Overall information about sound pack. This corresponds
- * to the information collected from AndroidManifest.xml (sounds tag).
- *
- * Below is an example of sounds tag
- * <sounds
- * pluto:name="Pluto Default"
- * pluto:thumbnail="@drawable/app_thumbnail"
- * pluto:author="John Doe"
- * pluto:ringtoneFileName="media/audio/ringtone.mp3"
- * pluto:notificationRingtoneFileName="media/audio/locked/notification.mp3"
- * pluto:copyright="T-Mobile, 2009"
- * />
- *
- * @hide
- */
-public class SoundsInfo extends BaseThemeInfo {
-
- private static final String [] attributes = new String [] {
- "name",
- "thumbnail",
- "author",
- "ringtoneFileName",
- "notificationRingtoneFileName",
- "ringtoneName",
- "notificationRingtoneName",
- "copyright",
- };
-
- private static Map<String, Integer> attributesLookupTable;
-
- static {
- attributesLookupTable = new HashMap<String, Integer>();
- for (int i = 0; i < attributes.length; i++) {
- attributesLookupTable.put(attributes[i], i);
- }
- }
-
- /**
- * {@link #name}
- *
- */
- private static final int NAME_INDEX = 0;
-
- /**
- * {@link #thumbnail}
- *
- */
- private static final int THUMBNAIL_INDEX = 1;
-
- /**
- * {@link #author}
- *
- */
- private static final int AUTHOR_INDEX = 2;
-
- /**
- * {@link #ringtoneName}
- *
- */
- private static final int RINGTONE_FILE_NAME_INDEX = 3;
-
- /**
- * {@link #notificationRingtoneName}
- *
- */
- private static final int NOTIFICATION_RINGTONE_FILE_NAME_INDEX = 4;
-
- /**
- * {@link #ringtoneName}
- *
- */
- private static final int RINGTONE_NAME_INDEX = 5;
-
- /**
- * {@link #notificationRingtoneName}
- *
- */
- private static final int NOTIFICATION_RINGTONE_NAME_INDEX = 6;
-
- /**
- * {@link #copyright}
- *
- */
- private static final int COPYRIGHT_INDEX = 7;
-
-
- public SoundsInfo(XmlPullParser parser, Resources res, AttributeSet attrs) throws XmlPullParserException {
- super();
-
- type = InfoObjectType.TYPE_SOUNDPACK;
- Map<String, Integer> tempMap = new HashMap<String, Integer>(attributesLookupTable);
- for (int i = 0; i < attrs.getAttributeCount(); i++) {
- if (!ApplicationInfo.isPlutoNamespace(parser.getAttributeNamespace(i))) {
- continue;
- }
- String key = attrs.getAttributeName(i);
- if (tempMap.containsKey(key)) {
- int index = tempMap.get(key);
- tempMap.remove(key);
-
- switch (index) {
- case NAME_INDEX:
- name = getResolvedString(res, attrs, i);
- break;
-
- case THUMBNAIL_INDEX:
- thumbnail = attrs.getAttributeValue(i);
- break;
-
- case AUTHOR_INDEX:
- author = getResolvedString(res, attrs, i);
- break;
-
- case RINGTONE_FILE_NAME_INDEX:
- ringtoneFileName = attrs.getAttributeValue(i);
- changeDrmFlagIfNeeded(ringtoneFileName);
- break;
-
- case NOTIFICATION_RINGTONE_FILE_NAME_INDEX:
- notificationRingtoneFileName = attrs.getAttributeValue(i);
- changeDrmFlagIfNeeded(notificationRingtoneFileName);
- break;
-
- case RINGTONE_NAME_INDEX:
- ringtoneName = attrs.getAttributeValue(i);
- break;
-
- case NOTIFICATION_RINGTONE_NAME_INDEX:
- notificationRingtoneName = attrs.getAttributeValue(i);
-
- case COPYRIGHT_INDEX:
- copyright = getResolvedString(res, attrs, i);
- break;
- }
- }
- }
- if (!tempMap.isEmpty()) {
- throw new XmlPullParserException("Not all compulsory attributes are specified in <sounds>");
- }
- }
-
- public static final Parcelable.Creator<SoundsInfo> CREATOR
- = new Parcelable.Creator<SoundsInfo>() {
- public SoundsInfo createFromParcel(Parcel source) {
- return new SoundsInfo(source);
- }
-
- public SoundsInfo[] newArray(int size) {
- return new SoundsInfo[size];
- }
- };
-
- private SoundsInfo(Parcel source) {
- super(source);
- }
-
-}