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:
@@ -52,6 +52,9 @@ public class NetworkRequest implements Parcelable {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId) {
|
public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId) {
|
||||||
|
if (nc == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
requestId = rId;
|
requestId = rId;
|
||||||
networkCapabilities = nc;
|
networkCapabilities = nc;
|
||||||
this.legacyType = legacyType;
|
this.legacyType = legacyType;
|
||||||
|
|||||||
Reference in New Issue
Block a user