Merge "Remove MessageUtils usage in VpnTransportInfo"
This commit is contained in:
@@ -22,9 +22,6 @@ import android.annotation.NonNull;
|
|||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.util.SparseArray;
|
|
||||||
|
|
||||||
import com.android.internal.util.MessageUtils;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -38,9 +35,6 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
@SystemApi(client = MODULE_LIBRARIES)
|
@SystemApi(client = MODULE_LIBRARIES)
|
||||||
public final class VpnTransportInfo implements TransportInfo, Parcelable {
|
public final class VpnTransportInfo implements TransportInfo, Parcelable {
|
||||||
private static final SparseArray<String> sTypeToString =
|
|
||||||
MessageUtils.findMessageNames(new Class[]{VpnManager.class}, new String[]{"TYPE_VPN_"});
|
|
||||||
|
|
||||||
/** Type of this VPN. */
|
/** Type of this VPN. */
|
||||||
public final int type;
|
public final int type;
|
||||||
|
|
||||||
@@ -63,8 +57,7 @@ public final class VpnTransportInfo implements TransportInfo, Parcelable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final String typeString = sTypeToString.get(type, "VPN_TYPE_???");
|
return String.format("VpnTransportInfo{type=%d}", type);
|
||||||
return String.format("VpnTransportInfo{%s}", typeString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user