Skip to content

Commit

Permalink
Call fixSpinner() body only for API 24 otherwise it might throw excep…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
grzesiek2010 committed Sep 20, 2019
1 parent 971c21c commit 4eb3b2b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ public void setTitle(CharSequence title) {
*/
@SuppressWarnings("deprecation")
private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24HourView) {
// android:timePickerMode spinner and clock began in Lollipop
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
try {
// Get the theme's android:timePickerMode
final int MODE_SPINNER = 2;
Expand Down

0 comments on commit 4eb3b2b

Please sign in to comment.