191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson/* 291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * Copyright (C) 2017 The Android Open Source Project 391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * 491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * Licensed under the Apache License, Version 2.0 (the "License"); 591c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * you may not use this file except in compliance with the License. 691c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * You may obtain a copy of the License at 791c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * 891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * http://www.apache.org/licenses/LICENSE-2.0 991c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * 1091c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * Unless required by applicable law or agreed to in writing, software 1191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * distributed under the License is distributed on an "AS IS" BASIS, 1291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * See the License for the specific language governing permissions and 1491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * limitations under the License. 1591c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson */ 1691c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidsonpackage android.telephony.euicc; 1791c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 1891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidsonimport android.annotation.Nullable; 1991c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidsonimport android.os.Parcel; 2091c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidsonimport android.os.Parcelable; 2191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 2291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson/** 2391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * Information about an eUICC chip/device. 2491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * 2591c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson * @see EuiccManager#getEuiccInfo 2691c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson */ 2791c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson// WARNING: Do not add any privacy-sensitive fields to this class (such as an eUICC identifier)! 2891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson// This API is accessible to all applications. Privacy-sensitive fields should be returned in their 2991c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson// own APIs guarded with appropriate permission checks. 3091c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidsonpublic final class EuiccInfo implements Parcelable { 3191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 3291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson public static final Creator<EuiccInfo> CREATOR = 3391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson new Creator<EuiccInfo>() { 3491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson @Override 3591c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson public EuiccInfo createFromParcel(Parcel in) { 3691c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson return new EuiccInfo(in); 3791c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson } 3891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 3991c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson @Override 4091c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson public EuiccInfo[] newArray(int size) { 4191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson return new EuiccInfo[size]; 4291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson } 4391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson }; 4491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 454f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun @Nullable 464f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun private final String osVersion; 474f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun 4891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson /** 494f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun * Gets the version of the operating system running on the eUICC. This field is 504f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun * hardware-specific and is not guaranteed to match any particular format. 5191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson */ 5291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson @Nullable 534f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun public String getOsVersion() { 544f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun return osVersion; 554f73b9c09ac6ae73c22ad02872e362c817ab2d4cHolly Jiuyu Sun } 5691c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 5791c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson public EuiccInfo(@Nullable String osVersion) { 5891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson this.osVersion = osVersion; 5991c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson } 6091c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 6191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson private EuiccInfo(Parcel in) { 6291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson osVersion = in.readString(); 6391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson } 6491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 6591c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson @Override 6691c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson public void writeToParcel(Parcel dest, int flags) { 6791c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson dest.writeString(osVersion); 6891c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson } 6991c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson 7091c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson @Override 7191c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson public int describeContents() { 7291c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson return 0; 7391c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson } 7491c3d07fd9c75258a47fb25c59bc0cd5d2b638a4Jeff Davidson} 75