use of com.android.settings.DefaultRingtonePreference in project android_packages_apps_Settings by crdroidandroid.
the class WorkSoundPreferenceController method initWorkPreference.
private DefaultRingtonePreference initWorkPreference(PreferenceGroup root, String key) {
DefaultRingtonePreference pref = (DefaultRingtonePreference) root.findPreference(key);
pref.setOnPreferenceChangeListener(this);
// Required so that RingtonePickerActivity lists the work profile ringtones
pref.setUserId(mManagedProfileId);
return pref;
}
use of com.android.settings.DefaultRingtonePreference in project platform_packages_apps_Settings by BlissRoms.
the class WorkSoundPreferenceController method initWorkPreference.
private DefaultRingtonePreference initWorkPreference(PreferenceGroup root, String key) {
DefaultRingtonePreference pref = (DefaultRingtonePreference) root.findPreference(key);
pref.setOnPreferenceChangeListener(this);
// Required so that RingtonePickerActivity lists the work profile ringtones
pref.setUserId(mManagedProfileId);
return pref;
}
use of com.android.settings.DefaultRingtonePreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class WorkSoundPreferenceController method initWorkPreference.
private DefaultRingtonePreference initWorkPreference(PreferenceGroup root, String key) {
DefaultRingtonePreference pref = (DefaultRingtonePreference) root.findPreference(key);
pref.setOnPreferenceChangeListener(this);
// Required so that RingtonePickerActivity lists the work profile ringtones
pref.setUserId(mManagedProfileId);
return pref;
}
use of com.android.settings.DefaultRingtonePreference in project android_packages_apps_Settings by omnirom.
the class SoundWorkSettingsTest method onPreferenceTreeClick_isRingtonePreference_shouldStartActivity.
@Test
public void onPreferenceTreeClick_isRingtonePreference_shouldStartActivity() {
final DefaultRingtonePreference ringtonePreference = mock(DefaultRingtonePreference.class);
when(mMetricsFeatureProvider.logClickedPreference(any(Preference.class), anyInt())).thenReturn(true);
mFragment.onPreferenceTreeClick(ringtonePreference);
verify(mActivity).startActivityForResultAsUser(any(), anyInt(), any(), any(UserHandle.class));
}
use of com.android.settings.DefaultRingtonePreference in project android_packages_apps_Settings by omnirom.
the class SoundWorkSettingsController method initWorkPreference.
private DefaultRingtonePreference initWorkPreference(PreferenceGroup root, String key) {
final DefaultRingtonePreference pref = root.findPreference(key);
pref.setOnPreferenceChangeListener(this);
// Required so that RingtonePickerActivity lists the work profile ringtones
pref.setUserId(mManagedProfileId);
return pref;
}
Aggregations