Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(944)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java

Issue 2632493004: Fix crash when set VR mode to false after VrShell is destroyed (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java
deleted file mode 100644
index 067749b5ba56c11a87ff12b8b1a22f3270a552b9..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.vr_shell;
-
-import android.app.Activity;
-import android.os.StrictMode;
-
-import org.chromium.base.Log;
-import org.chromium.base.annotations.UsedByReflection;
-
-/**
- * Builder class to create all VR related classes. These VR classes are behind the same build time
- * flag as this class. So no reflection is necessary when create them.
- */
-@UsedByReflection("VrShellDelegate.java")
-public class VrClassesBuilderImpl implements VrClassesBuilder {
- private static final String TAG = "VrClassesBuilderImpl";
- private final Activity mActivity;
-
- @UsedByReflection("VrShellDelegate.java")
- public VrClassesBuilderImpl(Activity activity) {
- mActivity = activity;
- }
-
- @Override
- public NonPresentingGvrContext createNonPresentingGvrContext() {
- StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
- try {
- return new NonPresentingGvrContextImpl(mActivity);
- } catch (Exception ex) {
- Log.e(TAG, "Unable to instantiate NonPresentingGvrContextImpl", ex);
- return null;
- } finally {
- StrictMode.setThreadPolicy(oldPolicy);
- }
- }
-
- @Override
- public VrShell createVrShell() {
- StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
- try {
- return new VrShellImpl(mActivity);
- } catch (Exception ex) {
- Log.e(TAG, "Unable to instantiate VrShellImpl", ex);
- return null;
- } finally {
- StrictMode.setThreadPolicy(oldPolicy);
- }
- }
-
- @Override
- public VrDaydreamApi createVrDaydreamApi() {
- return new VrDaydreamApiImpl(mActivity);
- }
-
- @Override
- public VrCoreVersionChecker createVrCoreVersionChecker() {
- return new VrCoreVersionCheckerImpl();
- }
-}

Powered by Google App Engine
This is Rietveld 408576698