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

Commit 49dc9825 authored by John Spurlock's avatar John Spurlock
Browse files

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
parent bf7fe20d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);
    }