Loading core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4024,7 +4024,7 @@ <string name="date_picker_day_typeface">sans-serif-medium</string> <!-- Notify use that they are in Lock-to-app --> <string name="lock_to_app_toast">To unpin this screen, touch and hold Back and Overview at the same time.</string> <string name="lock_to_app_toast">To unpin this screen, touch and hold Back.</string> <!-- Notify use that they are in Lock-to-app in accessibility mode --> <string name="lock_to_app_toast_accessible">To unpin this screen, touch and hold Overview.</string> <!-- Notify user that they are locked in lock-to-app mode --> Loading packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +8 −3 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.os.RemoteException; import android.util.DisplayMetrics; Loading Loading @@ -204,11 +205,15 @@ public class ScreenPinningRequest implements View.OnClickListener { // Status bar is always on the right. mLayout.setLayoutDirection(View.LAYOUT_DIRECTION_LTR); // Buttons and text do switch sides though. View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); mLayout.findViewById(R.id.screen_pinning_text_area) .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); if (Recents.getSystemServices().hasSoftNavigationBar()) { buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); swapChildrenIfRtlAndVertical(buttons); } else { buttons.setVisibility(View.GONE); } ((Button) mLayout.findViewById(R.id.screen_pinning_ok_button)) .setOnClickListener(ScreenPinningRequest.this); Loading packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +12 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,18 @@ public class SystemServicesProxy { return false; } /** * Returns whether there is a soft nav bar. */ public boolean hasSoftNavigationBar() { try { return WindowManagerGlobal.getWindowManagerService().hasNavigationBar(); } catch (RemoteException e) { e.printStackTrace(); } return false; } /** * Cancels the current window transtion to/from Recents for the given task id. */ Loading Loading
core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4024,7 +4024,7 @@ <string name="date_picker_day_typeface">sans-serif-medium</string> <!-- Notify use that they are in Lock-to-app --> <string name="lock_to_app_toast">To unpin this screen, touch and hold Back and Overview at the same time.</string> <string name="lock_to_app_toast">To unpin this screen, touch and hold Back.</string> <!-- Notify use that they are in Lock-to-app in accessibility mode --> <string name="lock_to_app_toast_accessible">To unpin this screen, touch and hold Overview.</string> <!-- Notify user that they are locked in lock-to-app mode --> Loading
packages/SystemUI/src/com/android/systemui/recents/ScreenPinningRequest.java +8 −3 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.os.RemoteException; import android.util.DisplayMetrics; Loading Loading @@ -204,11 +205,15 @@ public class ScreenPinningRequest implements View.OnClickListener { // Status bar is always on the right. mLayout.setLayoutDirection(View.LAYOUT_DIRECTION_LTR); // Buttons and text do switch sides though. View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); mLayout.findViewById(R.id.screen_pinning_text_area) .setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); View buttons = mLayout.findViewById(R.id.screen_pinning_buttons); if (Recents.getSystemServices().hasSoftNavigationBar()) { buttons.setLayoutDirection(View.LAYOUT_DIRECTION_LOCALE); swapChildrenIfRtlAndVertical(buttons); } else { buttons.setVisibility(View.GONE); } ((Button) mLayout.findViewById(R.id.screen_pinning_ok_button)) .setOnClickListener(ScreenPinningRequest.this); Loading
packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java +12 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,18 @@ public class SystemServicesProxy { return false; } /** * Returns whether there is a soft nav bar. */ public boolean hasSoftNavigationBar() { try { return WindowManagerGlobal.getWindowManagerService().hasNavigationBar(); } catch (RemoteException e) { e.printStackTrace(); } return false; } /** * Cancels the current window transtion to/from Recents for the given task id. */ Loading