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

Commit 7420e0e1 authored by Bill Rassieur's avatar Bill Rassieur
Browse files

Merge master@5406228 into git_qt-dev-plus-aosp.

Change-Id: I65a8520796eb6ee6ddeeb1b8870a9cd574573cd1
BUG: 129345239
parents 845aaf7c d7030f12
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -27,6 +27,13 @@ filegroup {
    ],
}

filegroup {
    name: "opt-telephony-common-srcs",
    srcs: [
        "src/java/**/*.java",
    ],
}

java_library {
    name: "telephony-common",
    installable: true,
@@ -35,7 +42,7 @@ java_library {
        local_include_dirs: ["src/java"],
    },
    srcs: [
        "src/java/**/*.java",
        ":opt-telephony-common-srcs",
        "src/java/**/I*.aidl",
        "src/java/**/*.logtags",
    ],
+8 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony;

import static android.preference.PreferenceManager.getDefaultSharedPreferences;
import static android.telephony.CarrierConfigManager.KEY_ALLOW_METERED_NETWORK_FOR_CERT_DOWNLOAD_BOOL;

import static java.nio.charset.StandardCharsets.UTF_8;

@@ -111,6 +112,7 @@ public class CarrierKeyDownloadManager {
    private final Context mContext;
    public final DownloadManager mDownloadManager;
    private String mURL;
    private boolean mAllowedOverMeteredNetwork = false;

    public CarrierKeyDownloadManager(Phone phone) {
        mPhone = phone;
@@ -370,6 +372,8 @@ public class CarrierKeyDownloadManager {
        }
        mKeyAvailability = b.getInt(CarrierConfigManager.IMSI_KEY_AVAILABILITY_INT);
        mURL = b.getString(CarrierConfigManager.IMSI_KEY_DOWNLOAD_URL_STRING);
        mAllowedOverMeteredNetwork = b.getBoolean(
                KEY_ALLOW_METERED_NETWORK_FOR_CERT_DOWNLOAD_BOOL);
        if (TextUtils.isEmpty(mURL) || mKeyAvailability == 0) {
            Log.d(LOG_TAG, "Carrier not enabled or invalid values");
            return false;
@@ -520,7 +524,10 @@ public class CarrierKeyDownloadManager {
        }
        try {
            DownloadManager.Request request = new DownloadManager.Request(Uri.parse(mURL));
            request.setAllowedOverMetered(false);

            // TODO(b/128550341): Implement the logic to minimize using metered network such as
            // LTE for downloading a certificate.
            request.setAllowedOverMetered(mAllowedOverMeteredNetwork);
            request.setVisibleInDownloadsUi(false);
            request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN);
            Long carrierKeyDownloadRequestId = mDownloadManager.enqueue(request);
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ public class CarrierServicesSmsFilter {
    public static final int EVENT_ON_FILTER_COMPLETE_NOT_CALLED = 1;

    /** onFilterComplete timeout. */
    public static final int FILTER_COMPLETE_TIMEOUT_MS = 60000; //10 minutes
    public static final int FILTER_COMPLETE_TIMEOUT_MS = 10 * 60 * 1000; //10 minutes

    private final Context mContext;
    private final Phone mPhone;
+6 −6
Original line number Diff line number Diff line
@@ -104,11 +104,11 @@ public class CellularNetworkService extends NetworkService {

                            try {
                                if (DBG) {
                                    log("Calling callback.onGetNetworkRegistrationInfoComplete."
                                    log("Calling onRequestNetworkRegistrationInfoComplete."
                                            + "resultCode = " + resultCode
                                            + ", netState = " + netState);
                                }
                                callback.onGetNetworkRegistrationInfoComplete(
                                callback.onRequestNetworkRegistrationInfoComplete(
                                         resultCode, netState);
                            } catch (Exception e) {
                                loge("Exception: " + e);
@@ -464,8 +464,8 @@ public class CellularNetworkService extends NetworkService {
        }

        @Override
        public void getNetworkRegistrationInfo(int domain, NetworkServiceCallback callback) {
            if (DBG) log("getNetworkRegistrationInfo for domain " + domain);
        public void requestNetworkRegistrationInfo(int domain, NetworkServiceCallback callback) {
            if (DBG) log("requestNetworkRegistrationInfo for domain " + domain);
            Message message = null;

            if (domain == NetworkRegistrationInfo.DOMAIN_CS) {
@@ -477,8 +477,8 @@ public class CellularNetworkService extends NetworkService {
                mCallbackMap.put(message, callback);
                mPhone.mCi.getDataRegistrationState(message);
            } else {
                loge("getNetworkRegistrationInfo invalid domain " + domain);
                callback.onGetNetworkRegistrationInfoComplete(
                loge("requestNetworkRegistrationInfo invalid domain " + domain);
                callback.onRequestNetworkRegistrationInfoComplete(
                        NetworkServiceCallback.RESULT_ERROR_INVALID_ARG, null);
            }
        }
+3 −2
Original line number Diff line number Diff line
@@ -44,8 +44,9 @@ public class DebugService {
     */
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (args != null && args.length > 0) {
            if (TextUtils.equals(args[0], "--metrics") ||
                    TextUtils.equals(args[0], "--metricsproto"))
            if (TextUtils.equals(args[0], "--metrics")
                    || TextUtils.equals(args[0], "--metricsproto")
                    || TextUtils.equals(args[0], "--metricsprototext"))
            {
                log("Collecting telephony metrics..");
                TelephonyMetrics.getInstance().dump(fd, pw, args);
Loading