surfaceflinger: replace early suspend with binder call from PowerManager

SurfaceFlinger will no longer directly synchronize with early suspend.
Instead, PowerManagerService will synchronize with SurfaceFlinger to
ensure that a black frame has been drawn on the display, and then
trigger all early suspend handlers.

Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 7320e4d..e4e8aa7 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -139,6 +139,12 @@
 
     /* return an IDisplayEventConnection */
     virtual sp<IDisplayEventConnection> createDisplayEventConnection() = 0;
+
+    /* triggers screen off and waits for it to complete */
+    virtual void blank() = 0;
+
+    /* triggers screen on and waits for it to complete */
+    virtual void unblank() = 0;
 };
 
 // ----------------------------------------------------------------------------
@@ -160,6 +166,8 @@
         TURN_ELECTRON_BEAM_ON,
         AUTHENTICATE_SURFACE,
         CREATE_DISPLAY_EVENT_CONNECTION,
+        BLANK,
+        UNBLANK,
     };
 
     virtual status_t    onTransact( uint32_t code,