Settings crash when receiving data state broadcast
Stress/Stability testing, Settings crash when receiving data state broadcast Solution: Do null judgement before function was called Test: Stress/Stability test Change-Id: Id71448ed89eeffcea268c4a2e7154d9ea7639db4
This commit is contained in:
committed by
Yifan Bai
parent
742bd03f12
commit
e4b5d69493
@@ -93,8 +93,11 @@ public class CellularDataCondition extends Condition {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED.equals(
|
||||
intent.getAction())) {
|
||||
ConditionManager.get(context).getCondition(CellularDataCondition.class)
|
||||
.refreshState();
|
||||
CellularDataCondition condition = ConditionManager.get(context).getCondition(
|
||||
CellularDataCondition.class);
|
||||
if (condition != null) {
|
||||
condition.refreshState();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user