Checks if the device has a landscape screen.
@param manager the package manager.
@return {@code true} if the device has a landscape screen.
976961
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
    public static boolean hasLandscapeScreenFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SCREEN_LANDSCAPE);
    }
982218
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasDistinctMultiTouchScreenFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT);
    }
804008
public static boolean isPackageInstalled(Context context, String targetPackage) {
        PackageManager manager = context.getPackageManager();
        Intent intent = new Intent();
        intent.setPackage(targetPackage);
        return manager.resolveActivity(intent, 0) != null;
    }
965472
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public static boolean hasFakeTouchFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_FAKETOUCH);
    }
1306197
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasTouchScreenFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN);
    }
1020307
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasCompassSensorFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SENSOR_COMPASS);
    }
900361
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static boolean hasBluetoothLEFeature(Context context) {
        return hasBluetoothLEFeature(context.getPackageManager());
    }
265006
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasGpsLocationFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS);
    }
744011
@Override
	public boolean isMachineRunning( TargetHandlerParameters parameters, String machineId )
	throws TargetException {

		this.logger.fine( "Verifying the in-memory agent for " + machineId + " is running." );
		Map<String,String> targetProperties = preventNull( parameters.getTargetProperties());

		// No agent factory => no iPojo instance => not running
		boolean result = false;
		if( this.standardAgentFactory != null )
			result = this.standardAgentFactory.getInstancesNames().contains( machineId );

		// On restoration, in-memory agents will ALL have disappeared.
		// So, it makes sense to recreate them if they do not exist anymore.
		// To determine whether we should restore them or no, we look for the model in the manager.
		if( ! result && ! simulatePlugins( targetProperties )) {

			Map.Entry<String,String> ctx = parseMachineId( machineId );
			ManagedApplication ma = this.manager.applicationMngr().findManagedApplicationByName( ctx.getValue());
			Instance scopedInstance = InstanceHelpers.findInstanceByPath( ma.getApplication(), ctx.getKey());

			// Is it supposed to be running?
			if( scopedInstance.getStatus() != InstanceStatus.NOT_DEPLOYED ) {
				this.logger.fine( "In-memory agent for " + machineId + " is supposed to be running but is not. It will be restored." );
				Map<String,String> messagingConfiguration = this.manager.messagingMngr().getMessagingClient().getConfiguration();
				Factory factory = findIPojoFactory( parameters );
				createIPojo( targetProperties, messagingConfiguration, machineId, ctx.getKey(), ctx.getValue(), this.manager.getDomain(), factory );
				result = true;
				// The agent will restore its model by asking it to the DM.
			}
		}

		return result;
	}
1150122
protected boolean hasPermission(final String permission) {
        if (getPrincipal() == null) {
            return false;
        }
        try (AlpineQueryManager qm = new AlpineQueryManager()) {
            boolean hasPermission = false;
            if (getPrincipal() instanceof ApiKey) {
                hasPermission = qm.hasPermission((ApiKey)getPrincipal(), permission);
            } else if (getPrincipal() instanceof UserPrincipal) {
                hasPermission = qm.hasPermission((UserPrincipal)getPrincipal(), permission, true);
            }
            return hasPermission;
        }
    }
441812
private void configureEnabled(Manager manager) {
		if (enabled != manager.isEnabled()) {
			if (enabled) {
				manager.enable();
			} else {
				manager.disable();
			}
		}
	}
577880
public boolean isInputVertex() {

		if (this.backwardEdges.size() == 0) {
			return true;
		}

		final Iterator<ManagementGroupEdge> it = this.backwardEdges.iterator();
		while (it.hasNext()) {
			if (it.next().getSource().getStageNumber() == this.getStageNumber()) {
				return false;
			}
		}

		return true;
	}
1356421
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    public static boolean hasWifiDirectFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT);
    }
701353
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static boolean hasBluetoothLEFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE);
    }
494319
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasLowLatencyAudioFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
    }
261951
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasBluetoothFeature(Context context) {
        return hasBluetoothFeature(context.getPackageManager());
    }
1305194
public boolean hasSelectFolder() {

        if (hasSelectResource()) {
            for (CmsResourceTypeBean type : m_dialogBean.getTypes()) {
                if (type.getType().contains(I_CmsGalleryProviderConstants.RESOURCE_TYPE_FOLDER)) {
                    return true;
                }
            }
        }
        return false;
    }