Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a812488b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Catch ServiceSpecificExceptions properly when getting reg state/...

Merge "Catch ServiceSpecificExceptions properly when getting reg state/ transport type" into sc-dev am: 369f574b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15263378

Change-Id: I0e8d427bbddcd0a3abb793f6ef19846bc6b2e169
parents 4ad6cb08 369f574b
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.feature.ImsFeature;
import android.telephony.ims.feature.MmTelFeature;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.IIntegerConsumer;
@@ -447,8 +448,9 @@ public class ImsMmTelManager implements RegistrationManager {
                    executor.execute(() -> stateCallback.accept(result));
                }
            });
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        } catch (ServiceSpecificException | RemoteException e) {
            Log.w("ImsMmTelManager", "Error getting registration state: " + e);
            executor.execute(() -> stateCallback.accept(REGISTRATION_STATE_NOT_REGISTERED));
        }
    }

@@ -488,8 +490,10 @@ public class ImsMmTelManager implements RegistrationManager {
                            executor.execute(() -> transportTypeCallback.accept(result));
                        }
                    });
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        } catch (ServiceSpecificException | RemoteException e) {
            Log.w("ImsMmTelManager", "Error getting transport type: " + e);
            executor.execute(() -> transportTypeCallback.accept(
                    AccessNetworkConstants.TRANSPORT_TYPE_INVALID));
        }
    }

+8 −4
Original line number Diff line number Diff line
@@ -302,8 +302,10 @@ public class ImsRcsManager {
                    executor.execute(() -> stateCallback.accept(result));
                }
            });
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        } catch (ServiceSpecificException | RemoteException e) {
            Log.w(TAG, "Get registration state error: " + e);
            executor.execute(() -> stateCallback.accept(
                    RegistrationManager.REGISTRATION_STATE_NOT_REGISTERED));
        }
    }

@@ -346,8 +348,10 @@ public class ImsRcsManager {
                            executor.execute(() -> transportTypeCallback.accept(result));
                        }
                    });
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        } catch (ServiceSpecificException | RemoteException e) {
            Log.w(TAG, "Get registration transport type error: " + e);
            executor.execute(() -> transportTypeCallback.accept(
                    AccessNetworkConstants.TRANSPORT_TYPE_INVALID));
        }
    }