Loading packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +10 −6 Original line number Original line Diff line number Diff line Loading @@ -217,7 +217,8 @@ public class ScreenPinningRequest implements View.OnClickListener { mLayout.findViewById(R.id.screen_pinning_text_area) mLayout.findViewById(R.id.screen_pinning_text_area) .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); if (Recents.getSystemServices().hasSoftNavigationBar()) { if (Recents.getSystemServices() != null && Recents.getSystemServices().hasSoftNavigationBar()) { buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); swapChildrenIfRtlAndVertical(buttons); swapChildrenIfRtlAndVertical(buttons); } else { } else { Loading @@ -235,7 +236,8 @@ public class ScreenPinningRequest implements View.OnClickListener { } } StatusBar statusBar = SysUiServiceProvider.getComponent(mContext, StatusBar.class); StatusBar statusBar = SysUiServiceProvider.getComponent(mContext, StatusBar.class); NavigationBarView navigationBarView = statusBar.getNavigationBarView(); NavigationBarView navigationBarView = statusBar != null ? statusBar.getNavigationBarView() : null; final boolean recentsVisible = navigationBarView != null final boolean recentsVisible = navigationBarView != null && navigationBarView.isRecentsButtonVisible(); && navigationBarView.isRecentsButtonVisible(); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); Loading @@ -256,10 +258,12 @@ public class ScreenPinningRequest implements View.OnClickListener { : R.string.screen_pinning_description_recents_invisible; : R.string.screen_pinning_description_recents_invisible; } } if (navigationBarView != null) { ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) .setImageDrawable(navigationBarView.getBackDrawable(mContext)); .setImageDrawable(navigationBarView.getBackDrawable(mContext)); ((ImageView) mLayout.findViewById(R.id.screen_pinning_home_icon)) ((ImageView) mLayout.findViewById(R.id.screen_pinning_home_icon)) .setImageDrawable(navigationBarView.getHomeDrawable(mContext)); .setImageDrawable(navigationBarView.getHomeDrawable(mContext)); } ((TextView) mLayout.findViewById(R.id.screen_pinning_description)) ((TextView) mLayout.findViewById(R.id.screen_pinning_description)) .setText(descriptionStringResId); .setText(descriptionStringResId); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenPinningNotify.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -42,17 +42,17 @@ public class ScreenPinningNotify { } } /** Show "Screen pinned" toast. */ /** Show "Screen pinned" toast. */ void showPinningStartToast() { public void showPinningStartToast() { makeAllUserToastAndShow(R.string.screen_pinning_start); makeAllUserToastAndShow(R.string.screen_pinning_start); } } /** Show "Screen unpinned" toast. */ /** Show "Screen unpinned" toast. */ void showPinningExitToast() { public void showPinningExitToast() { makeAllUserToastAndShow(R.string.screen_pinning_exit); makeAllUserToastAndShow(R.string.screen_pinning_exit); } } /** Show a toast that describes the gesture the user should use to escape pinned mode. */ /** Show a toast that describes the gesture the user should use to escape pinned mode. */ void showEscapeToast(boolean isRecentsButtonVisible) { public void showEscapeToast(boolean isRecentsButtonVisible) { long showToastTime = SystemClock.elapsedRealtime(); long showToastTime = SystemClock.elapsedRealtime(); if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) { if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) { Slog.i(TAG, "Ignore toast since it is requested in very short interval."); Slog.i(TAG, "Ignore toast since it is requested in very short interval."); Loading Loading
packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +10 −6 Original line number Original line Diff line number Diff line Loading @@ -217,7 +217,8 @@ public class ScreenPinningRequest implements View.OnClickListener { mLayout.findViewById(R.id.screen_pinning_text_area) mLayout.findViewById(R.id.screen_pinning_text_area) .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); if (Recents.getSystemServices().hasSoftNavigationBar()) { if (Recents.getSystemServices() != null && Recents.getSystemServices().hasSoftNavigationBar()) { buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); swapChildrenIfRtlAndVertical(buttons); swapChildrenIfRtlAndVertical(buttons); } else { } else { Loading @@ -235,7 +236,8 @@ public class ScreenPinningRequest implements View.OnClickListener { } } StatusBar statusBar = SysUiServiceProvider.getComponent(mContext, StatusBar.class); StatusBar statusBar = SysUiServiceProvider.getComponent(mContext, StatusBar.class); NavigationBarView navigationBarView = statusBar.getNavigationBarView(); NavigationBarView navigationBarView = statusBar != null ? statusBar.getNavigationBarView() : null; final boolean recentsVisible = navigationBarView != null final boolean recentsVisible = navigationBarView != null && navigationBarView.isRecentsButtonVisible(); && navigationBarView.isRecentsButtonVisible(); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); boolean touchExplorationEnabled = mAccessibilityService.isTouchExplorationEnabled(); Loading @@ -256,10 +258,12 @@ public class ScreenPinningRequest implements View.OnClickListener { : R.string.screen_pinning_description_recents_invisible; : R.string.screen_pinning_description_recents_invisible; } } if (navigationBarView != null) { ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) ((ImageView) mLayout.findViewById(R.id.screen_pinning_back_icon)) .setImageDrawable(navigationBarView.getBackDrawable(mContext)); .setImageDrawable(navigationBarView.getBackDrawable(mContext)); ((ImageView) mLayout.findViewById(R.id.screen_pinning_home_icon)) ((ImageView) mLayout.findViewById(R.id.screen_pinning_home_icon)) .setImageDrawable(navigationBarView.getHomeDrawable(mContext)); .setImageDrawable(navigationBarView.getHomeDrawable(mContext)); } ((TextView) mLayout.findViewById(R.id.screen_pinning_description)) ((TextView) mLayout.findViewById(R.id.screen_pinning_description)) .setText(descriptionStringResId); .setText(descriptionStringResId); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScreenPinningNotify.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -42,17 +42,17 @@ public class ScreenPinningNotify { } } /** Show "Screen pinned" toast. */ /** Show "Screen pinned" toast. */ void showPinningStartToast() { public void showPinningStartToast() { makeAllUserToastAndShow(R.string.screen_pinning_start); makeAllUserToastAndShow(R.string.screen_pinning_start); } } /** Show "Screen unpinned" toast. */ /** Show "Screen unpinned" toast. */ void showPinningExitToast() { public void showPinningExitToast() { makeAllUserToastAndShow(R.string.screen_pinning_exit); makeAllUserToastAndShow(R.string.screen_pinning_exit); } } /** Show a toast that describes the gesture the user should use to escape pinned mode. */ /** Show a toast that describes the gesture the user should use to escape pinned mode. */ void showEscapeToast(boolean isRecentsButtonVisible) { public void showEscapeToast(boolean isRecentsButtonVisible) { long showToastTime = SystemClock.elapsedRealtime(); long showToastTime = SystemClock.elapsedRealtime(); if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) { if ((showToastTime - mLastShowToastTime) < SHOW_TOAST_MINIMUM_INTERVAL) { Slog.i(TAG, "Ignore toast since it is requested in very short interval."); Slog.i(TAG, "Ignore toast since it is requested in very short interval."); Loading