Merge "Settings crash when receiving data state broadcast"
This commit is contained in:
@@ -93,8 +93,11 @@ public class CellularDataCondition extends Condition {
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
if (TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED.equals(
|
if (TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED.equals(
|
||||||
intent.getAction())) {
|
intent.getAction())) {
|
||||||
ConditionManager.get(context).getCondition(CellularDataCondition.class)
|
CellularDataCondition condition = ConditionManager.get(context).getCondition(
|
||||||
.refreshState();
|
CellularDataCondition.class);
|
||||||
|
if (condition != null) {
|
||||||
|
condition.refreshState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user