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

Commit c9afb8ba authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Remove managed profile toast

Change-Id: I9f324a94d7fab35b0f00a1bd9c675708dac6f85a
Fixes: 110418889
Test: atest SystemUITests
parent f910fdb1
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -764,9 +764,6 @@
    <dimen name="volume_expander_margin_end">2dp</dimen>
    <dimen name="volume_expander_margin_top">6dp</dimen>

    <!-- Padding between icon and text for managed profile toast -->
    <dimen name="managed_profile_toast_padding">4dp</dimen>

    <!-- Thickness of the assist disclosure beams -->
    <dimen name="assist_disclosure_thickness">2.5dp</dimen>

+0 −3
Original line number Diff line number Diff line
@@ -1326,9 +1326,6 @@
    <!-- Hide quick settings tile confirmation button -->
    <string name="quick_settings_reset_confirmation_button">Hide</string>

    <!-- Toast shown when user unlocks screen and managed profile activity is in the foreground -->
    <string name="managed_profile_foreground_toast">You\'re using your work profile</string>

    <!-- volume stream names. All nouns. -->
    <string name="stream_voice_call">Call</string> <!-- STREAM_VOICE_CALL -->
    <string name="stream_system">System</string> <!-- STREAM_SYSTEM -->
+0 −24
Original line number Diff line number Diff line
@@ -108,16 +108,6 @@ public class NotificationLockscreenUserManager implements Dumpable {
            } else if (Intent.ACTION_USER_UNLOCKED.equals(action)) {
                // Start the overview connection to the launcher service
                Dependency.get(OverviewProxyService.class).startConnectionToCurrentUser();
            } else if (Intent.ACTION_USER_PRESENT.equals(action)) {
                try {
                    final int lastResumedActivityUserId =
                            ActivityManager.getService().getLastResumedActivityUserId();
                    if (mUserManager.isManagedProfile(lastResumedActivityUserId)) {
                        showForegroundManagedProfileActivityToast();
                    }
                } catch (RemoteException e) {
                    // Abandon hope activity manager not running.
                }
            } else if (NOTIFICATION_UNLOCKED_BY_WORK_CHALLENGE_ACTION.equals(action)) {
                final IntentSender intentSender = intent.getParcelableExtra(Intent.EXTRA_INTENT);
                final String notificationKey = intent.getStringExtra(Intent.EXTRA_INDEX);
@@ -224,7 +214,6 @@ public class NotificationLockscreenUserManager implements Dumpable {
        IntentFilter filter = new IntentFilter();
        filter.addAction(Intent.ACTION_USER_SWITCHED);
        filter.addAction(Intent.ACTION_USER_ADDED);
        filter.addAction(Intent.ACTION_USER_PRESENT);
        filter.addAction(Intent.ACTION_USER_UNLOCKED);
        mContext.registerReceiver(mBaseBroadcastReceiver, filter);

@@ -237,19 +226,6 @@ public class NotificationLockscreenUserManager implements Dumpable {
        mSettingsObserver.onChange(false);  // set up
    }

    private void showForegroundManagedProfileActivityToast() {
        Toast toast = Toast.makeText(mContext,
                R.string.managed_profile_foreground_toast,
                Toast.LENGTH_SHORT);
        TextView text = toast.getView().findViewById(android.R.id.message);
        text.setCompoundDrawablesRelativeWithIntrinsicBounds(
                R.drawable.stat_sys_managed_profile_status, 0, 0, 0);
        int paddingPx = mContext.getResources().getDimensionPixelSize(
                R.dimen.managed_profile_toast_padding);
        text.setCompoundDrawablePadding(paddingPx);
        toast.show();
    }

    public boolean shouldShowLockscreenNotifications() {
        return mShowLockscreenNotifications;
    }