Skip to content

Commit

Permalink
Merge branch 'MiuiX_V3_New'
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan095 committed Jun 13, 2024
2 parents 5132e78 + ccfa3d1 commit 558016e
Show file tree
Hide file tree
Showing 364 changed files with 8,325 additions and 5,395 deletions.
Binary file removed app/libs/animation-release.aar
Binary file not shown.
Binary file added app/libs/appcompat-debug.aar
Binary file not shown.
Binary file removed app/libs/appcompat-release.aar
Binary file not shown.
Binary file added app/libs/core-debug.aar
Binary file not shown.
Binary file removed app/libs/core-release.aar
Binary file not shown.
Binary file removed app/libs/external-release.aar
Binary file not shown.
Binary file added app/libs/folme-debug.aar
Binary file not shown.
Binary file added app/libs/graphics-debug.aar
Binary file not shown.
Binary file added app/libs/haptic-debug.aar
Binary file not shown.
Binary file removed app/libs/haptic-release.aar
Binary file not shown.
Binary file added app/libs/navigator-debug.aar
Binary file not shown.
Binary file added app/libs/nestedheader-debug.aar
Binary file not shown.
Binary file added app/libs/preference-debug.aar
Binary file not shown.
Binary file removed app/libs/preference-release.aar
Binary file not shown.
Binary file added app/libs/recyclerview-debug.aar
Binary file not shown.
Binary file added app/libs/smooth-debug.aar
Binary file not shown.
Binary file removed app/libs/smooth-release.aar
Binary file not shown.
Binary file added app/libs/springback-debug.aar
Binary file not shown.
Binary file removed app/libs/springback-release.aar
Binary file not shown.
Binary file added app/libs/viewpager-debug.aar
Binary file not shown.
5 changes: 4 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
-keep class com.sevtinge.hyperceiler.utils.blur.*
-keep class com.sevtinge.hyperceiler.utils.Helpers { boolean isModuleActive; }
-keep class com.sevtinge.hyperceiler.utils.Helpers { int XposedVersion; }
-keep class moralnorm.**{*;}
-keep class fan.**{*;}
-keep class org.luckypray.dexkit.*
-keep class * extends com.sevtinge.hyperceiler.ui.dashboard.*
-keep class * extends com.sevtinge.hyperceiler.ui.settings.*
-keep class * extends com.sevtinge.hyperceiler.ui.fragment.base.*
-keep class * extends com.sevtinge.hyperceiler.module.base.BaseHook { <init>(); }
-keep class * extends com.sevtinge.hyperceiler.module.base.BaseModule
Expand All @@ -20,5 +22,6 @@
-dontwarn android.app.ActivityTaskManager$RootTaskInfo
-dontwarn miui.app.MiuiFreeFormManager$MiuiFreeFormStackInfo
-dontwarn com.android.internal.view.menu.MenuBuilder
-dontwarn miui.util.HapticFeedbackUtil
-allowaccessmodification
-overloadaggressively
22 changes: 10 additions & 12 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="miui.permission.READ_LOGS" />
<uses-permission android:name="miui.permission.DUMP_CACHED_LOG" />
<uses-permission android:name="com.miui.securitycenter.permission.PERM_USE_INFO" />
<uses-permission android:name="com.miui.securitycenter.permission.SYSTEM_PERMISSION_DECLARE" />
<uses-permission android:name="com.miui.securitycenter.permission.ACCESS_SECURITY_CENTER_PROVIDER" />
<uses-permission
Expand All @@ -59,26 +60,26 @@
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/HyperCeilerTheme">

<activity
android:name=".ui.MainActivity"
android:name=".ui.CeilerTabActivity"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity">
android:theme="@style/Theme.Settings.MiuiSettings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
</intent-filter>
</activity>

<activity
android:name=".safe.CrashActivity"
android:name=".crash.activity.CrashActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:excludeFromRecents="true"
android:exported="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleTask"
android:theme="@style/Theme.HyperCeiler.Translucent.NoActionBar">
android:theme="@style/HyperCeilerTranslucentTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.Crash" />
<category android:name="android.intent.category.CrashDailog" />
Expand All @@ -89,8 +90,7 @@
android:name=".ui.LauncherActivity"
android:exported="true"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:targetActivity=".ui.MainActivity"
android:targetActivity=".ui.CeilerTabActivity"
tools:ignore="DiscouragedApi,LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -99,9 +99,8 @@
</activity-alias>

<activity
android:name=".ui.SubSettings"
android:name=".ui.settings.SubSettings"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -111,7 +110,6 @@

<activity
android:name=".ui.SubPickerActivity"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />

<provider
Expand Down Expand Up @@ -146,7 +144,7 @@
android:resource="@array/xposed_scope" />

