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

Commit 9305badf authored by Oli Thompson's avatar Oli Thompson Committed by Android (Google) Code Review
Browse files

Merge "Show edu card when managed profile removed" into main

parents c9efd81d 3ea1acb8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,9 +50,9 @@
                android:id="@+id/action_btn"
                android:layout_width="@dimen/x_icon_size"
                android:layout_height="@dimen/x_icon_size"
                android:scaleType="centerInside"
                android:layout_gravity="center"
                android:contentDescription="@string/accessibility_close"
                android:padding="@dimen/x_icon_padding"
                android:background="@android:color/transparent"
                android:src="@drawable/ic_remove_no_shadow" />
        </FrameLayout>
+0 −1
Original line number Diff line number Diff line
@@ -167,7 +167,6 @@
    <!-- (x) icon button inside work edu card -->
    <dimen name="rounded_button_width">24dp</dimen>
    <dimen name="x_icon_size">16dp</dimen>
    <dimen name="x_icon_padding">4dp</dimen>

    <!-- rounded button shown inside card views, and snack bars  -->
    <dimen name="padded_rounded_button_height">48dp</dimen>
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.launcher3;
import static android.app.admin.DevicePolicyManager.ACTION_DEVICE_POLICY_RESOURCE_UPDATED;

import static com.android.launcher3.LauncherAppState.ACTION_FORCE_ROLOAD;
import static com.android.launcher3.LauncherPrefs.WORK_EDU_STEP;
import static com.android.launcher3.config.FeatureFlags.IS_STUDIO_BUILD;
import static com.android.launcher3.icons.cache.BaseIconCache.EMPTY_CLASS_NAME;
import static com.android.launcher3.model.PackageUpdatedTask.OP_UPDATE;
@@ -276,6 +277,9 @@ public class LauncherModel implements InstallSessionTracker.Callback {
            enqueueModelUpdateTask(new PackageUpdatedTask(
                    PackageUpdatedTask.OP_USER_AVAILABILITY_CHANGE, user));
        }
        if (Intent.ACTION_MANAGED_PROFILE_REMOVED.equals(action)) {
            LauncherPrefs.get(mApp.getContext()).put(WORK_EDU_STEP, 0);
        }
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ public class UserCache implements SafeCloseable {
        mUserChangeReceiver.register(mContext,
                Intent.ACTION_MANAGED_PROFILE_AVAILABLE,
                Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE,
                Intent.ACTION_MANAGED_PROFILE_REMOVED,
                ACTION_PROFILE_ADDED,
                ACTION_PROFILE_REMOVED,
                ACTION_PROFILE_UNLOCKED,