@@ -87,6 +87,7 @@ public class VrShellDelegate
8787 // when used with startActivityForResult...
8888 public static final int EXIT_VR_RESULT = 7212 ;
8989 public static final int VR_SERVICES_UPDATE_RESULT = 7213 ;
90+ public static final int GVR_KEYBOARD_UPDATE_RESULT = 7214 ;
9091
9192 private static final int ENTER_VR_NOT_NECESSARY = 0 ;
9293 private static final int ENTER_VR_CANCELLED = 1 ;
@@ -113,6 +114,9 @@ public class VrShellDelegate
113114 private static final String VR_CORE_MARKET_URI =
114115 "market://details?id=" + VrCoreVersionChecker .VR_CORE_PACKAGE_ID ;
115116
117+ private static final String GVR_KEYBOARD_MARKET_URI =
118+ "market://details?id=com.google.android.vr.inputmethod" ;
119+
116120 // This value is intentionally probably overkill. This is the time we need to wait from when
117121 // Chrome is resumed, to when Chrome actually renders a black frame, so that we can cancel the
118122 // stay_hidden animation and not see a white monoscopic frame in-headset. 150ms is definitely
@@ -322,6 +326,10 @@ public static boolean onActivityResultWithNative(int requestCode, int resultCode
322326 if (sInstance != null ) sInstance .onVrServicesMaybeUpdated ();
323327 return true ;
324328 }
329+ // Handles the result of requesting to update GVR Keyboard.
330+ if (requestCode == GVR_KEYBOARD_UPDATE_RESULT ) {
331+ return true ;
332+ }
325333 return false ;
326334 }
327335
@@ -1776,6 +1784,12 @@ public boolean onInfoBarButtonClicked(boolean isPrimary) {
17761784 buttonText , null , true );
17771785 }
17781786
1787+ /* package */ void promptForKeyboardUpdate () {
1788+ mActivity .startActivityForResult (
1789+ new Intent (Intent .ACTION_VIEW , Uri .parse (GVR_KEYBOARD_MARKET_URI )),
1790+ GVR_KEYBOARD_UPDATE_RESULT );
1791+ }
1792+
17791793 private boolean createVrShell () {
17801794 assert mVrShell == null ;
17811795 if (mVrClassesWrapper == null ) return false ;
0 commit comments