Loading telephony/java/android/telephony/ims/ProvisioningManager.java +0 −22 Original line number Diff line number Diff line Loading @@ -26,8 +26,6 @@ import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.WorkerThread; import android.content.Context; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.os.Binder; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -376,10 +374,6 @@ public class ProvisioningManager { @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull @CallbackExecutor Executor executor, @NonNull Callback callback) throws ImsException { if (!isImsAvailableOnDevice()) { throw new ImsException("IMS not available on device.", ImsException.CODE_ERROR_UNSUPPORTED_OPERATION); } callback.setExecutor(executor); try { getITelephony().registerImsProvisioningChangedCallback(mSubId, callback.getBinder()); Loading Loading @@ -612,22 +606,6 @@ public class ProvisioningManager { } private static boolean isImsAvailableOnDevice() { IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); if (pm == null) { // For some reason package manger is not available.. This will fail internally anyways, // so do not throw error and allow. return true; } try { return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_IMS, 0); } catch (RemoteException e) { // For some reason package manger is not available.. This will fail internally anyways, // so do not throw error and allow. } return true; } private static ITelephony getITelephony() { ITelephony binder = ITelephony.Stub.asInterface( ServiceManager.getService(Context.TELEPHONY_SERVICE)); Loading Loading
telephony/java/android/telephony/ims/ProvisioningManager.java +0 −22 Original line number Diff line number Diff line Loading @@ -26,8 +26,6 @@ import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.WorkerThread; import android.content.Context; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.os.Binder; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -376,10 +374,6 @@ public class ProvisioningManager { @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull @CallbackExecutor Executor executor, @NonNull Callback callback) throws ImsException { if (!isImsAvailableOnDevice()) { throw new ImsException("IMS not available on device.", ImsException.CODE_ERROR_UNSUPPORTED_OPERATION); } callback.setExecutor(executor); try { getITelephony().registerImsProvisioningChangedCallback(mSubId, callback.getBinder()); Loading Loading @@ -612,22 +606,6 @@ public class ProvisioningManager { } private static boolean isImsAvailableOnDevice() { IPackageManager pm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); if (pm == null) { // For some reason package manger is not available.. This will fail internally anyways, // so do not throw error and allow. return true; } try { return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY_IMS, 0); } catch (RemoteException e) { // For some reason package manger is not available.. This will fail internally anyways, // so do not throw error and allow. } return true; } private static ITelephony getITelephony() { ITelephony binder = ITelephony.Stub.asInterface( ServiceManager.getService(Context.TELEPHONY_SERVICE)); Loading