Prepare settings for METADATA_NAME_CONFIG_ACTIVITY removal.

This is to avoid even a temporary build breakage. Using the new
xml file will be done in a followup commit.

Bug:7172816
Change-Id: If6fedefbee38428eda5b39994c3ad8ff86c8fef9
This commit is contained in:
John Spurlock
2012-09-26 11:16:34 -04:00
parent bf7fe20d5b
commit 49dc982556

View File

@@ -29,7 +29,6 @@ import android.graphics.drawable.Drawable;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.provider.Settings;
import android.service.dreams.Dream;
import android.service.dreams.IDreamManager;
import android.util.Log;
@@ -41,6 +40,11 @@ import java.util.List;
public class DreamBackend {
private static final String TAG = DreamSettings.class.getSimpleName() + ".Backend";
// avoid breaking when the api changes.
// FIXME: use the new xml file when available
private static final String OLD_METADATA_NAME_CONFIG_ACTIVITY =
"android.service.dreams.config_activity";
public static class DreamInfo {
CharSequence caption;
Drawable icon;
@@ -205,7 +209,7 @@ public class DreamBackend {
|| resolveInfo.serviceInfo == null
|| resolveInfo.serviceInfo.metaData == null)
return null;
String cn = resolveInfo.serviceInfo.metaData.getString(Dream.METADATA_NAME_CONFIG_ACTIVITY);
String cn = resolveInfo.serviceInfo.metaData.getString(OLD_METADATA_NAME_CONFIG_ACTIVITY);
return cn == null ? null : ComponentName.unflattenFromString(cn);
}