Merge changes from topic "netstack_api_review" into rvc-dev
* changes: Remove usage of Context.NETWORK_STACK_SERVICE Remove NETWORK_STACK_SERVICE constant
This commit is contained in:
committed by
Android (Google) Code Review
commit
06b45ca764
@@ -33,6 +33,7 @@ import android.net.ITetheringConnector;
|
|||||||
import android.net.ITetheringEventCallback;
|
import android.net.ITetheringEventCallback;
|
||||||
import android.net.NetworkCapabilities;
|
import android.net.NetworkCapabilities;
|
||||||
import android.net.NetworkRequest;
|
import android.net.NetworkRequest;
|
||||||
|
import android.net.NetworkStack;
|
||||||
import android.net.TetheringRequestParcel;
|
import android.net.TetheringRequestParcel;
|
||||||
import android.net.dhcp.DhcpServerCallbacks;
|
import android.net.dhcp.DhcpServerCallbacks;
|
||||||
import android.net.dhcp.DhcpServingParamsParcel;
|
import android.net.dhcp.DhcpServingParamsParcel;
|
||||||
@@ -364,8 +365,7 @@ public class TetheringService extends Service {
|
|||||||
IBinder connector;
|
IBinder connector;
|
||||||
try {
|
try {
|
||||||
final long before = System.currentTimeMillis();
|
final long before = System.currentTimeMillis();
|
||||||
while ((connector = (IBinder) mContext.getSystemService(
|
while ((connector = NetworkStack.getService()) == null) {
|
||||||
Context.NETWORK_STACK_SERVICE)) == null) {
|
|
||||||
if (System.currentTimeMillis() - before > NETWORKSTACK_TIMEOUT_MS) {
|
if (System.currentTimeMillis() - before > NETWORKSTACK_TIMEOUT_MS) {
|
||||||
Log.wtf(TAG, "Timeout, fail to get INetworkStackConnector");
|
Log.wtf(TAG, "Timeout, fail to get INetworkStackConnector");
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user