Decouple the display manager from the overlay manager

The display manager relies on resources that may or may not have been
modified via runtime resource overlay. Because the overlay manager is
initialized in parallel with the display manager, the two need to
synchronize their work so the display manager knows when it can rely on
its resources.

An upcoming change will hold off on threading the system until after the
initialization of the overlay manager. This means all overlays should be
setup before other services start, which in turn means no additional
synchronization is required. As a first step towards this, remove the
synchronization between the display manager and the overlay manager.

Also remove unused variable LogicalDisplay#PROP_MASKING_INSET_TOP.

Bug: 80150169
Test: builds, boots
Change-Id: I844de9e09eb1464ae112e1b480d21cf662a026e0
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 3bb8ce3..2489f2a 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -36,7 +36,6 @@
 import android.database.sqlite.SQLiteCompatibilityWalFlags;
 import android.database.sqlite.SQLiteGlobal;
 import android.hardware.display.ColorDisplayManager;
-import android.hardware.display.DisplayManagerInternal;
 import android.os.BaseBundle;
 import android.os.Binder;
 import android.os.Build;
@@ -717,17 +716,9 @@
 
         // Manages Overlay packages
         traceBeginAndSlog("StartOverlayManagerService");
-        OverlayManagerService overlayManagerService = new OverlayManagerService(
-                mSystemContext, installer);
-        mSystemServiceManager.startService(overlayManagerService);
+        mSystemServiceManager.startService(new OverlayManagerService(mSystemContext, installer));
         traceEnd();
 
-        if (SystemProperties.getInt("persist.sys.displayinset.top", 0) > 0) {
-            // DisplayManager needs the overlay immediately.
-            overlayManagerService.updateSystemUiContext();
-            LocalServices.getService(DisplayManagerInternal.class).onOverlayChanged();
-        }
-
         // The sensor service needs access to package manager service, app ops
         // service, and permissions service, therefore we start it after them.
         // Start sensor service in a separate thread. Completion should be checked