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

Commit ca1bdcfd authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Revert "Added constructor with looper param for OnSubscriptionsChangedListener"

This reverts commit 831e401c.

Not needed now since tests create HandlerThread

BUG=25691379
Change-Id: Ic0ac3e3ef3c717fd31acb5fc8d6d81cc9995a2f7
parent 831e401c
Loading
Loading
Loading
Loading
+2 −27
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Looper;
import android.telephony.Rlog;
import android.os.Handler;
import android.os.Message;
@@ -348,31 +347,7 @@ public class SubscriptionManager {
     * for #onSubscriptionsChanged to be invoked.
     */
    public static class OnSubscriptionsChangedListener {
        private final Handler mHandler;

        public OnSubscriptionsChangedListener() {
            mHandler = new OnSubscriptionsChangedListenerHandler();
        }

        /**
         * Contructor that takes in looper as parameter in case a subclass/instantiation needs
         * to use a specific looper (like in tests where mainLooper may need to be used).
         * @param looper Looper to be used for mHandler
         * @hide
         */
        protected OnSubscriptionsChangedListener(Looper looper) {
            mHandler = new OnSubscriptionsChangedListenerHandler(looper);
        }

        private class OnSubscriptionsChangedListenerHandler extends Handler {
            private OnSubscriptionsChangedListenerHandler() {
                super();
            }

            private OnSubscriptionsChangedListenerHandler(Looper looper) {
                super(looper);
            }

        private final Handler mHandler  = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                if (DBG) {
@@ -380,7 +355,7 @@ public class SubscriptionManager {
                }
                OnSubscriptionsChangedListener.this.onSubscriptionsChanged();
            }
        }
        };

        /**
         * Callback invoked when there is any change to any SubscriptionInfo. Typically