summaryrefslogtreecommitdiff
path: root/core/java/android/app/VrManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-1/+2
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-2/+1
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-1/+2
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
* Fix VR-related system APIsPat Plunkett2019-04-151-4/+5
| | | | | | | | | | | This adds necessary nullness conditions on method arguments, and makes a Builder class final. Bug: 126700268 Bug: 126701891 Bug: 126701662 Test: Compiles Change-Id: I4e825057b413fe22d1c2ebd228a5b76641b04868
* Unimplement VrManager#setVrInputMethod()Yohei Yukawa2019-01-221-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A system API VrManager#setVrInputMethod(), which was originally introduced in Android P [1], has hever been used actually. To avoid unnecessary maintenance burden in the Android Framework, this CL makes VrManager#setVrInputMethod() no-op. For those who want to develop VR Keyboard, they should be able to use Android P build to see if it actually works and it's actually what they want. In the future, if we can have a working prototype, we can revisit here to see if we want to restore the framework implementation or not. Note that with this CL IMEs that have android:isVrOnly="true" will always be ignored. There should be no user/developer visible behavior change because this is about an unused system API. [1]: I1db7981b5198e7e203d4578cae7e5b6d20037d0d 89a6c48a8b2e54f9b93211c20a126edab0eefe35 Bug: 72522822 Fix: 122058241 Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases Test: atest FrameworksCoreTests:InputMethodInfoTest Test: atest FrameworksServicesTests:InputMethodManagerServiceTests Change-Id: I5464ff74b92ff4a0d30002d643bd3c89925f0f0c
* Merge "API: Clean up redundant and ineffective usages of SystemApi and ↵Adrian Roos2018-12-131-2/+0
|\ | | | | | | | | | | | | | | TestApi (2/2)" am: a48e431113 am: a11f1d2d50 am: 84f03da369 Change-Id: I4c746b570470301f076efca9d4897cb2032a3732
| * API: Clean up redundant and ineffective usages of SystemApi and TestApi (2/2)Adrian Roos2018-12-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Everything that is marked SystemApi or TestApi, but not @hide is still part of the public SDK, it is therefore not sound to have that combination. In the future, specifing such a combination will be considered an error to prevent inadvertently exposing SystemApi and TestApi as public API. Bug: 115333477 Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi Change-Id: I6d370e8ffcb9e7cd2859c310c555a2a847c70ae8 Exempt-From-Owner-Approval: API cleanup
| * Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.app.usage android.app.trust android.app.timezonedetector android.app.timezone android.app.timedetector android.app.job android.app.backup android.app.assist android.app.admin android.app This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I5d15d50344d7178617418846917f693cfabf006b Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
* | Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.app.usage android.app.trust android.app.timezonedetector android.app.timezone android.app.timedetector android.app.job android.app.backup android.app.assist android.app.admin android.app This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
* | Add @SystemApi to related VR functions that will be used by VrCorerongliu2018-05-021-17/+28
|/ | | | | | | | | | | | Services. We added them to grey list, but it would be better to make them proper SystemApi. Bug: 74430927 Test: Run VR app, not seeing VR related "Accessing hidden field" log. Change-Id: I9e6ec7eb35244fbac4f6448721458efbee65a887
* Add support for VR InputMethod.Tarandeep Singh2017-12-081-0/+19
| | | | | | | | | | | | | | | | This change adds support for VR-only IMEs in InputMethod framework. In order to set this VR IME, setVrInputMethod(ComponentName) should be called by VrManager. When VrManager calls setVrInputMethod(), IMMS changes updates the selected input method in a transient way i.e. it doesn't update the Settings or input history. Once VR mode finishes, it restores last input from settings. Bug: 63037786 Test: Manually using the sample app in bug. Change-Id: I1db7981b5198e7e203d4578cae7e5b6d20037d0d
* On standalones, stay in vr mode until standbySteven Thomas2017-11-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | On standalones, stay in vr mode until the Power Policy Service notifies us it has switched to standby mode. We still have a few issues elsewhere in the code, so the "stay in vr mode" functionality is only enabled if the system property "persist.vr.use_standby_to_exit_vr_mode" is set to true, which you can do like this: $ adb shell setprop persist.vr.use_standby_to_exit_vr_mode true Bug: 65248224 Test: - Confirmed on a standalone that doffing leaves us in vr mode for 5 minutes, then we get a notification that we've entered standby, and we exit vr mode. Confirmed we enter vr mode again when we don the device. - Confirmed no behavioral change on phones, as expected. Change-Id: I41d62761fe8c2fc7630f0615732453669cb25f06
* Bind VR compositor service from VrManagerService.Ruben Brunk2017-10-031-0/+17
| | | | | | | | | | | | | | - Allow VR system application to have VR manager service bind a compositor process so that oom scoring for the compositor process can be adjusted. Bug: 38390640 Test: Check that the VrCore compositor process is -700 on AIO devices with: adb shell procrank -o Change-Id: I7b5bce5eb87bd5ed0fdeadf4ec7bdd2b361ab875
* Fix missing RequiredPermission annotation.Santos Cordon2017-09-181-4/+16
| | | | | | Bug: 64360244 Test: Manual compilation. Change-Id: I7091e366baf5bcaf29945e9a0e2a283309e54452
* Allow VR State Listeners with RESTRICTED_VR_ACCESS permission.Santos Cordon2017-08-241-2/+111
| | | | | | | | | | | | | | Extend the ability to use VrStateListeners to applications that have RESTRICTED_VR_ACCESS permission. Previously, it required ACCESS_VR_MANAGER only. Add VrStateCallback object and methods to VrManager to access the functionality outside of frameworks. Bug: 64360244 Test: Manual. Tested ability from VrCore. Change-Id: I01f1c75b1ccd44a09364df84218168cf6caab322
* Annotate @SystemApi with required permissions.Jeff Sharkey2017-06-051-7/+6
| | | | | | | | | | | | | | | | | Most @SystemApi methods should be protected with system (or higher) permissions, so annotate common methods with @RequiresPermission to make automatic verification easier. Verification is really only relevant when calling into system services (where permissions checking can happen on the other side of a Binder call), so annotate managers with the new @SystemService annotation, which is now automatically documented. This is purely a docs change; no logic changes are being made. Test: make -j32 update-api && make -j32 offline-sdk-docs Bug: 62263906 Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
* Remove controller connection APIDaniel Nicoara2017-05-041-30/+0
| | | | | | | | No longer need the proxy since VR Window Manager is in VrCore. Bug: 36506799, 37542947 Test: Compiled and ran in VR on device. Change-Id: Id5b5f34a1ad2b6da263527463d63777d40f18085
* Rename CompatibilityDisplay to Vr2dDisplayKarthik Ravi Shankar2017-05-031-6/+6
| | | | | | | | | | | | | | | | | | | CompatibilityDisplay used for displaying 2D activities in Vr world. This is confusing in more than one way. To clarify what it really means, rename it to Vr2dDisplay. Changes in this CL - - /s/CompatibilityDisplay/Vr2dDisplay - /s/Compatibility/Vr2d - in CompatibilityDisplay context. Bug: 37851944 Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerDisplayTests passes on Marlin. Change-Id: I0a442302fa9d0f48bbd0c01a7766b94369e04386 Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
* Make VR mode virtual display properties customizableKarthik Ravi Shankar2017-04-171-0/+20
| | | | | | | | | | | | | | | | | | | | | | | Currently the virtual display created in VR mode is of fixed size. This may not work for all the devices. Add APIs to make the resolution and DPI adjustable from VrCore. Bug: 37260266 Test: Sample reflection which works - cl/153039188 Test: adb shell set-persistent-vr-mode-enabled true adb shell vr set-compatibility-display-properties 500 500 500 adb shell dumpsys display >> DisplayDeviceInfo{"VR 2D Display": uniqueId="virtual:android,1000,VR 2D Display,0", 500 x 500, modeId 6, defaultModeId 6, supportedModes [{id=6, width=500, height=500, fps=60.0}], colorMode 0, supportedColorModes [0], HdrCapabilities null, density 500, 500.0 x 500.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, state ON, owner android (uid 1000), FLAG_PRIVATE, FLAG_NEVER_BLANK, FLAG_OWN_CONTENT_ONLY} Change-Id: Ibb2d03b7f7f8f62fcce97fcc2b373ae3f09cef01 Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
* Manage controller connection from VrCore to VrWindowManager.Kevin Schoedel2017-03-241-0/+30
| | | | | | | | | | | | | Use VrManager as a proxy to pass the controller data file descriptor from VrCore to VrWindowManager, since the latter is a purely native service with no Java visibility. This is intended to be replaced by moving the relevant parts of VrWindowManager into VrCore (b/36506799). Bug: 35619424 Test: manual on device Change-Id: I9545349893ed9b23de4ba8d3cb61c7d403ad0b97
* Introduces VrManager as a system service.Zak Cohen2017-02-051-0/+44
Provides access to persistent VR mode as used by VR viewer when a device is believed to be inside a viewer. Bug: 34736524 Test: Built, run using build of vr services that enables mode. Change-Id: I6ff392f09adb8e4bd522dacbd064777bba836282