Fix NPE when passing displayId through handler

NPE was thrown when calling getPendingFrameRateOverrideUids. This is
because the LogicalDisplay array could change before the message is
handled. This fix ensures that the logical display is valid before
continuing with the method.

Bug: 198359227
Bug: 198159201
Bug: 199027886

Test: Verify it doesn't crash
Change-Id: I11adf67478d7a6f81512aa3cd4bc568056dfa80a
1 file changed