Loading
Make DeviceStateController generic
Previously it was specific to fold-state, and used to notify a single client of fold-state changes. DeviceStateController is now generic and can be used (or modified) to cache, query, or receive callbacks for other state changes. Note that we are purposely removing the nested FoldStateListener class since it's a very thin layer and makes it unnecessarily complex when we add new functionality to DeviceStateController. A simple example would be DeviceStateController#getCurrentState() needing to access an inner FoldStateListener#getCurrentState(). Bug: 264499484 Test: atest DisplayRotationTests Test: atest DeviceStateControllerTests Change-Id: I81b0a61b52d74718fe1dee213a59509a44a9a920