Search in sources :

Example 6 with ZenServiceListing

use of com.android.settings.utils.ZenServiceListing in project android_packages_apps_Settings by LineageOS.

the class ZenModeSettings method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.zen_mode_settings);
    final PreferenceScreen root = getPreferenceScreen();
    mAutomaticRules = (PreferenceCategory) root.findPreference(KEY_AUTOMATIC_RULES);
    mPrioritySettings = root.findPreference(KEY_PRIORITY_SETTINGS);
    mVisualSettings = root.findPreference(KEY_VISUAL_SETTINGS);
    mPolicy = NotificationManager.from(mContext).getNotificationPolicy();
    mSummaryBuilder = new SummaryBuilder(getContext());
    mPm = mContext.getPackageManager();
    mServiceListing = new ZenServiceListing(mContext, CONFIG);
    mServiceListing.reloadApprovedServices();
}
Also used : PreferenceScreen(android.support.v7.preference.PreferenceScreen) ZenServiceListing(com.android.settings.utils.ZenServiceListing)

Example 7 with ZenServiceListing

use of com.android.settings.utils.ZenServiceListing in project android_packages_apps_Settings by omnirom.

the class ZenModeSettings method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.zen_mode_settings);
    final PreferenceScreen root = getPreferenceScreen();
    mAutomaticRules = (PreferenceCategory) root.findPreference(KEY_AUTOMATIC_RULES);
    mPrioritySettings = root.findPreference(KEY_PRIORITY_SETTINGS);
    mVisualSettings = root.findPreference(KEY_VISUAL_SETTINGS);
    mPolicy = NotificationManager.from(mContext).getNotificationPolicy();
    mSummaryBuilder = new SummaryBuilder(getContext());
    mPm = mContext.getPackageManager();
    mServiceListing = new ZenServiceListing(mContext, CONFIG);
    mServiceListing.reloadApprovedServices();
}
Also used : PreferenceScreen(android.support.v7.preference.PreferenceScreen) ZenServiceListing(com.android.settings.utils.ZenServiceListing)

Example 8 with ZenServiceListing

use of com.android.settings.utils.ZenServiceListing in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ZenModeAutomationSettings method createPreferenceControllers.

@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
    ZenServiceListing serviceListing = new ZenServiceListing(getContext(), CONFIG);
    serviceListing.reloadApprovedServices();
    return buildPreferenceControllers(context, this, serviceListing, getSettingsLifecycle());
}
Also used : ZenServiceListing(com.android.settings.utils.ZenServiceListing)

Aggregations

ZenServiceListing (com.android.settings.utils.ZenServiceListing)8 PreferenceScreen (android.support.v7.preference.PreferenceScreen)6