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

Commit 483befe0 authored by Rick Yiu's avatar Rick Yiu
Browse files

Revert "Revert "Add null check for vrManager""

This reverts commit 122d8445.

Bug: 112064298
Change-Id: Id38ab76ed100358adc03d189373432c03471bcaf
parent 122d8445
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -732,11 +732,13 @@ public class StatusBar extends SystemUI implements DemoMode,

        IVrManager vrManager = IVrManager.Stub.asInterface(ServiceManager.getService(
                Context.VR_SERVICE));
        if (vrManager != null) {
            try {
                vrManager.registerListener(mVrStateCallbacks);
            } catch (RemoteException e) {
                Slog.e(TAG, "Failed to register VR mode state listener: " + e);
            }
        }

        IWallpaperManager wallpaperManager = IWallpaperManager.Stub.asInterface(
                ServiceManager.getService(Context.WALLPAPER_SERVICE));