导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - FrozenAppProvider.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 FrozenAppProvider.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.iflytek.mdmservice.provider;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.iflytek.mdmcommon.LogUtil;
import net.sqlcipher.BuildConfig;

public class FrozenAppProvider extends ContentProvider {

    private static String f327a = "string/*/*/";

    private static final UriMatcher f328b;

    private class b {

        private String f329a;

        private Object f330b;

        private b(FrozenAppProvider frozenAppProvider) {
        }

        public Object a() {
            return this.f330b;
        }

        public String b() {
            return this.f329a;
        }

        public void c(Object obj) {
            this.f330b = obj;
        }

        public void d(String str) {
            this.f329a = str;
        }

        public void e(String str) {
        }
    }

    static {
        UriMatcher uriMatcher = new UriMatcher(-1);
        f328b = uriMatcher;
        uriMatcher.addURI("com.iflytek.mdmservice.frozen.app", f327a, 100);
    }

    private Cursor a(Context context, b bVar, int i) {
        String string;
        Object a2 = bVar.a();
        if (i != 100) {
            string = null;
        } else {
            SharedPreferences sharedPreferences = context.getSharedPreferences("tb605fc_frozenapp", 0);
            string = a2 == null ? sharedPreferences.getString(bVar.b(), BuildConfig.FLAVOR) : sharedPreferences.getString(bVar.b(), String.valueOf(a2));
        }
        if (string == null) {
            return null;
        }
        MatrixCursor matrixCursor = new MatrixCursor(new String[]{"FROZEN_APP"});
        matrixCursor.addRow(new Object[]{string});
        return matrixCursor;
    }

    private b b(Uri uri) {
        try {
            b bVar = new b();
            bVar.e(uri.getPathSegments().get(1));
            if (uri.getPathSegments().size() > 2) {
                bVar.d(uri.getPathSegments().get(2));
            }
            if (uri.getPathSegments().size() > 3) {
                bVar.c(uri.getPathSegments().get(3));
            }
            return bVar;
        } catch (Exception e) {
            LogUtil.i("MDMService", "FrozenAppProvider.getModel exception: " + e.getMessage());
            return null;
        }
    }

    @Override
    public int delete(@NonNull Uri uri, @Nullable String str, @Nullable String[] strArr) {
        return 0;
    }

    @Override
    @Nullable
    public String getType(@NonNull Uri uri) {
        return null;
    }

    @Override
    @Nullable
    public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
        return null;
    }

    @Override
    public boolean onCreate() {
        return false;
    }

    @Override
    public Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
        b b2 = b(uri);
        if (b2 == null) {
            return null;
        }
        return a(getContext(), b2, f328b.match(uri));
    }

    @Override
    public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String str, @Nullable String[] strArr) {
        return 0;
    }
}