Revert "Remove a compat hack SurfaceView#setWindowType()"
This CL reverts my previous CL [1] that aimed to get rid of
a nasty compatibility hack that was introduced for Bug
36345857.
For those who are interested in, what happenned are:
1. @hide method SurfaceView#setWindowType() was removed [2].
2. It broke some app (Bug
36345857). We had to work around
it by re-introducing SurfaceView#setWindowType()
temporarily [3].
3. Some app switched to the correct implementation when
running on Android O devices.
4. We removed that compatibility hack [1] (Bug
62054282).
5. Android O MR1 is set to be "REL" [4].
6. It broke some app, probably because of some unfortunate
mistake in the version check logic in that app.
7. We end up introducing the same hack again for O MR1.
[1]: Icee198c554de558cfa4ffe0b264064969839654e
7a1ad6d97ca1984789446211a986d5ad1b5c81e2
[2]: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
d5c7dd6da810a6b89151b337bea79fd817e6b72a
[3]: I5217f6417a73690ae8a978754218b7b089070fdd
3b5011afc9e17963607269bfb6665d04e3ab4ca1
[4]: I054e3ecff49803e61e7741753fe6764a567d72c4
62a835d0ef89e51f4a97fecf8576224551b545a5
Bug:
36345857
Bug:
62054282
Fixes:
65508814
Test: Manually verified that Bug
65508814 is not reproducible
Change-Id: If8a3f726789daa22f73e1962e938f071d3c09414