Add cellular data off conditional
Change-Id: I34980f3fc09bf5dd47eb296c5b1c5fccc87b5c90
This commit is contained in:
@@ -19,13 +19,10 @@ import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.StatusBarManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.provider.Settings;
|
||||
|
||||
import android.service.notification.ZenModeConfig;
|
||||
import com.android.settings.R;
|
||||
|
||||
@@ -55,13 +52,8 @@ public class DndCondition extends Condition {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSilenceChanged(boolean silenced) {
|
||||
// Only need to listen for dnd mode changes when its been silenced.
|
||||
PackageManager pm = mManager.getContext().getPackageManager();
|
||||
pm.setComponentEnabledSetting(new ComponentName(mManager.getContext(), Receiver.class),
|
||||
silenced ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
||||
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
|
||||
PackageManager.DONT_KILL_APP);
|
||||
protected Class<?> getReceiverClass() {
|
||||
return Receiver.class;
|
||||
}
|
||||
|
||||
private CharSequence getZenState() {
|
||||
|
Reference in New Issue
Block a user