Simplifying some test utility methods

Bug: 283821111
Test: Presubmit
Flag: N/A
Change-Id: I7b9690bc0cc53d097d26cd4f0ab2dd36ba88e1cb
This commit is contained in:
Sunny Goyal
2023-05-25 19:20:10 -07:00
parent 0edac04688
commit ee9740462e
18 changed files with 171 additions and 193 deletions

View File

@@ -33,6 +33,7 @@ import android.text.TextUtils;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.logging.StatsLogManager.LauncherEvent;
import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext;
import java.util.Locale;
import java.util.Objects;
@@ -92,6 +93,9 @@ public class DeviceGridState implements Comparable<DeviceGridState> {
* Stores the device state to shared preferences
*/
public void writeToPrefs(Context context) {
if (context instanceof SandboxContext) {
return;
}
LauncherPrefs.get(context).put(
WORKSPACE_SIZE.to(mGridSizeString),
HOTSEAT_COUNT.to(mNumHotseat),