Loading packages/ConnectivityT/service/src/com/android/server/net/NetworkStatsService.java +3 −4 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { handlerThread.start(); mHandler = new NetworkStatsHandler(handlerThread.getLooper()); mNetworkStatsSubscriptionsMonitor = deps.makeSubscriptionsMonitor(mContext, mHandler.getLooper(), new HandlerExecutor(mHandler), this); new HandlerExecutor(mHandler), this); mContentResolver = mContext.getContentResolver(); mContentObserver = mDeps.makeContentObserver(mHandler, mSettings, mNetworkStatsSubscriptionsMonitor); Loading @@ -474,11 +474,10 @@ public class NetworkStatsService extends INetworkStatsService.Stub { */ @NonNull public NetworkStatsSubscriptionsMonitor makeSubscriptionsMonitor(@NonNull Context context, @NonNull Looper looper, @NonNull Executor executor, @NonNull NetworkStatsService service) { @NonNull Executor executor, @NonNull NetworkStatsService service) { // TODO: Update RatType passively in NSS, instead of querying into the monitor // when notifyNetworkStatus. return new NetworkStatsSubscriptionsMonitor(context, looper, executor, return new NetworkStatsSubscriptionsMonitor(context, executor, (subscriberId, type) -> service.handleOnCollapsedRatTypeChanged()); } Loading packages/ConnectivityT/service/src/com/android/server/net/NetworkStatsSubscriptionsMonitor.java +2 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.net.NetworkTemplate.getCollapsedRatType; import android.annotation.NonNull; import android.content.Context; import android.os.Looper; import android.telephony.Annotation; import android.telephony.NetworkRegistrationInfo; import android.telephony.PhoneStateListener; Loading Loading @@ -79,9 +78,9 @@ public class NetworkStatsSubscriptionsMonitor extends @NonNull private final Executor mExecutor; NetworkStatsSubscriptionsMonitor(@NonNull Context context, @NonNull Looper looper, NetworkStatsSubscriptionsMonitor(@NonNull Context context, @NonNull Executor executor, @NonNull Delegate delegate) { super(looper); super(); mSubscriptionManager = (SubscriptionManager) context.getSystemService( Context.TELEPHONY_SUBSCRIPTION_SERVICE); mTeleManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); Loading Loading
packages/ConnectivityT/service/src/com/android/server/net/NetworkStatsService.java +3 −4 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub { handlerThread.start(); mHandler = new NetworkStatsHandler(handlerThread.getLooper()); mNetworkStatsSubscriptionsMonitor = deps.makeSubscriptionsMonitor(mContext, mHandler.getLooper(), new HandlerExecutor(mHandler), this); new HandlerExecutor(mHandler), this); mContentResolver = mContext.getContentResolver(); mContentObserver = mDeps.makeContentObserver(mHandler, mSettings, mNetworkStatsSubscriptionsMonitor); Loading @@ -474,11 +474,10 @@ public class NetworkStatsService extends INetworkStatsService.Stub { */ @NonNull public NetworkStatsSubscriptionsMonitor makeSubscriptionsMonitor(@NonNull Context context, @NonNull Looper looper, @NonNull Executor executor, @NonNull NetworkStatsService service) { @NonNull Executor executor, @NonNull NetworkStatsService service) { // TODO: Update RatType passively in NSS, instead of querying into the monitor // when notifyNetworkStatus. return new NetworkStatsSubscriptionsMonitor(context, looper, executor, return new NetworkStatsSubscriptionsMonitor(context, executor, (subscriberId, type) -> service.handleOnCollapsedRatTypeChanged()); } Loading
packages/ConnectivityT/service/src/com/android/server/net/NetworkStatsSubscriptionsMonitor.java +2 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static android.net.NetworkTemplate.getCollapsedRatType; import android.annotation.NonNull; import android.content.Context; import android.os.Looper; import android.telephony.Annotation; import android.telephony.NetworkRegistrationInfo; import android.telephony.PhoneStateListener; Loading Loading @@ -79,9 +78,9 @@ public class NetworkStatsSubscriptionsMonitor extends @NonNull private final Executor mExecutor; NetworkStatsSubscriptionsMonitor(@NonNull Context context, @NonNull Looper looper, NetworkStatsSubscriptionsMonitor(@NonNull Context context, @NonNull Executor executor, @NonNull Delegate delegate) { super(looper); super(); mSubscriptionManager = (SubscriptionManager) context.getSystemService( Context.TELEPHONY_SUBSCRIPTION_SERVICE); mTeleManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); Loading