blob: 40c7db7ff1df3439a97dc048bea7005a81efe2ba [file] [log] [blame]
Jared Duke2d1a8322024-08-23 22:17:09 +00001// This file is auto-generated. DO NOT MODIFY.
2// Args: com.android.systemfeatures.RoNoFeatures \
3// --readonly=true \
4// --feature-apis=WATCH
5package com.android.systemfeatures;
6
Jared Duke568adec2024-09-20 21:11:17 +00007import android.annotation.NonNull;
Jared Duke2d1a8322024-08-23 22:17:09 +00008import android.annotation.Nullable;
9import android.content.Context;
Jared Duke568adec2024-09-20 21:11:17 +000010import android.content.pm.FeatureInfo;
Jared Duke2d1a8322024-08-23 22:17:09 +000011import android.content.pm.PackageManager;
Jared Duke2a90b8f2024-09-19 23:25:21 +000012import android.util.ArrayMap;
Jared Duke2d1a8322024-08-23 22:17:09 +000013
14/**
15 * @hide
16 */
17public final class RoNoFeatures {
18 /**
19 * Check for FEATURE_WATCH.
20 *
21 * @hide
22 */
23 public static boolean hasFeatureWatch(Context context) {
24 return hasFeatureFallback(context, PackageManager.FEATURE_WATCH);
25 }
26
27 private static boolean hasFeatureFallback(Context context, String featureName) {
28 return context.getPackageManager().hasSystemFeature(featureName, 0);
29 }
30
31 /**
32 * @hide
33 */
34 @Nullable
35 public static Boolean maybeHasFeature(String featureName, int version) {
36 return null;
37 }
Jared Duke568adec2024-09-20 21:11:17 +000038
39 /**
40 * Gets features marked as available at compile-time, keyed by name.
41 *
42 * @hide
43 */
44 @NonNull
Jared Duke2a90b8f2024-09-19 23:25:21 +000045 public static ArrayMap<String, FeatureInfo> getReadOnlySystemEnabledFeatures() {
46 ArrayMap<String, FeatureInfo> features = new ArrayMap<>(0);
Jared Duke568adec2024-09-20 21:11:17 +000047 return features;
48 }
Jared Duke2d1a8322024-08-23 22:17:09 +000049}