libui: remove gralloc0/gralloc1 support

We now talk to HIDL gralloc exclusively.

Bug: 37433368
Test: boots
Change-Id: Iecd2f9a02c7066b2f33f24c1de57e9c4af8e28f5
diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp
index 75f5686..f8d9401 100644
--- a/libs/ui/Gralloc2.cpp
+++ b/libs/ui/Gralloc2.cpp
@@ -33,7 +33,7 @@
 Mapper::Mapper()
 {
     mMapper = IMapper::getService();
-    if (mMapper != nullptr && mMapper->isRemote()) {
+    if (mMapper == nullptr || mMapper->isRemote()) {
         LOG_ALWAYS_FATAL("gralloc-mapper must be in passthrough mode");
     }
 }
@@ -196,8 +196,9 @@
 Allocator::Allocator(const Mapper& mapper)
     : mMapper(mapper)
 {
-    if (mMapper.valid()) {
-        mAllocator = IAllocator::getService();
+    mAllocator = IAllocator::getService();
+    if (mAllocator == nullptr) {
+        LOG_ALWAYS_FATAL("gralloc-alloc is missing");
     }
 }