improvements

This commit is contained in:
gdlbo
2023-02-25 19:24:37 +03:00
parent 23e89c31eb
commit 9e07ddcdf5
3 changed files with 10 additions and 14 deletions
@@ -108,10 +108,8 @@ public class DockBarInjector {
private static void removeAllChildren(ViewGroup view) {
for (int i = 0; i < view.getChildCount(); i++) {
if (view instanceof ViewGroup) {
removeAllChildren((ViewGroup) view.getChildAt(i));
view.removeAllViews();
}
removeAllChildren((ViewGroup) view.getChildAt(i));
view.removeAllViews();
}
}
@@ -247,8 +245,8 @@ public class DockBarInjector {
}
try {
JSONArray jSONArray = new JSONArray();
for (int i = 0; i < arrayList.size(); i++) {
jSONArray.put(new JSONObject().put("name", arrayList.get(i)));
for (String s : arrayList) {
jSONArray.put(new JSONObject().put("name", s));
}
for (int i2 = 0; i2 < arr.length(); i2++) {
jSONArray.put(arr.getJSONObject(i2));
@@ -19,8 +19,8 @@ public class ArscEditor {
final var id = BinaryResourceIdentifier.create(packageChunk.getId(), typeSpecChunk.getId(), entry.getKey());
for (int i = 0; i < colorIds.length; ++i) {
if (colorIds[i] != id.resId()) continue;
for (int colorId : colorIds) {
if (colorId != id.resId()) continue;
final var value = entry.getValue();
value.updateValue(new BinaryResourceValue(8, value.value().type(), color /*colors[i]*/));
@@ -3,6 +3,8 @@ package ru.vtosters.lite.ui.wallpapers;
import android.graphics.Bitmap;
import android.graphics.Color;
import java.util.Arrays;
public class ConvolutionMatrix {
public static final int SIZE = 3;
@@ -83,17 +85,13 @@ public class ConvolutionMatrix {
public void setAll(double value) {
for (int x = 0; x < SIZE; ++x) {
for (int y = 0; y < SIZE; ++y) {
Matrix[x][y] = value;
}
Arrays.fill(Matrix[x], value);
}
}
public void applyConfig(double[][] config) {
for (int x = 0; x < SIZE; ++x) {
for (int y = 0; y < SIZE; ++y) {
Matrix[x][y] = config[x][y];
}
System.arraycopy(config[x], 0, Matrix[x], 0, SIZE);
}
}
}