Loading services/core/java/com/android/server/ConnectivityService.java +26 −23 Original line number Original line Diff line number Diff line Loading @@ -3088,6 +3088,21 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override @Override public void notifyDataStallSuspected(DataStallReportParcelable p) { public void notifyDataStallSuspected(DataStallReportParcelable p) { ConnectivityService.this.notifyDataStallSuspected(p, mNetId); } @Override public int getInterfaceVersion() { return this.VERSION; } @Override public String getInterfaceHash() { return this.HASH; } } private void notifyDataStallSuspected(DataStallReportParcelable p, int netId) { final PersistableBundle extras = new PersistableBundle(); final PersistableBundle extras = new PersistableBundle(); switch (p.detectionMethod) { switch (p.detectionMethod) { case DETECTION_METHOD_DNS_EVENTS: case DETECTION_METHOD_DNS_EVENTS: Loading @@ -3099,30 +3114,19 @@ public class ConnectivityService extends IConnectivityManager.Stub p.tcpMetricsCollectionPeriodMillis); p.tcpMetricsCollectionPeriodMillis); break; break; default: default: // TODO(b/156294356): update for new data stall detection methods log("Unknown data stall detection method, ignoring: " + p.detectionMethod); log("Unknown data stall detection method, ignoring: " + p.detectionMethod); return; return; } } proxyDataStallToConnectivityDiagnosticsHandler( notifyDataStallSuspected(p.detectionMethod, netId, p.timestampMillis, extras); p.detectionMethod, mNetId, p.timestampMillis, extras); } } @Override private void notifyDataStallSuspected(int detectionMethod, int netId, long timestampMillis, public int getInterfaceVersion() { @NonNull PersistableBundle extras) { return this.VERSION; } @Override public String getInterfaceHash() { return this.HASH; } } private void proxyDataStallToConnectivityDiagnosticsHandler(int detectionMethod, int netId, long timestampMillis, @NonNull PersistableBundle extras) { final Message msg = mConnectivityDiagnosticsHandler.obtainMessage( final Message msg = mConnectivityDiagnosticsHandler.obtainMessage( ConnectivityDiagnosticsHandler.EVENT_DATA_STALL_SUSPECTED, ConnectivityDiagnosticsHandler.EVENT_DATA_STALL_SUSPECTED, detectionMethod, netId, detectionMethod, netId, timestampMillis); timestampMillis); msg.setData(new Bundle(extras)); msg.setData(new Bundle(extras)); // NetworkStateTrackerHandler currently doesn't take any actions based on data // NetworkStateTrackerHandler currently doesn't take any actions based on data Loading Loading @@ -8190,7 +8194,6 @@ public class ConnectivityService extends IConnectivityManager.Stub + "creators"); + "creators"); } } proxyDataStallToConnectivityDiagnosticsHandler( notifyDataStallSuspected(detectionMethod, network.netId, timestampMillis, extras); detectionMethod, network.netId, timestampMillis, extras); } } } } Loading
services/core/java/com/android/server/ConnectivityService.java +26 −23 Original line number Original line Diff line number Diff line Loading @@ -3088,6 +3088,21 @@ public class ConnectivityService extends IConnectivityManager.Stub @Override @Override public void notifyDataStallSuspected(DataStallReportParcelable p) { public void notifyDataStallSuspected(DataStallReportParcelable p) { ConnectivityService.this.notifyDataStallSuspected(p, mNetId); } @Override public int getInterfaceVersion() { return this.VERSION; } @Override public String getInterfaceHash() { return this.HASH; } } private void notifyDataStallSuspected(DataStallReportParcelable p, int netId) { final PersistableBundle extras = new PersistableBundle(); final PersistableBundle extras = new PersistableBundle(); switch (p.detectionMethod) { switch (p.detectionMethod) { case DETECTION_METHOD_DNS_EVENTS: case DETECTION_METHOD_DNS_EVENTS: Loading @@ -3099,30 +3114,19 @@ public class ConnectivityService extends IConnectivityManager.Stub p.tcpMetricsCollectionPeriodMillis); p.tcpMetricsCollectionPeriodMillis); break; break; default: default: // TODO(b/156294356): update for new data stall detection methods log("Unknown data stall detection method, ignoring: " + p.detectionMethod); log("Unknown data stall detection method, ignoring: " + p.detectionMethod); return; return; } } proxyDataStallToConnectivityDiagnosticsHandler( notifyDataStallSuspected(p.detectionMethod, netId, p.timestampMillis, extras); p.detectionMethod, mNetId, p.timestampMillis, extras); } } @Override private void notifyDataStallSuspected(int detectionMethod, int netId, long timestampMillis, public int getInterfaceVersion() { @NonNull PersistableBundle extras) { return this.VERSION; } @Override public String getInterfaceHash() { return this.HASH; } } private void proxyDataStallToConnectivityDiagnosticsHandler(int detectionMethod, int netId, long timestampMillis, @NonNull PersistableBundle extras) { final Message msg = mConnectivityDiagnosticsHandler.obtainMessage( final Message msg = mConnectivityDiagnosticsHandler.obtainMessage( ConnectivityDiagnosticsHandler.EVENT_DATA_STALL_SUSPECTED, ConnectivityDiagnosticsHandler.EVENT_DATA_STALL_SUSPECTED, detectionMethod, netId, detectionMethod, netId, timestampMillis); timestampMillis); msg.setData(new Bundle(extras)); msg.setData(new Bundle(extras)); // NetworkStateTrackerHandler currently doesn't take any actions based on data // NetworkStateTrackerHandler currently doesn't take any actions based on data Loading Loading @@ -8190,7 +8194,6 @@ public class ConnectivityService extends IConnectivityManager.Stub + "creators"); + "creators"); } } proxyDataStallToConnectivityDiagnosticsHandler( notifyDataStallSuspected(detectionMethod, network.netId, timestampMillis, extras); detectionMethod, network.netId, timestampMillis, extras); } } } }