Search in sources :

Example 61 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by SudaMod.

the class InstalledAppDetails method startAppInfoFragment.

public static void startAppInfoFragment(Class<?> fragment, CharSequence title, SettingsPreferenceFragment caller, AppEntry appEntry) {
    // start new fragment to display extended information
    Bundle args = new Bundle();
    args.putString(ARG_PACKAGE_NAME, appEntry.info.packageName);
    args.putInt(ARG_PACKAGE_UID, appEntry.info.uid);
    SettingsActivity sa = (SettingsActivity) caller.getActivity();
    sa.startPreferencePanel(caller, fragment.getName(), args, -1, title, caller, SUB_INFO_FRAGMENT);
}
Also used : Bundle(android.os.Bundle) SettingsActivity(com.android.settings.SettingsActivity)

Example 62 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by SudaMod.

the class AppOpsCategory method startApplicationDetailsActivity.

// utility method used to start sub activity
private void startApplicationDetailsActivity() {
    // start new fragment to display extended information
    Bundle args = new Bundle();
    args.putString(AppOpsDetails.ARG_PACKAGE_NAME, mCurrentPkgName);
    SettingsActivity sa = (SettingsActivity) getActivity();
    sa.startPreferencePanel(this, AppOpsDetails.class.getName(), args, org.lineageos.platform.internal.R.string.privacy_guard_manager_title, null, this, RESULT_APP_DETAILS);
}
Also used : Bundle(android.os.Bundle) SettingsActivity(com.android.settings.SettingsActivity)

Example 63 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by SudaMod.

the class AppOpsDetails method setIntentAndFinish.

private void setIntentAndFinish(boolean finish, boolean appChanged) {
    Intent intent = new Intent();
    intent.putExtra(ManageApplications.APP_CHG, appChanged);
    SettingsActivity sa = (SettingsActivity) getActivity();
    sa.finishPreferencePanel(this, Activity.RESULT_OK, intent);
}
Also used : Intent(android.content.Intent) SettingsActivity(com.android.settings.SettingsActivity)

Example 64 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by SudaMod.

the class UserDictionaryAddWordFragment method onItemSelected.

@Override
public void onItemSelected(final AdapterView<?> parent, final View view, final int pos, final long id) {
    final LocaleRenderer locale = (LocaleRenderer) parent.getItemAtPosition(pos);
    if (locale.isMoreLanguages()) {
        SettingsActivity sa = (SettingsActivity) getActivity();
        sa.startPreferenceFragment(new UserDictionaryLocalePicker(this), true);
    } else {
        mContents.updateLocale(locale.getLocaleString());
    }
}
Also used : LocaleRenderer(com.android.settings.inputmethod.UserDictionaryAddWordContents.LocaleRenderer) SettingsActivity(com.android.settings.SettingsActivity)

Example 65 with SettingsActivity

use of com.android.settings.SettingsActivity in project android_packages_apps_Settings by SudaMod.

the class LocationSettings method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    final SettingsActivity activity = (SettingsActivity) getActivity();
    mUm = (UserManager) activity.getSystemService(Context.USER_SERVICE);
    setHasOptionsMenu(true);
    mSwitchBar = activity.getSwitchBar();
    mSwitch = mSwitchBar.getSwitch();
    mSwitchBar.show();
    setHasOptionsMenu(true);
}
Also used : SettingsActivity(com.android.settings.SettingsActivity)

Aggregations

SettingsActivity (com.android.settings.SettingsActivity)246 Bundle (android.os.Bundle)71 Intent (android.content.Intent)37 ArrayList (java.util.ArrayList)27 Preference (android.support.v7.preference.Preference)25 AnomalySummaryPreferenceController (com.android.settings.fuelgauge.anomaly.AnomalySummaryPreferenceController)18 SwitchBarController (com.android.settings.widget.SwitchBarController)16 ContentResolver (android.content.ContentResolver)15 TextView (android.widget.TextView)15 Lifecycle (com.android.settingslib.core.lifecycle.Lifecycle)15 Test (org.junit.Test)15 Context (android.content.Context)14 View (android.view.View)14 LinkifyUtils (com.android.settings.LinkifyUtils)14 RemoteException (android.os.RemoteException)13 EngineInfo (android.speech.tts.TextToSpeech.EngineInfo)13 PreferenceScreen (android.support.v7.preference.PreferenceScreen)13 RecyclerView (android.support.v7.widget.RecyclerView)12 LayoutPreference (com.android.settings.applications.LayoutPreference)12 AbstractPreferenceController (com.android.settingslib.core.AbstractPreferenceController)11