-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
364 changed files
with
8,325 additions
and
5,395 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/sevtinge/hyperceiler/controller/DisableLowApiCheckController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
117 changes: 117 additions & 0 deletions
117
app/src/main/java/com/sevtinge/hyperceiler/crash/CrashRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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<>(); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.