diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index b0e9cd07c4..83c7ba3fd3 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -171,7 +171,6 @@
-
@@ -233,7 +232,6 @@
-
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index 15a4fc4072..f963913db1 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -248,7 +248,6 @@ public class InvariantDeviceProfile {
public int gridType;
public String dbFile;
public int defaultLayoutId;
- public int demoModeLayoutId;
public boolean[] inlineQsb = new boolean[COUNT_SIZES];
/**
@@ -376,7 +375,6 @@ public class InvariantDeviceProfile {
dbFile = closestProfile.dbFile;
gridType = closestProfile.gridType;
defaultLayoutId = closestProfile.defaultLayoutId;
- demoModeLayoutId = closestProfile.demoModeLayoutId;
numFolderRows = closestProfile.numFolderRows;
numFolderColumns = closestProfile.numFolderColumns;
@@ -979,7 +977,6 @@ public class InvariantDeviceProfile {
private final String dbFile;
private final int defaultLayoutId;
- private final int demoModeLayoutId;
private final boolean isScalable;
private final boolean mIsDualGrid;
@@ -1018,15 +1015,12 @@ public class InvariantDeviceProfile {
numRows = gridSize.mNumRows;
dbFile = gridSize.mDbFile;
defaultLayoutId = gridSize.mDefaultLayoutId;
- demoModeLayoutId = gridSize.mDemoModeLayoutId;
} else {
numRows = a.getInt(R.styleable.GridDisplayOption_numRows, 0);
numColumns = a.getInt(R.styleable.GridDisplayOption_numColumns, 0);
dbFile = a.getString(R.styleable.GridDisplayOption_dbFile);
defaultLayoutId = a.getResourceId(
R.styleable.GridDisplayOption_defaultLayoutId, 0);
- demoModeLayoutId = a.getResourceId(
- R.styleable.GridDisplayOption_demoModeLayoutId, defaultLayoutId);
}
numSearchContainerColumns = a.getInt(
@@ -1209,8 +1203,6 @@ public class InvariantDeviceProfile {
final float mMinDeviceHeightPx;
final String mDbFile;
final int mDefaultLayoutId;
- final int mDemoModeLayoutId;
-
GridSize(Context context, AttributeSet attrs) {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.GridSize);
@@ -1222,8 +1214,6 @@ public class InvariantDeviceProfile {
mDbFile = a.getString(R.styleable.GridSize_dbFile);
mDefaultLayoutId = a.getResourceId(
R.styleable.GridSize_defaultLayoutId, 0);
- mDemoModeLayoutId = a.getResourceId(
- R.styleable.GridSize_demoModeLayoutId, mDefaultLayoutId);
a.recycle();
}
diff --git a/src/com/android/launcher3/model/ModelDbController.java b/src/com/android/launcher3/model/ModelDbController.java
index f48d8488c2..7561c08ddb 100644
--- a/src/com/android/launcher3/model/ModelDbController.java
+++ b/src/com/android/launcher3/model/ModelDbController.java
@@ -35,7 +35,6 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Process;
import android.os.UserHandle;
-import android.os.UserManager;
import android.text.TextUtils;
import android.util.Log;
@@ -649,12 +648,8 @@ public class ModelDbController {
}
private DefaultLayoutParser getDefaultLayoutParser(LauncherWidgetHolder widgetHolder) {
- int defaultLayout = mIdp.demoModeLayoutId != 0
- && mContext.getSystemService(UserManager.class).isDemoUser()
- ? mIdp.demoModeLayoutId : mIdp.defaultLayoutId;
-
return new DefaultLayoutParser(mContext, widgetHolder,
- mOpenHelper, mContext.getResources(), defaultLayout);
+ mOpenHelper, mContext.getResources(), mIdp.defaultLayoutId);
}
private ConstantItem getEmptyDbCreatedKey() {