正在查看: Tasker v6.5.11 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.5.11 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package jg;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.joaomgcd.taskerm.util.s;
import com.joaomgcd.taskerm.util.z2;
import hk.o;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import ji.r;
import lj.e0;
import net.dinglisch.android.taskerm.dq;
import net.dinglisch.android.taskerm.g6;
import xj.l;
import xj.p;
import yj.q;
public final class c {
static final class a<T> extends q implements l<T, e0> {
final l<T, Boolean> i;
final Context q;
final String r;
final SharedPreferences s;
a(l<? super T, Boolean> lVar, Context context, String str, SharedPreferences sharedPreferences) {
super(1);
this.i = lVar;
this.q = context;
this.r = str;
this.s = sharedPreferences;
}
public final void a(T t) {
if (this.i.invoke(t).booleanValue()) {
c.C(this.q, this.r, Boolean.TRUE, this.s);
}
}
@Override
public e0 invoke(Object obj) {
a(obj);
return e0.a;
}
}
static final class b extends q implements p<SharedPreferences.Editor, String, SharedPreferences.Editor> {
final String i;
b(String str) {
super(2);
this.i = str;
}
@Override
public final SharedPreferences.Editor l(SharedPreferences.Editor editor, String str) {
yj.p.i(editor, "$this$put");
yj.p.i(str, "it");
SharedPreferences.Editor putString = editor.putString(this.i, str);
yj.p.h(putString, "putString(...)");
return putString;
}
}
static final class C0173c extends q implements p<SharedPreferences.Editor, Boolean, SharedPreferences.Editor> {
final String i;
C0173c(String str) {
super(2);
this.i = str;
}
public final SharedPreferences.Editor a(SharedPreferences.Editor editor, boolean z) {
yj.p.i(editor, "$this$put");
SharedPreferences.Editor putBoolean = editor.putBoolean(this.i, z);
yj.p.h(putBoolean, "putBoolean(...)");
return putBoolean;
}
@Override
public SharedPreferences.Editor l(SharedPreferences.Editor editor, Boolean bool) {
return a(editor, bool.booleanValue());
}
}
static final class d extends q implements p<SharedPreferences.Editor, Integer, SharedPreferences.Editor> {
final String i;
d(String str) {
super(2);
this.i = str;
}
public final SharedPreferences.Editor a(SharedPreferences.Editor editor, int i) {
yj.p.i(editor, "$this$put");
SharedPreferences.Editor putInt = editor.putInt(this.i, i);
yj.p.h(putInt, "putInt(...)");
return putInt;
}
@Override
public SharedPreferences.Editor l(SharedPreferences.Editor editor, Integer num) {
return a(editor, num.intValue());
}
}
static final class e extends q implements p<SharedPreferences.Editor, Long, SharedPreferences.Editor> {
final String i;
e(String str) {
super(2);
this.i = str;
}
public final SharedPreferences.Editor a(SharedPreferences.Editor editor, long j) {
yj.p.i(editor, "$this$put");
SharedPreferences.Editor putLong = editor.putLong(this.i, j);
yj.p.h(putLong, "putLong(...)");
return putLong;
}
@Override
public SharedPreferences.Editor l(SharedPreferences.Editor editor, Long l) {
return a(editor, l.longValue());
}
}
static final class f extends q implements p<SharedPreferences.Editor, Object, SharedPreferences.Editor> {
final String i;
final mc.e q;
f(String str, mc.e eVar) {
super(2);
this.i = str;
this.q = eVar;
}
@Override
public final SharedPreferences.Editor l(SharedPreferences.Editor editor, Object obj) {
yj.p.i(editor, "$this$put");
yj.p.i(obj, "it");
editor.remove(this.i);
SharedPreferences.Editor putString = editor.putString(this.i, this.q.r(obj));
yj.p.h(putString, "putString(...)");
return putString;
}
}
public static final void A(SharedPreferences sharedPreferences, String str, String str2) {
yj.p.i(sharedPreferences, "<this>");
yj.p.i(str, "key");
z(sharedPreferences, str, str2, new b(str));
}
public static void B(SharedPreferences sharedPreferences, String str, Object obj, mc.e eVar, int i, Object obj2) {
if ((i & 4) != 0) {
eVar = wf.c.a();
}
y(sharedPreferences, str, obj, eVar);
}
public static final void C(Context context, String str, Boolean bool, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
v(sharedPreferences, str, bool);
}
public static final void D(Context context, String str, Integer num, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
w(sharedPreferences, str, num);
}
public static final void E(Context context, String str, Long l, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
x(sharedPreferences, str, l);
}
public static final void F(Context context, String str, Object obj, SharedPreferences sharedPreferences, mc.e eVar) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
yj.p.i(eVar, "gsonOverride");
y(sharedPreferences, str, obj, eVar);
}
public static final void G(Context context, String str, String str2, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
A(sharedPreferences, str, str2);
}
public static void H(Context context, String str, Boolean bool, SharedPreferences sharedPreferences, int i, Object obj) {
if ((i & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
C(context, str, bool, sharedPreferences);
}
public static void I(Context context, String str, Integer num, SharedPreferences sharedPreferences, int i, Object obj) {
if ((i & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
D(context, str, num, sharedPreferences);
}
public static void J(Context context, String str, Object obj, SharedPreferences sharedPreferences, mc.e eVar, int i, Object obj2) {
if ((i & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
if ((i & 8) != 0) {
eVar = wf.c.a();
}
F(context, str, obj, sharedPreferences, eVar);
}
public static void K(Context context, String str, String str2, SharedPreferences sharedPreferences, int i, Object obj) {
if ((i & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
G(context, str, str2, sharedPreferences);
}
public static final int L(Context context, String str) {
yj.p.i(context, "<this>");
yj.p.i(str, "stringInIt");
Map<String, ?> all = p(context).getAll();
yj.p.h(all, "getAll(...)");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Map.Entry<String, ?> entry : all.entrySet()) {
String key = entry.getKey();
yj.p.h(key, "<get-key>(...)");
if (o.N(key, str, false, 2, null)) {
linkedHashMap.put(entry.getKey(), entry.getValue());
}
}
SharedPreferences.Editor edit = p(context).edit();
Iterator it = linkedHashMap.entrySet().iterator();
while (it.hasNext()) {
edit.remove((String) ((Map.Entry) it.next()).getKey());
}
edit.apply();
return linkedHashMap.size();
}
public static final void M(Context context, String str, xj.a<e0> aVar) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(aVar, "action");
s m = z2.m(str);
if (t(context, m, null, 2, null)) {
return;
}
u(context, m);
aVar.invoke();
}
public static final <T> r<T> b(Context context, com.joaomgcd.taskerm.util.q qVar, xj.a<? extends r<T>> aVar, l<? super T, Boolean> lVar, SharedPreferences sharedPreferences, xj.a<? extends r<T>> aVar2) {
yj.p.i(context, "<this>");
yj.p.i(qVar, "tipKey");
yj.p.i(aVar, "getterIfDone");
yj.p.i(lVar, "isDone");
yj.p.i(sharedPreferences, "preferences");
yj.p.i(aVar2, "block");
String b2 = qVar.b();
if (s(context, qVar, sharedPreferences)) {
return aVar.invoke();
}
r<T> invoke = aVar2.invoke();
final a aVar3 = new a(lVar, context, b2, sharedPreferences);
r<T> q = invoke.q(new oi.d() {
@Override
public final void accept(Object obj) {
c.d(l.this, obj);
}
});
yj.p.h(q, "doOnSuccess(...)");
return q;
}
public static r c(Context context, com.joaomgcd.taskerm.util.q qVar, xj.a aVar, l lVar, SharedPreferences sharedPreferences, xj.a aVar2, int i, Object obj) {
if ((i & 8) != 0) {
sharedPreferences = p(context);
yj.p.h(sharedPreferences, "<get-preferencesState>(...)");
}
return b(context, qVar, aVar, lVar, sharedPreferences, aVar2);
}
public static final void d(l lVar, Object obj) {
yj.p.i(lVar, "$tmp0");
lVar.invoke(obj);
}
public static final void e(SharedPreferences sharedPreferences, l<? super SharedPreferences.Editor, e0> lVar) {
yj.p.i(sharedPreferences, "<this>");
yj.p.i(lVar, "block");
SharedPreferences.Editor edit = sharedPreferences.edit();
yj.p.f(edit);
lVar.invoke(edit);
edit.commit();
}
public static final boolean f(Context context, String str, boolean z, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
return sharedPreferences.getBoolean(str, z);
}
public static boolean g(Context context, String str, boolean z, SharedPreferences sharedPreferences, int i, Object obj) {
if ((i & 2) != 0) {
z = false;
}
if ((i & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
return f(context, str, z, sharedPreferences);
}
public static final int h(Context context, String str, int i, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
return sharedPreferences.getInt(str, i);
}
public static int i(Context context, String str, int i, SharedPreferences sharedPreferences, int i2, Object obj) {
if ((i2 & 2) != 0) {
i = 0;
}
if ((i2 & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
return h(context, str, i, sharedPreferences);
}
public static final long j(Context context, String str, long j, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
return sharedPreferences.getLong(str, j);
}
public static final String k(Context context, String str, String str2, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(str, "key");
yj.p.i(sharedPreferences, "state");
return sharedPreferences.getString(str, str2);
}
public static String l(Context context, String str, String str2, SharedPreferences sharedPreferences, int i, Object obj) {
if ((i & 2) != 0) {
str2 = null;
}
if ((i & 4) != 0) {
sharedPreferences = m(context);
yj.p.h(sharedPreferences, "<get-preferences>(...)");
}
return k(context, str, str2, sharedPreferences);
}
public static final SharedPreferences m(Context context) {
yj.p.i(context, "<this>");
return PreferenceManager.getDefaultSharedPreferences(context);
}
public static final SharedPreferences n(Context context) {
yj.p.i(context, "<this>");
return context.getSharedPreferences(g6.g, 0);
}
public static final SharedPreferences o(Context context) {
yj.p.i(context, "<this>");
return dq.R0(context);
}
public static final SharedPreferences p(Context context) {
yj.p.i(context, "<this>");
return dq.S0(context);
}
public static final SharedPreferences q(Context context) {
yj.p.i(context, "<this>");
return context.getSharedPreferences(g6.j, 0);
}
public static final boolean r(Context context, com.joaomgcd.taskerm.util.q qVar) {
yj.p.i(context, "<this>");
yj.p.i(qVar, "key");
return t(context, qVar, null, 2, null);
}
public static final boolean s(Context context, com.joaomgcd.taskerm.util.q qVar, SharedPreferences sharedPreferences) {
yj.p.i(context, "<this>");
yj.p.i(qVar, "key");
yj.p.i(sharedPreferences, "preferences");
return f(context, qVar.b(), false, sharedPreferences);
}
public static boolean t(Context context, com.joaomgcd.taskerm.util.q qVar, SharedPreferences sharedPreferences, int i, Object obj) {
if ((i & 2) != 0) {
sharedPreferences = p(context);
yj.p.h(sharedPreferences, "<get-preferencesState>(...)");
}
return s(context, qVar, sharedPreferences);
}
public static final void u(Context context, com.joaomgcd.taskerm.util.q qVar) {
yj.p.i(context, "<this>");
yj.p.i(qVar, "tipKey");
String b2 = qVar.b();
Boolean bool = Boolean.TRUE;
SharedPreferences p = p(context);
yj.p.h(p, "<get-preferencesState>(...)");
C(context, b2, bool, p);
}
public static final void v(SharedPreferences sharedPreferences, String str, Boolean bool) {
yj.p.i(sharedPreferences, "<this>");
yj.p.i(str, "key");
z(sharedPreferences, str, bool, new C0173c(str));
}
public static final void w(SharedPreferences sharedPreferences, String str, Integer num) {
yj.p.i(sharedPreferences, "<this>");
yj.p.i(str, "key");
z(sharedPreferences, str, num, new d(str));
}
public static final void x(SharedPreferences sharedPreferences, String str, Long l) {
yj.p.i(sharedPreferences, "<this>");
yj.p.i(str, "key");
z(sharedPreferences, str, l, new e(str));
}
public static final void y(SharedPreferences sharedPreferences, String str, Object obj, mc.e eVar) {
yj.p.i(sharedPreferences, "<this>");
yj.p.i(str, "key");
yj.p.i(eVar, "gsonOverride");
z(sharedPreferences, str, obj, new f(str, eVar));
}
private static final <T> void z(SharedPreferences sharedPreferences, String str, T t, p<? super SharedPreferences.Editor, ? super T, ? extends SharedPreferences.Editor> pVar) {
SharedPreferences.Editor edit = sharedPreferences.edit();
if (t == null) {
edit.remove(str);
} else {
yj.p.f(edit);
pVar.l(edit, t);
}
edit.commit();
}
}