So I'm overriding onRestoreInstanceState() to restore data when the screen is flipped over, and inside I'm calling getString() to set the text of an instance of EditText:
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mEditText.setText(savedInstanceState.getString(TYPED_TEXT, String.valueOf(R.string.message_empty)));
}
And then, Android Studio 1.0.2 underlines getString() and then gives me a warning: "Call requires API level 21"
The thing is, although I get a warning, when I run the app on an Android device (version 4.0.3 - API 15) it works just fine!
My min SDK is set to Froyo
My target SDK to Lollipop
Does anybody know why I'm getting that warning?