Skip to content

Commit 0212beb

Browse files
Make lint happy
1 parent 62d864e commit 0212beb

25 files changed

Lines changed: 35 additions & 62 deletions

app/src/main/java/com/sevtinge/hyperceiler/data/LocationData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ public void setRemarks(String remarks) {
109109
}
110110

111111
public String toString() {
112-
return String.valueOf(Latitude) + "," + String.valueOf(Longitude) + "," + String.valueOf(Offset) + "," + String.valueOf(RegionCode) + "," + String.valueOf(BaseStationCode) + "," + Remarks;
112+
return Latitude + "," + Longitude + "," + Offset + "," + RegionCode + "," + BaseStationCode + "," + Remarks;
113113
}
114114
}

app/src/main/java/com/sevtinge/hyperceiler/data/adapter/AppDataAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup
7575
assert appInfo != null;
7676
if (mMode == AppPicker.INPUT_MODE) {
7777
String edit = getEdit(appInfo.packageName);
78-
if (!edit.equals("")) {
78+
if (!edit.isEmpty()) {
7979
appName.setText(edit);
8080
} else {
8181
appName.setText(appInfo.label);
@@ -105,7 +105,7 @@ public String getEdit(String packageName) {
105105
}
106106
}
107107
}
108-
if (string2 != null && !string2.equals("")) {
108+
if (string2 != null && !string2.isEmpty()) {
109109
for (int i = 0; i < appLists.size(); i++) {
110110
AppArrayList arrayList = appLists.get(i);
111111
if (arrayList.mPackageName.equals(packageName)) {

app/src/main/java/com/sevtinge/hyperceiler/module/base/tool/HookTool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public boolean hookAllMethodsBoolean(String className, String methodName, Method
271271
try {
272272
Class<?> hookClass = findClassIfExists(className);
273273
if (hookClass != null) {
274-
return XposedBridge.hookAllMethods(hookClass, methodName, callback).size() > 0;
274+
return !XposedBridge.hookAllMethods(hookClass, methodName, callback).isEmpty();
275275
}
276276
} catch (Throwable ignored) {
277277
return false;
@@ -282,7 +282,7 @@ public boolean hookAllMethodsBoolean(String className, String methodName, Method
282282
public boolean hookAllMethodsBoolean(Class<?> hookClass, String methodName, MethodHook callback) {
283283
try {
284284
if (hookClass != null) {
285-
return XposedBridge.hookAllMethods(hookClass, methodName, callback).size() > 0;
285+
return !XposedBridge.hookAllMethods(hookClass, methodName, callback).isEmpty();
286286
}
287287
return false;
288288
} catch (Throwable t) {

app/src/main/java/com/sevtinge/hyperceiler/module/hook/calendar/UnlockSubscription.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
package com.sevtinge.hyperceiler.module.hook.calendar;
22

3-
import static de.robv.android.xposed.XposedHelpers.callStaticMethod;
4-
5-
import android.content.Context;
6-
import android.content.SharedPreferences;
7-
import android.preference.PreferenceManager;
8-
93
import com.sevtinge.hyperceiler.module.base.BaseHook;
104
import com.sevtinge.hyperceiler.module.base.dexkit.DexKit;
115

app/src/main/java/com/sevtinge/hyperceiler/module/hook/contentextension/LinkOpenMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private String getDefaultBrowserApp(Context context) {
8888
Uri uri = Uri.parse("http://");
8989
intent.setDataAndType(uri, null);
9090
List<ResolveInfo> resolveInfoList = context.getPackageManager().queryIntentActivities(intent, PackageManager.GET_INTENT_FILTERS);
91-
if (resolveInfoList.size() > 0) {
91+
if (!resolveInfoList.isEmpty()) {
9292
ActivityInfo activityInfo = resolveInfoList.get(0).activityInfo;
9393
return activityInfo.packageName;
9494
} else {

app/src/main/java/com/sevtinge/hyperceiler/module/hook/gallery/UnPrivacyWatermark.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ public void drawWatermark(Canvas canvas, String text, int mWidth, int mHeight, i
8484
float max = (float) ((Math.max(i6 / mHeight, mHeight / i6) * Math.sin(abs)) + 1.0d);
8585
if (angle != 90) {
8686
if (angle == 180) {
87-
float f3 = mHeight;
88-
i4 = (int) (max * f3);
89-
canvas.translate(i6 - height2, f3 - height3);
87+
i4 = (int) (max * (float) mHeight);
88+
canvas.translate(i6 - height2, (float) mHeight - height3);
9089
} else if (angle == 270) {
9190
float f4 = i6;
9291
i4 = (int) (max * f4);

app/src/main/java/com/sevtinge/hyperceiler/module/hook/home/title/IconTitleCustomization.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void modifyTitle(Object thisObject) {
162162
// String actName = (String) XposedHelpers.callMethod(thisObject, "getClassName");
163163
// UserHandle user = (UserHandle) XposedHelpers.getObjectField(thisObject, "user");
164164
String newTitle = (String) getAppName(pkgName);
165-
if (newTitle != null && !newTitle.equals(""))
165+
if (newTitle != null && !newTitle.isEmpty())
166166
XposedHelpers.setObjectField(thisObject, "mLabel", newTitle);
167167
}
168168

app/src/main/java/com/sevtinge/hyperceiler/module/hook/securitycenter/sidebar/AddSideBarExpandReceiver.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ protected void after(MethodHookParam param) throws Throwable {
6060
View view = (View) param.args[0];
6161
if (originDockLocation == -1) {
6262
originDockLocation = view.getContext().getSharedPreferences("sp_video_box", 0).getInt("dock_line_location", 0);
63-
;
6463
}
6564
BroadcastReceiver showReceiver = new BroadcastReceiver() {
6665
@Override

app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/VolumeSeparateControl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ protected void before(MethodHookParam param) throws Throwable {
7070
Set<Integer> DEVICE_OUT_ALL = (Set<Integer>) XposedHelpers.getStaticObjectField(audioSystem, "DEVICE_OUT_ALL_SET");
7171
int DEVICE_OUT_DEFAULT = XposedHelpers.getStaticIntField(audioSystem, "DEVICE_OUT_DEFAULT");
7272
int[] DEFAULT_STREAM_VOLUME = (int[]) XposedHelpers.getStaticObjectField(audioSystem, "DEFAULT_STREAM_VOLUME");
73-
Set<Integer> remainingDevices = DEVICE_OUT_ALL;
7473
Object mContentResolver = XposedHelpers.getObjectField(XposedHelpers.getSurroundingThis(param.thisObject), "mContentResolver");
7574
SparseIntArray mIndexMap = (SparseIntArray) XposedHelpers.getObjectField(param.thisObject, "mIndexMap");
7675

77-
for (Integer deviceType : remainingDevices) {
76+
for (Integer deviceType : DEVICE_OUT_ALL) {
7877
int device = deviceType;
7978
String name = (String) XposedHelpers.callMethod(param.thisObject, "getSettingNameForDevice", device);
8079
int index = (int) XposedHelpers.callStaticMethod(Settings.System.class, "getIntForUser", mContentResolver, name, device == DEVICE_OUT_DEFAULT ? DEFAULT_STREAM_VOLUME[mStreamType] : -1, -2);

app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemframework/display/ToastTime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected void after(MethodHookParam param) {
4141
Context mContext = (Context) XposedHelpers.callMethod(param.thisObject, "getContext");
4242
Handler mHandler = (Handler) XposedHelpers.getObjectField(param.thisObject, "mHandler");
4343
ArrayList<Object> mToastQueue = (ArrayList<Object>) XposedHelpers.getObjectField(param.thisObject, "mToastQueue");
44-
if (mContext == null || mHandler == null || mToastQueue == null || mToastQueue.size() == 0)
44+
if (mContext == null || mHandler == null || mToastQueue == null || mToastQueue.isEmpty())
4545
return;
4646
int mod = (PrefsUtils.getSharedIntPrefs(mContext, "system_ui_display_toast_times", 0) - 4) * 1000;
4747
for (Object record : mToastQueue)

0 commit comments

Comments
 (0)