Skip to content

Instantly share code, notes, and snippets.

@trevd
Created June 21, 2014 00:18
Show Gist options
  • Save trevd/ad80f72875e719429435 to your computer and use it in GitHub Desktop.
Save trevd/ad80f72875e719429435 to your computer and use it in GitHub Desktop.
streamline
String button_text = mAppEntry.info.enabled ? R.string.disable_text : R.string.enable_text ;
if (!mAppEntry.info.packageName.contains("com.android.cellbroadcastreceiver") &&
( mHomePackages.contains(mAppEntry.info.packageName) || isThisASystemPackage())){
button.setText(R.string.disable_text);
}else {
button.setText(button_text);
disableable = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment