Catch creation of NetworkRequest without NetCap

Using reflection you could do this and it would crash the system.
Thanks, ServiceFuzzer!

bug:17379629
Change-Id: I8b470bda78a69761ccd92496746f5d295b5d07f2
This commit is contained in:
Robert Greenwalt
2014-09-03 19:35:47 -07:00
parent 939112e006
commit ea266c65ee

View File

@@ -52,6 +52,9 @@ public class NetworkRequest implements Parcelable {
* @hide
*/
public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId) {
if (nc == null) {
throw new NullPointerException();
}
requestId = rId;
networkCapabilities = nc;
this.legacyType = legacyType;