Skip to content
Snippets Groups Projects
Commit 200bd728 authored by Patrick Rohr's avatar Patrick Rohr
Browse files

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
parent 81559e71
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment