Skip to content
Commit b6e9d2fc authored by Kevin Chyn's avatar Kevin Chyn
Browse files

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
parent 286074d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment