Home Controls: Fix column computation.
When we enter home controls from a full screen media player and auto rotation is off, the columns were not being computed correctly. This is because we were getting the config resources from the application context and not the activity context. Bug: 203177915 Test: Manual Change-Id: Iec76d61b1506022746127b58d022656e82da99d3
This commit is contained in:
@@ -437,7 +437,7 @@ class ControlsUiControllerImpl @Inject constructor (
|
||||
* number of columns. This helps prevent text truncation on these devices.
|
||||
*/
|
||||
private fun findMaxColumns(): Int {
|
||||
val res = context.resources
|
||||
val res = activityContext.resources
|
||||
var maxColumns = res.getInteger(R.integer.controls_max_columns)
|
||||
val maxColumnsAdjustWidth =
|
||||
res.getInteger(R.integer.controls_max_columns_adjust_below_width_dp)
|
||||
|
||||
Reference in New Issue
Block a user