Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9052e27 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski Committed by Android (Google) Code Review
Browse files

Merge "Expose the public VD from VDMInternal" into main

parents bf72299b 3b391a78
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -890,6 +890,11 @@ public class VirtualDeviceManagerService extends SystemService {
            return mImpl.getDeviceIdForDisplayId(displayId);
        }

        @Override
        public VirtualDevice getVirtualDevice(int deviceId) {
            return mImpl.getVirtualDevice(deviceId);
        }

        @Override
        public long getDimDurationMillisForDeviceId(int deviceId) {
            VirtualDeviceImpl virtualDevice = getVirtualDeviceForId(deviceId);
+16 −0
Original line number Diff line number Diff line
@@ -211,4 +211,20 @@ public abstract class VirtualDeviceManagerInternal {
     */
    public abstract @NonNull VirtualDeviceManager.VirtualDevice createVirtualDevice(
            @NonNull VirtualDeviceParams params);

    /**
     * Returns the details of the virtual device with the given ID, if any.
     *
     * <p>The returned object is a read-only representation of the virtual device that expose its
     * properties.</p>
     *
     * <p>Note that if the virtual device is closed and becomes invalid, the returned object will
     * not be updated and may contain stale values. Use a {@link VirtualDeviceListener} for real
     * time updates of the availability of virtual devices.</p>
     *
     * @return the virtual device with the requested ID, or {@code null} if no such device exists or
     *   it has already been closed.
     */
    @Nullable
    public abstract VirtualDevice getVirtualDevice(int deviceId);
}