Skip to content

Instantly share code, notes, and snippets.

@RamitPahwa
Created July 27, 2021 11:27
Show Gist options
  • Save RamitPahwa/946bfd8a0ad6dd5a32055ded97df0d85 to your computer and use it in GitHub Desktop.
Save RamitPahwa/946bfd8a0ad6dd5a32055ded97df0d85 to your computer and use it in GitHub Desktop.
private void updateCanSayHello()
{
boolean canSayHello = false;
if(isAFWManagedApp(getContext()) || isAFWManagedDevice(getContext()))
{
canSayHello = isAFWCanSayHello(getContext());
}
mTextSayHello.setText(canSayHello ?
R.string.explanation_can_say_hello_true :
R.string.explanation_can_say_hello_false);
mButtonSayHello.setEnabled(canSayHello);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment