Add policy disabled msg as empty views in zenmode related fragments.
Change-Id: I0d7489d2884ffd5c227a37a638d560bf033f5cd9
This commit is contained in:
@@ -81,6 +81,9 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
if (isUiRestricted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
updateControls();
|
updateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -72,6 +72,9 @@ public class ZenModeEventRuleSettings extends ZenModeRuleSettingsBase {
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
if (isUiRestricted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!mCreate) {
|
if (!mCreate) {
|
||||||
reloadCalendar();
|
reloadCalendar();
|
||||||
}
|
}
|
||||||
|
@@ -133,6 +133,9 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
if (isUiRestricted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
updateControls();
|
updateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,6 +47,9 @@ public class ZenModeSettings extends ZenModeSettingsBase {
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
if (isUiRestricted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
updateControls();
|
updateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,7 +28,9 @@ import android.provider.Settings;
|
|||||||
import android.provider.Settings.Global;
|
import android.provider.Settings.Global;
|
||||||
import android.service.notification.ZenModeConfig;
|
import android.service.notification.ZenModeConfig;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
import com.android.settings.RestrictedSettingsFragment;
|
import com.android.settings.RestrictedSettingsFragment;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -67,10 +69,16 @@ abstract public class ZenModeSettingsBase extends RestrictedSettingsFragment {
|
|||||||
maybeRefreshRules(true, true /*fireChanged*/);
|
maybeRefreshRules(true, true /*fireChanged*/);
|
||||||
mSettingsObserver.register();
|
mSettingsObserver.register();
|
||||||
if (isUiRestricted()) {
|
if (isUiRestricted()) {
|
||||||
finish();
|
getPreferenceScreen().removeAll();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected View initAdminSupportDetailsView() {
|
||||||
|
return getActivity().findViewById(R.id.admin_support_details);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
Reference in New Issue
Block a user