Clean up unused DB columns.
Remove some columns from Contextual Card DB as they are never used. Fixes: 143058171 Test: robotests Change-Id: Ic618ccba16c3ed9f0a85b905535916e5d062d79e
This commit is contained in:
@@ -56,17 +56,10 @@ public class ContextualCard {
|
||||
private final double mRankingScore;
|
||||
private final String mSliceUri;
|
||||
private final int mCategory;
|
||||
private final String mLocalizedToLocale;
|
||||
private final String mPackageName;
|
||||
private final long mAppVersion;
|
||||
private final String mTitleResName;
|
||||
private final String mTitleText;
|
||||
private final String mSummaryResName;
|
||||
private final String mSummaryText;
|
||||
private final String mIconResName;
|
||||
private final int mIconResId;
|
||||
private final int mCardAction;
|
||||
private final long mExpireTimeMS;
|
||||
private final boolean mIsLargeCard;
|
||||
private final Drawable mIconDrawable;
|
||||
@LayoutRes
|
||||
@@ -98,10 +91,6 @@ public class ContextualCard {
|
||||
return mCategory;
|
||||
}
|
||||
|
||||
public String getLocalizedToLocale() {
|
||||
return mLocalizedToLocale;
|
||||
}
|
||||
|
||||
public String getPackageName() {
|
||||
return mPackageName;
|
||||
}
|
||||
@@ -110,38 +99,14 @@ public class ContextualCard {
|
||||
return mAppVersion;
|
||||
}
|
||||
|
||||
public String getTitleResName() {
|
||||
return mTitleResName;
|
||||
}
|
||||
|
||||
public String getTitleText() {
|
||||
return mTitleText;
|
||||
}
|
||||
|
||||
public String getSummaryResName() {
|
||||
return mSummaryResName;
|
||||
}
|
||||
|
||||
public String getSummaryText() {
|
||||
return mSummaryText;
|
||||
}
|
||||
|
||||
public String getIconResName() {
|
||||
return mIconResName;
|
||||
}
|
||||
|
||||
public int getIconResId() {
|
||||
return mIconResId;
|
||||
}
|
||||
|
||||
public int getCardAction() {
|
||||
return mCardAction;
|
||||
}
|
||||
|
||||
public long getExpireTimeMS() {
|
||||
return mExpireTimeMS;
|
||||
}
|
||||
|
||||
public Drawable getIconDrawable() {
|
||||
return mIconDrawable;
|
||||
}
|
||||
@@ -177,17 +142,10 @@ public class ContextualCard {
|
||||
mRankingScore = builder.mRankingScore;
|
||||
mSliceUri = builder.mSliceUri;
|
||||
mCategory = builder.mCategory;
|
||||
mLocalizedToLocale = builder.mLocalizedToLocale;
|
||||
mPackageName = builder.mPackageName;
|
||||
mAppVersion = builder.mAppVersion;
|
||||
mTitleResName = builder.mTitleResName;
|
||||
mTitleText = builder.mTitleText;
|
||||
mSummaryResName = builder.mSummaryResName;
|
||||
mSummaryText = builder.mSummaryText;
|
||||
mIconResName = builder.mIconResName;
|
||||
mIconResId = builder.mIconResId;
|
||||
mCardAction = builder.mCardAction;
|
||||
mExpireTimeMS = builder.mExpireTimeMS;
|
||||
mIconDrawable = builder.mIconDrawable;
|
||||
mIsLargeCard = builder.mIsLargeCard;
|
||||
mViewType = builder.mViewType;
|
||||
@@ -207,31 +165,14 @@ public class ContextualCard {
|
||||
mBuilder.setSliceUri(Uri.parse(mSliceUri));
|
||||
mCategory = c.getInt(c.getColumnIndex(CardDatabaseHelper.CardColumns.CATEGORY));
|
||||
mBuilder.setCategory(mCategory);
|
||||
mLocalizedToLocale = c.getString(
|
||||
c.getColumnIndex(CardDatabaseHelper.CardColumns.LOCALIZED_TO_LOCALE));
|
||||
mBuilder.setLocalizedToLocale(mLocalizedToLocale);
|
||||
mPackageName = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.PACKAGE_NAME));
|
||||
mBuilder.setPackageName(mPackageName);
|
||||
mAppVersion = c.getLong(c.getColumnIndex(CardDatabaseHelper.CardColumns.APP_VERSION));
|
||||
mBuilder.setAppVersion(mAppVersion);
|
||||
mTitleResName = c.getString(
|
||||
c.getColumnIndex(CardDatabaseHelper.CardColumns.TITLE_RES_NAME));
|
||||
mBuilder.setTitleResName(mTitleResName);
|
||||
mTitleText = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.TITLE_TEXT));
|
||||
mTitleText = "";
|
||||
mBuilder.setTitleText(mTitleText);
|
||||
mSummaryResName = c.getString(
|
||||
c.getColumnIndex(CardDatabaseHelper.CardColumns.SUMMARY_RES_NAME));
|
||||
mBuilder.setSummaryResName(mSummaryResName);
|
||||
mSummaryText = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.SUMMARY_TEXT));
|
||||
mBuilder.setSummaryText(mSummaryText);
|
||||
mIconResName = c.getString(c.getColumnIndex(CardDatabaseHelper.CardColumns.ICON_RES_NAME));
|
||||
mBuilder.setIconResName(mIconResName);
|
||||
mIconResId = c.getInt(c.getColumnIndex(CardDatabaseHelper.CardColumns.ICON_RES_ID));
|
||||
mBuilder.setIconResId(mIconResId);
|
||||
mCardAction = c.getInt(c.getColumnIndex(CardDatabaseHelper.CardColumns.CARD_ACTION));
|
||||
mBuilder.setCardAction(mCardAction);
|
||||
mExpireTimeMS = c.getLong(c.getColumnIndex(CardDatabaseHelper.CardColumns.EXPIRE_TIME_MS));
|
||||
mBuilder.setExpireTimeMS(mExpireTimeMS);
|
||||
mSummaryText = "";
|
||||
mBuilder.setTitleText(mSummaryText);
|
||||
mIsLargeCard = false;
|
||||
mBuilder.setIsLargeCard(mIsLargeCard);
|
||||
mIconDrawable = null;
|
||||
@@ -278,17 +219,10 @@ public class ContextualCard {
|
||||
private double mRankingScore;
|
||||
private String mSliceUri;
|
||||
private int mCategory;
|
||||
private String mLocalizedToLocale;
|
||||
private String mPackageName;
|
||||
private long mAppVersion;
|
||||
private String mTitleResName;
|
||||
private String mTitleText;
|
||||
private String mSummaryResName;
|
||||
private String mSummaryText;
|
||||
private String mIconResName;
|
||||
private int mIconResId;
|
||||
private int mCardAction;
|
||||
private long mExpireTimeMS;
|
||||
private Drawable mIconDrawable;
|
||||
private boolean mIsLargeCard;
|
||||
@LayoutRes
|
||||
@@ -321,11 +255,6 @@ public class ContextualCard {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLocalizedToLocale(String localizedToLocale) {
|
||||
mLocalizedToLocale = localizedToLocale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setPackageName(String packageName) {
|
||||
mPackageName = packageName;
|
||||
return this;
|
||||
@@ -336,46 +265,16 @@ public class ContextualCard {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTitleResName(String titleResName) {
|
||||
mTitleResName = titleResName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTitleText(String titleText) {
|
||||
mTitleText = titleText;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSummaryResName(String summaryResName) {
|
||||
mSummaryResName = summaryResName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSummaryText(String summaryText) {
|
||||
mSummaryText = summaryText;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setIconResName(String iconResName) {
|
||||
mIconResName = iconResName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setIconResId(int iconResId) {
|
||||
mIconResId = iconResId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCardAction(int cardAction) {
|
||||
mCardAction = cardAction;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setExpireTimeMS(long expireTimeMS) {
|
||||
mExpireTimeMS = expireTimeMS;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setIconDrawable(Drawable iconDrawable) {
|
||||
mIconDrawable = iconDrawable;
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user