Fix incorrect video overlay status update.
Status should be set to PREPARE_TO_CLOSE only if its OPEN. Devices which rely on the status being CLOSED, if overlay is unavailable, can crash. (cherry picked from commit a6ee9945dedde6f2d119f0bdd8724fed20781f0e) Conflicts: libhwcomposer/badger/hwcomposer.cpp Change-Id: Iddf0ba1cc142e02fcf906d3b31f8f44a65def316 Conflicts: libhwcomposer/hwcomposer.cpp
This commit is contained in:
		
				
					committed by
					
						 Andrew Sutherland
						Andrew Sutherland
					
				
			
			
				
	
			
			
			
						parent
						
							ce483cb074
						
					
				
				
					commit
					6107e39aec
				
			| @@ -1670,8 +1670,8 @@ static int hwc_set(hwc_composer_device_t *dev, | ||||
|             } | ||||
|         } | ||||
|     } else { | ||||
|         ctx->hwcOverlayStatus =  HWC_OVERLAY_PREPARE_TO_CLOSE; | ||||
|         unlockPreviousOverlayBuffer(ctx); | ||||
|             if (ctx->hwcOverlayStatus == HWC_OVERLAY_OPEN) | ||||
|                 ctx->hwcOverlayStatus =  HWC_OVERLAY_PREPARE_TO_CLOSE; | ||||
|     } | ||||
|      | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user