导航菜单

页面标题

页面副标题

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

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

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


package com.iflytek.mdmservice.provider;

import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.iflytek.mdmservice.db.impl.MdmDaoImpl;

public class MdmProvider extends ContentProvider {

    public static final Uri f331b = Uri.parse("content://com.iflytek.mdmservice.provider.MdmProvider/mdm");

    private static final UriMatcher f332c;

    private MdmDaoImpl f333a;

    static {
        UriMatcher uriMatcher = new UriMatcher(-1);
        f332c = uriMatcher;
        uriMatcher.addURI("com.iflytek.mdmservice.provider.MdmProvider", "mdm", 0);
    }

    @Override
    public int delete(@NonNull Uri uri, @Nullable String str, @Nullable String[] strArr) {
        if (f332c.match(uri) == 0) {
            int delete = this.f333a.delete(str, strArr);
            getContext().getContentResolver().notifyChange(uri, null);
            return delete;
        }
        throw new IllegalArgumentException("Unknown URI: " + uri);
    }

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

    @Override
    @Nullable
    public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
        if (f332c.match(uri) == 0) {
            Uri withAppendedId = ContentUris.withAppendedId(uri, this.f333a.insertOrReplace(contentValues));
            getContext().getContentResolver().notifyChange(uri, null);
            return withAppendedId;
        }
        throw new IllegalArgumentException("Unknown URI: " + uri);
    }

    @Override
    public boolean onCreate() {
        this.f333a = new MdmDaoImpl(getContext());
        return true;
    }

    @Override
    @Nullable
    public Cursor query(@NonNull Uri uri, @Nullable String[] strArr, @Nullable String str, @Nullable String[] strArr2, @Nullable String str2) {
        if (f332c.match(uri) == 0) {
            Cursor query = this.f333a.query(str, strArr2);
            query.setNotificationUri(getContext().getContentResolver(), uri);
            return query;
        }
        throw new IllegalArgumentException("Unknown URI: " + uri);
    }

    @Override
    public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String str, @Nullable String[] strArr) {
        if (f332c.match(uri) == 0) {
            int update = this.f333a.update(contentValues, str, strArr);
            getContext().getContentResolver().notifyChange(uri, null);
            return update;
        }
        throw new IllegalArgumentException("Unknown URI: " + uri);
    }
}