Merge "Remove old APIs that are no longer used/implemented"
This commit is contained in:
committed by
Android (Google) Code Review
commit
593474e074
@@ -20823,7 +20823,7 @@ package android.net.sip {
|
||||
|
||||
package android.net.wifi {
|
||||
|
||||
public class BatchedScanResult implements android.os.Parcelable {
|
||||
public deprecated class BatchedScanResult implements android.os.Parcelable {
|
||||
ctor public BatchedScanResult();
|
||||
ctor public BatchedScanResult(android.net.wifi.BatchedScanResult);
|
||||
method public int describeContents();
|
||||
@@ -21234,7 +21234,7 @@ package android.net.wifi {
|
||||
method public boolean disableNetwork(int);
|
||||
method public boolean disconnect();
|
||||
method public boolean enableNetwork(int, boolean);
|
||||
method public java.util.List<android.net.wifi.BatchedScanResult> getBatchedScanResults();
|
||||
method public deprecated java.util.List<android.net.wifi.BatchedScanResult> getBatchedScanResults();
|
||||
method public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
|
||||
method public android.net.wifi.WifiInfo getConnectionInfo();
|
||||
method public android.net.wifi.WifiConnectionStatistics getConnectionStatistics();
|
||||
@@ -21244,7 +21244,7 @@ package android.net.wifi {
|
||||
method public java.util.List<android.net.wifi.ScanResult> getScanResults();
|
||||
method public int getWifiState();
|
||||
method public boolean is5GHzBandSupported();
|
||||
method public boolean isBatchedScanSupported();
|
||||
method public deprecated boolean isBatchedScanSupported();
|
||||
method public boolean isDeviceToApRttSupported();
|
||||
method public boolean isDeviceToDeviceRttSupported();
|
||||
method public boolean isEnhancedPowerReportingSupported();
|
||||
@@ -21264,7 +21264,7 @@ package android.net.wifi {
|
||||
method public void setTdlsEnabled(java.net.InetAddress, boolean);
|
||||
method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
|
||||
method public boolean setWifiEnabled(boolean);
|
||||
method public boolean startLocationRestrictedScan(android.os.WorkSource);
|
||||
method public deprecated boolean startLocationRestrictedScan(android.os.WorkSource);
|
||||
method public boolean startScan();
|
||||
method public boolean startScan(android.os.WorkSource);
|
||||
method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2013, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
parcelable BatchedScanResult;
|
||||
@@ -25,8 +25,9 @@ import java.util.List;
|
||||
/**
|
||||
* Describes the Results of a batched set of wifi scans where the firmware performs many
|
||||
* scans and stores the timestamped results without waking the main processor each time.
|
||||
* @hide pending review
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public class BatchedScanResult implements Parcelable {
|
||||
private static final String TAG = "BatchedScanResult";
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2013, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
parcelable BatchedScanSettings;
|
||||
@@ -1,263 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Describes the settings for batched wifi scans where the firmware performs many
|
||||
* scans and stores the timestamped results without waking the main processor each time.
|
||||
* This can give information over time with minimal battery impact.
|
||||
* @hide pending review
|
||||
*/
|
||||
public class BatchedScanSettings implements Parcelable {
|
||||
private static final String TAG = "BatchedScanSettings";
|
||||
|
||||
/** Used to indicate no preference for an int value */
|
||||
public final static int UNSPECIFIED = Integer.MAX_VALUE;
|
||||
|
||||
// TODO - make MIN/mAX as standard for wifi batch capability requirement.
|
||||
public final static int MIN_SCANS_PER_BATCH = 2;
|
||||
public final static int MAX_SCANS_PER_BATCH = 20;
|
||||
public final static int DEFAULT_SCANS_PER_BATCH = MAX_SCANS_PER_BATCH;
|
||||
|
||||
public final static int MIN_AP_PER_SCAN = 2;
|
||||
public final static int MAX_AP_PER_SCAN = 16;
|
||||
public final static int DEFAULT_AP_PER_SCAN = 16;
|
||||
|
||||
public final static int MIN_INTERVAL_SEC = 10;
|
||||
public final static int MAX_INTERVAL_SEC = 500;
|
||||
public final static int DEFAULT_INTERVAL_SEC = 30;
|
||||
|
||||
public final static int MIN_AP_FOR_DISTANCE = 0;
|
||||
public final static int MAX_AP_FOR_DISTANCE = MAX_AP_PER_SCAN;
|
||||
public final static int DEFAULT_AP_FOR_DISTANCE = 0;
|
||||
|
||||
public final static int MAX_WIFI_CHANNEL = 196;
|
||||
|
||||
/** The expected number of scans per batch. Note that the firmware may drop scans
|
||||
* leading to fewer scans during the normal batch scan duration. This value need not
|
||||
* be specified (may be set to {@link UNSPECIFIED}) by the application and we will try
|
||||
* to scan as many times as the firmware can support. If another app requests fewer
|
||||
* scans per batch we will attempt to honor that.
|
||||
*/
|
||||
public int maxScansPerBatch;
|
||||
|
||||
/** The maximum desired AP listed per scan. Fewer AP may be returned if that's all
|
||||
* that the driver detected. If another application requests more AP per scan that
|
||||
* will take precedence. The if more channels are detected than we request, the APs
|
||||
* with the lowest signal strength will be dropped.
|
||||
*/
|
||||
public int maxApPerScan;
|
||||
|
||||
/** The channels used in the scan. If all channels should be used, {@code null} may be
|
||||
* specified. If another application requests more channels or all channels, that
|
||||
* will take precedence.
|
||||
*/
|
||||
public Collection<String> channelSet;
|
||||
|
||||
/** The time between the start of two sequential scans, in seconds. If another
|
||||
* application requests more frequent scans, that will take precedence. If this
|
||||
* value is less than the duration of a scan, the next scan should start immediately.
|
||||
*/
|
||||
public int scanIntervalSec;
|
||||
|
||||
/** The number of the best (strongest signal) APs for which the firmware will
|
||||
* attempt to get distance information (RTT). Not all firmware supports this
|
||||
* feature, so it may be ignored. If another application requests a greater
|
||||
* number, that will take precedence.
|
||||
*/
|
||||
public int maxApForDistance;
|
||||
|
||||
public BatchedScanSettings() {
|
||||
clear();
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
maxScansPerBatch = UNSPECIFIED;
|
||||
maxApPerScan = UNSPECIFIED;
|
||||
channelSet = null;
|
||||
scanIntervalSec = UNSPECIFIED;
|
||||
maxApForDistance = UNSPECIFIED;
|
||||
}
|
||||
|
||||
public BatchedScanSettings(BatchedScanSettings source) {
|
||||
maxScansPerBatch = source.maxScansPerBatch;
|
||||
maxApPerScan = source.maxApPerScan;
|
||||
if (source.channelSet != null) {
|
||||
channelSet = new ArrayList(source.channelSet);
|
||||
}
|
||||
scanIntervalSec = source.scanIntervalSec;
|
||||
maxApForDistance = source.maxApForDistance;
|
||||
}
|
||||
|
||||
private boolean channelSetIsValid() {
|
||||
if (channelSet == null || channelSet.isEmpty()) return true;
|
||||
for (String channel : channelSet) {
|
||||
try {
|
||||
int i = Integer.parseInt(channel);
|
||||
if (i > 0 && i <= MAX_WIFI_CHANNEL) continue;
|
||||
} catch (NumberFormatException e) {}
|
||||
if (channel.equals("A") || channel.equals("B")) continue;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/** @hide */
|
||||
public boolean isInvalid() {
|
||||
if (maxScansPerBatch != UNSPECIFIED && (maxScansPerBatch < MIN_SCANS_PER_BATCH ||
|
||||
maxScansPerBatch > MAX_SCANS_PER_BATCH)) return true;
|
||||
if (maxApPerScan != UNSPECIFIED && (maxApPerScan < MIN_AP_PER_SCAN ||
|
||||
maxApPerScan > MAX_AP_PER_SCAN)) return true;
|
||||
if (channelSetIsValid() == false) return true;
|
||||
if (scanIntervalSec != UNSPECIFIED && (scanIntervalSec < MIN_INTERVAL_SEC ||
|
||||
scanIntervalSec > MAX_INTERVAL_SEC)) return true;
|
||||
if (maxApForDistance != UNSPECIFIED && (maxApForDistance < MIN_AP_FOR_DISTANCE ||
|
||||
maxApForDistance > MAX_AP_FOR_DISTANCE)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void constrain() {
|
||||
if (scanIntervalSec == UNSPECIFIED) {
|
||||
scanIntervalSec = DEFAULT_INTERVAL_SEC;
|
||||
} else if (scanIntervalSec < MIN_INTERVAL_SEC) {
|
||||
scanIntervalSec = MIN_INTERVAL_SEC;
|
||||
} else if (scanIntervalSec > MAX_INTERVAL_SEC) {
|
||||
scanIntervalSec = MAX_INTERVAL_SEC;
|
||||
}
|
||||
|
||||
if (maxScansPerBatch == UNSPECIFIED) {
|
||||
maxScansPerBatch = DEFAULT_SCANS_PER_BATCH;
|
||||
} else if (maxScansPerBatch < MIN_SCANS_PER_BATCH) {
|
||||
maxScansPerBatch = MIN_SCANS_PER_BATCH;
|
||||
} else if (maxScansPerBatch > MAX_SCANS_PER_BATCH) {
|
||||
maxScansPerBatch = MAX_SCANS_PER_BATCH;
|
||||
}
|
||||
|
||||
if (maxApPerScan == UNSPECIFIED) {
|
||||
maxApPerScan = DEFAULT_AP_PER_SCAN;
|
||||
} else if (maxApPerScan < MIN_AP_PER_SCAN) {
|
||||
maxApPerScan = MIN_AP_PER_SCAN;
|
||||
} else if (maxApPerScan > MAX_AP_PER_SCAN) {
|
||||
maxApPerScan = MAX_AP_PER_SCAN;
|
||||
}
|
||||
|
||||
if (maxApForDistance == UNSPECIFIED) {
|
||||
maxApForDistance = DEFAULT_AP_FOR_DISTANCE;
|
||||
} else if (maxApForDistance < MIN_AP_FOR_DISTANCE) {
|
||||
maxApForDistance = MIN_AP_FOR_DISTANCE;
|
||||
} else if (maxApForDistance > MAX_AP_FOR_DISTANCE) {
|
||||
maxApForDistance = MAX_AP_FOR_DISTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof BatchedScanSettings == false) return false;
|
||||
BatchedScanSettings o = (BatchedScanSettings)obj;
|
||||
if (maxScansPerBatch != o.maxScansPerBatch ||
|
||||
maxApPerScan != o.maxApPerScan ||
|
||||
scanIntervalSec != o.scanIntervalSec ||
|
||||
maxApForDistance != o.maxApForDistance) return false;
|
||||
if (channelSet == null) {
|
||||
return (o.channelSet == null);
|
||||
}
|
||||
return channelSet.equals(o.channelSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return maxScansPerBatch +
|
||||
(maxApPerScan * 3) +
|
||||
(scanIntervalSec * 5) +
|
||||
(maxApForDistance * 7) +
|
||||
(channelSet.hashCode() * 11);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String none = "<none>";
|
||||
|
||||
sb.append("BatchScanSettings [maxScansPerBatch: ").
|
||||
append(maxScansPerBatch == UNSPECIFIED ? none : maxScansPerBatch).
|
||||
append(", maxApPerScan: ").append(maxApPerScan == UNSPECIFIED? none : maxApPerScan).
|
||||
append(", scanIntervalSec: ").
|
||||
append(scanIntervalSec == UNSPECIFIED ? none : scanIntervalSec).
|
||||
append(", maxApForDistance: ").
|
||||
append(maxApForDistance == UNSPECIFIED ? none : maxApForDistance).
|
||||
append(", channelSet: ");
|
||||
if (channelSet == null) {
|
||||
sb.append("ALL");
|
||||
} else {
|
||||
sb.append("<");
|
||||
for (String channel : channelSet) {
|
||||
sb.append(" " + channel);
|
||||
}
|
||||
sb.append(">");
|
||||
}
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(maxScansPerBatch);
|
||||
dest.writeInt(maxApPerScan);
|
||||
dest.writeInt(scanIntervalSec);
|
||||
dest.writeInt(maxApForDistance);
|
||||
dest.writeInt(channelSet == null ? 0 : channelSet.size());
|
||||
if (channelSet != null) {
|
||||
for (String channel : channelSet) dest.writeString(channel);
|
||||
}
|
||||
}
|
||||
|
||||
/** Implement the Parcelable interface {@hide} */
|
||||
public static final Creator<BatchedScanSettings> CREATOR =
|
||||
new Creator<BatchedScanSettings>() {
|
||||
public BatchedScanSettings createFromParcel(Parcel in) {
|
||||
BatchedScanSettings settings = new BatchedScanSettings();
|
||||
settings.maxScansPerBatch = in.readInt();
|
||||
settings.maxApPerScan = in.readInt();
|
||||
settings.scanIntervalSec = in.readInt();
|
||||
settings.maxApForDistance = in.readInt();
|
||||
int channelCount = in.readInt();
|
||||
if (channelCount > 0) {
|
||||
settings.channelSet = new ArrayList(channelCount);
|
||||
while (channelCount-- > 0) {
|
||||
settings.channelSet.add(in.readString());
|
||||
}
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
public BatchedScanSettings[] newArray(int size) {
|
||||
return new BatchedScanSettings[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -16,12 +16,9 @@
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
import android.net.wifi.BatchedScanResult;
|
||||
import android.net.wifi.BatchedScanSettings;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.WifiInfo;
|
||||
import android.net.wifi.ScanSettings;
|
||||
import android.net.wifi.WifiChannel;
|
||||
import android.net.wifi.ScanResult;
|
||||
import android.net.wifi.ScanInfo;
|
||||
import android.net.wifi.WifiConnectionStatistics;
|
||||
@@ -61,12 +58,8 @@ interface IWifiManager
|
||||
|
||||
boolean pingSupplicant();
|
||||
|
||||
List<WifiChannel> getChannelList();
|
||||
|
||||
void startScan(in ScanSettings requested, in WorkSource ws);
|
||||
|
||||
void startLocationRestrictedScan(in WorkSource ws);
|
||||
|
||||
List<ScanResult> getScanResults(String callingPackage);
|
||||
|
||||
void disconnect();
|
||||
@@ -125,10 +118,6 @@ interface IWifiManager
|
||||
|
||||
void setWifiApConfiguration(in WifiConfiguration wifiConfig);
|
||||
|
||||
void startWifi();
|
||||
|
||||
void stopWifi();
|
||||
|
||||
void addToBlacklist(String bssid);
|
||||
|
||||
void clearBlacklist();
|
||||
@@ -141,16 +130,6 @@ interface IWifiManager
|
||||
|
||||
void enableTdlsWithMacAddress(String remoteMacAddress, boolean enable);
|
||||
|
||||
boolean requestBatchedScan(in BatchedScanSettings requested, IBinder binder, in WorkSource ws);
|
||||
|
||||
void stopBatchedScan(in BatchedScanSettings requested);
|
||||
|
||||
List<BatchedScanResult> getBatchedScanResults(String callingPackage);
|
||||
|
||||
boolean isBatchedScanSupported();
|
||||
|
||||
void pollBatchedScan();
|
||||
|
||||
String getWpsNfcConfigurationToken(int netId);
|
||||
|
||||
void enableVerboseLogging(int verbose);
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.net.wifi;
|
||||
|
||||
parcelable WifiChannel;
|
||||
@@ -27,7 +27,6 @@ import android.net.Network;
|
||||
import android.net.NetworkCapabilities;
|
||||
import android.net.NetworkRequest;
|
||||
import android.net.wifi.ScanSettings;
|
||||
import android.net.wifi.WifiChannel;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
@@ -440,8 +439,11 @@ public class WifiManager {
|
||||
/**
|
||||
* A batch of access point scans has been completed and the results areavailable.
|
||||
* Call {@link #getBatchedScanResults()} to obtain the results.
|
||||
* @hide pending review
|
||||
* @deprecated This API is nolonger supported.
|
||||
* Use {@link android.net.wifi.WifiScanner} API
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
|
||||
public static final String BATCHED_SCAN_RESULTS_AVAILABLE_ACTION =
|
||||
"android.net.wifi.BATCHED_RESULTS";
|
||||
@@ -904,22 +906,6 @@ public class WifiManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of available channels for customized scan.
|
||||
*
|
||||
* @see {@link WifiChannel}
|
||||
*
|
||||
* @return the channel list, or null if not available
|
||||
* @hide
|
||||
*/
|
||||
public List<WifiChannel> getChannelList() {
|
||||
try {
|
||||
return mService.getChannelList();
|
||||
} catch (RemoteException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* Keep this list in sync with wifi_hal.h */
|
||||
/** @hide */
|
||||
public static final int WIFI_FEATURE_INFRA = 0x0001; // Basic infrastructure mode
|
||||
@@ -1125,142 +1111,41 @@ public class WifiManager {
|
||||
* startLocationRestrictedScan()
|
||||
* Trigger a scan which will not make use of DFS channels and is thus not suitable for
|
||||
* establishing wifi connection.
|
||||
* @deprecated This API is nolonger supported.
|
||||
* Use {@link android.net.wifi.WifiScanner} API
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SystemApi
|
||||
public boolean startLocationRestrictedScan(WorkSource workSource) {
|
||||
try {
|
||||
mService.startLocationRestrictedScan(workSource);
|
||||
return true;
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a scan for access points in specified channel list. Each channel is specified by its
|
||||
* frequency in MHz, e.g. "5500" (do NOT include "DFS" even though it is). The availability of
|
||||
* the results is made known later in the same way as {@link #startScan}.
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
* 1. Customized scan is for non-connection purposes, i.e. it won't trigger a wifi connection
|
||||
* even though it finds some known networks.
|
||||
*
|
||||
* 2. Customized scan result may include access points that is not specified in the channel
|
||||
* list. An app will need to do frequency filtering if it wants to get pure results for the
|
||||
* channel list it specified.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public boolean startCustomizedScan(ScanSettings requested) {
|
||||
try {
|
||||
mService.startScan(requested, null);
|
||||
return true;
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public boolean startCustomizedScan(ScanSettings requested, WorkSource workSource) {
|
||||
try {
|
||||
mService.startScan(requested, workSource);
|
||||
return true;
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a batched scan for access points. To end your requested batched scan,
|
||||
* call stopBatchedScan with the same Settings.
|
||||
*
|
||||
* If there are mulitple requests for batched scans, the more demanding settings will
|
||||
* take precidence.
|
||||
*
|
||||
* @param requested {@link BatchedScanSettings} the scan settings requested.
|
||||
* @return false on known error
|
||||
* @hide
|
||||
*/
|
||||
public boolean requestBatchedScan(BatchedScanSettings requested) {
|
||||
try {
|
||||
return mService.requestBatchedScan(requested, new Binder(), null);
|
||||
} catch (RemoteException e) { return false; }
|
||||
}
|
||||
/** @hide */
|
||||
public boolean requestBatchedScan(BatchedScanSettings requested, WorkSource workSource) {
|
||||
try {
|
||||
return mService.requestBatchedScan(requested, new Binder(), workSource);
|
||||
} catch (RemoteException e) { return false; }
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the Batched Scan feature is supported.
|
||||
*
|
||||
* @return false if not supported.
|
||||
* @deprecated This API is nolonger supported.
|
||||
* Use {@link android.net.wifi.WifiScanner} API
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SystemApi
|
||||
public boolean isBatchedScanSupported() {
|
||||
try {
|
||||
return mService.isBatchedScanSupported();
|
||||
} catch (RemoteException e) { return false; }
|
||||
}
|
||||
|
||||
/**
|
||||
* End a requested batch scan for this applicaiton. Note that batched scan may
|
||||
* still occur if other apps are using them.
|
||||
*
|
||||
* @param requested {@link BatchedScanSettings} the scan settings you previously requested
|
||||
* and now wish to stop. A value of null here will stop all scans requested by the
|
||||
* calling App.
|
||||
* @hide
|
||||
*/
|
||||
public void stopBatchedScan(BatchedScanSettings requested) {
|
||||
try {
|
||||
mService.stopBatchedScan(requested);
|
||||
} catch (RemoteException e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the latest batched scan result. This should be called immediately after
|
||||
* {@link BATCHED_SCAN_RESULTS_AVAILABLE_ACTION} is received.
|
||||
* @deprecated This API is nolonger supported.
|
||||
* Use {@link android.net.wifi.WifiScanner} API
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
@SystemApi
|
||||
public List<BatchedScanResult> getBatchedScanResults() {
|
||||
try {
|
||||
return mService.getBatchedScanResults(mContext.getOpPackageName());
|
||||
} catch (RemoteException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Force a re-reading of batched scan results. This will attempt
|
||||
* to read more information from the chip, but will do so at the expense
|
||||
* of previous data. Rate limited to the current scan frequency.
|
||||
*
|
||||
* pollBatchedScan will always wait 1 period from the start of the batch
|
||||
* before trying to read from the chip, so if your #scans/batch == 1 this will
|
||||
* have no effect.
|
||||
*
|
||||
* If you had already waited 1 period before calling, this should have
|
||||
* immediate (though async) effect.
|
||||
*
|
||||
* If you call before that 1 period is up this will set up a timer and fetch
|
||||
* results when the 1 period is up.
|
||||
*
|
||||
* Servicing a pollBatchedScan request (immediate or after timed delay) starts a
|
||||
* new batch, so if you were doing 10 scans/batch and called in the 4th scan, you
|
||||
* would get data in the 4th and then again 10 scans later.
|
||||
* @hide
|
||||
*/
|
||||
public void pollBatchedScan() {
|
||||
try {
|
||||
mService.pollBatchedScan();
|
||||
} catch (RemoteException e) { }
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1625,48 +1510,6 @@ public class WifiManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the driver and connect to network.
|
||||
*
|
||||
* This function will over-ride WifiLock and device idle status. For example,
|
||||
* even if the device is idle or there is only a scan-only lock held,
|
||||
* a start wifi would mean that wifi connection is kept active until
|
||||
* a stopWifi() is sent.
|
||||
*
|
||||
* This API is used by WifiStateTracker
|
||||
*
|
||||
* @return {@code true} if the operation succeeds else {@code false}
|
||||
* @hide
|
||||
*/
|
||||
public boolean startWifi() {
|
||||
try {
|
||||
mService.startWifi();
|
||||
return true;
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect from a network (if any) and stop the driver.
|
||||
*
|
||||
* This function will over-ride WifiLock and device idle status. Wi-Fi
|
||||
* stays inactive until a startWifi() is issued.
|
||||
*
|
||||
* This API is used by WifiStateTracker
|
||||
*
|
||||
* @return {@code true} if the operation succeeds else {@code false}
|
||||
* @hide
|
||||
*/
|
||||
public boolean stopWifi() {
|
||||
try {
|
||||
mService.stopWifi();
|
||||
return true;
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a bssid to the supplicant blacklist
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user