Skip to content

Instantly share code, notes, and snippets.

@RamitPahwa
Created Jul 27, 2021
Embed
What would you like to do?
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