Loading core/api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -12520,6 +12520,7 @@ package android.telephony.data { method public final int getSlotIndex(); method public final void notifyApnUnthrottled(@NonNull String); method public final void notifyDataCallListChanged(java.util.List<android.telephony.data.DataCallResponse>); method public final void notifyDataProfileUnthrottled(@NonNull android.telephony.data.DataProfile); method public void requestDataCallList(@NonNull android.telephony.data.DataServiceCallback); method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback); method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback); Loading @@ -12530,6 +12531,7 @@ package android.telephony.data { public class DataServiceCallback { method public void onApnUnthrottled(@NonNull String); method public void onDataCallListChanged(@NonNull java.util.List<android.telephony.data.DataCallResponse>); method public void onDataProfileUnthrottled(@NonNull android.telephony.data.DataProfile); method public void onDeactivateDataCallComplete(int); method public void onRequestDataCallListComplete(int, @NonNull java.util.List<android.telephony.data.DataCallResponse>); method public void onSetDataProfileComplete(int); telephony/java/android/telephony/data/DataService.java +29 −2 Original line number Diff line number Diff line Loading @@ -401,6 +401,21 @@ public abstract class DataService extends Service { } } /** * Notify the system that a given DataProfile was unthrottled. * * @param dataProfile DataProfile associated with an APN returned from the modem */ public final void notifyDataProfileUnthrottled(@NonNull DataProfile dataProfile) { synchronized (mApnUnthrottledCallbacks) { for (IDataServiceCallback callback : mApnUnthrottledCallbacks) { mHandler.obtainMessage(DATA_SERVICE_INDICATION_APN_UNTHROTTLED, mSlotIndex, 0, new ApnUnthrottledIndication(dataProfile, callback)).sendToTarget(); } } } /** * Called when the instance of data service is destroyed (e.g. got unbind or binder died) * or when the data service provider is removed. The extended class should implement this Loading Loading @@ -496,13 +511,20 @@ public abstract class DataService extends Service { } private static final class ApnUnthrottledIndication { public final DataProfile dataProfile; public final String apn; public final IDataServiceCallback callback; ApnUnthrottledIndication(String apn, IDataServiceCallback callback) { this.dataProfile = null; this.apn = apn; this.callback = callback; } ApnUnthrottledIndication(DataProfile dataProfile, IDataServiceCallback callback) { this.dataProfile = dataProfile; this.apn = null; this.callback = callback; } } private class DataServiceHandler extends Handler { Loading Loading @@ -636,8 +658,13 @@ public abstract class DataService extends Service { ApnUnthrottledIndication apnUnthrottledIndication = (ApnUnthrottledIndication) message.obj; try { if (apnUnthrottledIndication.dataProfile != null) { apnUnthrottledIndication.callback .onDataProfileUnthrottled(apnUnthrottledIndication.dataProfile); } else { apnUnthrottledIndication.callback .onApnUnthrottled(apnUnthrottledIndication.apn); } } catch (RemoteException e) { loge("Failed to call onApnUnthrottled. " + e); } Loading telephony/java/android/telephony/data/DataServiceCallback.java +25 −2 Original line number Diff line number Diff line Loading @@ -260,8 +260,8 @@ public class DataServiceCallback { /** * Unthrottles the APN on the current transport. There is no matching "APN throttle" method. * Instead, the APN is throttled for the time specified in * {@link DataCallResponse#getRetryDurationMillis}. * Instead, the APN is throttled when {@link IDataService#setupDataCall} fails within * the time specified by {@link DataCallResponse#getRetryDurationMillis}. * <p/> * see: {@link DataCallResponse#getRetryDurationMillis} * Loading @@ -279,4 +279,27 @@ public class DataServiceCallback { Rlog.e(TAG, "onApnUnthrottled: callback is null!"); } } /** * Unthrottles the DataProfile on the current transport. * There is no matching "DataProfile throttle" method. * Instead, the DataProfile is throttled when {@link IDataService#setupDataCall} fails within * the time specified by {@link DataCallResponse#getRetryDurationMillis}. * <p/> * see: {@link DataCallResponse#getRetryDurationMillis} * * @param dataProfile DataProfile containing the APN to be throttled */ public void onDataProfileUnthrottled(final @NonNull DataProfile dataProfile) { if (mCallback != null) { try { if (DBG) Rlog.d(TAG, "onDataProfileUnthrottled"); mCallback.onDataProfileUnthrottled(dataProfile); } catch (RemoteException e) { Rlog.e(TAG, "onDataProfileUnthrottled: remote exception", e); } } else { Rlog.e(TAG, "onDataProfileUnthrottled: callback is null!"); } } } telephony/java/android/telephony/data/IDataServiceCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.telephony.data; import android.telephony.data.DataCallResponse; import android.telephony.data.DataProfile; /** * The call back interface Loading @@ -33,4 +34,5 @@ oneway interface IDataServiceCallback void onHandoverStarted(int result); void onHandoverCancelled(int result); void onApnUnthrottled(in String apn); void onDataProfileUnthrottled(in DataProfile dp); } Loading
core/api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -12520,6 +12520,7 @@ package android.telephony.data { method public final int getSlotIndex(); method public final void notifyApnUnthrottled(@NonNull String); method public final void notifyDataCallListChanged(java.util.List<android.telephony.data.DataCallResponse>); method public final void notifyDataProfileUnthrottled(@NonNull android.telephony.data.DataProfile); method public void requestDataCallList(@NonNull android.telephony.data.DataServiceCallback); method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback); method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback); Loading @@ -12530,6 +12531,7 @@ package android.telephony.data { public class DataServiceCallback { method public void onApnUnthrottled(@NonNull String); method public void onDataCallListChanged(@NonNull java.util.List<android.telephony.data.DataCallResponse>); method public void onDataProfileUnthrottled(@NonNull android.telephony.data.DataProfile); method public void onDeactivateDataCallComplete(int); method public void onRequestDataCallListComplete(int, @NonNull java.util.List<android.telephony.data.DataCallResponse>); method public void onSetDataProfileComplete(int);
telephony/java/android/telephony/data/DataService.java +29 −2 Original line number Diff line number Diff line Loading @@ -401,6 +401,21 @@ public abstract class DataService extends Service { } } /** * Notify the system that a given DataProfile was unthrottled. * * @param dataProfile DataProfile associated with an APN returned from the modem */ public final void notifyDataProfileUnthrottled(@NonNull DataProfile dataProfile) { synchronized (mApnUnthrottledCallbacks) { for (IDataServiceCallback callback : mApnUnthrottledCallbacks) { mHandler.obtainMessage(DATA_SERVICE_INDICATION_APN_UNTHROTTLED, mSlotIndex, 0, new ApnUnthrottledIndication(dataProfile, callback)).sendToTarget(); } } } /** * Called when the instance of data service is destroyed (e.g. got unbind or binder died) * or when the data service provider is removed. The extended class should implement this Loading Loading @@ -496,13 +511,20 @@ public abstract class DataService extends Service { } private static final class ApnUnthrottledIndication { public final DataProfile dataProfile; public final String apn; public final IDataServiceCallback callback; ApnUnthrottledIndication(String apn, IDataServiceCallback callback) { this.dataProfile = null; this.apn = apn; this.callback = callback; } ApnUnthrottledIndication(DataProfile dataProfile, IDataServiceCallback callback) { this.dataProfile = dataProfile; this.apn = null; this.callback = callback; } } private class DataServiceHandler extends Handler { Loading Loading @@ -636,8 +658,13 @@ public abstract class DataService extends Service { ApnUnthrottledIndication apnUnthrottledIndication = (ApnUnthrottledIndication) message.obj; try { if (apnUnthrottledIndication.dataProfile != null) { apnUnthrottledIndication.callback .onDataProfileUnthrottled(apnUnthrottledIndication.dataProfile); } else { apnUnthrottledIndication.callback .onApnUnthrottled(apnUnthrottledIndication.apn); } } catch (RemoteException e) { loge("Failed to call onApnUnthrottled. " + e); } Loading
telephony/java/android/telephony/data/DataServiceCallback.java +25 −2 Original line number Diff line number Diff line Loading @@ -260,8 +260,8 @@ public class DataServiceCallback { /** * Unthrottles the APN on the current transport. There is no matching "APN throttle" method. * Instead, the APN is throttled for the time specified in * {@link DataCallResponse#getRetryDurationMillis}. * Instead, the APN is throttled when {@link IDataService#setupDataCall} fails within * the time specified by {@link DataCallResponse#getRetryDurationMillis}. * <p/> * see: {@link DataCallResponse#getRetryDurationMillis} * Loading @@ -279,4 +279,27 @@ public class DataServiceCallback { Rlog.e(TAG, "onApnUnthrottled: callback is null!"); } } /** * Unthrottles the DataProfile on the current transport. * There is no matching "DataProfile throttle" method. * Instead, the DataProfile is throttled when {@link IDataService#setupDataCall} fails within * the time specified by {@link DataCallResponse#getRetryDurationMillis}. * <p/> * see: {@link DataCallResponse#getRetryDurationMillis} * * @param dataProfile DataProfile containing the APN to be throttled */ public void onDataProfileUnthrottled(final @NonNull DataProfile dataProfile) { if (mCallback != null) { try { if (DBG) Rlog.d(TAG, "onDataProfileUnthrottled"); mCallback.onDataProfileUnthrottled(dataProfile); } catch (RemoteException e) { Rlog.e(TAG, "onDataProfileUnthrottled: remote exception", e); } } else { Rlog.e(TAG, "onDataProfileUnthrottled: callback is null!"); } } }
telephony/java/android/telephony/data/IDataServiceCallback.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.telephony.data; import android.telephony.data.DataCallResponse; import android.telephony.data.DataProfile; /** * The call back interface Loading @@ -33,4 +34,5 @@ oneway interface IDataServiceCallback void onHandoverStarted(int result); void onHandoverCancelled(int result); void onApnUnthrottled(in String apn); void onDataProfileUnthrottled(in DataProfile dp); }