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

Commit 54f63d65 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Checking for success of interactions with Wellbeing" into ub-launcher3-rvc-dev

parents 73763959 bd7ee736
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ public final class WellbeingModel {
    private static final String EXTRA_ACTION = "action";
    private static final String EXTRA_MAX_NUM_ACTIONS_SHOWN = "max_num_actions_shown";
    private static final String EXTRA_PACKAGES = "packages";
    private static final String EXTRA_SUCCESS = "success";

    public static final MainThreadInitializedObject<WellbeingModel> INSTANCE =
            new MainThreadInitializedObject<>(WellbeingModel::new);
@@ -221,6 +222,7 @@ public final class WellbeingModel {
            params.putInt(EXTRA_MAX_NUM_ACTIONS_SHOWN, 1);
            // Perform wellbeing call .
            remoteActionBundle = client.call(METHOD_GET_ACTIONS, null, params);
            if (!remoteActionBundle.getBoolean(EXTRA_SUCCESS, true)) return false;

            synchronized (mModelLock) {
                // Remove the entries for requested packages, and then update the fist with what we