Use application context in DeviceFoldStateProvider
Get application context from the passed context in DeviceFoldStateProvider as in case of using display context the configuration won't be updated automatically. We use display context in live wallpapers because Service context doesn't return a display (Context#getDisplay) as Service is not a UI context. Application context will use default display's configuration which should be acceptable as the rest of the code relies on the default display too (e.g. screen callbacks are delivered only for the default display). Application context's configuration is updated normally on fold/unfold. Bug: 377280470 Test: check that we don't play animation on rear camera selfie mode Flag: EXEMPT bugfix Change-Id: I989c2be83187816b247b3f41e5a3755be361592e
Loading
Please register or sign in to comment