Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cab71af0 authored by Russell Myers's avatar Russell Myers
Browse files

Re-enable app_functions on Wear.

The Gemini team now has use-cases for using this service that they previously
did not have aligned on Wear at the time of b/361300136.

This leaves the infrastructure in place such that this can be still configured
across a few locations, which likely would be desirable on other form factors
such as TV and Auto for the time.

Bug: 372711850
Test: Build
Flag: EXEMPT - Feature is already flagged, this controls the Wear variant.
Change-Id: I4abf648a2abc2bcfb6737e6caf057357e7c0ddd4
parent ee17ce99
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import static android.app.appfunctions.flags.Flags.enableAppFunctionManager;

import android.annotation.NonNull;
import android.content.Context;
import android.content.pm.PackageManager;

/**
 * Represents the system configuration of support for the {@code AppFunctionManager} and associated
@@ -29,15 +28,13 @@ import android.content.pm.PackageManager;
 * @hide
 */
public class AppFunctionManagerConfiguration {
    private final Context mContext;

    /**
     * Constructs a new instance of {@code AppFunctionManagerConfiguration}.
     *
     * @param context context
     */
    public AppFunctionManagerConfiguration(@NonNull final Context context) {
        mContext = context;
        // Context can be used to access system features, etc.
    }

    /**
@@ -46,7 +43,7 @@ public class AppFunctionManagerConfiguration {
     * @return {@code true} if supported; otherwise {@code false}
     */
    public boolean isSupported() {
        return enableAppFunctionManager() && !isWatch();
        return enableAppFunctionManager();
    }

    /**
@@ -58,8 +55,4 @@ public class AppFunctionManagerConfiguration {
    public static boolean isSupported(@NonNull final Context context) {
        return new AppFunctionManagerConfiguration(context).isSupported();
    }

    private boolean isWatch() {
        return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH);
    }
}