Merge "Rename ANS to ONS"
This commit is contained in:
@@ -553,7 +553,7 @@ java_defaults {
|
|||||||
"telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl",
|
"telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl",
|
||||||
"telephony/java/com/android/internal/telephony/ISms.aidl",
|
"telephony/java/com/android/internal/telephony/ISms.aidl",
|
||||||
"telephony/java/com/android/internal/telephony/ISub.aidl",
|
"telephony/java/com/android/internal/telephony/ISub.aidl",
|
||||||
"telephony/java/com/android/internal/telephony/IAns.aidl",
|
"telephony/java/com/android/internal/telephony/IOns.aidl",
|
||||||
"telephony/java/com/android/internal/telephony/ITelephony.aidl",
|
"telephony/java/com/android/internal/telephony/ITelephony.aidl",
|
||||||
"telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl",
|
"telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl",
|
||||||
"telephony/java/com/android/internal/telephony/IWapPushManager.aidl",
|
"telephony/java/com/android/internal/telephony/IWapPushManager.aidl",
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ import com.android.ims.internal.IImsServiceFeatureCallback;
|
|||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.telecom.ITelecomService;
|
import com.android.internal.telecom.ITelecomService;
|
||||||
import com.android.internal.telephony.CellNetworkScanResult;
|
import com.android.internal.telephony.CellNetworkScanResult;
|
||||||
import com.android.internal.telephony.IAns;
|
|
||||||
import com.android.internal.telephony.INumberVerificationCallback;
|
import com.android.internal.telephony.INumberVerificationCallback;
|
||||||
|
import com.android.internal.telephony.IOns;
|
||||||
import com.android.internal.telephony.IPhoneSubInfo;
|
import com.android.internal.telephony.IPhoneSubInfo;
|
||||||
import com.android.internal.telephony.ITelephony;
|
import com.android.internal.telephony.ITelephony;
|
||||||
import com.android.internal.telephony.ITelephonyRegistry;
|
import com.android.internal.telephony.ITelephonyRegistry;
|
||||||
@@ -4624,8 +4624,8 @@ public class TelephonyManager {
|
|||||||
return ITelephonyRegistry.Stub.asInterface(ServiceManager.getService("telephony.registry"));
|
return ITelephonyRegistry.Stub.asInterface(ServiceManager.getService("telephony.registry"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private IAns getIAns() {
|
private IOns getIOns() {
|
||||||
return IAns.Stub.asInterface(ServiceManager.getService("ians"));
|
return IOns.Stub.asInterface(ServiceManager.getService("ions"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -9284,10 +9284,10 @@ public class TelephonyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable AlternativeNetworkService.
|
* Enable or disable OpportunisticNetworkService.
|
||||||
*
|
*
|
||||||
* This method should be called to enable or disable
|
* This method should be called to enable or disable
|
||||||
* AlternativeNetwork service on the device.
|
* OpportunisticNetwork service on the device.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Requires Permission:
|
* Requires Permission:
|
||||||
@@ -9298,25 +9298,25 @@ public class TelephonyManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
||||||
public boolean setAlternativeNetworkState(boolean enable) {
|
public boolean setOpportunisticNetworkState(boolean enable) {
|
||||||
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
||||||
boolean ret = false;
|
boolean ret = false;
|
||||||
try {
|
try {
|
||||||
IAns iAlternativeNetworkService = getIAns();
|
IOns iOpportunisticNetworkService = getIOns();
|
||||||
if (iAlternativeNetworkService != null) {
|
if (iOpportunisticNetworkService != null) {
|
||||||
ret = iAlternativeNetworkService.setEnable(enable, pkgForDebug);
|
ret = iOpportunisticNetworkService.setEnable(enable, pkgForDebug);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Rlog.e(TAG, "enableAlternativeNetwork RemoteException", ex);
|
Rlog.e(TAG, "enableOpportunisticNetwork RemoteException", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is AlternativeNetworkService enabled
|
* is OpportunisticNetworkService enabled
|
||||||
*
|
*
|
||||||
* This method should be called to determine if the AlternativeNetworkService is
|
* This method should be called to determine if the OpportunisticNetworkService is
|
||||||
* enabled
|
* enabled
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
@@ -9325,17 +9325,17 @@ public class TelephonyManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
public boolean isAlternativeNetworkEnabled() {
|
public boolean isOpportunisticNetworkEnabled() {
|
||||||
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
||||||
boolean isEnabled = false;
|
boolean isEnabled = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
IAns iAlternativeNetworkService = getIAns();
|
IOns iOpportunisticNetworkService = getIOns();
|
||||||
if (iAlternativeNetworkService != null) {
|
if (iOpportunisticNetworkService != null) {
|
||||||
isEnabled = iAlternativeNetworkService.isEnabled(pkgForDebug);
|
isEnabled = iOpportunisticNetworkService.isEnabled(pkgForDebug);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Rlog.e(TAG, "enableAlternativeNetwork RemoteException", ex);
|
Rlog.e(TAG, "enableOpportunisticNetwork RemoteException", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return isEnabled;
|
return isEnabled;
|
||||||
@@ -9690,9 +9690,9 @@ public class TelephonyManager {
|
|||||||
public boolean setPreferredOpportunisticDataSubscription(int subId) {
|
public boolean setPreferredOpportunisticDataSubscription(int subId) {
|
||||||
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
||||||
try {
|
try {
|
||||||
IAns iAlternativeNetworkService = getIAns();
|
IOns iOpportunisticNetworkService = getIOns();
|
||||||
if (iAlternativeNetworkService != null) {
|
if (iOpportunisticNetworkService != null) {
|
||||||
return iAlternativeNetworkService.setPreferredData(subId, pkgForDebug);
|
return iOpportunisticNetworkService.setPreferredData(subId, pkgForDebug);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Rlog.e(TAG, "setPreferredData RemoteException", ex);
|
Rlog.e(TAG, "setPreferredData RemoteException", ex);
|
||||||
@@ -9714,9 +9714,9 @@ public class TelephonyManager {
|
|||||||
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
||||||
int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||||
try {
|
try {
|
||||||
IAns iAlternativeNetworkService = getIAns();
|
IOns iOpportunisticNetworkService = getIOns();
|
||||||
if (iAlternativeNetworkService != null) {
|
if (iOpportunisticNetworkService != null) {
|
||||||
subId = iAlternativeNetworkService.getPreferredData(pkgForDebug);
|
subId = iOpportunisticNetworkService.getPreferredData(pkgForDebug);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Rlog.e(TAG, "getPreferredData RemoteException", ex);
|
Rlog.e(TAG, "getPreferredData RemoteException", ex);
|
||||||
@@ -9727,8 +9727,8 @@ public class TelephonyManager {
|
|||||||
/**
|
/**
|
||||||
* Update availability of a list of networks in the current location.
|
* Update availability of a list of networks in the current location.
|
||||||
*
|
*
|
||||||
* This api should be called to inform AlternativeNetwork Service about the availability
|
* This api should be called to inform OpportunisticNetwork Service about the availability
|
||||||
* of a network at the current location. This information will be used by AlternativeNetwork
|
* of a network at the current location. This information will be used by OpportunisticNetwork
|
||||||
* service to decide to attach to the network opportunistically. If an empty list is passed,
|
* service to decide to attach to the network opportunistically. If an empty list is passed,
|
||||||
* it is assumed that no network is available.
|
* it is assumed that no network is available.
|
||||||
* Requires that the calling app has carrier privileges on both primary and
|
* Requires that the calling app has carrier privileges on both primary and
|
||||||
@@ -9743,9 +9743,9 @@ public class TelephonyManager {
|
|||||||
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
||||||
boolean ret = false;
|
boolean ret = false;
|
||||||
try {
|
try {
|
||||||
IAns iAlternativeNetworkService = getIAns();
|
IOns iOpportunisticNetworkService = getIOns();
|
||||||
if (iAlternativeNetworkService != null) {
|
if (iOpportunisticNetworkService != null) {
|
||||||
ret = iAlternativeNetworkService.updateAvailableNetworks(availableNetworks,
|
ret = iOpportunisticNetworkService.updateAvailableNetworks(availableNetworks,
|
||||||
pkgForDebug);
|
pkgForDebug);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ package com.android.internal.telephony;
|
|||||||
|
|
||||||
import android.telephony.AvailableNetworkInfo;
|
import android.telephony.AvailableNetworkInfo;
|
||||||
|
|
||||||
interface IAns {
|
interface IOns {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable Alternative Network service.
|
* Enable or disable Opportunistic Network service.
|
||||||
*
|
*
|
||||||
* This method should be called to enable or disable
|
* This method should be called to enable or disable
|
||||||
* AlternativeNetwork service on the device.
|
* OpportunisticNetwork service on the device.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Requires Permission:
|
* Requires Permission:
|
||||||
@@ -38,9 +38,9 @@ interface IAns {
|
|||||||
boolean setEnable(boolean enable, String callingPackage);
|
boolean setEnable(boolean enable, String callingPackage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is Alternative Network service enabled
|
* is Opportunistic Network service enabled
|
||||||
*
|
*
|
||||||
* This method should be called to determine if the Alternative Network service is enabled
|
* This method should be called to determine if the Opportunistic Network service is enabled
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Requires Permission:
|
* Requires Permission:
|
||||||
@@ -84,7 +84,7 @@ interface IAns {
|
|||||||
* Update availability of a list of networks in the current location.
|
* Update availability of a list of networks in the current location.
|
||||||
*
|
*
|
||||||
* This api should be called if the caller is aware of the availability of a network
|
* This api should be called if the caller is aware of the availability of a network
|
||||||
* at the current location. This information will be used by AlternativeNetwork service
|
* at the current location. This information will be used by OpportunisticNetwork service
|
||||||
* to decide to attach to the network. If an empty list is passed,
|
* to decide to attach to the network. If an empty list is passed,
|
||||||
* it is assumed that no network is available.
|
* it is assumed that no network is available.
|
||||||
* Requires that the calling app has carrier privileges on both primary and
|
* Requires that the calling app has carrier privileges on both primary and
|
||||||
Reference in New Issue
Block a user