Improve magisk hide app list's adapter, better thread safety

This commit is contained in:
tonymanou
2017-01-08 14:41:19 +01:00
committed by topjohnwu
parent b91919bffa
commit 2a70619577
5 changed files with 100 additions and 55 deletions
@@ -9,6 +9,7 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Environment;
import android.support.v4.app.ActivityCompat;
import android.text.TextUtils;
import android.util.Base64;
import android.widget.Toast;
@@ -144,6 +145,10 @@ public class Utils {
}
}
public static boolean lowercaseContains(CharSequence string, CharSequence nonNullLowercaseSearch) {
return !TextUtils.isEmpty(string) && string.toString().toLowerCase().contains(nonNullLowercaseSearch);
}
public static class ByteArrayInOutStream extends ByteArrayOutputStream {
public ByteArrayInputStream getInputStream() {
ByteArrayInputStream in = new ByteArrayInputStream(buf, 0, count);