Merge "Add logs to track app grid changes" into tm-qpr-dev
This commit is contained in:
@@ -206,6 +206,8 @@ public class InvariantDeviceProfile {
|
|||||||
if (!newGridName.equals(gridName)) {
|
if (!newGridName.equals(gridName)) {
|
||||||
LauncherPrefs.getPrefs(context).edit().putString(KEY_IDP_GRID_NAME, newGridName)
|
LauncherPrefs.getPrefs(context).edit().putString(KEY_IDP_GRID_NAME, newGridName)
|
||||||
.apply();
|
.apply();
|
||||||
|
Log.d("b/258560494", "InvariantDeviceProfile - setting newGridName: " + newGridName
|
||||||
|
+ ", gridName: " + gridName);
|
||||||
}
|
}
|
||||||
new DeviceGridState(this).writeToPrefs(context);
|
new DeviceGridState(this).writeToPrefs(context);
|
||||||
|
|
||||||
@@ -453,6 +455,7 @@ public class InvariantDeviceProfile {
|
|||||||
public void setCurrentGrid(Context context, String gridName) {
|
public void setCurrentGrid(Context context, String gridName) {
|
||||||
Context appContext = context.getApplicationContext();
|
Context appContext = context.getApplicationContext();
|
||||||
LauncherPrefs.getPrefs(appContext).edit().putString(KEY_IDP_GRID_NAME, gridName).apply();
|
LauncherPrefs.getPrefs(appContext).edit().putString(KEY_IDP_GRID_NAME, gridName).apply();
|
||||||
|
Log.d("b/258560494", "setCurrentGrid: " + gridName);
|
||||||
MAIN_EXECUTOR.execute(() -> onConfigChanged(appContext));
|
MAIN_EXECUTOR.execute(() -> onConfigChanged(appContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,6 +520,10 @@ public class InvariantDeviceProfile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filteredProfiles.isEmpty()) {
|
if (filteredProfiles.isEmpty()) {
|
||||||
|
if (gridName != null) {
|
||||||
|
Log.d("b/258560494", "No matching grid from for gridName: " + gridName
|
||||||
|
+ ", deviceType: " + deviceType);
|
||||||
|
}
|
||||||
// No grid found, use the default options
|
// No grid found, use the default options
|
||||||
for (DisplayOption option : profiles) {
|
for (DisplayOption option : profiles) {
|
||||||
if (option.canBeDefault) {
|
if (option.canBeDefault) {
|
||||||
|
|||||||
Reference in New Issue
Block a user