Search in sources :

Example 1 with ApplicationsState

use of com.android.settingslib.applications.ApplicationsState in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AdvancedAppSettings method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    addPreferencesFromResource(R.xml.advanced_apps);
    Preference permissions = getPreferenceScreen().findPreference(KEY_APP_PERM);
    final Intent intent = new Intent(Intent.ACTION_MANAGE_PERMISSIONS);
    if (!getPackageManager().queryIntentActivities(intent, 0).isEmpty()) {
        permissions.setIntent(intent);
    }
    ApplicationsState applicationsState = ApplicationsState.getInstance(getActivity().getApplication());
    mSession = applicationsState.newSession(this);
    mAppPermsPreference = findPreference(KEY_APP_PERM);
    mAppDomainURLsPreference = findPreference(KEY_APP_DOMAIN_URLS);
    mHighPowerPreference = findPreference(KEY_HIGH_POWER_APPS);
    mSystemAlertWindowPreference = findPreference(KEY_SYSTEM_ALERT_WINDOW);
    mWriteSettingsPreference = findPreference(KEY_WRITE_SETTINGS_APPS);
}
Also used : Preference(android.support.v7.preference.Preference) ApplicationsState(com.android.settingslib.applications.ApplicationsState) Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)1 Preference (android.support.v7.preference.Preference)1 ApplicationsState (com.android.settingslib.applications.ApplicationsState)1