Merge "More cleanly separate requests and listens." am: d301e60ccf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565202 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia7ed944bb1c2b81dd3f6ff74c195a3bc5f22ea51
This commit is contained in:
@@ -435,25 +435,7 @@ public class NetworkRequest implements Parcelable {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public boolean isRequest() {
|
public boolean isRequest() {
|
||||||
return isForegroundRequest() || isBackgroundRequest();
|
return type == Type.REQUEST || type == Type.BACKGROUND_REQUEST;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true iff. the contained NetworkRequest is one that:
|
|
||||||
*
|
|
||||||
* - should be associated with at most one satisfying network
|
|
||||||
* at a time;
|
|
||||||
*
|
|
||||||
* - should cause a network to be kept up and in the foreground if
|
|
||||||
* it is the best network which can satisfy the NetworkRequest.
|
|
||||||
*
|
|
||||||
* For full detail of how isRequest() is used for pairing Networks with
|
|
||||||
* NetworkRequests read rematchNetworkAndRequests().
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public boolean isForegroundRequest() {
|
|
||||||
return type == Type.TRACK_DEFAULT || type == Type.REQUEST;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user