Skip to content
Commit 738f4416 authored by Les Lee's avatar Les Lee
Browse files

fix: Invalid subscription plan cause NPE

If someone setup a invalid subscription plan with
subId:INVALID_SUBSCRIPTION_ID. (For instance, test code).
It will cause NPE when WiFi connected because WiFi network doesn't own
subscriberId. (Happened on API call: buildTemplateCarrierMetered with
null subscriberId.)

Fix:
1. Add null check before calling buildTemplateCarrierMetered
2. Add invalid subId check before saving subscription plan.

Bug: 191938713
Test: atest -c NetworkPolicyManagerServiceTest

Change-Id: I835a7b8890035975e187ca0a70ec2f30ca56455a
Merged-In: I835a7b8890035975e187ca0a70ec2f30ca56455a
parent 5ded797e
Loading
Loading
Loading
Loading
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