Merge "Covert list<String> into String[] in INetd"
am: d274332a9d
Change-Id: I0e6cf058b441b542fcd49a94a0b4d08e417fe6bb
This commit is contained in:
@@ -163,8 +163,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
|
|
||||||
private static final int MAX_UID_RANGES_PER_COMMAND = 10;
|
private static final int MAX_UID_RANGES_PER_COMMAND = 10;
|
||||||
|
|
||||||
private static final String[] EMPTY_STRING_ARRAY = new String[0];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name representing {@link #setGlobalAlert(long)} limit when delivered to
|
* Name representing {@link #setGlobalAlert(long)} limit when delivered to
|
||||||
* {@link INetworkManagementEventObserver#limitReached(String, String)}.
|
* {@link INetworkManagementEventObserver#limitReached(String, String)}.
|
||||||
@@ -954,8 +952,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
public String[] listInterfaces() {
|
public String[] listInterfaces() {
|
||||||
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
||||||
try {
|
try {
|
||||||
final List<String> result = mNetdService.interfaceGetList();
|
return mNetdService.interfaceGetList();
|
||||||
return result.toArray(EMPTY_STRING_ARRAY);
|
|
||||||
} catch (RemoteException | ServiceSpecificException e) {
|
} catch (RemoteException | ServiceSpecificException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
@@ -1247,8 +1244,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
public String[] listTetheredInterfaces() {
|
public String[] listTetheredInterfaces() {
|
||||||
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
||||||
try {
|
try {
|
||||||
final List<String> result = mNetdService.tetherInterfaceList();
|
return mNetdService.tetherInterfaceList();
|
||||||
return result.toArray(EMPTY_STRING_ARRAY);
|
|
||||||
} catch (RemoteException | ServiceSpecificException e) {
|
} catch (RemoteException | ServiceSpecificException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
@@ -1271,8 +1267,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
public String[] getDnsForwarders() {
|
public String[] getDnsForwarders() {
|
||||||
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
|
||||||
try {
|
try {
|
||||||
final List<String> result = mNetdService.tetherDnsList();
|
return mNetdService.tetherDnsList();
|
||||||
return result.toArray(EMPTY_STRING_ARRAY);
|
|
||||||
} catch (RemoteException | ServiceSpecificException e) {
|
} catch (RemoteException | ServiceSpecificException e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user