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

Commit e8005ed1 authored by Willy Hu's avatar Willy Hu Committed by Automerger Merge Worker
Browse files

[ImsService] Support to trigger bugreport when IMS service crash am: e51504e7

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1512715

Change-Id: I262635468eca05b1a3ee7158b348bae0aa4a3b76
parents 1e54fd45 e51504e7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.os.IInterface;
import android.os.RemoteException;
import android.os.UserHandle;
import android.permission.PermissionManager;
import android.telephony.AnomalyReporter;
import android.telephony.ims.ImsService;
import android.telephony.ims.aidl.IImsConfig;
import android.telephony.ims.aidl.IImsRegistration;
@@ -48,6 +49,7 @@ import java.io.PrintWriter;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.stream.Collectors;

@@ -66,7 +68,7 @@ import java.util.stream.Collectors;
 * called for each feature that is created/removed.
 */
public class ImsServiceController {

    private final UUID mAnomalyUUID = UUID.fromString("e93b05e4-6d0a-4755-a6da-a2d2dbfb10d6");
    class ImsServiceConnection implements ServiceConnection {
        // Track the status of whether or not the Service has died in case we need to permanently
        // unbind (see onNullBinding below).
@@ -116,6 +118,9 @@ public class ImsServiceController {
            mLocalLog.log("onServiceDisconnected");
            Log.w(LOG_TAG, "ImsService(" + name + "): onServiceDisconnected. Waiting...");
            // Service disconnected, but we are still technically bound. Waiting for reconnect.

            String message = "IMS Service Crashed";
            AnomalyReporter.reportAnomaly(mAnomalyUUID, message);
        }

        @Override