() {
+ @Override
+ public GridOption apply(DisplayOption displayOption) {
+ return displayOption.grid;
+ }
+ })
+ .findFirst()
+ .orElse(allOptions.get(0).grid);
+ Log.e(TAG, "initGrid: deviceModel=" + Build.MODEL
+ + ", minWidthDps=" + minWidthDps + ", minHeightDps=" + minHeightDps
+ + ", selectedGrid=" + closestProfile.name
+ + ", numRows=" + closestProfile.numRows
+ + ", numColumns=" + closestProfile.numColumns
+ + ", numHotseatIcons=" + closestProfile.numHotseatIcons
+ + ", defaultLayoutId=" + closestProfile.defaultLayoutId);
numRows = closestProfile.numRows;
numColumns = closestProfile.numColumns;
numHotseatIcons = closestProfile.numHotseatIcons;
@@ -360,7 +419,7 @@ public class InvariantDeviceProfile {
}
}
}
- } catch (IOException|XmlPullParserException e) {
+ } catch (IOException | XmlPullParserException e) {
throw new RuntimeException(e);
}
@@ -388,7 +447,7 @@ public class InvariantDeviceProfile {
private int getLauncherIconDensity(int requiredSize) {
// Densities typically defined by an app.
- int[] densityBuckets = new int[] {
+ int[] densityBuckets = new int[]{
DisplayMetrics.DENSITY_LOW,
DisplayMetrics.DENSITY_MEDIUM,
DisplayMetrics.DENSITY_TV,
@@ -412,7 +471,7 @@ public class InvariantDeviceProfile {
/**
* Apply any Partner customization grid overrides.
- *
+ *
* Currently we support: all apps row / column count.
*/
private void applyPartnerDeviceProfileOverrides(Context context, DisplayMetrics dm) {
@@ -428,7 +487,7 @@ public class InvariantDeviceProfile {
@VisibleForTesting
static DisplayOption invDistWeightedInterpolate(float width, float height,
- ArrayList points) {
+ ArrayList points) {
float weights = 0;
DisplayOption p = points.get(0);
@@ -471,8 +530,8 @@ public class InvariantDeviceProfile {
// We will use these two data points to extrapolate how much the wallpaper parallax effect
// to span (ie travel) at any aspect ratio:
- final float ASPECT_RATIO_LANDSCAPE = 16/10f;
- final float ASPECT_RATIO_PORTRAIT = 10/16f;
+ final float ASPECT_RATIO_LANDSCAPE = 16 / 10f;
+ final float ASPECT_RATIO_PORTRAIT = 10 / 16f;
final float WALLPAPER_WIDTH_TO_SCREEN_RATIO_LANDSCAPE = 1.5f;
final float WALLPAPER_WIDTH_TO_SCREEN_RATIO_PORTRAIT = 1.2f;
diff --git a/src/com/aoleyun/os/icons/IconCache.java b/src/com/aoleyun/os/icons/IconCache.java
index 10ef410..4656e19 100644
--- a/src/com/aoleyun/os/icons/IconCache.java
+++ b/src/com/aoleyun/os/icons/IconCache.java
@@ -114,7 +114,7 @@ public class IconCache extends BaseIconCache {
false /*replace existing*/);
}
} catch (NameNotFoundException e) {
- Log.d(TAG, "Package not found", e);
+ Log.d(TAG, "Package not found: " + packageName);
}
}
@@ -233,16 +233,20 @@ public class IconCache extends BaseIconCache {
private List appClassNameList = new ArrayList() {{
this.add("com.android.calculator2.Calculator");//计算器
+ this.add("com.onyx.calculator.Calculator");//计算器
this.add("com.android.calendar.AllInOneActivity");//日历
+ this.add("com.onyx.mail.calendar.ui.CalendarActivity");//日历
this.add("com.android.camera.CameraLauncher");//相机
this.add("com.mediatek.camera.CameraLauncher");//相机
this.add("com.android.contacts.activities.PeopleActivity");//通讯录
this.add("com.android.deskclock.DeskClock");//时钟
+ this.add("com.simplemobiletools.clock.activities.SplashActivity");//时钟
this.add("com.android.dialer.DialtactsActivity");//电话
this.add("com.android.dialer.app.DialtactsActivity");//电话
this.add("com.android.dialer.main.impl.MainActivity");//电话
this.add("com.android.gallery3d.v2.app.GalleryActivity2");//图库
this.add("com.android.gallery3d.app.GalleryActivity");//图库
+ this.add("com.onyx.gallery.activities.NewMainActivity");//图库
this.add("com.android.messaging.ui.conversationlist.ConversationListActivity");//信息
this.add("com.android.mms.ui.BootActivity");//信息
this.add("com.android.music.MusicBrowserActivity");//音乐
@@ -262,20 +266,28 @@ public class IconCache extends BaseIconCache {
this.add("com.aoleyun.sn.activity.EyeProtectionActivity");//护眼模式
this.add("com.aoleyun.sn.activity.CleanupActivity");//一键加速
this.add("com.aoleyun.sn.activity.update.UpdateActivity");//检查更新
+ this.add("com.onyx.easytransfer.main.MainActivity");//互传
+ this.add("com.onyx.easytransfer.wechat.ui.WeChatDropActivity");//微信互传
+ this.add("com.onyx.floatingbutton.FloatButtonSettingActivity");//互传
+
}};
private List appIconList = new ArrayList() {{
this.add("com_android_calculator2");
+ this.add("com_android_calculator2");
+ this.add("com_android_calendar");
this.add("com_android_calendar");
this.add("com_android_camera");
this.add("com_android_camera");
this.add("com_android_contacts");
this.add("com_android_deskclock");
+ this.add("com_android_deskclock");
this.add("com_android_dialer");
this.add("com_android_dialer");
this.add("com_android_dialer");
this.add("com_android_gallery3d_app");
this.add("com_android_gallery3d_app");
+ this.add("com_android_gallery3d_app");
this.add("com_android_mms_ui");
this.add("com_android_mms_ui");
this.add("com_android_music");
@@ -295,6 +307,9 @@ public class IconCache extends BaseIconCache {
this.add("com_system_huyan");
this.add("com_system_clean");
this.add("com_aoleyun_update");
+ this.add("com_onyx_easytransfer");
+ this.add("com_onyx_easytransfer_wechat");
+ this.add("com_onyx_floatingbutton");
}};
public Drawable getFullResIcon(LauncherActivityInfo info) {
diff --git a/src/com/aoleyun/os/touch/ItemClickHandler.java b/src/com/aoleyun/os/touch/ItemClickHandler.java
index 8c360dc..6231ad0 100644
--- a/src/com/aoleyun/os/touch/ItemClickHandler.java
+++ b/src/com/aoleyun/os/touch/ItemClickHandler.java
@@ -132,7 +132,7 @@ public class ItemClickHandler {
}
//获取本地密码
String ApplicationLock = mMMKV.decodeString("ApplicationLock");
- Log.e("onClick", "onClick: " + ApplicationLock);
+ Log.e("ItemClickHandler", "onClick: " + ApplicationLock);
Type type = new TypeToken>() {
}.getType();
List appPasswdBeans = new Gson().fromJson(ApplicationLock, type);
diff --git a/src/com/aoleyun/os/uiuiutils/CustomDialog.java b/src/com/aoleyun/os/uiuiutils/CustomDialog.java
index 9613ba1..ed45fba 100644
--- a/src/com/aoleyun/os/uiuiutils/CustomDialog.java
+++ b/src/com/aoleyun/os/uiuiutils/CustomDialog.java
@@ -24,7 +24,7 @@ public class CustomDialog extends AlertDialog {
/**
* 显示的图片
*/
- private ImageView imageIv;
+ private ImageView imageIv, ivClose;
/**
* 显示的标题
@@ -103,6 +103,12 @@ public class CustomDialog extends AlertDialog {
}
}
});
+ ivClose.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dismiss();
+ }
+ });
}
/**
@@ -176,6 +182,7 @@ public class CustomDialog extends AlertDialog {
}
});
imageIv = findViewById(R.id.image);
+ ivClose= findViewById(R.id.iv_close);
columnLineView = findViewById(R.id.column_line);
}
diff --git a/src/com/aoleyun/os/views/ScrimView.java b/src/com/aoleyun/os/views/ScrimView.java
index 5fe4959..986048c 100644
--- a/src/com/aoleyun/os/views/ScrimView.java
+++ b/src/com/aoleyun/os/views/ScrimView.java
@@ -174,6 +174,7 @@ public class ScrimView extends View implements Insettable, WallpaperColorInfo.On
onExtractedColorsChanged(mWallpaperColorInfo);
mAM.addAccessibilityStateChangeListener(this);
+ mLauncher.getStateManager().addStateListener(this);
onAccessibilityStateChanged(mAM.isEnabled());
}
@@ -182,6 +183,7 @@ public class ScrimView extends View implements Insettable, WallpaperColorInfo.On
super.onDetachedFromWindow();
mWallpaperColorInfo.removeOnChangeListener(this);
mAM.removeAccessibilityStateChangeListener(this);
+ mLauncher.getStateManager().removeStateListener(this);
}
@Override
@@ -320,11 +322,7 @@ public class ScrimView extends View implements Insettable, WallpaperColorInfo.On
@Override
public void onAccessibilityStateChanged(boolean enabled) {
- LauncherStateManager stateManager = mLauncher.getStateManager();
- stateManager.removeStateListener(this);
-
if (enabled) {
- stateManager.addStateListener(this);
handleStateChangedComplete(mLauncher.getStateManager().getState());
} else {
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
@@ -333,7 +331,9 @@ public class ScrimView extends View implements Insettable, WallpaperColorInfo.On
}
private void updateDragHandleVisibility(Drawable recycle) {
- boolean visible = mLauncher.getDeviceProfile().isVerticalBarLayout() || mAM.isEnabled();
+ // 桌面主屏(NORMAL)状态下隐藏上滑把手(drag handle),由分页指示器(PageIndicatorDots)展示页面信息
+ boolean visible = (mLauncher.getDeviceProfile().isVerticalBarLayout() || mAM.isEnabled())
+ && !mLauncher.isInState(NORMAL);
boolean wasVisible = mDragHandle != null;
if (visible != wasVisible) {
if (visible) {
@@ -378,6 +378,7 @@ public class ScrimView extends View implements Insettable, WallpaperColorInfo.On
setImportantForAccessibility(finalState == ALL_APPS
? IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
: IMPORTANT_FOR_ACCESSIBILITY_AUTO);
+ updateDragHandleVisibility(null);
}
protected class AccessibilityHelper extends ExploreByTouchHelper {