diff options
| -rw-r--r-- | cmds/telecom/src/com/android/commands/telecom/Telecom.java | 13 | ||||
| -rw-r--r-- | core/java/android/util/Log.java | 46 | ||||
| -rw-r--r-- | core/jni/Android.bp | 1 | ||||
| -rw-r--r-- | core/jni/android_hardware_SensorManager.cpp | 2 | ||||
| -rw-r--r-- | core/jni/android_view_DisplayEventReceiver.cpp | 8 | ||||
| -rw-r--r-- | core/jni/android_view_InputEventReceiver.cpp | 4 | ||||
| -rw-r--r-- | core/jni/android_view_InputEventSender.cpp | 2 | ||||
| -rw-r--r-- | core/jni/android_view_InputQueue.cpp | 2 | ||||
| -rw-r--r-- | core/jni/core_jni_helpers.cpp | 35 | ||||
| -rw-r--r-- | core/jni/core_jni_helpers.h | 9 | ||||
| -rw-r--r-- | graphics/java/android/graphics/Bitmap.java | 2 | ||||
| -rw-r--r-- | libs/WindowManager/OWNERS | 3 | ||||
| -rw-r--r-- | libs/WindowManager/Shell/OWNERS | 4 | ||||
| -rw-r--r-- | services/core/java/com/android/server/connectivity/Vpn.java | 2 | ||||
| -rw-r--r-- | telecomm/java/com/android/internal/telecom/ITelecomService.aidl | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/data/ApnSetting.java | 5 |
16 files changed, 108 insertions, 32 deletions
diff --git a/cmds/telecom/src/com/android/commands/telecom/Telecom.java b/cmds/telecom/src/com/android/commands/telecom/Telecom.java index 8b9ab4c57574..d464e266ac36 100644 --- a/cmds/telecom/src/com/android/commands/telecom/Telecom.java +++ b/cmds/telecom/src/com/android/commands/telecom/Telecom.java @@ -73,6 +73,8 @@ public final class Telecom extends BaseCommand { private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer"; private static final String COMMAND_STOP_BLOCK_SUPPRESSION = "stop-block-suppression"; private static final String COMMAND_CLEANUP_STUCK_CALLS = "cleanup-stuck-calls"; + private static final String COMMAND_CLEANUP_ORPHAN_PHONE_ACCOUNTS = + "cleanup-orphan-phone-accounts"; private static final String COMMAND_RESET_CAR_MODE = "reset-car-mode"; /** @@ -131,6 +133,9 @@ public final class Telecom extends BaseCommand { + " provider after a call to emergency services.\n" + "usage: telecom cleanup-stuck-calls: Clear any disconnected calls that have" + " gotten wedged in Telecom.\n" + + "usage: telecom cleanup-orphan-phone-accounts: remove any phone accounts that" + + " no longer have a valid UserHandle or accounts that no longer belongs to an" + + " installed package.\n" + "usage: telecom set-emer-phone-account-filter <PACKAGE>\n" + "\n" + "telecom set-phone-account-enabled: Enables the given phone account, if it has" @@ -235,6 +240,9 @@ public final class Telecom extends BaseCommand { case COMMAND_CLEANUP_STUCK_CALLS: runCleanupStuckCalls(); break; + case COMMAND_CLEANUP_ORPHAN_PHONE_ACCOUNTS: + runCleanupOrphanPhoneAccounts(); + break; case COMMAND_RESET_CAR_MODE: runResetCarMode(); break; @@ -373,6 +381,11 @@ public final class Telecom extends BaseCommand { mTelecomService.cleanupStuckCalls(); } + private void runCleanupOrphanPhoneAccounts() throws RemoteException { + System.out.println("Success - cleaned up " + mTelecomService.cleanupOrphanPhoneAccounts() + + " phone accounts."); + } + private void runResetCarMode() throws RemoteException { mTelecomService.resetCarMode(); } diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java index b5fe4f58dfb2..f1e91d0234e4 100644 --- a/core/java/android/util/Log.java +++ b/core/java/android/util/Log.java @@ -66,6 +66,10 @@ import java.net.UnknownHostException; * <p>When calling the log methods that take a Throwable parameter, * if any of the throwables in the cause chain is an <code>UnknownHostException</code>, * then the stack trace is not logged. + * + * <p>Note: The return value from the logging functions in this class may vary between Android + * releases due to changes in the logging implementation. For the methods that return an integer, + * a positive value may be considered as a successful invocation. */ public final class Log { /** @hide */ @@ -134,6 +138,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int v(@Nullable String tag, @NonNull String msg) { return println_native(LOG_ID_MAIN, VERBOSE, tag, msg); @@ -144,7 +149,8 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. - * @param tr An exception to log + * @param tr An exception to log. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int v(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) { return printlns(LOG_ID_MAIN, VERBOSE, tag, msg, tr); @@ -155,6 +161,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int d(@Nullable String tag, @NonNull String msg) { return println_native(LOG_ID_MAIN, DEBUG, tag, msg); @@ -165,7 +172,8 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. - * @param tr An exception to log + * @param tr An exception to log. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int d(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) { return printlns(LOG_ID_MAIN, DEBUG, tag, msg, tr); @@ -176,6 +184,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int i(@Nullable String tag, @NonNull String msg) { return println_native(LOG_ID_MAIN, INFO, tag, msg); @@ -186,7 +195,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. - * @param tr An exception to log + * @param tr An exception to log. */ public static int i(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) { return printlns(LOG_ID_MAIN, INFO, tag, msg, tr); @@ -197,6 +206,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int w(@Nullable String tag, @NonNull String msg) { return println_native(LOG_ID_MAIN, WARN, tag, msg); @@ -207,7 +217,8 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. - * @param tr An exception to log + * @param tr An exception to log. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int w(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) { return printlns(LOG_ID_MAIN, WARN, tag, msg, tr); @@ -239,7 +250,8 @@ public final class Log { * Send a {@link #WARN} log message and log the exception. * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. - * @param tr An exception to log + * @param tr An exception to log. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int w(@Nullable String tag, @Nullable Throwable tr) { return printlns(LOG_ID_MAIN, WARN, tag, "", tr); @@ -250,6 +262,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int e(@Nullable String tag, @NonNull String msg) { return println_native(LOG_ID_MAIN, ERROR, tag, msg); @@ -260,7 +273,8 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. - * @param tr An exception to log + * @param tr An exception to log. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int e(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) { return printlns(LOG_ID_MAIN, ERROR, tag, msg, tr); @@ -274,6 +288,7 @@ public final class Log { * immediately with an error dialog. * @param tag Used to identify the source of a log message. * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int wtf(@Nullable String tag, @Nullable String msg) { return wtf(LOG_ID_MAIN, tag, msg, null, false, false); @@ -293,6 +308,7 @@ public final class Log { * Similar to {@link #wtf(String, String)}, with an exception to log. * @param tag Used to identify the source of a log message. * @param tr An exception to log. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int wtf(@Nullable String tag, @NonNull Throwable tr) { return wtf(LOG_ID_MAIN, tag, tr.getMessage(), tr, false, false); @@ -304,6 +320,7 @@ public final class Log { * @param tag Used to identify the source of a log message. * @param msg The message you would like logged. * @param tr An exception to log. May be null. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int wtf(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) { return wtf(LOG_ID_MAIN, tag, msg, tr, false, false); @@ -348,7 +365,7 @@ public final class Log { * <p>If any of the throwables in the cause chain is an <code>UnknownHostException</code>, * this returns an empty string. - * @param tr An exception to log + * @param tr An exception to log. */ @NonNull public static String getStackTraceString(@Nullable Throwable tr) { @@ -379,7 +396,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param msg The message you would like logged. - * @return The number of bytes written. + * @return A positive value if the message was loggable (see {@link #isLoggable}). */ public static int println(@Level int priority, @Nullable String tag, @NonNull String msg) { return println_native(LOG_ID_MAIN, priority, tag, msg); @@ -391,7 +408,16 @@ public final class Log { /** @hide */ public static final int LOG_ID_SYSTEM = 3; /** @hide */ public static final int LOG_ID_CRASH = 4; - /** @hide */ + /** + * Low-level logging call. + * @param bufID The buffer ID to receive the message. + * @param priority The priority of the message. + * @param tag Used to identify the source of a log message. It usually identifies + * the class or activity where the log call occurs. + * @param msg The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). + * @hide + */ @UnsupportedAppUsage public static native int println_native(int bufID, int priority, String tag, String msg); @@ -407,6 +433,7 @@ public final class Log { * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param message The message you would like logged. + * @return A positive value if the message was loggable (see {@link #isLoggable}). * @hide */ @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @@ -425,6 +452,7 @@ public final class Log { * Helper function for long messages. Uses the LineBreakBufferedWriter to break * up long messages and stacktraces along newlines, but tries to write in large * chunks. This is to avoid truncation. + * @return A positive value if the message was loggable (see {@link #isLoggable}). * @hide */ public static int printlns(int bufID, int priority, @Nullable String tag, @NonNull String msg, diff --git a/core/jni/Android.bp b/core/jni/Android.bp index 682dbc31c8f5..a60368b53bc5 100644 --- a/core/jni/Android.bp +++ b/core/jni/Android.bp @@ -50,6 +50,7 @@ cc_library_shared { "android_util_XmlBlock.cpp", "android_util_jar_StrictJarFile.cpp", "com_android_internal_util_VirtualRefBasePtr.cpp", + "core_jni_helpers.cpp", ":deviceproductinfoconstants_aidl", ], diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp index d0504fb481ca..af0800aedba7 100644 --- a/core/jni/android_hardware_SensorManager.cpp +++ b/core/jni/android_hardware_SensorManager.cpp @@ -332,7 +332,7 @@ private: virtual int handleEvent(int fd, int events, void* data) { JNIEnv* env = AndroidRuntime::getJNIEnv(); sp<SensorEventQueue> q = reinterpret_cast<SensorEventQueue *>(data); - ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); + ScopedLocalRef<jobject> receiverObj(env, GetReferent(env, mReceiverWeakGlobal)); ssize_t n; ASensorEvent buffer[16]; diff --git a/core/jni/android_view_DisplayEventReceiver.cpp b/core/jni/android_view_DisplayEventReceiver.cpp index ce772cf9faff..c9d8ac0abb1b 100644 --- a/core/jni/android_view_DisplayEventReceiver.cpp +++ b/core/jni/android_view_DisplayEventReceiver.cpp @@ -102,7 +102,7 @@ void NativeDisplayEventReceiver::dispatchVsync(nsecs_t timestamp, PhysicalDispla uint32_t count, VsyncEventData vsyncEventData) { JNIEnv* env = AndroidRuntime::getJNIEnv(); - ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); + ScopedLocalRef<jobject> receiverObj(env, GetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking vsync handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchVsync, @@ -118,7 +118,7 @@ void NativeDisplayEventReceiver::dispatchHotplug(nsecs_t timestamp, PhysicalDisp bool connected) { JNIEnv* env = AndroidRuntime::getJNIEnv(); - ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); + ScopedLocalRef<jobject> receiverObj(env, GetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking hotplug handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchHotplug, @@ -133,7 +133,7 @@ void NativeDisplayEventReceiver::dispatchModeChanged(nsecs_t timestamp, Physical int32_t modeId, nsecs_t) { JNIEnv* env = AndroidRuntime::getJNIEnv(); - ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); + ScopedLocalRef<jobject> receiverObj(env, GetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking mode changed handler.", this); env->CallVoidMethod(receiverObj.get(), gDisplayEventReceiverClassInfo.dispatchModeChanged, @@ -148,7 +148,7 @@ void NativeDisplayEventReceiver::dispatchFrameRateOverrides( nsecs_t timestamp, PhysicalDisplayId displayId, std::vector<FrameRateOverride> overrides) { JNIEnv* env = AndroidRuntime::getJNIEnv(); - ScopedLocalRef<jobject> receiverObj(env, jniGetReferent(env, mReceiverWeakGlobal)); + ScopedLocalRef<jobject> receiverObj(env, GetReferent(env, mReceiverWeakGlobal)); if (receiverObj.get()) { ALOGV("receiver %p ~ Invoking FrameRateOverride handler.", this); const auto frameRateOverrideClass = diff --git a/core/jni/android_view_InputEventReceiver.cpp b/core/jni/android_view_InputEventReceiver.cpp index 7d0f60adeb5c..9f2fd717cb70 100644 --- a/core/jni/android_view_InputEventReceiver.cpp +++ b/core/jni/android_view_InputEventReceiver.cpp @@ -328,7 +328,7 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env, if (!skipCallbacks && !mBatchedInputEventPending && mInputConsumer.hasPendingBatch()) { // There is a pending batch. Come back later. if (!receiverObj.get()) { - receiverObj.reset(jniGetReferent(env, mReceiverWeakGlobal)); + receiverObj.reset(GetReferent(env, mReceiverWeakGlobal)); if (!receiverObj.get()) { ALOGW("channel '%s' ~ Receiver object was finalized " "without being disposed.", @@ -357,7 +357,7 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env, if (!skipCallbacks) { if (!receiverObj.get()) { - receiverObj.reset(jniGetReferent(env, mReceiverWeakGlobal)); + receiverObj.reset(GetReferent(env, mReceiverWeakGlobal)); if (!receiverObj.get()) { ALOGW("channel '%s' ~ Receiver object was finalized " "without being disposed.", getInputChannelName().c_str()); diff --git a/core/jni/android_view_InputEventSender.cpp b/core/jni/android_view_InputEventSender.cpp index 16366a4e5bec..7ce54afd3bea 100644 --- a/core/jni/android_view_InputEventSender.cpp +++ b/core/jni/android_view_InputEventSender.cpp @@ -202,7 +202,7 @@ status_t NativeInputEventSender::processConsumerResponse(JNIEnv* env) { ALOGD("channel '%s' ~ Receiving finished signals.", getInputChannelName().c_str()); } - ScopedLocalRef<jobject> senderObj(env, jniGetReferent(env, mSenderWeakGlobal)); + ScopedLocalRef<jobject> senderObj(env, GetReferent(env, mSenderWeakGlobal)); if (!senderObj.get()) { ALOGW("channel '%s' ~ Sender object was finalized without being disposed.", getInputChannelName().c_str()); diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp index 70a9be740810..244b8957e9ab 100644 --- a/core/jni/android_view_InputQueue.cpp +++ b/core/jni/android_view_InputQueue.cpp @@ -135,7 +135,7 @@ void InputQueue::handleMessage(const Message& message) { switch(message.what) { case MSG_FINISH_INPUT: JNIEnv* env = AndroidRuntime::getJNIEnv(); - ScopedLocalRef<jobject> inputQueueObj(env, jniGetReferent(env, mInputQueueWeakGlobal)); + ScopedLocalRef<jobject> inputQueueObj(env, GetReferent(env, mInputQueueWeakGlobal)); if (!inputQueueObj.get()) { ALOGW("InputQueue was finalized without being disposed"); return; diff --git a/core/jni/core_jni_helpers.cpp b/core/jni/core_jni_helpers.cpp new file mode 100644 index 000000000000..b65053bbe8ab --- /dev/null +++ b/core/jni/core_jni_helpers.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2022 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. + */ + +#include "core_jni_helpers.h" + +namespace android { + +namespace { + +jmethodID gGetReferent = nullptr; + +} // namespace + +jobject GetReferent(JNIEnv* env, jobject ref) { + if (gGetReferent == nullptr) { + jclass clazz = FindClassOrDie(env, "java/lang/ref/Reference"); + gGetReferent = GetMethodIDOrDie(env, clazz, "get", "()Ljava/lang/Object;"); + } + return env->CallObjectMethod(ref, gGetReferent); +} + +} // namespace android
\ No newline at end of file diff --git a/core/jni/core_jni_helpers.h b/core/jni/core_jni_helpers.h index 526804998896..b85a42529fb6 100644 --- a/core/jni/core_jni_helpers.h +++ b/core/jni/core_jni_helpers.h @@ -90,11 +90,10 @@ static inline int RegisterMethodsOrDie(JNIEnv* env, const char* className, return res; } -static inline jobject jniGetReferent(JNIEnv* env, jobject ref) { - jclass cls = FindClassOrDie(env, "java/lang/ref/Reference"); - jmethodID get = GetMethodIDOrDie(env, cls, "get", "()Ljava/lang/Object;"); - return env->CallObjectMethod(ref, get); -} +/** + * Returns the result of invoking java.lang.ref.Reference.get() on a Reference object. + */ +jobject GetReferent(JNIEnv* env, jobject ref); /** * Read the specified field from jobject, and convert to std::string. diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 055e5ad17def..ad089b63a7c1 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -519,7 +519,7 @@ public final class Bitmap implements Parcelable { ARGB_8888 (5), /** - * Each pixels is stored on 8 bytes. Each channel (RGB and alpha + * Each pixel is stored on 8 bytes. Each channel (RGB and alpha * for translucency) is stored as a * {@link android.util.Half half-precision floating point value}. * diff --git a/libs/WindowManager/OWNERS b/libs/WindowManager/OWNERS index 780e4c1632f7..2c61df96eb03 100644 --- a/libs/WindowManager/OWNERS +++ b/libs/WindowManager/OWNERS @@ -1,6 +1,3 @@ set noparent include /services/core/java/com/android/server/wm/OWNERS - -# Give submodule owners in shell resource approval -per-file Shell/res*/*/*.xml = hwwang@google.com, lbill@google.com, madym@google.com diff --git a/libs/WindowManager/Shell/OWNERS b/libs/WindowManager/Shell/OWNERS new file mode 100644 index 000000000000..4b125904004a --- /dev/null +++ b/libs/WindowManager/Shell/OWNERS @@ -0,0 +1,4 @@ +xutan@google.com + +# Give submodule owners in shell resource approval +per-file res*/*/*.xml = hwwang@google.com, lbill@google.com, madym@google.com diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index baeaa505549b..774fe5bc862c 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -3341,7 +3341,7 @@ public class Vpn { // TODO(b/230548427): Remove SDK check once VPN related stuff are // decoupled from ConnectivityServiceTest. - if (SdkLevel.isAtLeastT() && category != null) { + if (SdkLevel.isAtLeastT() && category != null && isVpnApp(mPackage)) { sendEventToVpnManagerApp(category, errorClass, errorCode, getPackage(), mSessionKey, makeVpnProfileStateLocked(), mActiveNetwork, diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl index 23b578748370..7a69fe5c1356 100644 --- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl +++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl @@ -340,6 +340,8 @@ interface ITelecomService { void cleanupStuckCalls(); + int cleanupOrphanPhoneAccounts(); + void resetCarMode(); void setTestDefaultCallRedirectionApp(String packageName); diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java index a710e38538ce..7fc8871e89c8 100644 --- a/telephony/java/android/telephony/data/ApnSetting.java +++ b/telephony/java/android/telephony/data/ApnSetting.java @@ -1134,10 +1134,7 @@ public class ApnSetting implements Parcelable { return false; } // DEFAULT can handle HIPRI. - if (hasApnType(type)) { - return true; - } - return false; + return hasApnType(type); } // Check whether the types of two APN same (even only one type of each APN is same). |