Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cd19bdc authored by Chen Xu's avatar Chen Xu Committed by Android (Google) Code Review
Browse files

Merge "Carrier identification config updater"

parents 84c4e9f6 ea56c330
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3918,6 +3918,14 @@
            </intent-filter>
        </receiver>

        <receiver android:name="com.android.server.updates.CarrierIdInstallReceiver"
                  android:permission="android.permission.UPDATE_CONFIG">
            <intent-filter>
                <action android:name="com.android.internal.intent.action.UPDATE_CARRIER_ID_DB" />
                <data android:scheme="content" android:host="*" android:mimeType="*/*" />
            </intent-filter>
        </receiver>

        <receiver android:name="com.android.server.MasterClearReceiver"
            android:permission="android.permission.MASTER_CLEAR">
            <intent-filter
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.updates;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Telephony;
import android.util.Log;

public class CarrierIdInstallReceiver extends ConfigUpdateInstallReceiver {

    public CarrierIdInstallReceiver() {
        super("/data/misc/carrierid", "carrier_list.pb", "metadata/", "version");
    }

    @Override
    protected void postInstall(Context context, Intent intent) {
        ContentResolver resolver = context.getContentResolver();
        resolver.update(Uri.withAppendedPath(Telephony.CarrierIdentification.CONTENT_URI,
                "update_db"), new ContentValues(), null, null);
    }
}