<service
android:name="com.sevtinge.hyperceiler.safe.CrashService"
android:name="com.sevtinge.hyperceiler.crash.service.CrashService"
android:enabled="true"
android:exported="true">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.sevtinge.hyperceiler.controller;

import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreAndroidVersion;

import android.content.Context;

import com.sevtinge.hyperceiler.ui.settings.core.BasePreferenceController;
import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils;

public class DisableLowApiCheckController extends BasePreferenceController {

public DisableLowApiCheckController(Context context, String preferenceKey) {
super(context, preferenceKey);
}

@Override
public int getAvailabilityStatus() {
return isMoreAndroidVersion(34) ? AVAILABLE :
UNSUPPORTED_ON_DEVICE;
}
}
117 changes: 117 additions & 0 deletions app/src/main/java/com/sevtinge/hyperceiler/crash/CrashRecord.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package com.sevtinge.hyperceiler.crash;

import static com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logE;

import com.sevtinge.hyperceiler.callback.ITAG;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;

/**
* 崩溃记录数据库
*/
public class CrashRecord {
public static final String TAG = ITAG.TAG + ": CrashRecord";
// public String label;
public String pkg;
public long time;
public int count;

public CrashRecord(String p, long t, int c) {
// label = l;
pkg = p;
time = t;
count = c;
}

public JSONObject toJSON() {
JSONObject jsonObject = new JSONObject();
try {
// jsonObject.put("l", label);
jsonObject.put("p", pkg);
jsonObject.put("t", time);
jsonObject.put("c", count);
return jsonObject;
} catch (JSONException e) {
logE(TAG, "Failed to convert JSON!" + e);
}
return jsonObject;
}

public JSONObject toJSONSmall() {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("p", pkg);
jsonObject.put("c", count);
return jsonObject;
} catch (JSONException e) {
logE(TAG, "Failed to convert JSON!" + e);
}
return jsonObject;
}

/*public static String getLabel(JSONObject jsonObject) {
try {
return jsonObject.getString("l");
} catch (JSONException e) {
logE(TAG, "Failed to get name!" + e);
}
return "null";
}*/

public static String getPkg(JSONObject jsonObject) {
try {
return jsonObject.getString("p");
} catch (JSONException e) {
logE(TAG, "Failed to get package name!" + e);
}
return "null";
}

public static long getTime(JSONObject jsonObject) {
try {
return jsonObject.getLong("t");
} catch (JSONException e) {
logE(TAG, "Failed to get timestamp!" + e);
}
return -1L;
}

public static int getCount(JSONObject jsonObject) {
try {
return jsonObject.getInt("c");
} catch (JSONException e) {
logE(TAG, "Failed to get the number of times!" + e);
}
return -1;
}

public static JSONObject putParam(JSONObject jsonObject, long time, int count) {
try {
jsonObject.put("c", count);
jsonObject.put("t", time);
return jsonObject;
} catch (JSONException e) {
logE(TAG, "Failed to update data!" + e);
}
return null;
}

public static ArrayList<JSONObject> toArray(String json) {
try {
ArrayList<JSONObject> list = new ArrayList<>();
JSONArray jsonArray = new JSONArray(json);
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject obj = jsonArray.getJSONObject(i);
list.add(obj);
}
return list;
} catch (Exception e) {
logE(TAG, "Failed to convert Array!" + e);
}
return new ArrayList<>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import com.sevtinge.hyperceiler.callback.IEditCallback;
import com.sevtinge.hyperceiler.data.AppData;
import com.sevtinge.hyperceiler.ui.fragment.sub.AppPicker;
import com.sevtinge.hyperceiler.ui.sub.AppPicker;
import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArrayList;

import fan.animation.Folme;
import fan.animation.ITouchStyle;
import fan.animation.base.AnimConfig;

public class ModSearchAdapter extends RecyclerView.Adapter<ModSearchAdapter.ViewHolder> {

private Context mContext;
Expand All @@ -67,7 +71,8 @@ public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int position) {
}

