Commit 26dc791d by Baoxy

fix: 禁止Hotseat上指定应用拖动

parent 45dd7ec8
...@@ -3219,6 +3219,11 @@ public class Launcher extends BaseActivity ...@@ -3219,6 +3219,11 @@ public class Launcher extends BaseActivity
mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING); HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
} else { } else {
// 判断当前是否是Hotseat按钮,并且为指定应用
boolean isHotseatButten = longClickCellInfo.container != -100;
if (isHotseatButten && v.getTag() instanceof ItemInfo && TextUtils.equals(((ItemInfo) v.getTag()).title, getString(R.string.app_name))) {
return false;
}
final boolean isAllAppsButton = final boolean isAllAppsButton =
!FeatureFlags.NO_ALL_APPS_ICON && isHotseatLayout(v) && !FeatureFlags.NO_ALL_APPS_ICON && isHotseatLayout(v) &&
mDeviceProfile.inv.isAllAppsButtonRank(mHotseat.getOrderInHotseat( mDeviceProfile.inv.isAllAppsButtonRank(mHotseat.getOrderInHotseat(
...@@ -3233,8 +3238,7 @@ public class Launcher extends BaseActivity ...@@ -3233,8 +3238,7 @@ public class Launcher extends BaseActivity
} }
boolean isHotseatLayout(View layout) { boolean isHotseatLayout(View layout) {
// TODO: Remove this method return mHotseat != null &&
return mHotseat != null && layout != null &&
(layout instanceof CellLayout) && (layout == mHotseat.getLayout()); (layout instanceof CellLayout) && (layout == mHotseat.getLayout());
} }
......
...@@ -28,7 +28,7 @@ android { ...@@ -28,7 +28,7 @@ android {
// 公司编号 // 公司编号
buildConfigField "String", "COMPANY_ID", "\"1\"" buildConfigField "String", "COMPANY_ID", "\"1\""
// 更新名称 // 更新名称
buildConfigField "String", "UPDATE_FLAG", "\"eduspace_demo\"" buildConfigField "String", "UPDATE_FLAG", "\"eduspace_tk\""
// 是否自动更新 // 是否自动更新
buildConfigField "boolean", "AUTO_UPDATE", "true" buildConfigField "boolean", "AUTO_UPDATE", "true"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment