mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Merge "Remove demo mode layout code" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
e18ec2b41a
@@ -171,7 +171,6 @@
|
||||
<attr name="numGridColumns" format="integer"/>
|
||||
<attr name="dbFile" />
|
||||
<attr name="defaultLayoutId"/>
|
||||
<attr name="demoModeLayoutId"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="GridDisplayOption">
|
||||
@@ -233,7 +232,6 @@
|
||||
|
||||
<attr name="dbFile" format="string" />
|
||||
<attr name="defaultLayoutId" format="reference" />
|
||||
<attr name="demoModeLayoutId" format="reference" />
|
||||
<attr name="isScalable" format="boolean" />
|
||||
<attr name="devicePaddingId" format="reference" />
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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<Boolean> getEmptyDbCreatedKey() {
|
||||
|
||||
Reference in New Issue
Block a user