Loading core/java/android/view/DisplayInfo.java +0 −3 Original line number Diff line number Diff line Loading @@ -810,9 +810,6 @@ public final class DisplayInfo implements Parcelable { if ((flags & Display.FLAG_TRUSTED) != 0) { result.append(", FLAG_TRUSTED"); } if ((flags & Display.FLAG_OWN_DISPLAY_GROUP) != 0) { result.append(", FLAG_OWN_DISPLAY_GROUP"); } return result.toString(); } } core/res/res/values/config.xml +0 −9 Original line number Diff line number Diff line Loading @@ -673,15 +673,6 @@ --> </integer-array> <!-- The device states (supplied by DeviceStateManager) that should be treated as unfolded by the display fold controller. Default is empty. --> <integer-array name="config_unfoldedDeviceStates"> <!-- Example: <item>3</item> <item>4</item> --> </integer-array> <!-- Indicate the display area rect for foldable devices in folded state. --> <string name="config_foldedArea"></string> Loading core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -3762,7 +3762,6 @@ <!-- For Foldables --> <java-symbol type="array" name="config_foldedDeviceStates" /> <java-symbol type="array" name="config_unfoldedDeviceStates" /> <java-symbol type="string" name="config_foldedArea" /> <java-symbol type="array" name="config_disableApksUnlessMatchedSku_apk_list" /> Loading services/core/java/com/android/server/display/DeviceStateToLayoutMap.java +15 −17 Original line number Diff line number Diff line Loading @@ -39,6 +39,10 @@ class DeviceStateToLayoutMap { public static final int STATE_DEFAULT = DeviceStateManager.INVALID_DEVICE_STATE; // TODO - b/168208162 - Remove these when we check in static definitions for layouts public static final int STATE_FOLDED = 100; public static final int STATE_UNFOLDED = 101; private final SparseArray<Layout> mLayoutMap = new SparseArray<>(); DeviceStateToLayoutMap(Context context) { Loading @@ -64,7 +68,7 @@ class DeviceStateToLayoutMap { return layout; } private Layout createLayout(int state) { private Layout create(int state) { if (mLayoutMap.contains(state)) { Slog.e(TAG, "Attempted to create a second layout for state " + state); return null; Loading @@ -75,12 +79,10 @@ class DeviceStateToLayoutMap { return layout; } /** * Loads config.xml-specified folded configurations for foldable devices. */ private void loadFoldedDisplayConfig(Context context) { final String[] strDisplayIds = context.getResources().getStringArray( com.android.internal.R.array.config_internalFoldedPhysicalDisplayIds); if (strDisplayIds.length != 2 || TextUtils.isEmpty(strDisplayIds[0]) || TextUtils.isEmpty(strDisplayIds[1])) { Slog.w(TAG, "Folded display configuration invalid: [" + Arrays.toString(strDisplayIds) Loading @@ -101,23 +103,19 @@ class DeviceStateToLayoutMap { final int[] foldedDeviceStates = context.getResources().getIntArray( com.android.internal.R.array.config_foldedDeviceStates); final int[] unfoldedDeviceStates = context.getResources().getIntArray( com.android.internal.R.array.config_unfoldedDeviceStates); // Only add folded states if folded state config is not empty if (foldedDeviceStates.length == 0 || unfoldedDeviceStates.length == 0) { if (foldedDeviceStates.length == 0) { return; } for (int state : foldedDeviceStates) { // Create the folded state layout createLayout(state).createDisplayLocked( final Layout foldedLayout = create(STATE_FOLDED); foldedLayout.createDisplayLocked( DisplayAddress.fromPhysicalDisplayId(displayIds[0]), true /*isDefault*/); } for (int state : unfoldedDeviceStates) { // Create the unfolded state layout createLayout(state).createDisplayLocked( final Layout unfoldedLayout = create(STATE_UNFOLDED); unfoldedLayout.createDisplayLocked( DisplayAddress.fromPhysicalDisplayId(displayIds[1]), true /*isDefault*/); } } } services/core/java/com/android/server/display/DisplayGroup.java +1 −14 Original line number Diff line number Diff line Loading @@ -30,8 +30,6 @@ public class DisplayGroup { private final List<LogicalDisplay> mDisplays = new ArrayList<>(); private final int mGroupId; private int mChangeCount; DisplayGroup(int groupId) { mGroupId = groupId; } Loading @@ -47,16 +45,11 @@ public class DisplayGroup { * @param display the {@link LogicalDisplay} to add to the Group */ void addDisplayLocked(LogicalDisplay display) { if (!containsLocked(display)) { mChangeCount++; if (!mDisplays.contains(display)) { mDisplays.add(display); } } boolean containsLocked(LogicalDisplay display) { return mDisplays.contains(display); } /** * Removes the provided {@code display} from the Group. * Loading @@ -64,7 +57,6 @@ public class DisplayGroup { * @return {@code true} if the {@code display} was removed; otherwise {@code false} */ boolean removeDisplayLocked(LogicalDisplay display) { mChangeCount++; return mDisplays.remove(display); } Loading @@ -73,11 +65,6 @@ public class DisplayGroup { return mDisplays.isEmpty(); } /** Returns a count of the changes made to this display group. */ int getChangeCountLocked() { return mChangeCount; } /** Returns the number of {@link LogicalDisplay LogicalDisplays} in the Group. */ int getSizeLocked() { return mDisplays.size(); Loading Loading
core/java/android/view/DisplayInfo.java +0 −3 Original line number Diff line number Diff line Loading @@ -810,9 +810,6 @@ public final class DisplayInfo implements Parcelable { if ((flags & Display.FLAG_TRUSTED) != 0) { result.append(", FLAG_TRUSTED"); } if ((flags & Display.FLAG_OWN_DISPLAY_GROUP) != 0) { result.append(", FLAG_OWN_DISPLAY_GROUP"); } return result.toString(); } }
core/res/res/values/config.xml +0 −9 Original line number Diff line number Diff line Loading @@ -673,15 +673,6 @@ --> </integer-array> <!-- The device states (supplied by DeviceStateManager) that should be treated as unfolded by the display fold controller. Default is empty. --> <integer-array name="config_unfoldedDeviceStates"> <!-- Example: <item>3</item> <item>4</item> --> </integer-array> <!-- Indicate the display area rect for foldable devices in folded state. --> <string name="config_foldedArea"></string> Loading
core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -3762,7 +3762,6 @@ <!-- For Foldables --> <java-symbol type="array" name="config_foldedDeviceStates" /> <java-symbol type="array" name="config_unfoldedDeviceStates" /> <java-symbol type="string" name="config_foldedArea" /> <java-symbol type="array" name="config_disableApksUnlessMatchedSku_apk_list" /> Loading
services/core/java/com/android/server/display/DeviceStateToLayoutMap.java +15 −17 Original line number Diff line number Diff line Loading @@ -39,6 +39,10 @@ class DeviceStateToLayoutMap { public static final int STATE_DEFAULT = DeviceStateManager.INVALID_DEVICE_STATE; // TODO - b/168208162 - Remove these when we check in static definitions for layouts public static final int STATE_FOLDED = 100; public static final int STATE_UNFOLDED = 101; private final SparseArray<Layout> mLayoutMap = new SparseArray<>(); DeviceStateToLayoutMap(Context context) { Loading @@ -64,7 +68,7 @@ class DeviceStateToLayoutMap { return layout; } private Layout createLayout(int state) { private Layout create(int state) { if (mLayoutMap.contains(state)) { Slog.e(TAG, "Attempted to create a second layout for state " + state); return null; Loading @@ -75,12 +79,10 @@ class DeviceStateToLayoutMap { return layout; } /** * Loads config.xml-specified folded configurations for foldable devices. */ private void loadFoldedDisplayConfig(Context context) { final String[] strDisplayIds = context.getResources().getStringArray( com.android.internal.R.array.config_internalFoldedPhysicalDisplayIds); if (strDisplayIds.length != 2 || TextUtils.isEmpty(strDisplayIds[0]) || TextUtils.isEmpty(strDisplayIds[1])) { Slog.w(TAG, "Folded display configuration invalid: [" + Arrays.toString(strDisplayIds) Loading @@ -101,23 +103,19 @@ class DeviceStateToLayoutMap { final int[] foldedDeviceStates = context.getResources().getIntArray( com.android.internal.R.array.config_foldedDeviceStates); final int[] unfoldedDeviceStates = context.getResources().getIntArray( com.android.internal.R.array.config_unfoldedDeviceStates); // Only add folded states if folded state config is not empty if (foldedDeviceStates.length == 0 || unfoldedDeviceStates.length == 0) { if (foldedDeviceStates.length == 0) { return; } for (int state : foldedDeviceStates) { // Create the folded state layout createLayout(state).createDisplayLocked( final Layout foldedLayout = create(STATE_FOLDED); foldedLayout.createDisplayLocked( DisplayAddress.fromPhysicalDisplayId(displayIds[0]), true /*isDefault*/); } for (int state : unfoldedDeviceStates) { // Create the unfolded state layout createLayout(state).createDisplayLocked( final Layout unfoldedLayout = create(STATE_UNFOLDED); unfoldedLayout.createDisplayLocked( DisplayAddress.fromPhysicalDisplayId(displayIds[1]), true /*isDefault*/); } } }
services/core/java/com/android/server/display/DisplayGroup.java +1 −14 Original line number Diff line number Diff line Loading @@ -30,8 +30,6 @@ public class DisplayGroup { private final List<LogicalDisplay> mDisplays = new ArrayList<>(); private final int mGroupId; private int mChangeCount; DisplayGroup(int groupId) { mGroupId = groupId; } Loading @@ -47,16 +45,11 @@ public class DisplayGroup { * @param display the {@link LogicalDisplay} to add to the Group */ void addDisplayLocked(LogicalDisplay display) { if (!containsLocked(display)) { mChangeCount++; if (!mDisplays.contains(display)) { mDisplays.add(display); } } boolean containsLocked(LogicalDisplay display) { return mDisplays.contains(display); } /** * Removes the provided {@code display} from the Group. * Loading @@ -64,7 +57,6 @@ public class DisplayGroup { * @return {@code true} if the {@code display} was removed; otherwise {@code false} */ boolean removeDisplayLocked(LogicalDisplay display) { mChangeCount++; return mDisplays.remove(display); } Loading @@ -73,11 +65,6 @@ public class DisplayGroup { return mDisplays.isEmpty(); } /** Returns a count of the changes made to this display group. */ int getChangeCountLocked() { return mChangeCount; } /** Returns the number of {@link LogicalDisplay LogicalDisplays} in the Group. */ int getSizeLocked() { return mDisplays.size(); Loading