Code example for PackageManager

Methods: hasSystemFeature

0
                js = this.fileToString("total-conversion-build.user.js", true);
            } 
        } 
 
        PackageManager pm = mContext.getPackageManager();
        boolean hasMultitouch = pm
                .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);
        boolean forcedZoom = sharedPref.getBoolean("pref_user_zoom", false);
        if (hasMultitouch && !forcedZoom) {
            js = js.replace("window.showZoom = true;",
                    "window.showZoom = false;"); 
        } 
 
        // hide layer chooser on desktop mode 
        // on mobile mode it is hidden via smartphone.css 
        boolean desktopMode = sharedPref.getBoolean("pref_force_desktop", false);
        if (desktopMode) {
            js = js.replace("window.showLayerChooser = true;",
                    "window.showLayerChooser = false"); 
        } 
        // add all plugins to the script...inject plugins + main script simultaneously