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 | |
| 7 | import android.annotation.Nullable; |
| 8 | import android.content.Context; |
| 9 | import android.content.pm.PackageManager; |
| 10 | |
| 11 | /** |
| 12 | * @hide |
| 13 | */ |
| 14 | public final class RoNoFeatures { |
| 15 | /** |
| 16 | * Check for FEATURE_WATCH. |
| 17 | * |
| 18 | * @hide |
| 19 | */ |
| 20 | public static boolean hasFeatureWatch(Context context) { |
| 21 | return hasFeatureFallback(context, PackageManager.FEATURE_WATCH); |
| 22 | } |
| 23 | |
| 24 | private static boolean hasFeatureFallback(Context context, String featureName) { |
| 25 | return context.getPackageManager().hasSystemFeature(featureName, 0); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * @hide |
| 30 | */ |
| 31 | @Nullable |
| 32 | public static Boolean maybeHasFeature(String featureName, int version) { |
| 33 | return null; |
| 34 | } |
| 35 | } |