diff options
| author | 2018-06-19 15:12:42 -0400 | |
|---|---|---|
| committer | 2018-06-21 14:05:01 -0400 | |
| commit | c9afb8ba064174df8112d6cf2bea5b5d2170b47a (patch) | |
| tree | b00b237e6a8b7ec8520bb6e83493d25b38c55e62 | |
| parent | f910fdb1daf1bd3c28222efde503e2ff8de5c027 (diff) | |
Remove managed profile toast
Change-Id: I9f324a94d7fab35b0f00a1bd9c675708dac6f85a
Fixes: 110418889
Test: atest SystemUITests
3 files changed, 0 insertions, 30 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 3b58b7249b05..34d71da2c017 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -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> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index edf56afad714..18f378e5919b 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -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 --> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java index 1287ced8594c..25684ff651fd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java @@ -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; } |