Associate rotation watchers with displays

Displays can be rotated separately and rotation watcher clients
are only interested in rotation of some specific display. This CL
adds displayId to rotation watchers and only informs them about
changes on their display.

Bug: 34242678
Test: Manual and debug.
Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
diff --git a/core/java/android/hardware/LegacySensorManager.java b/core/java/android/hardware/LegacySensorManager.java
index f959093..f5cf3f7 100644
--- a/core/java/android/hardware/LegacySensorManager.java
+++ b/core/java/android/hardware/LegacySensorManager.java
@@ -16,6 +16,8 @@
 
 package android.hardware;
 
+import static android.view.Display.DEFAULT_DISPLAY;
+
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.view.IRotationWatcher;
@@ -57,8 +59,7 @@
                                     public void onRotationChanged(int rotation) {
                                         LegacySensorManager.onRotationChanged(rotation);
                                     }
-                                }
-                        );
+                                }, DEFAULT_DISPLAY);
                     } catch (RemoteException e) {
                     }
                 }