Merge "Remove deprecated entitlement API" am: 2adc944732 am: 74b3b60b76
am: 3baef16087
Change-Id: I6bb5611de8d45e9a5c17128ea38ba1bdd8f86ac2
This commit is contained in:
@@ -2815,23 +2815,6 @@ public class ConnectivityManager {
|
||||
void onTetheringEntitlementResult(@EntitlementResultCode int resultCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed
|
||||
* @deprecated This API would be removed when all of caller has been updated.
|
||||
* */
|
||||
@Deprecated
|
||||
public abstract static class TetheringEntitlementValueListener {
|
||||
/**
|
||||
* Called to notify entitlement result.
|
||||
*
|
||||
* @param resultCode a int value of entitlement result. It may be one of
|
||||
* {@link #TETHER_ERROR_NO_ERROR},
|
||||
* {@link #TETHER_ERROR_PROVISION_FAILED}, or
|
||||
* {@link #TETHER_ERROR_ENTITLEMENT_UNKONWN}.
|
||||
*/
|
||||
public void onEntitlementResult(int resultCode) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last value of the entitlement check on this downstream. If the cached value is
|
||||
* {@link #TETHER_ERROR_NO_ERROR} or showEntitlementUi argument is false, it just return the
|
||||
@@ -2877,31 +2860,6 @@ public class ConnectivityManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed
|
||||
* @deprecated This API would be removed when all of caller has been updated.
|
||||
* */
|
||||
@Deprecated
|
||||
public void getLatestTetheringEntitlementValue(int type, boolean showEntitlementUi,
|
||||
@NonNull final TetheringEntitlementValueListener listener, @Nullable Handler handler) {
|
||||
Preconditions.checkNotNull(listener, "TetheringEntitlementValueListener cannot be null.");
|
||||
ResultReceiver wrappedListener = new ResultReceiver(handler) {
|
||||
@Override
|
||||
protected void onReceiveResult(int resultCode, Bundle resultData) {
|
||||
listener.onEntitlementResult(resultCode);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
String pkgName = mContext.getOpPackageName();
|
||||
Log.i(TAG, "getLatestTetheringEntitlementValue:" + pkgName);
|
||||
mService.getLatestTetheringEntitlementResult(type, wrappedListener,
|
||||
showEntitlementUi, pkgName);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Report network connectivity status. This is currently used only
|
||||
* to alter status bar UI.
|
||||
|
||||
Reference in New Issue
Block a user