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

Commit b34f1b96 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Adds better logging for ImsFeature features

Test: Manual, check logcat
Change-Id: I203cfb8462956dffcab03756cbb379810595835b
parent 434e4fdf
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -34,7 +34,9 @@ import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

@@ -105,6 +107,16 @@ public abstract class ImsFeature {
     */
    public static final int FEATURE_MAX = 3;

    /**
     * Used for logging purposes.
     * @hide
     */
    public static final Map<Integer, String> FEATURE_LOG_MAP = new HashMap<Integer, String>() {{
            put(FEATURE_EMERGENCY_MMTEL, "EMERGENCY_MMTEL");
            put(FEATURE_MMTEL, "MMTEL");
            put(FEATURE_RCS, "RCS");
        }};

    /**
     * Integer values defining IMS features that are supported in ImsFeature.
     * @hide
@@ -144,6 +156,16 @@ public abstract class ImsFeature {
     */
    public static final int STATE_READY = 2;

    /**
     * Used for logging purposes.
     * @hide
     */
    public static final Map<Integer, String> STATE_LOG_MAP = new HashMap<Integer, String>() {{
            put(STATE_UNAVAILABLE, "UNAVAILABLE");
            put(STATE_INITIALIZING, "INITIALIZING");
            put(STATE_READY, "READY");
        }};

    /**
     * Integer values defining the result codes that should be returned from
     * {@link #changeEnabledCapabilities} when the framework tries to set a feature's capability.
+1 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.ims.feature.ImsFeature;
import android.util.ArraySet;
import android.util.Pair;

import java.util.Set;

@@ -80,7 +79,7 @@ public final class ImsFeatureConfiguration implements Parcelable {

        @Override
        public String toString() {
            return "{s=" + slotId + ", f=" + featureType + "}";
            return "{s=" + slotId + ", f=" + ImsFeature.FEATURE_LOG_MAP.get(featureType) + "}";
        }
    }