AudioManager audio = (AudioManager) getSystemService(AUDIO_SERVICE);
audio.adjustSuggestedStreamVolume(AudioManager.ADJUST_SAME, AudioManager.USE_DEFAULT_STREAM_TYPE, AudioManager.FLAG_SHOW_UI);
+ if(LauncherHelper.getInstance().isOnSecondaryHomeScreen())
+ U.showToast(this, R.string.tb_opening_volume_control);
+
showStartMenu = false;
shouldHideTaskbar = true;
contextMenuFix = false;
contextMenuFix = false;
break;
case "power_menu":
- U.sendAccessibilityAction(this, AccessibilityService.GLOBAL_ACTION_POWER_DIALOG);
+ U.sendAccessibilityAction(this, AccessibilityService.GLOBAL_ACTION_POWER_DIALOG, () -> {
+ if(LauncherHelper.getInstance().isOnSecondaryHomeScreen())
+ U.showToast(this, R.string.tb_opening_power_menu);
+ });
showStartMenu = false;
shouldHideTaskbar = true;
if(!U.isLibrary(context)) {
sysTrayLayout.setOnClickListener(v -> {
- U.sendAccessibilityAction(context, AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS,
- () -> U.showToast(context, R.string.tb_opening_notification_tray));
+ U.sendAccessibilityAction(context, AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS, () -> {
+ if(LauncherHelper.getInstance().isOnSecondaryHomeScreen())
+ U.showToast(context, R.string.tb_opening_notification_tray);
+ });
+
if(U.shouldCollapse(context, false))
hideTaskbar(true);
});
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
sysTrayLayout.setOnLongClickListener(v -> {
- U.sendAccessibilityAction(context, AccessibilityService.GLOBAL_ACTION_QUICK_SETTINGS,
- () -> U.showToast(context, R.string.tb_opening_quick_settings));
+ U.sendAccessibilityAction(context, AccessibilityService.GLOBAL_ACTION_QUICK_SETTINGS, () -> {
+ if(LauncherHelper.getInstance().isOnSecondaryHomeScreen())
+ U.showToast(context, R.string.tb_opening_quick_settings);
+ });
+
if(U.shouldCollapse(context, false))
hideTaskbar(true);
sysTrayLayout.setOnGenericMotionListener((view, motionEvent) -> {
if(motionEvent.getAction() == MotionEvent.ACTION_BUTTON_PRESS
&& motionEvent.getButtonState() == MotionEvent.BUTTON_SECONDARY) {
- U.sendAccessibilityAction(context, AccessibilityService.GLOBAL_ACTION_QUICK_SETTINGS,
- () -> U.showToast(context, R.string.tb_opening_quick_settings));
+ U.sendAccessibilityAction(context, AccessibilityService.GLOBAL_ACTION_QUICK_SETTINGS, () -> {
+ if(LauncherHelper.getInstance().isOnSecondaryHomeScreen())
+ U.showToast(context, R.string.tb_opening_quick_settings);
+ });
+
if(U.shouldCollapse(context, false))
hideTaskbar(true);
}
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
\ No newline at end of file
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
\ No newline at end of file
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
\ No newline at end of file
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
\ No newline at end of file
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>
\ No newline at end of file
<string name="tb_hide_icon_labels">Hide app icon labels</string>
- <string name="tb_opening_notification_tray">Opening notification tray on primary display</string>
- <string name="tb_opening_quick_settings">Opening quick settings on primary display</string>
+ <string name="tb_opening_notification_tray">Opened notification tray on primary display</string>
+ <string name="tb_opening_quick_settings">Opened quick settings on primary display</string>
+ <string name="tb_opening_volume_control">Opened volume control on primary display</string>
+ <string name="tb_opening_power_menu">Opened power menu on primary display</string>
</resources>