Merge "Add onPreProvisioningRecevied to RcsProvisioningCallback"
This commit is contained in:
@@ -11542,6 +11542,7 @@ package android.telephony.ims {
|
||||
method public void onAutoConfigurationErrorReceived(int, @NonNull String);
|
||||
method public void onConfigurationChanged(@NonNull byte[]);
|
||||
method public void onConfigurationReset();
|
||||
method public void onPreProvisioningReceived(@NonNull byte[]);
|
||||
method public void onRemoved();
|
||||
}
|
||||
|
||||
@@ -12011,6 +12012,7 @@ package android.telephony.ims.stub {
|
||||
method public int getConfigInt(int);
|
||||
method public String getConfigString(int);
|
||||
method public final void notifyAutoConfigurationErrorReceived(int, @NonNull String);
|
||||
method public final void notifyPreProvisioningReceived(@NonNull byte[]);
|
||||
method public final void notifyProvisionedValueChanged(int, int);
|
||||
method public final void notifyProvisionedValueChanged(int, String);
|
||||
method public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean);
|
||||
|
||||
@@ -993,6 +993,16 @@ public class ProvisioningManager {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreProvisioningReceived(byte[] configXml) {
|
||||
final long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mExecutor.execute(() -> mLocalCallback.onPreProvisioningReceived(configXml));
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
|
||||
private void setExecutor(Executor executor) {
|
||||
mExecutor = executor;
|
||||
}
|
||||
@@ -1005,7 +1015,7 @@ public class ProvisioningManager {
|
||||
* due to various triggers defined in GSMA RCC.14 for ACS(auto configuration
|
||||
* server) or other operator defined triggers. If RCS provisioning is already
|
||||
* completed at the time of callback registration, then this method shall be
|
||||
* invoked with the current configuration
|
||||
* invoked with the current configuration.
|
||||
* @param configXml The RCS configuration XML received by OTA. It is defined
|
||||
* by GSMA RCC.07.
|
||||
*/
|
||||
@@ -1038,6 +1048,20 @@ public class ProvisioningManager {
|
||||
*/
|
||||
public void onRemoved() {}
|
||||
|
||||
/**
|
||||
* Some carriers using ACS (auto configuration server) may send a carrier-specific
|
||||
* pre-provisioning configuration XML if the user has not been provisioned for RCS
|
||||
* services yet. When this provisioning XML is received, the framework will move
|
||||
* into a "not provisioned" state for RCS. In order for provisioning to proceed,
|
||||
* the application must parse this configuration XML and perform the carrier specific
|
||||
* opt-in flow for RCS services. If the user accepts, {@link #triggerRcsReconfiguration}
|
||||
* must be called in order for the device to move out of this state and try to fetch
|
||||
* the RCS provisioning information.
|
||||
*
|
||||
* @param configXml the pre-provisioning config in carrier specified format.
|
||||
*/
|
||||
public void onPreProvisioningReceived(@NonNull byte[] configXml) {}
|
||||
|
||||
/**@hide*/
|
||||
public final IRcsConfigCallback getBinder() {
|
||||
return mBinder;
|
||||
|
||||
@@ -25,5 +25,6 @@ oneway interface IRcsConfigCallback {
|
||||
void onAutoConfigurationErrorReceived(int errorCode, String errorString);
|
||||
void onConfigurationReset();
|
||||
void onRemoved();
|
||||
void onPreProvisioningReceived(in byte[] config);
|
||||
}
|
||||
|
||||
|
||||
@@ -542,11 +542,34 @@ public class ImsConfigImplBase {
|
||||
}
|
||||
mRcsCallbacks.broadcastAction(c -> {
|
||||
try {
|
||||
//TODO compressed by default?
|
||||
c.onAutoConfigurationErrorReceived(errorCode, errorString);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "dead binder in notifyAutoConfigurationErrorReceived, skipping.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies application that pre-provisioning config is received.
|
||||
*
|
||||
* <p>Some carriers using ACS (auto configuration server) may send a carrier-specific
|
||||
* pre-provisioning configuration XML if the user has not been provisioned for RCS
|
||||
* services yet. When such provisioning XML is received, ACS client must call this
|
||||
* method to notify the application with the XML.
|
||||
*
|
||||
* @param configXml the pre-provisioning config in carrier specified format.
|
||||
*/
|
||||
public final void notifyPreProvisioningReceived(@NonNull byte[] configXml) {
|
||||
// can be null in testing
|
||||
if (mRcsCallbacks == null) {
|
||||
return;
|
||||
}
|
||||
mRcsCallbacks.broadcastAction(c -> {
|
||||
try {
|
||||
c.onPreProvisioningReceived(configXml);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "dead binder in notifyPreProvisioningReceived, skipping.");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user