use of com.voipgrid.vialer.api.models.UseEncryption in project vialer-android by VoIPGRID.
the class UpdateHelper method enableSecureCalling.
/**
* Migrate secure calling permissions to use secure calling by default.
* V5_2
*/
private void enableSecureCalling() {
AccountHelper accountHelper = new AccountHelper(mContext);
Api mApi = ServiceGenerator.createService(mContext, Api.class, mContext.getString(R.string.api_url), accountHelper.getEmail(), accountHelper.getPassword());
Call<UseEncryption> call = mApi.useEncryption(new UseEncryption(true));
try {
Response response = call.execute();
if (!response.isSuccessful()) {
handleApiFailure(response.code());
}
} catch (IOException e) {
handleApiFailure(0);
}
}
Aggregations