Set the same density to all displays
Bug: 324439718 Test: manual Test: atest DisplaySizeDataTest Test: atest ScreenResolutionFragmentTest Flag: EXEMPT bugfix Change-Id: Ibe8b15be8968545c701a872103c1c20fa698228f
This commit is contained in:
@@ -36,13 +36,13 @@ public class ScreenZoomPreference extends Preference {
|
||||
android.R.attr.preferenceStyle));
|
||||
|
||||
final DisplayDensityUtils density = new DisplayDensityUtils(context);
|
||||
final int defaultIndex = density.getCurrentIndexForDefaultDisplay();
|
||||
final int defaultIndex = density.getCurrentIndex();
|
||||
if (defaultIndex < 0) {
|
||||
setVisible(false);
|
||||
setEnabled(false);
|
||||
} else if (TextUtils.isEmpty(getSummary())) {
|
||||
final String[] entries = density.getDefaultDisplayDensityEntries();
|
||||
final int currentIndex = density.getCurrentIndexForDefaultDisplay();
|
||||
final String[] entries = density.getEntries();
|
||||
final int currentIndex = density.getCurrentIndex();
|
||||
setSummary(entries[currentIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user