use of com.android.settings.rr.Preferences.PackageListAdapter in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BatterySettings method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.aggressive_battery);
mFooterPreferenceMixin.createFooterPreference().setTitle(R.string.add_sensor_block_package_summary);
final PreferenceScreen prefScreen = getPreferenceScreen();
mPackageManager = getPackageManager();
mPackageAdapter = new PackageListAdapter(getActivity());
mSensorBlockPrefList = (PreferenceGroup) findPreference("sensor_block_applications");
mSensorBlockPrefList.setOrderingAsAdded(false);
mBlockedPackages = new HashMap<String, Package>();
mAddSensorBlockPref = findPreference("add_sensor_block_packages");
mAddSensorBlockPref.setOnPreferenceClickListener(this);
mContext = getActivity().getApplicationContext();
int anim = Settings.System.getInt(getActivity().getContentResolver(), Settings.System.RR_CONFIG_ANIM, 0);
try {
if (anim == 0) {
removePreference("animation");
} else if (anim == 1) {
removePreference("preview");
} else if (anim == 2) {
removePreference("animation");
removePreference("preview");
}
} catch (Exception e) {
}
}
Aggregations