use of android.annotation.UiThread in project android_packages_apps_Settings by DirtyUnicorns.
the class VpnSettings method setShownPreferences.
@VisibleForTesting
@UiThread
public void setShownPreferences(final Collection<Preference> updates) {
mLegacyVpnPreferences.values().retainAll(updates);
mAppPreferences.values().retainAll(updates);
// Change {@param updates} in-place to only contain new preferences that were not already
// added to the preference screen.
final PreferenceGroup vpnGroup = getPreferenceScreen();
for (int i = vpnGroup.getPreferenceCount() - 1; i >= 0; i--) {
Preference p = vpnGroup.getPreference(i);
if (updates.contains(p)) {
updates.remove(p);
} else {
vpnGroup.removePreference(p);
}
}
// Show any new preferences on the screen
for (Preference pref : updates) {
vpnGroup.addPreference(pref);
}
}
use of android.annotation.UiThread in project platform_packages_apps_Settings by BlissRoms.
the class VpnSettings method setShownPreferences.
@VisibleForTesting
@UiThread
public void setShownPreferences(final Collection<Preference> updates) {
mLegacyVpnPreferences.values().retainAll(updates);
mAppPreferences.values().retainAll(updates);
// Change {@param updates} in-place to only contain new preferences that were not already
// added to the preference screen.
final PreferenceGroup vpnGroup = getPreferenceScreen();
for (int i = vpnGroup.getPreferenceCount() - 1; i >= 0; i--) {
Preference p = vpnGroup.getPreference(i);
if (updates.contains(p)) {
updates.remove(p);
} else {
vpnGroup.removePreference(p);
}
}
// Show any new preferences on the screen
for (Preference pref : updates) {
vpnGroup.addPreference(pref);
}
}
use of android.annotation.UiThread in project android_packages_apps_Settings by LineageOS.
the class VpnSettings method setShownPreferences.
@VisibleForTesting
@UiThread
public void setShownPreferences(final Collection<Preference> updates) {
mLegacyVpnPreferences.values().retainAll(updates);
mAppPreferences.values().retainAll(updates);
// Change {@param updates} in-place to only contain new preferences that were not already
// added to the preference screen.
final PreferenceGroup vpnGroup = getPreferenceScreen();
for (int i = vpnGroup.getPreferenceCount() - 1; i >= 0; i--) {
Preference p = vpnGroup.getPreference(i);
if (updates.contains(p)) {
updates.remove(p);
} else {
vpnGroup.removePreference(p);
}
}
// Show any new preferences on the screen
for (Preference pref : updates) {
vpnGroup.addPreference(pref);
}
}
use of android.annotation.UiThread in project android_packages_apps_Settings by crdroidandroid.
the class VpnSettings method setShownPreferences.
@VisibleForTesting
@UiThread
public void setShownPreferences(final Collection<Preference> updates) {
mLegacyVpnPreferences.values().retainAll(updates);
mAppPreferences.values().retainAll(updates);
// Change {@param updates} in-place to only contain new preferences that were not already
// added to the preference screen.
final PreferenceGroup vpnGroup = getPreferenceScreen();
for (int i = vpnGroup.getPreferenceCount() - 1; i >= 0; i--) {
Preference p = vpnGroup.getPreference(i);
if (updates.contains(p)) {
updates.remove(p);
} else {
vpnGroup.removePreference(p);
}
}
// Show any new preferences on the screen
for (Preference pref : updates) {
vpnGroup.addPreference(pref);
}
}
use of android.annotation.UiThread in project android_packages_apps_Settings by SudaMod.
the class VpnSettings method setShownPreferences.
@VisibleForTesting
@UiThread
public void setShownPreferences(final Collection<Preference> updates) {
mLegacyVpnPreferences.values().retainAll(updates);
mAppPreferences.values().retainAll(updates);
// Change {@param updates} in-place to only contain new preferences that were not already
// added to the preference screen.
final PreferenceGroup vpnGroup = getPreferenceScreen();
for (int i = vpnGroup.getPreferenceCount() - 1; i >= 0; i--) {
Preference p = vpnGroup.getPreference(i);
if (updates.contains(p)) {
updates.remove(p);
} else {
vpnGroup.removePreference(p);
}
}
// Show any new preferences on the screen
for (Preference pref : updates) {
vpnGroup.addPreference(pref);
}
}
Aggregations