@Override
public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) {
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
Folme.useAt(holder.itemView).touch().setScale(1.0f, new ITouchStyle.TouchType[0]).setBackgroundColor(mContext.getResources().getColor(R.color.settings_item_touch_color, mContext.getTheme())).setTintMode(1).handleTouchOf(holder.itemView, new AnimConfig[0]);
ModData ad = modsList.get(position);
Spannable spannable = new SpannableString(ad.title);
if (isChina) {
Expand All @@ -79,19 +84,19 @@ public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) {
spannable.setSpan(new ForegroundColorSpan(SearchHelper.MARK_COLOR_VIBRANT), start, start + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
}
viewHolder.mName.setText(spannable, TextView.BufferType.SPANNABLE);
holder.mName.setText(spannable, TextView.BufferType.SPANNABLE);
} else {
int start = ad.title.toLowerCase().indexOf(filterString);
if (start >= 0) {
spannable.setSpan(new ForegroundColorSpan(SearchHelper.MARK_COLOR_VIBRANT), start, start + filterString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
viewHolder.mName.setText(spannable, TextView.BufferType.SPANNABLE);
holder.mName.setText(spannable, TextView.BufferType.SPANNABLE);
} else {
viewHolder.mName.setText(ad.title);
holder.mName.setText(ad.title);
}
}
viewHolder.mPackageName.setText(ad.breadcrumbs);
holder.mPackageName.setText(ad.breadcrumbs);
// 设置item点击监听事件
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mItemClickListener.onItemClick(view, ad);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import java.util.List;

import moralnorm.appcompat.widget.CheckedTextView;
import fan.appcompat.widget.CheckedTextView;

public class MutipleChoiceAdapter extends RecyclerView.Adapter<MutipleChoiceAdapter.ViewHolder> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.hchen.hooktool.HCInit;
import com.sevtinge.hyperceiler.XposedInit;
import com.sevtinge.hyperceiler.module.base.dexkit.DexKit;
import com.sevtinge.hyperceiler.safe.CrashData;
import com.sevtinge.hyperceiler.crash.CrashData;
import com.sevtinge.hyperceiler.utils.ContextUtils;
import com.sevtinge.hyperceiler.utils.Helpers;
import com.sevtinge.hyperceiler.utils.api.ProjectApi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import com.sevtinge.hyperceiler.module.app.VariousSystemApps;
import com.sevtinge.hyperceiler.module.app.VariousThirdApps;
import com.sevtinge.hyperceiler.module.base.tool.ResourcesTool;
import com.sevtinge.hyperceiler.safe.CrashHook;
import com.sevtinge.hyperceiler.crash.CrashHook;
import com.sevtinge.hyperceiler.utils.api.ProjectApi;
import com.sevtinge.hyperceiler.utils.prefs.PrefsMap;
import com.sevtinge.hyperceiler.utils.prefs.PrefsUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@

import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.module.base.BaseHook;
import com.sevtinge.hyperceiler.ui.MainActivity;
import com.sevtinge.hyperceiler.ui.CeilerTabActivity;
import com.sevtinge.hyperceiler.utils.api.ProjectApi;

import java.util.ArrayList;
import java.util.List;

import de.robv.android.xposed.XposedHelpers;
import moralnorm.os.Build;
import fan.os.BuildCompat;

public class HyperCeilerSettings extends BaseHook {

Expand Down Expand Up @@ -69,7 +69,7 @@ protected void after(MethodHookParam param) throws Throwable {

Intent mIntent = new Intent();
mIntent.putExtra("isDisplayHomeAsUpEnabled", true);
mIntent.setClassName(ProjectApi.mAppModulePkg, MainActivity.class.getCanonicalName());
mIntent.setClassName(ProjectApi.mAppModulePkg, CeilerTabActivity.class.getCanonicalName());

Object header = XposedHelpers.newInstance(mPreferenceHeader);
XposedHelpers.setLongField(header, "id", 666);
Expand All @@ -96,7 +96,7 @@ protected void after(MethodHookParam param) throws Throwable {
headers.add(position - 1, header);
} else if (opt == 2 && id == themes) {
headers.add(position, header);
} else if (opt == 3 && id == (Integer.parseInt(Build.getMiuiVersionCode()) < 14 ? special : timer)) {
} else if (opt == 3 && id == (BuildCompat.MIUI_VERSION_CODE < 14 ? special : timer)) {
headers.add(position, header);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import java.util.ArrayList;

import moralnorm.preference.Preference;
import fan.preference.Preference;

public class PreferenceHeader extends Preference {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
import androidx.annotation.Nullable;

import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.ui.SubSettings;
import com.sevtinge.hyperceiler.ui.settings.SubSettings;
import com.sevtinge.hyperceiler.utils.SettingLauncherHelper;

import java.util.ArrayList;
import java.util.List;

import moralnorm.animation.Folme;
import moralnorm.preference.Preference;
import moralnorm.preference.PreferenceViewHolder;
import fan.animation.Folme;
import fan.preference.Preference;
import fan.preference.PreferenceViewHolder;

public class RecommendPreference extends Preference {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import java.io.DataOutputStream;
import java.io.IOException;

import moralnorm.preference.Preference;
import moralnorm.preference.PreferenceViewHolder;
import fan.preference.Preference;
import fan.preference.PreferenceViewHolder;

public class StartActivityWithRootPreference extends Preference {

Expand Down
Loading

0 comments on commit 558016e

Please sign in to comment.