Jared Duke | 2d1a832 | 2024-08-23 22:17:09 +0000 | [diff] [blame] | 1 | // This file is auto-generated. DO NOT MODIFY. |
| 2 | // Args: com.android.systemfeatures.RoNoFeatures \ |
| 3 | // --readonly=true \ |
| 4 | // --feature-apis=WATCH |
| 5 | package com.android.systemfeatures; |
| 6 | |
Jared Duke | 568adec | 2024-09-20 21:11:17 +0000 | [diff] [blame^] | 7 | import android.annotation.NonNull; |
Jared Duke | 2d1a832 | 2024-08-23 22:17:09 +0000 | [diff] [blame] | 8 | import android.annotation.Nullable; |
| 9 | import android.content.Context; |
Jared Duke | 568adec | 2024-09-20 21:11:17 +0000 | [diff] [blame^] | 10 | import android.content.pm.FeatureInfo; |
Jared Duke | 2d1a832 | 2024-08-23 22:17:09 +0000 | [diff] [blame] | 11 | import android.content.pm.PackageManager; |
Jared Duke | 568adec | 2024-09-20 21:11:17 +0000 | [diff] [blame^] | 12 | import java.util.HashMap; |
| 13 | import java.util.Map; |
Jared Duke | 2d1a832 | 2024-08-23 22:17:09 +0000 | [diff] [blame] | 14 | |
| 15 | /** |
| 16 | * @hide |
| 17 | */ |
| 18 | public final class RoNoFeatures { |
| 19 | /** |
| 20 | * Check for FEATURE_WATCH. |
| 21 | * |
| 22 | * @hide |
| 23 | */ |
| 24 | public static boolean hasFeatureWatch(Context context) { |
| 25 | return hasFeatureFallback(context, PackageManager.FEATURE_WATCH); |
| 26 | } |
| 27 | |
| 28 | private static boolean hasFeatureFallback(Context context, String featureName) { |
| 29 | return context.getPackageManager().hasSystemFeature(featureName, 0); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * @hide |
| 34 | */ |
| 35 | @Nullable |
| 36 | public static Boolean maybeHasFeature(String featureName, int version) { |
| 37 | return null; |
| 38 | } |
Jared Duke | 568adec | 2024-09-20 21:11:17 +0000 | [diff] [blame^] | 39 | |
| 40 | /** |
| 41 | * Gets features marked as available at compile-time, keyed by name. |
| 42 | * |
| 43 | * @hide |
| 44 | */ |
| 45 | @NonNull |
| 46 | public static Map<String, FeatureInfo> getCompileTimeAvailableFeatures() { |
| 47 | Map<String, FeatureInfo> features = new HashMap<>(0); |
| 48 | return features; |
| 49 | } |
Jared Duke | 2d1a832 | 2024-08-23 22:17:09 +0000 | [diff] [blame] | 50 | } |