Checks if the device has a accelerometer sensor.
@param manager the package manager.
@return {@code true} if the device has a accelerometer sensor.
545957
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasAccelerometerSensorFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SENSOR_ACCELEROMETER);
    }
436102
@Override
	public boolean isMachineRunning( TargetHandlerParameters parameters, String machineId )
	throws TargetException {

		boolean result;
		try {
			final ServiceInstance vmwareServiceInstance = getServiceInstance( parameters.getTargetProperties());
			VirtualMachine vm = getVirtualMachine( vmwareServiceInstance, machineId );
			result = vm != null;

		} catch( Exception e ) {
			throw new TargetException( e );
		}

		return result;
	}
372248
def is_current_manager_equals_to(cls, pm):
        """"""
        if hasattr(cls, 'works_result'):
            return cls.works_result
        is_ok = bool(cls._try_get_current_manager() == pm)
        setattr(cls, 'works_result', is_ok)
        return is_ok
80780
private boolean isAccelerating(SensorEvent event) {
		float ax = event.values[0];
		float ay = event.values[1];
		float az = event.values[2];

		final double magnitude = Math.sqrt(ax * ax + ay * ay + az * az);
		return magnitude > ACCELERATION_THRESHOLD;
	}
1329720
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    public static boolean hasTelevisionFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_TELEVISION);
    }
752749
def motion_sensor(self, enabled):
        """"""
        if enabled is True:
            value = CONST.SETTINGS_MOTION_POLICY_ON
        elif enabled is False:
            value = CONST.SETTINGS_MOTION_POLICY_OFF
        else:
            raise SkybellException(ERROR.INVALID_SETTING_VALUE,
                                   (CONST.SETTINGS_MOTION_POLICY, enabled))

        self._set_setting({CONST.SETTINGS_MOTION_POLICY: value})
591984
@TargetApi(Build.VERSION_CODES.KITKAT)
    public static boolean hasConsumerIrFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_CONSUMER_IR);
    }
1344422
public static boolean isRotationEnabled(Context context) {
        return android.provider.Settings.System.getInt(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 1;
    }
1099953
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasSipVoipFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SIP_VOIP);
    }
46279
public boolean hasAllMandatoryParameters() {
        if (this.f_Parameters.get(_INDEX_F_MessageType) == null
                || this.f_Parameters.get(_INDEX_F_MessageType).getCode() != this.getMessageType().getCode()) {
            return false;
        }

        return true;
    }
251663
private void checkForest(Set<Sensor> sensors) {
        if (!sensors.add(this))
            throw new IllegalArgumentException("Circular dependency in sensors: " + name() + " is its own parent.");
        for (int i = 0; i < parents.length; i++)
            parents[i].checkForest(sensors);
    }
368419
private boolean hasVibratePermission(Context context) {
        PackageManager pm = context.getPackageManager();
        int hasPerm = pm.checkPermission(android.Manifest.permission.VIBRATE, context.getPackageName());
        return hasPerm == PackageManager.PERMISSION_GRANTED;
    }
65373
public boolean isEnabledSaslMechanism(String saslMechanism) {
        // If enabledSaslMechanisms is not set, then all mechanisms which are not blacklisted are enabled per default.
        if (enabledSaslMechanisms == null) {
            return !SASLAuthentication.getBlacklistedSASLMechanisms().contains(saslMechanism);
        }
        return enabledSaslMechanisms.contains(saslMechanism);
    }
1033147
private function isDeferredExplicit(DoctrineObjectManager $manager, $data): bool
    {
        $classMetadata = $manager->getClassMetadata($this->getObjectClass($data));
        if ($classMetadata instanceof ClassMetadataInfo && method_exists($classMetadata, 'isChangeTrackingDeferredExplicit')) {
            return $classMetadata->isChangeTrackingDeferredExplicit();
        }

        return false;
    }
152607
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasGyroscopeSensorFeature(Context context) {
        return hasGyroscopeSensorFeature(context.getPackageManager());
    }
1327259
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static boolean hasInputMethodsFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_INPUT_METHODS);
    }
325482
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasLocationFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_LOCATION);
    }