Checks if the device has a step detector sensor.
@param context the context.
@return {@code true} if the device has a step detector sensor.
777046
@TargetApi(Build.VERSION_CODES.KITKAT)
    public static boolean hasStepDetectorSensorFeature(Context context) {
        return hasStepDetectorSensorFeature(context.getPackageManager());
    }
1039930
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasNfcFeature(Context context) {
        return hasNfcFeature(context.getPackageManager());
    }
927177
protected boolean isMethodInstrumentedByThisAdapter() {
        if (injectedTraceAnnotationVisitor == null) {
            return false;
        }

        List<String> visitedMethodAdapters = injectedTraceAnnotationVisitor.getMethodAdapters();
        return visitedMethodAdapters.contains(getClass().getName());
    }
660877
private boolean isNewStep(RouteProgress routeProgress) {
    boolean isNewStep = currentStep == null || !currentStep.equals(routeProgress.currentLegProgress().currentStep());
    currentStep = routeProgress.currentLegProgress().currentStep();
    resetAlertLevels(isNewStep);
    return isNewStep;
  }
1165268
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasCompassSensorFeature(Context context) {
        return hasCompassSensorFeature(context.getPackageManager());
    }
198894
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1)
    public static boolean hasUsbHostFeature(Context context) {
        return hasUsbHostFeature(context.getPackageManager());
    }
1332316
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasBarometerSensorFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SENSOR_BAROMETER);
    }
585063
@TargetApi(Build.VERSION_CODES.FROYO)
    public static boolean hasLocationFeature(Context context) {
        return hasLocationFeature(context.getPackageManager());
    }
465505
public boolean isManagerOfProject(CmsRequestContext context) {

        try {
            return getAllManageableProjects(
                context,
                readOrganizationalUnit(context, context.getCurrentProject().getOuFqn()),
                false).contains(context.getCurrentProject());
        } catch (CmsException e) {
            // should never happen
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            return false;
        }
    }
446777
public static boolean isSupportVIVOPush(Context context) {
    com.vivo.push.PushClient client = com.vivo.push.PushClient.getInstance(context);
    if (null == client) {
      return false;
    }
    return client.isSupport();
  }
1323008
protected boolean isGatewayPresent(final RequestContext context) {
        val requestParameterMap = context.getExternalContext().getRequestParameterMap();
        return StringUtils.hasText(requestParameterMap.get(CasProtocolConstants.PARAMETER_GATEWAY));
    }
704592
public static boolean isEnabled(UICommand command, UIContext context)
   {
      return (command.isEnabled(context) && !(command instanceof UIWizardStep));
   }
1373696
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasLowLatencyAudioFeature(Context context) {
        return hasLowLatencyAudioFeature(context.getPackageManager());
    }
41712
protected static Boolean isCharging(Context ctx) {
        try {
            Intent intent = ctx.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
            if (intent == null) {
                return null;
            }

            int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
            return plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB;
        } catch (Exception e) {
            Log.e(TAG, "Error getting device charging state.", e);
            return null;
        }
    }
94530
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasGyroscopeSensorFeature(PackageManager manager) {
        return manager.hasSystemFeature(PackageManager.FEATURE_SENSOR_GYROSCOPE);
    }
51313
public static boolean isContextForeground(Context context) {

		ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
		List<RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
		int pid = getPid();
		for (RunningAppProcessInfo appProcess : appProcesses) {
			if (appProcess.pid == pid) {
				return appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
			}
		}
		return false;
	}
625079
public static boolean isTopApplication(Context context) {
		ComponentName activity = getTopActivity(context);
		if (activity == null) {
			return false;
		}
		return activity.getPackageName().equals(context.getApplicationInfo().packageName);
	}