Merge "Settings crash when receiving data state broadcast"
am: 2ed42d009b
Change-Id: Ie0dcb238e132705022408e2f0cacd35597ff86f1
This commit is contained in:
@@ -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