Add DeviceProfile tests on all attributes across different configurations.

Fix: 237542518
Test: DeviceProfilePhoneTest.kt
Test: DeviceProfileVerticalBarTest.kt
Test: DeviceProfilePhone3ButtonTest.kt
Test: DeviceProfileVerticalBar3ButtonTest.kt
Test: DeviceProfileTabletLandscapeTest.kt
Test: DeviceProfileTabletPortraitTest.kt
Test: DeviceProfileTabletLandscape3ButtonTest.kt
Test: DeviceProfileTabletPortrait3ButtonTest.kt
Test: DeviceProfileTwoPanelLandscapeTest.kt
Test: DeviceProfileTwoPanelPortraitTest.kt
Test: DeviceProfileTwoPanelLandscape3ButtonTest.kt
Test: DeviceProfileTwoPanelPortrait3ButtonTest.kt
Change-Id: I1596dcd1fb8c9b353cdfcab224d7670d88bed716
This commit is contained in:
Pat Manning committed 2022-07-12 14:17:18 +01:00
1 parent 8693d0a52f
commit 26f70f777e
22 files changed
+5918 -314

No files matched your search

@@ -17,14 +17,9 @@
package com.android.launcher3.uioverrides;
import android.app.Person;
import android.content.Context;
import android.content.pm.ShortcutInfo;
import android.content.res.Resources;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController.NavigationMode;
public class ApiWrapper {
@@ -34,24 +29,4 @@ public class ApiWrapper {
Person[] persons = si.getPersons();
return persons == null ? Utilities.EMPTY_PERSON_ARRAY : persons;
}
/**
* Returns the minimum space that should be left empty at the end of hotseat
*/
public static int getHotseatEndOffset(Context context) {
if (DisplayController.getNavigationMode(context) == NavigationMode.THREE_BUTTONS) {
Resources res = context.getResources();
/*
* 3 nav buttons +
* Little space at the end for contextual buttons +
* Little space between icons and nav buttons
*/
return 3 * res.getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size)
+ res.getDimensionPixelSize(R.dimen.taskbar_contextual_button_margin)
+ res.getDimensionPixelSize(R.dimen.taskbar_hotseat_nav_spacing);
} else {
return 0;
}
}
}