* commit 'f4d86a1dd9d758f9479a7d486e610930266205d0': Radio Capability Support.
This commit is contained in:
@@ -300,6 +300,9 @@
|
|||||||
<protected-broadcast android:name="android.intent.action.ACTION_SUBINFO_CONTENT_CHANGE" />
|
<protected-broadcast android:name="android.intent.action.ACTION_SUBINFO_CONTENT_CHANGE" />
|
||||||
<protected-broadcast android:name="android.intent.action.ACTION_SUBINFO_RECORD_UPDATED" />
|
<protected-broadcast android:name="android.intent.action.ACTION_SUBINFO_RECORD_UPDATED" />
|
||||||
|
|
||||||
|
<protected-broadcast android:name="android.intent.action.ACTION_SET_RADIO_CAPABILITY_DONE" />
|
||||||
|
<protected-broadcast android:name="android.intent.action.ACTION_SET_RADIO_CAPABILITY_FAILED" />
|
||||||
|
|
||||||
<!-- ====================================== -->
|
<!-- ====================================== -->
|
||||||
<!-- Permissions for things that cost money -->
|
<!-- Permissions for things that cost money -->
|
||||||
<!-- ====================================== -->
|
<!-- ====================================== -->
|
||||||
|
|||||||
19
telephony/java/android/telephony/RadioAccessFamily.aidl
Normal file
19
telephony/java/android/telephony/RadioAccessFamily.aidl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2014 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.telephony;
|
||||||
|
|
||||||
|
parcelable RadioAccessFamily;
|
||||||
135
telephony/java/android/telephony/RadioAccessFamily.java
Normal file
135
telephony/java/android/telephony/RadioAccessFamily.java
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2014 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.telephony;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object to indicate the phone radio type and access technology.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public class RadioAccessFamily implements Parcelable {
|
||||||
|
|
||||||
|
// Radio Access Family
|
||||||
|
public static final int RAF_UNKNOWN = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN);
|
||||||
|
public static final int RAF_GPRS = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_GPRS);
|
||||||
|
public static final int RAF_EDGE = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_EDGE);
|
||||||
|
public static final int RAF_UMTS = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_UMTS);
|
||||||
|
public static final int RAF_IS95A = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_IS95A);
|
||||||
|
public static final int RAF_IS95B = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_IS95B);
|
||||||
|
public static final int RAF_1xRTT = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT);
|
||||||
|
public static final int RAF_EVDO_0 = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_0);
|
||||||
|
public static final int RAF_EVDO_A = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_A);
|
||||||
|
public static final int RAF_HSDPA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_HSDPA);
|
||||||
|
public static final int RAF_HSUPA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_HSUPA);
|
||||||
|
public static final int RAF_HSPA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_HSPA);
|
||||||
|
public static final int RAF_EVDO_B = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_EVDO_B);
|
||||||
|
public static final int RAF_EHRPD = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_EHRPD);
|
||||||
|
public static final int RAF_LTE = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_LTE);
|
||||||
|
public static final int RAF_HSPAP = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP);
|
||||||
|
public static final int RAF_GSM = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_GSM);
|
||||||
|
public static final int RAF_TD_SCDMA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA);
|
||||||
|
|
||||||
|
/* Phone ID of phone */
|
||||||
|
private int mPhoneId;
|
||||||
|
|
||||||
|
/* Radio Access Family */
|
||||||
|
private int mRadioAccessFamily;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param phoneId the phone ID
|
||||||
|
* @param radioAccessFamily the phone radio access family defined
|
||||||
|
* in RadioAccessFamily. It's a bit mask value to represent
|
||||||
|
* the support type.
|
||||||
|
*/
|
||||||
|
public RadioAccessFamily(int phoneId, int radioAccessFamily) {
|
||||||
|
mPhoneId = phoneId;
|
||||||
|
mRadioAccessFamily = radioAccessFamily;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get phone ID.
|
||||||
|
*
|
||||||
|
* @return phone ID
|
||||||
|
*/
|
||||||
|
public int getPhoneId() {
|
||||||
|
return mPhoneId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get radio access family.
|
||||||
|
*
|
||||||
|
* @return radio access family
|
||||||
|
*/
|
||||||
|
public int getRadioAccessFamily() {
|
||||||
|
return mRadioAccessFamily;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
String ret = "{ mPhoneId = " + mPhoneId
|
||||||
|
+ ", mRadioAccessFamily = " + mRadioAccessFamily
|
||||||
|
+ "}";
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement the Parcelable interface.
|
||||||
|
*
|
||||||
|
* @return describe content
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement the Parcelable interface.
|
||||||
|
*
|
||||||
|
* @param outParcel The Parcel in which the object should be written.
|
||||||
|
* @param flags Additional flags about how the object should be written.
|
||||||
|
*/
|
||||||
|
public void writeToParcel(Parcel outParcel, int flags) {
|
||||||
|
outParcel.writeInt(mPhoneId);
|
||||||
|
outParcel.writeInt(mRadioAccessFamily);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implement the Parcelable interface.
|
||||||
|
*/
|
||||||
|
public static final Creator<RadioAccessFamily> CREATOR =
|
||||||
|
new Creator<RadioAccessFamily>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RadioAccessFamily createFromParcel(Parcel in) {
|
||||||
|
int phoneId = in.readInt();
|
||||||
|
int radioAccessFamily = in.readInt();
|
||||||
|
|
||||||
|
return new RadioAccessFamily(phoneId, radioAccessFamily);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RadioAccessFamily[] newArray(int size) {
|
||||||
|
return new RadioAccessFamily[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -21,6 +21,7 @@ import android.os.Bundle;
|
|||||||
import android.telephony.CellInfo;
|
import android.telephony.CellInfo;
|
||||||
import android.telephony.IccOpenLogicalChannelResponse;
|
import android.telephony.IccOpenLogicalChannelResponse;
|
||||||
import android.telephony.NeighboringCellInfo;
|
import android.telephony.NeighboringCellInfo;
|
||||||
|
import android.telephony.RadioAccessFamily;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -813,4 +814,21 @@ interface ITelephony {
|
|||||||
* Shutdown Mobile Radios
|
* Shutdown Mobile Radios
|
||||||
*/
|
*/
|
||||||
void shutdownMobileRadios();
|
void shutdownMobileRadios();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set phone radio type and access technology.
|
||||||
|
*
|
||||||
|
* @param rafs an RadioAccessFamily array to indicate all phone's
|
||||||
|
* new radio access family. The length of RadioAccessFamily
|
||||||
|
* must equ]]al to phone count.
|
||||||
|
*/
|
||||||
|
void setRadioCapability(in RadioAccessFamily[] rafs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get phone radio type and access technology.
|
||||||
|
*
|
||||||
|
* @param phoneId which phone you want to get
|
||||||
|
* @return phone radio type and access technology
|
||||||
|
*/
|
||||||
|
int getRadioAccessFamily(in int phoneId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,8 +291,8 @@ cat include/telephony/ril.h | \
|
|||||||
int RIL_REQUEST_SET_DC_RT_INFO_RATE = 127;
|
int RIL_REQUEST_SET_DC_RT_INFO_RATE = 127;
|
||||||
int RIL_REQUEST_SET_DATA_PROFILE = 128;
|
int RIL_REQUEST_SET_DATA_PROFILE = 128;
|
||||||
int RIL_REQUEST_SHUTDOWN = 129;
|
int RIL_REQUEST_SHUTDOWN = 129;
|
||||||
int RIL_REQUEST_GET_3G_CAPABILITY = 130;
|
int RIL_REQUEST_GET_RADIO_CAPABILITY = 130;
|
||||||
int RIL_REQUEST_SET_3G_CAPABILITY = 131;
|
int RIL_REQUEST_SET_RADIO_CAPABILITY = 131;
|
||||||
|
|
||||||
int RIL_UNSOL_RESPONSE_BASE = 1000;
|
int RIL_UNSOL_RESPONSE_BASE = 1000;
|
||||||
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;
|
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;
|
||||||
@@ -336,4 +336,6 @@ cat include/telephony/ril.h | \
|
|||||||
int RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED = 1038;
|
int RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED = 1038;
|
||||||
int RIL_UNSOL_SRVCC_STATE_NOTIFY = 1039;
|
int RIL_UNSOL_SRVCC_STATE_NOTIFY = 1039;
|
||||||
int RIL_UNSOL_HARDWARE_CONFIG_CHANGED = 1040;
|
int RIL_UNSOL_HARDWARE_CONFIG_CHANGED = 1040;
|
||||||
|
int RIL_UNSOL_DC_RT_INFO_CHANGED = 1041;
|
||||||
|
int RIL_UNSOL_RADIO_CAPABILITY = 1042;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,4 +401,23 @@ public class TelephonyIntents {
|
|||||||
*/
|
*/
|
||||||
public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
|
public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
|
||||||
= "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED";
|
= "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Broadcast Action: An attempt to set phone radio type and access technology has changed.
|
||||||
|
* This has the following extra values:
|
||||||
|
* <ul>
|
||||||
|
* <li><em>phones radio access family </em> - A RadioAccessFamily
|
||||||
|
* array, contain phone ID and new radio access family for each phone.</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
public static final String ACTION_SET_RADIO_CAPABILITY_DONE =
|
||||||
|
"android.intent.action.ACTION_SET_RADIO_CAPABILITY_DONE";
|
||||||
|
|
||||||
|
public static final String EXTRA_RADIO_ACCESS_FAMILY = "rafs";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Broadcast Action: An attempt to set phone radio access family has failed.
|
||||||
|
*/
|
||||||
|
public static final String ACTION_SET_RADIO_CAPABILITY_FAILED =
|
||||||
|
"android.intent.action.ACTION_SET_RADIO_CAPABILITY_FAILED";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user