OSDN Git Service

Revert "Remove a compat hack SurfaceView#setWindowType()"
authorYohei Yukawa <yukawa@google.com>
Sun, 10 Sep 2017 00:45:27 +0000 (17:45 -0700)
committerYohei Yukawa <yukawa@google.com>
Sun, 10 Sep 2017 00:45:27 +0000 (17:45 -0700)
commit9309c19513ef569043cfd08deae78e04d5eb5c24
treef444852e4ec74b265c68d7b0013c7ade88967838
parent627cc3c7ae03d46f775a0e681034c38ad0867bd7
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
core/java/android/view/SurfaceView.java