am 109ec506
: am c44e33e1
: am dc16286f
: Merge "Avoid NPE when template rapidly switched." into lmp-dev
* commit '109ec50635927c302fa9e292381fb2c79023a78f': Avoid NPE when template rapidly switched.
This commit is contained in:
@@ -1791,10 +1791,12 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
||||
public static void show(DataUsageSummary parent) {
|
||||
if (!parent.isAdded()) return;
|
||||
|
||||
final NetworkPolicy policy = parent.mPolicyEditor.getPolicy(parent.mTemplate);
|
||||
if (policy == null) return;
|
||||
|
||||
final Resources res = parent.getResources();
|
||||
final CharSequence message;
|
||||
final long minLimitBytes = (long) (
|
||||
parent.mPolicyEditor.getPolicy(parent.mTemplate).warningBytes * 1.2f);
|
||||
final long minLimitBytes = (long) (policy.warningBytes * 1.2f);
|
||||
final long limitBytes;
|
||||
|
||||
// TODO: customize default limits based on network template
|
||||
|
Reference in New Issue
Block a user