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

Commit 81a14902 authored by Amit's avatar Amit
Browse files

Remove google lookup and backup agent

parent 72c4775b
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -76,12 +76,8 @@
        android:icon="@mipmap/ic_launcher_phone"
        android:hardwareAccelerated="true"
        android:supportsRtl="true"
        android:backupAgent='com.android.dialer.DialerBackupAgent'
        android:usesCleartextTraffic="false">

        <meta-data android:name="com.google.android.backup.api_key"
            android:value="AEdPqrEAAAAIBXgtCEKQ6W0PXVnW-ZVia2KmlV2AxsTw3GjAeQ" />

        <!-- The entrance point for Phone UI.
             stateAlwaysHidden is set to suppress keyboard show up on
             dialpad screen. -->
+0 −2
Original line number Diff line number Diff line
@@ -34,12 +34,10 @@
    </string-array>

    <string-array name="forward_lookup_providers" translatable="false">
        <item>Google</item>
        <item>OpenStreetMap</item>
    </string-array>

    <string-array name="forward_lookup_provider_names" translatable="false">
        <item>Google</item>
        <item>OpenStreetMap</item>
    </string-array>

+0 −38
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 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.dialer;

import android.app.backup.BackupAgentHelper;
import android.app.backup.BackupDataInput;
import android.app.backup.SharedPreferencesBackupHelper;
import android.content.Context;

/**
 * The Dialer backup agent backs up the shared preferences settings of the
 * Dialer App. Right now it backs up the whole shared preference file. This
 * can be modified in the future to accommodate partical backup.
 */
public class DialerBackupAgent extends BackupAgentHelper
{
    private static final String SHARED_KEY = "shared_pref";

    @Override
    public void onCreate() {
        addHelper(SHARED_KEY, new SharedPreferencesBackupHelper(this,
                DialtactsActivity.SHARED_PREFS_NAME));
    }
}
+3 −8
Original line number Diff line number Diff line
@@ -35,9 +35,7 @@ public abstract class ForwardLookup {
        if (INSTANCE == null || !isInstance(provider)) {
            Log.d(TAG, "Chosen forward lookup provider: " + provider);

            if (provider.equals(LookupSettings.FLP_GOOGLE)) {
                INSTANCE = new GoogleForwardLookup(context);
            } else if (provider.equals(LookupSettings.FLP_OPENSTREETMAP)) {
            if (provider.equals(LookupSettings.FLP_OPENSTREETMAP)) {
                INSTANCE = new OpenStreetMapForwardLookup(context);
            } 
        }
@@ -46,10 +44,7 @@ public abstract class ForwardLookup {
    }

    private static boolean isInstance(String provider) {
        if (provider.equals(LookupSettings.FLP_GOOGLE)
                && INSTANCE instanceof GoogleForwardLookup) {
            return true;
        } else if (provider.equals(LookupSettings.FLP_OPENSTREETMAP)
        if (provider.equals(LookupSettings.FLP_OPENSTREETMAP)
                && INSTANCE instanceof OpenStreetMapForwardLookup) {
            return true;
        } else {
+2 −3
Original line number Diff line number Diff line
@@ -30,9 +30,8 @@ public final class LookupSettings {
    private static final String TAG = LookupSettings.class.getSimpleName();

    /** Forward lookup providers */
    public static final String FLP_GOOGLE = "Google";
    public static final String FLP_OPENSTREETMAP = "OpenStreetMap";
    public static final String FLP_DEFAULT = FLP_GOOGLE;
    public static final String FLP_DEFAULT = FLP_OPENSTREETMAP;

    /** People lookup providers */
    public static final String PLP_AUSKUNFT = "Auskunft";
@@ -90,7 +89,7 @@ public final class LookupSettings {
        String provider = getLookupProvider(context,
                CMSettings.System.REVERSE_LOOKUP_PROVIDER, RLP_DEFAULT);

        if ("Google".equals(provider) || "Gebeld".equals(provider) ||
        if ("Gebeld".equals(provider) ||
                "WhitePages".equals(provider) || "WhitePages_CA".equals(provider)) {
            CMSettings.System.putString(context.getContentResolver(),
                    CMSettings.System.REVERSE_LOOKUP_PROVIDER, RLP_DEFAULT);
Loading