| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.vr_shell; | 5 package org.chromium.chrome.browser.vr_shell; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.app.PendingIntent; | 8 import android.app.PendingIntent; |
| 9 import android.content.ComponentName; | 9 import android.content.ComponentName; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 @Override | 78 @Override |
| 79 public Boolean isDaydreamCurrentViewer() { | 79 public Boolean isDaydreamCurrentViewer() { |
| 80 DaydreamApi daydreamApi = DaydreamApi.create(mActivity); | 80 DaydreamApi daydreamApi = DaydreamApi.create(mActivity); |
| 81 if (daydreamApi == null) return false; | 81 if (daydreamApi == null) return false; |
| 82 int type = daydreamApi.getCurrentViewerType(); | 82 int type = daydreamApi.getCurrentViewerType(); |
| 83 daydreamApi.close(); | 83 daydreamApi.close(); |
| 84 return type == GvrApi.ViewerType.DAYDREAM; | 84 return type == GvrApi.ViewerType.DAYDREAM; |
| 85 } | 85 } |
| 86 |
| 87 @Override |
| 88 public void launchVrHomescreen() { |
| 89 DaydreamApi daydreamApi = DaydreamApi.create(mActivity); |
| 90 if (daydreamApi == null) return; |
| 91 daydreamApi.launchVrHomescreen(); |
| 92 daydreamApi.close(); |
| 93 } |
| 86 } | 94 } |
| OLD | NEW |