app/src/main/java/fr/neamar/kiss/utils/ShortcutUtil.java
/**
     * @return true if shortcuts are enabled in settings and android version is higher or equals android 8
     */
@return true if shortcuts are enabled in settings and android version is higher or equals android 8
@return true if shortcuts are enabled in settings and android version is higher or equals android 8
public static boolean areShortcutsEnabled(Context context){
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
        return android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
                prefs.getBoolean("enable-shortcuts", true);
    }
public static boolean areShortcutsEnabled ( Context context ) { SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ; return android . os . Build . VERSION . SDK_INT >= Build . VERSION_CODES . O && prefs . getBoolean ( "enable-shortcuts" , true ) ; }
@return true if shortcuts are enabled in settings and android version is higher or equals android 8
@return true if shortcuts are enabled in settings and android version is higher or equals android 8