Java tutorial
/* * Copyright (c) 2016, Sergey Penkovsky <sergey.penkovsky@gmail.com> * * This file is part of TraccarLitvakM (fork Erlymon Monitor). * * TraccarLitvakM (fork Erlymon Monitor) is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * TraccarLitvakM (fork Erlymon Monitor) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with TraccarLitvakM (fork Erlymon Monitor). If not, see <http://www.gnu.org/licenses/>. */ package org.erlymon.litvak.monitor.view.fragment; import android.os.Build; import android.support.v4.app.DialogFragment; /** * Created by Sergey Penkovsky <sergey.penkovsky@gmail.com> on 23.10.15. */ public class BaseDialogFragment extends DialogFragment { protected boolean isBrokenSamsungDevice() { return (Build.MANUFACTURER.equalsIgnoreCase("samsung") && isBetweenAndroidVersions(Build.VERSION_CODES.LOLLIPOP, Build.VERSION_CODES.LOLLIPOP_MR1)); } protected boolean isBetweenAndroidVersions(int min, int max) { return Build.VERSION.SDK_INT >= min && Build.VERSION.SDK_INT <= max; } }