public class ZenModeHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ZenModeHelper.Callback |
Modifier and Type | Field and Description |
---|---|
static long |
SUPPRESSED_EFFECT_ALL |
static long |
SUPPRESSED_EFFECT_CALLS |
static long |
SUPPRESSED_EFFECT_NOTIFICATIONS |
Constructor and Description |
---|
ZenModeHelper(Context context,
Looper looper,
ConditionProviders conditionProviders) |
public static final long SUPPRESSED_EFFECT_NOTIFICATIONS
public static final long SUPPRESSED_EFFECT_CALLS
public static final long SUPPRESSED_EFFECT_ALL
public ZenModeHelper(Context context, Looper looper, ConditionProviders conditionProviders)
public Looper getLooper()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public boolean matchesCallFilter(UserHandle userHandle, Bundle extras, ValidateNotificationPeople validator, int contactsTimeoutMs, float timeoutAffinity)
public boolean isCall(NotificationRecord record)
public void recordCaller(NotificationRecord record)
public boolean shouldIntercept(NotificationRecord record)
public boolean shouldSuppressWhenScreenOff()
public boolean shouldSuppressWhenScreenOn()
public void addCallback(ZenModeHelper.Callback callback)
public void removeCallback(ZenModeHelper.Callback callback)
public void initZenMode()
public void onSystemReady()
public void onUserSwitched(int user)
public void onUserRemoved(int user)
public void onUserUnlocked(int user)
public int getZenModeListenerInterruptionFilter()
public void requestFromListener(ComponentName name, int filter)
public void setSuppressedEffects(long suppressedEffects)
public long getSuppressedEffects()
public int getZenMode()
public List<ZenModeConfig.ZenRule> getZenRules()
public AutomaticZenRule getAutomaticZenRule(String id)
public String addAutomaticZenRule(AutomaticZenRule automaticZenRule, String reason)
public boolean updateAutomaticZenRule(String ruleId, AutomaticZenRule automaticZenRule, String reason)
public int getCurrentInstanceCount(ComponentName owner)
public boolean canManageAutomaticZenRule(ZenModeConfig.ZenRule rule)
public void setManualZenMode(int zenMode, Uri conditionId, String caller, String reason)
public void dump(PrintWriter pw, String prefix)
public void readXml(XmlPullParser parser, boolean forRestore) throws XmlPullParserException, IOException
XmlPullParserException
IOException
public void writeXml(XmlSerializer out, boolean forBackup) throws IOException
IOException
public NotificationManager.Policy getNotificationPolicy()
public void setNotificationPolicy(NotificationManager.Policy policy)
public ZenModeConfig getConfig()
public boolean setConfigLocked(ZenModeConfig config, String reason)
public void setConfig(ZenModeConfig config, String reason)