NetworkCapabilities: convert ALL_VALID_CAPABILITIES to long
ALL_VALID_CAPABILITIES should be a long, since there are now 35 NetworkCapabilities that are stored in a bitfield. This caused NetworkCapabilities to be lost during parceling. Bug: 291160389 Test: TH Change-Id: Ia021ba5fd2094fdaec87446c73de2037c920c4f1
This commit is contained in:
parent
81559e711f
commit
200bd72898
1 changed files with 3 additions and 3 deletions
|
|
@ -693,11 +693,11 @@ public final class NetworkCapabilities implements Parcelable {
|
|||
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
|
||||
private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_PRIORITIZE_BANDWIDTH;
|
||||
|
||||
private static final int ALL_VALID_CAPABILITIES;
|
||||
private static final long ALL_VALID_CAPABILITIES;
|
||||
static {
|
||||
int caps = 0;
|
||||
long caps = 0;
|
||||
for (int i = MIN_NET_CAPABILITY; i <= MAX_NET_CAPABILITY; ++i) {
|
||||
caps |= 1 << i;
|
||||
caps |= 1L << i;
|
||||
}
|
||||
ALL_VALID_CAPABILITIES = caps;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue