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

Commit c3e29e29 authored by Natiq Ahmed's avatar Natiq Ahmed
Browse files

Volte_vt fix and other minor fixes

Conflicts:
	core/java/android/provider/Settings.java
Change-Id: I7619aba9efbaed7299667c96f6a69bc869a17ba9
parent c2d264c9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
                        throw new OperationApplicationException("App op not allowed", 0);
                    }
                } else if (operation.isWriteOperation()) {
                    if (enforceWritePermission(callingPkg, uri)
                    if (enforceWritePermission(callingPkg, uri, null)
                            != AppOpsManager.MODE_ALLOWED) {
                        throw new OperationApplicationException("App op not allowed", 0);
                    }
@@ -475,7 +475,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
        }

        private int enforceDeletePermission(String callingPkg, Uri uri) throws SecurityException {
            enforceWritePermissionInner(uri);
            enforceWritePermissionInner(uri, null);
            if (mWriteOp != AppOpsManager.OP_NONE) {
                int op = mWriteOp;
                switch (mWriteOp) {
+4 −2
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;

import android.util.ArraySet;

import java.util.HashSet;

/**
 * Per-user state information about a package.
 * @hide
@@ -53,9 +55,9 @@ public class PackageUserState {
        hidden = o.hidden;
        lastDisableAppCaller = o.lastDisableAppCaller;
        disabledComponents = o.disabledComponents != null
                ? new ArraySet<String>(o.disabledComponents) : null;
                ? new HashSet<String>(o.disabledComponents) : null;
        enabledComponents = o.enabledComponents != null
                ? new ArraySet<String>(o.enabledComponents) : null;
                ? new HashSet<String>(o.enabledComponents) : null;
        blockUninstall = o.blockUninstall;
        protectedComponents = o.protectedComponents != null
                ? new HashSet<String>(o.protectedComponents) : null;
+12 −12
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import libcore.net.event.NetworkEventDispatcher;
 */
public class ConnectivityManager {
    private static final String TAG = "ConnectivityManager";
    private static final boolean LEGACY_DBG = true; // STOPSHIP

    /**
     * A change in network connectivity has occurred. A default connection has either
@@ -1000,12 +1001,14 @@ public class ConnectivityManager {
                    feature);
            return -1;
        }

        if (removeRequestForFeature(netCap)) {
    NetworkCallback networkCallback = removeRequestForFeature(netCap);
    if (networkCallback != null) {
       Log.d(TAG, "stopUsingNetworkFeature for " + networkType + ", " + feature);
       unregisterNetworkCallback(networkCallback);
       }
        return 1;
    }

    /**
     * Tells the underlying networking system that the caller is finished
     * using the named feature. The interpretation of {@code feature}
@@ -1280,15 +1283,12 @@ public class ConnectivityManager {
        }
    }

    private boolean removeRequestForFeature(NetworkCapabilities netCap) {
        final LegacyRequest l;
    private NetworkCallback removeRequestForFeature(NetworkCapabilities netCap) {
        synchronized (sLegacyRequests) {
            l = sLegacyRequests.remove(netCap);
            LegacyRequest l = sLegacyRequests.remove(netCap);
            if (l == null) return null;
            return l.networkCallback;
        }
        if (l == null) return false;
        unregisterNetworkCallback(l.networkCallback);
        l.clearDnsBinding();
        return true;
    }

    /**
@@ -1398,7 +1398,7 @@ public class ConnectivityManager {
                ITelephony it = ITelephony.Stub.asInterface(b);
                int subId = SubscriptionManager.getDefaultDataSubId();
                Log.d("ConnectivityManager", "getMobileDataEnabled()+ subId=" + subId);
                boolean retVal = it.getDataEnabled(subId);
                boolean retVal = it.getDataEnabled();
                Log.d("ConnectivityManager", "getMobileDataEnabled()- subId=" + subId
                        + " retVal=" + retVal);
                return retVal;
+12 −0
Original line number Diff line number Diff line
@@ -133,6 +133,18 @@ public class NetworkIdentity {
        }
    }

    /**
     * Scrub given IMSI on production builds.
     */
    public static String[] scrubSubscriberId(String[] subscriberId) {
        if (subscriberId == null) return null;
        final String[] res = new String[subscriberId.length];
        for (int i = 0; i < res.length; i++) {
            res[i] = NetworkIdentity.scrubSubscriberId(subscriberId[i]);
        }
        return res;
    }

    /**
     * Build a {@link NetworkIdentity} from the given {@link NetworkState},
     * assuming that any mobile networks are using the current IMSI.
+3 −1
Original line number Diff line number Diff line
@@ -3018,6 +3018,7 @@ public final class Settings {
            POINTER_SPEED,
            VIBRATE_WHEN_RINGING,
            RINGTONE,
            NOTIFICATION_SOUND,
            SYSTEM_PROFILES_ENABLED,
            PHONE_BLACKLIST_ENABLED,
            PHONE_BLACKLIST_NOTIFY_ENABLED,
@@ -3026,7 +3027,6 @@ public final class Settings {
            PHONE_BLACKLIST_REGEX_ENABLED,
            STATUS_BAR_SHOW_BATTERY_PERCENT,
            LOCK_TO_APP_ENABLED,
            NOTIFICATION_SOUND
        };

        /**
@@ -4733,6 +4733,8 @@ public final class Settings {

        /**
        public static final String WIMAX_ON = "wimax_on";

        /**
         * The number of milliseconds to hold on to a PendingIntent based request. This delay gives
         * the receivers of the PendingIntent an opportunity to make a new network request before
         * the Network satisfying the request is potentially removed.
Loading