use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ToggleBackupSettingFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
SettingsActivity activity = (SettingsActivity) getActivity();
mSwitchBar = activity.getSwitchBar();
mToggleSwitch = mSwitchBar.getSwitch();
// not mention full data backup
if (Settings.Secure.getInt(getContentResolver(), USER_FULL_DATA_BACKUP_AWARE, 0) != 0) {
mSummaryPreference.setSummary(R.string.fullbackup_data_summary);
} else {
mSummaryPreference.setSummary(R.string.backup_data_summary);
}
try {
boolean backupEnabled = mBackupManager == null ? false : mBackupManager.isBackupEnabled();
mSwitchBar.setCheckedInternal(backupEnabled);
} catch (RemoteException e) {
// The world is aflame, turn it off.
mSwitchBar.setEnabled(false);
}
getActivity().setTitle(R.string.backup_data_title);
}
use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.
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());
}
}
use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BluetoothSettings method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
/* Don't auto start scan if screen reconstructs due to frozen screen*/
mInitialScanStarted = (savedInstanceState != null);
mInitiateDiscoverable = true;
final SettingsActivity activity = (SettingsActivity) getActivity();
mSwitchBar = activity.getSwitchBar();
mBluetoothEnabler = new BluetoothEnabler(activity, mSwitchBar);
mBluetoothEnabler.setupSwitchBar();
}
use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.
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);
}
use of com.android.settings.SettingsActivity in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ZenModeRuleSettingsBase method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
final SettingsActivity activity = (SettingsActivity) getActivity();
mSwitchBar = activity.getSwitchBar();
mSwitchBar.addOnSwitchChangeListener(this);
mSwitchBar.show();
}
Aggregations