Merge "getBlobAshmemSize -> getOpenAshmemSize"
diff --git a/ApiDocs.bp b/ApiDocs.bp
index c181646..a926ddc 100644
--- a/ApiDocs.bp
+++ b/ApiDocs.bp
@@ -192,6 +192,42 @@
},
}
+// This produces the same annotations.zip as framework-doc-stubs, but by using
+// outputs from individual modules instead of all the source code.
+genrule {
+ name: "sdk-annotations.zip",
+ srcs: [
+ ":android-non-updatable-doc-stubs{.annotations.zip}",
+
+ // Conscrypt and i18n currently do not enable annotations
+ // ":conscrypt.module.public.api{.public.annotations.zip}",
+ // ":i18n.module.public.api{.public.annotations.zip}",
+
+ // Modules that enable annotations below
+ ":android.net.ipsec.ike{.public.annotations.zip}",
+ ":art.module.public.api{.public.annotations.zip}",
+ ":framework-appsearch{.public.annotations.zip}",
+ ":framework-connectivity{.public.annotations.zip}",
+ ":framework-graphics{.public.annotations.zip}",
+ ":framework-media{.public.annotations.zip}",
+ ":framework-mediaprovider{.public.annotations.zip}",
+ ":framework-permission{.public.annotations.zip}",
+ ":framework-permission-s{.public.annotations.zip}",
+ ":framework-scheduling{.public.annotations.zip}",
+ ":framework-sdkextensions{.public.annotations.zip}",
+ ":framework-statsd{.public.annotations.zip}",
+ ":framework-tethering{.public.annotations.zip}",
+ ":framework-wifi{.public.annotations.zip}",
+ ],
+ out: ["annotations.zip"],
+ tools: [
+ "merge_annotation_zips",
+ "soong_zip",
+ ],
+ cmd: "$(location merge_annotation_zips) $(genDir)/out $(in) && " +
+ "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out",
+}
+
/////////////////////////////////////////////////////////////////////
// API docs are created from the generated stub source files
// using droiddoc
diff --git a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
index 591e8ba..4becc6b 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
@@ -1008,13 +1008,21 @@
}
@Override
- public void onUserUnlocked(@NonNull TargetUser user) {
+ public void onUserStarting(@NonNull TargetUser user) {
synchronized (mLock) {
- // Note that the user has started after its unlocked instead of when the user
- // actually starts because the storage won't be decrypted until unlock.
mStartedUsers = ArrayUtils.appendInt(mStartedUsers, user.getUserIdentifier());
}
- // Let's kick any outstanding jobs for this user.
+ // The user is starting but credential encrypted storage is still locked.
+ // Only direct-boot-aware jobs can safely run.
+ // Let's kick off any eligible jobs for this user.
+ mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
+ }
+
+ @Override
+ public void onUserUnlocked(@NonNull TargetUser user) {
+ // The user is fully unlocked and credential encrypted storage is now decrypted.
+ // Direct-boot-UNaware jobs can now safely run.
+ // Let's kick off any outstanding jobs for this user.
mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
}
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 4a732e5..13f7cfb 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -2128,6 +2128,7 @@
field @NonNull public static final android.os.ParcelUuid AVRCP_TARGET;
field @NonNull public static final android.os.ParcelUuid BASE_UUID;
field @NonNull public static final android.os.ParcelUuid BNEP;
+ field @NonNull public static final android.os.ParcelUuid CAP;
field @NonNull public static final android.os.ParcelUuid COORDINATED_SET;
field @NonNull public static final android.os.ParcelUuid DIP;
field @NonNull public static final android.os.ParcelUuid GENERIC_MEDIA_CONTROL;
diff --git a/core/java/android/app/time/OWNERS b/core/java/android/app/time/OWNERS
index 8f80897..ef357e5 100644
--- a/core/java/android/app/time/OWNERS
+++ b/core/java/android/app/time/OWNERS
@@ -1,3 +1,4 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# The app-facing APIs related to both time and time zone detection.
+include /services/core/java/com/android/server/timedetector/OWNERS
+include /services/core/java/com/android/server/timezonedetector/OWNERS
diff --git a/core/java/android/app/timedetector/OWNERS b/core/java/android/app/timedetector/OWNERS
index 941eed8..e9dbe4a 100644
--- a/core/java/android/app/timedetector/OWNERS
+++ b/core/java/android/app/timedetector/OWNERS
@@ -1,4 +1,3 @@
# Bug component: 847766
-mingaleev@google.com
-narayan@google.com
-nfuller@google.com
+# Internal APIs related to time detection. SDK APIs are in android.app.time.
+include /services/core/java/com/android/server/timedetector/OWNERS
diff --git a/core/java/android/app/timezone/OWNERS b/core/java/android/app/timezone/OWNERS
index 8f80897..04d78f2 100644
--- a/core/java/android/app/timezone/OWNERS
+++ b/core/java/android/app/timezone/OWNERS
@@ -1,3 +1,4 @@
-# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# Bug component: 24949
+# Internal APIs related to APK-based time zone rule updates.
+# Deprecated, deletion tracked by b/148144561
+include /services/core/java/com/android/server/timezone/OWNERS
diff --git a/core/java/android/app/timezonedetector/OWNERS b/core/java/android/app/timezonedetector/OWNERS
index 8f80897..fa03f1e 100644
--- a/core/java/android/app/timezonedetector/OWNERS
+++ b/core/java/android/app/timezonedetector/OWNERS
@@ -1,3 +1,3 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# Internal APIs related to time zone detection. SDK APIs are in android.app.time.
+include /services/core/java/com/android/server/timezonedetector/OWNERS
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 3b744a7..06ce053 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -2099,7 +2099,7 @@
try {
return mManagerService.isBleScanAlwaysAvailable();
} catch (RemoteException e) {
- Log.e(TAG, "remote expection when calling isBleScanAlwaysAvailable", e);
+ Log.e(TAG, "remote exception when calling isBleScanAlwaysAvailable", e);
return false;
}
}
@@ -2307,7 +2307,7 @@
try {
return mManagerService.isHearingAidProfileSupported();
} catch (RemoteException e) {
- Log.e(TAG, "remote expection when calling isHearingAidProfileSupported", e);
+ Log.e(TAG, "remote exception when calling isHearingAidProfileSupported", e);
return false;
}
}
diff --git a/core/java/android/bluetooth/BluetoothLeAudio.java b/core/java/android/bluetooth/BluetoothLeAudio.java
index c30c933..d7940eb 100644
--- a/core/java/android/bluetooth/BluetoothLeAudio.java
+++ b/core/java/android/bluetooth/BluetoothLeAudio.java
@@ -156,6 +156,12 @@
"android.bluetooth.action.LE_AUDIO_CONF_CHANGED";
/**
+ * Indicates unspecified audio content.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_UNSPECIFIED = 0x0001;
+
+ /**
* Indicates conversation between humans as, for example, in telephony or video calls.
* @hide
*/
@@ -168,6 +174,66 @@
public static final int CONTEXT_TYPE_MEDIA = 0x0004;
/**
+ * Indicates instructional audio as, for example, in navigation, traffic announcements
+ * or user guidance.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_INSTRUCTIONAL = 0x0008;
+
+ /**
+ * Indicates attention seeking audio as, for example, in beeps signalling arrival of a message
+ * or keyboard clicks.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_ATTENTION_SEEKING = 0x0010;
+
+ /**
+ * Indicates immediate alerts as, for example, in a low battery alarm, timer expiry or alarm
+ * clock.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_IMMEDIATE_ALERT = 0x0020;
+
+ /**
+ * Indicates man machine communication as, for example, with voice recognition or virtual
+ * assistant.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_MAN_MACHINE = 0x0040;
+
+ /**
+ * Indicates emergency alerts as, for example, with fire alarms or other urgent alerts.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_EMERGENCY_ALERT = 0x0080;
+
+ /**
+ * Indicates ringtone as in a call alert.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_RINGTONE = 0x0100;
+
+ /**
+ * Indicates audio associated with a television program and/or with metadata conforming to the
+ * Bluetooth Broadcast TV profile.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_TV = 0x0200;
+
+ /**
+ * Indicates audio associated with a low latency live audio stream.
+ *
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_LIVE = 0x0400;
+
+ /**
+ * Indicates audio associated with a video game stream.
+ * @hide
+ */
+ public static final int CONTEXT_TYPE_GAME = 0x0800;
+
+ /**
* This represents an invalid group ID.
*
* @hide
@@ -250,6 +316,17 @@
*/
public static final int GROUP_STATUS_INACTIVE = IBluetoothLeAudio.GROUP_STATUS_INACTIVE;
+ /**
+ * Indicating that node has been added to the group.
+ * @hide
+ */
+ public static final int GROUP_NODE_ADDED = IBluetoothLeAudio.GROUP_NODE_ADDED;
+
+ /**
+ * Indicating that node has been removed from the group.
+ * @hide
+ */
+ public static final int GROUP_NODE_REMOVED = IBluetoothLeAudio.GROUP_NODE_REMOVED;
private final BluetoothProfileConnector<IBluetoothLeAudio> mProfileConnector =
new BluetoothProfileConnector(this, BluetoothProfile.LE_AUDIO, "BluetoothLeAudio",
@@ -546,6 +623,61 @@
}
/**
+ * Add device to the given group.
+ * @param group_id group ID the device is being added to
+ * @param device the active device
+ * @return true on success, otherwise false
+ * @hide
+ */
+ @RequiresBluetoothConnectPermission
+ @RequiresPermission(allOf = {
+ android.Manifest.permission.BLUETOOTH_CONNECT,
+ android.Manifest.permission.BLUETOOTH_PRIVILEGED
+ })
+ public boolean groupAddNode(int group_id, @NonNull BluetoothDevice device) {
+ if (VDBG) log("groupAddNode()");
+ final IBluetoothLeAudio service = getService();
+ try {
+ if (service != null && mAdapter.isEnabled()) {
+ return service.groupAddNode(group_id, device, mAttributionSource);
+ }
+ if (service == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ }
+ }
+
+ /**
+ * Remove device from a given group.
+ * @param group_id group ID the device is being removed from
+ * @param device the active device
+ * @return true on success, otherwise false
+ *
+ * @hide
+ */
+ @RequiresBluetoothConnectPermission
+ @RequiresPermission(allOf = {
+ android.Manifest.permission.BLUETOOTH_CONNECT,
+ android.Manifest.permission.BLUETOOTH_PRIVILEGED
+ })
+ public boolean groupRemoveNode(int group_id, @NonNull BluetoothDevice device) {
+ if (VDBG) log("groupRemoveNode()");
+ final IBluetoothLeAudio service = getService();
+ try {
+ if (service != null && mAdapter.isEnabled()) {
+ return service.groupRemoveNode(group_id, device, mAttributionSource);
+ }
+ if (service == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ }
+ }
+
+ /**
* Set connection policy of the profile
*
* <p> The device should already be paired.
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java
index 325a771..858819e 100644
--- a/core/java/android/bluetooth/BluetoothUuid.java
+++ b/core/java/android/bluetooth/BluetoothUuid.java
@@ -188,6 +188,11 @@
/** @hide */
@NonNull
@SystemApi
+ public static final ParcelUuid CAP =
+ ParcelUuid.fromString("EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE");
+ /** @hide */
+ @NonNull
+ @SystemApi
public static final ParcelUuid BASE_UUID =
ParcelUuid.fromString("00000000-0000-1000-8000-00805F9B34FB");
diff --git a/core/java/android/net/OWNERS b/core/java/android/net/OWNERS
index 4ea8a54..f55bcd3 100644
--- a/core/java/android/net/OWNERS
+++ b/core/java/android/net/OWNERS
@@ -2,4 +2,5 @@
include platform/frameworks/base:/services/core/java/com/android/server/net/OWNERS
-per-file SSL*, Uri*, Url* = prb@google.com, dauletz@google.com, narayan@google.com, ngeoffray@google.com
+per-file SSL*,Uri*,Url* = prb@google.com,oth@google.com,narayan@google.com,ngeoffray@google.com
+per-file SntpClient* = file:/services/core/java/com/android/server/timedetector/OWNERS
diff --git a/core/java/android/net/sntp/OWNERS b/core/java/android/net/sntp/OWNERS
new file mode 100644
index 0000000..9a3e264
--- /dev/null
+++ b/core/java/android/net/sntp/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/timedetector/OWNERS
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index d83ccf7..ab2c8c0 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -2891,9 +2891,11 @@
/**
* Same as {@link #readList(List, ClassLoader)} but accepts {@code clazz} parameter as
- * the type required for each item. If the item to be deserialized is not an instance
- * of that class or any of its children class
- * a {@link BadParcelableException} will be thrown.
+ * the type required for each item.
+ *
+ * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
+ * is not an instance of that class or any of its children classes or there was an error
+ * trying to instantiate an element.
*/
public <T> void readList(@NonNull List<? super T> outVal,
@Nullable ClassLoader loader, @NonNull Class<T> clazz) {
@@ -3894,8 +3896,11 @@
/**
* Same as {@link #readParcelable(ClassLoader)} but accepts {@code clazz} parameter as the type
- * required for each item. If the item to be deserialized is not an instance of that class or
- * any of its children classes a {@link BadParcelableException} will be thrown.
+ * required for each item.
+ *
+ * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
+ * is not an instance of that class or any of its children classes or there was an error
+ * trying to instantiate an element.
*/
@Nullable
public <T extends Parcelable> T readParcelable(@Nullable ClassLoader loader,
@@ -3961,8 +3966,11 @@
/**
* Same as {@link #readParcelableCreator(ClassLoader)} but accepts {@code clazz} parameter
- * as the required type. If the item to be deserialized is not an instance of that class
- * or any of its children classes a {@link BadParcelableException} will be thrown.
+ * as the required type.
+ *
+ * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
+ * is not an instance of that class or any of its children class or there there was an error
+ * trying to read the {@link Parcelable.Creator}.
*/
@Nullable
public <T> Parcelable.Creator<T> readParcelableCreator(
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 51f19eb..b4acb67 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -706,6 +706,25 @@
/**
* Contains the recent calls.
+ * <p>
+ * Note: If you want to query the call log and limit the results to a single value, you should
+ * append the {@link #LIMIT_PARAM_KEY} parameter to the content URI. For example:
+ * <pre>
+ * {@code
+ * getContentResolver().query(
+ * Calls.CONTENT_URI.buildUpon().appendQueryParameter(LIMIT_PARAM_KEY, "1")
+ * .build(),
+ * null, null, null, null);
+ * }
+ * </pre>
+ * <p>
+ * The call log provider enforces strict SQL grammar, so you CANNOT append "LIMIT" to the SQL
+ * query as below:
+ * <pre>
+ * {@code
+ * getContentResolver().query(Calls.CONTENT_URI, null, "LIMIT 1", null, null);
+ * }
+ * </pre>
*/
public static class Calls implements BaseColumns {
/**
diff --git a/core/java/android/service/timezone/OWNERS b/core/java/android/service/timezone/OWNERS
index 28aff18..b5144d1 100644
--- a/core/java/android/service/timezone/OWNERS
+++ b/core/java/android/service/timezone/OWNERS
@@ -1,3 +1,3 @@
# Bug component: 847766
-nfuller@google.com
-include /core/java/android/app/timedetector/OWNERS
+# System APIs for system server time zone detection plugins.
+include /services/core/java/com/android/server/timezonedetector/OWNERS
diff --git a/core/java/android/timezone/OWNERS b/core/java/android/timezone/OWNERS
index 8f80897..8b5e156 100644
--- a/core/java/android/timezone/OWNERS
+++ b/core/java/android/timezone/OWNERS
@@ -1,3 +1,5 @@
-# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# Bug component: 24949
+# APIs originally intended to provide a stable API surface to access time zone rules data for use by
+# unbundled components like a telephony mainline module and the ART module. Not exposed, potentially
+# deletable if callers do not unbundle.
+include platform/libcore:/OWNERS
diff --git a/core/proto/OWNERS b/core/proto/OWNERS
index 44ea23f..78650ed 100644
--- a/core/proto/OWNERS
+++ b/core/proto/OWNERS
@@ -8,9 +8,6 @@
yro@google.com
zhouwenjie@google.com
-# Settings UI
-per-file settings_enums.proto=tmfang@google.com
-
# Frameworks
ogunwale@google.com
jjaggi@google.com
diff --git a/core/tests/coretests/src/android/app/time/OWNERS b/core/tests/coretests/src/android/app/time/OWNERS
index 8f80897..292cb72 100644
--- a/core/tests/coretests/src/android/app/time/OWNERS
+++ b/core/tests/coretests/src/android/app/time/OWNERS
@@ -1,3 +1,2 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+include /core/java/android/app/time/OWNERS
diff --git a/core/tests/coretests/src/android/app/timedetector/OWNERS b/core/tests/coretests/src/android/app/timedetector/OWNERS
index 8f80897..c612473 100644
--- a/core/tests/coretests/src/android/app/timedetector/OWNERS
+++ b/core/tests/coretests/src/android/app/timedetector/OWNERS
@@ -1,3 +1,2 @@
# Bug component: 847766
-mingaleev@google.com
include /core/java/android/app/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/app/timezone/OWNERS b/core/tests/coretests/src/android/app/timezone/OWNERS
index 8f80897..381ecf1 100644
--- a/core/tests/coretests/src/android/app/timezone/OWNERS
+++ b/core/tests/coretests/src/android/app/timezone/OWNERS
@@ -1,3 +1,2 @@
-# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# Bug component: 24949
+include /core/java/android/app/timezone/OWNERS
diff --git a/core/tests/coretests/src/android/app/timezonedetector/OWNERS b/core/tests/coretests/src/android/app/timezonedetector/OWNERS
index 8f80897..2e9c324 100644
--- a/core/tests/coretests/src/android/app/timezonedetector/OWNERS
+++ b/core/tests/coretests/src/android/app/timezonedetector/OWNERS
@@ -1,3 +1,2 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+include /core/java/android/app/timezonedetector/OWNERS
diff --git a/core/tests/coretests/src/android/net/OWNERS b/core/tests/coretests/src/android/net/OWNERS
index aa87958..4e5136f 100644
--- a/core/tests/coretests/src/android/net/OWNERS
+++ b/core/tests/coretests/src/android/net/OWNERS
@@ -1 +1,3 @@
include /services/core/java/com/android/server/net/OWNERS
+
+per-file SntpClient* = file:/services/core/java/com/android/server/timedetector/OWNERS
diff --git a/core/tests/coretests/src/android/net/sntp/OWNERS b/core/tests/coretests/src/android/net/sntp/OWNERS
new file mode 100644
index 0000000..232c2eb
--- /dev/null
+++ b/core/tests/coretests/src/android/net/sntp/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/net/sntp/OWNERS
diff --git a/core/tests/coretests/src/android/service/timezone/OWNERS b/core/tests/coretests/src/android/service/timezone/OWNERS
new file mode 100644
index 0000000..8116388
--- /dev/null
+++ b/core/tests/coretests/src/android/service/timezone/OWNERS
@@ -0,0 +1,2 @@
+# Bug component: 847766
+include /core/java/android/service/timezone/OWNERS
diff --git a/services/core/java/com/android/server/timedetector/OWNERS b/services/core/java/com/android/server/timedetector/OWNERS
index 8f80897..67fc9d6 100644
--- a/services/core/java/com/android/server/timedetector/OWNERS
+++ b/services/core/java/com/android/server/timedetector/OWNERS
@@ -1,3 +1,3 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# This code is maintained by the same OWNERS as timezonedetector.
+include /services/core/java/com/android/server/timezonedetector/OWNERS
diff --git a/services/core/java/com/android/server/timezone/OWNERS b/services/core/java/com/android/server/timezone/OWNERS
index 8f80897..2d36574 100644
--- a/services/core/java/com/android/server/timezone/OWNERS
+++ b/services/core/java/com/android/server/timezone/OWNERS
@@ -1,3 +1,2 @@
-# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# Bug component: 24949
+include platform/libcore:/OWNERS
diff --git a/services/core/java/com/android/server/timezonedetector/OWNERS b/services/core/java/com/android/server/timezonedetector/OWNERS
index 8f80897..0293242 100644
--- a/services/core/java/com/android/server/timezonedetector/OWNERS
+++ b/services/core/java/com/android/server/timezonedetector/OWNERS
@@ -1,3 +1,7 @@
# Bug component: 847766
+# This is the main list for platform time / time zone detection maintainers, for this dir and
+# ultimately referenced by other OWNERS files for components maintained by the same team.
+nfuller@google.com
+jmorace@google.com
mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+narayan@google.com
diff --git a/services/core/jni/com_android_server_power_PowerManagerService.cpp b/services/core/jni/com_android_server_power_PowerManagerService.cpp
index 7fea547..fe86ff1 100644
--- a/services/core/jni/com_android_server_power_PowerManagerService.cpp
+++ b/services/core/jni/com_android_server_power_PowerManagerService.cpp
@@ -178,9 +178,10 @@
void enableAutoSuspend() {
static bool enabled = false;
if (!enabled) {
+ static sp<IBinder> autosuspendClientToken = new BBinder();
sp<system::suspend::internal::ISuspendControlServiceInternal> suspendControl =
getSuspendControlInternal();
- suspendControl->enableAutosuspend(&enabled);
+ suspendControl->enableAutosuspend(autosuspendClientToken, &enabled);
}
{
diff --git a/services/tests/servicestests/src/com/android/server/timedetector/OWNERS b/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
index 8f80897..a0f46e1 100644
--- a/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
+++ b/services/tests/servicestests/src/com/android/server/timedetector/OWNERS
@@ -1,3 +1,2 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+include /services/core/java/com/android/server/timedetector/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timezone/OWNERS b/services/tests/servicestests/src/com/android/server/timezone/OWNERS
index 8f80897..6165260 100644
--- a/services/tests/servicestests/src/com/android/server/timezone/OWNERS
+++ b/services/tests/servicestests/src/com/android/server/timezone/OWNERS
@@ -1,3 +1,2 @@
-# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+# Bug component: 24949
+include /services/core/java/com/android/server/timezone/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS b/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS
index 8f80897..a6ff1ba 100644
--- a/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS
+++ b/services/tests/servicestests/src/com/android/server/timezonedetector/OWNERS
@@ -1,3 +1,2 @@
# Bug component: 847766
-mingaleev@google.com
-include /core/java/android/app/timedetector/OWNERS
+include /services/core/java/com/android/server/timezonedetector/OWNERS
diff --git a/telephony/java/android/telephony/BarringInfo.java b/telephony/java/android/telephony/BarringInfo.java
index e9698ad..0aa4b58 100644
--- a/telephony/java/android/telephony/BarringInfo.java
+++ b/telephony/java/android/telephony/BarringInfo.java
@@ -28,7 +28,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.util.List;
import java.util.Objects;
/**
@@ -269,42 +268,6 @@
mBarringServiceInfos = barringServiceInfos;
}
- /** @hide */
- public static BarringInfo create(
- @NonNull android.hardware.radio.V1_5.CellIdentity halBarringCellId,
- @NonNull List<android.hardware.radio.V1_5.BarringInfo> halBarringInfos) {
- CellIdentity ci = CellIdentity.create(halBarringCellId);
- SparseArray<BarringServiceInfo> serviceInfos = new SparseArray<>();
-
- for (android.hardware.radio.V1_5.BarringInfo halBarringInfo : halBarringInfos) {
- if (halBarringInfo.barringType
- == android.hardware.radio.V1_5.BarringInfo.BarringType.CONDITIONAL) {
- if (halBarringInfo.barringTypeSpecificInfo.getDiscriminator()
- != android.hardware.radio.V1_5.BarringInfo.BarringTypeSpecificInfo
- .hidl_discriminator.conditional) {
- // this is an error case where the barring info is conditional but the
- // conditional barring fields weren't included
- continue;
- }
- android.hardware.radio.V1_5.BarringInfo.BarringTypeSpecificInfo
- .Conditional conditionalInfo =
- halBarringInfo.barringTypeSpecificInfo.conditional();
- serviceInfos.put(
- halBarringInfo.serviceType, new BarringServiceInfo(
- halBarringInfo.barringType, // will always be CONDITIONAL here
- conditionalInfo.isBarred,
- conditionalInfo.factor,
- conditionalInfo.timeSeconds));
- } else {
- // Barring type is either NONE or UNCONDITIONAL
- serviceInfos.put(
- halBarringInfo.serviceType, new BarringServiceInfo(
- halBarringInfo.barringType, false, 0, 0));
- }
- }
- return new BarringInfo(ci, serviceInfos);
- }
-
/**
* Get the BarringServiceInfo for a specified service.
*
diff --git a/telephony/java/android/telephony/CellConfigLte.java b/telephony/java/android/telephony/CellConfigLte.java
index 4b57d71..3e4e244 100644
--- a/telephony/java/android/telephony/CellConfigLte.java
+++ b/telephony/java/android/telephony/CellConfigLte.java
@@ -34,11 +34,6 @@
}
/** @hide */
- public CellConfigLte(android.hardware.radio.V1_4.CellConfigLte cellConfig) {
- mIsEndcAvailable = cellConfig.isEndcAvailable;
- }
-
- /** @hide */
public CellConfigLte(boolean isEndcAvailable) {
mIsEndcAvailable = isEndcAvailable;
}
diff --git a/telephony/java/android/telephony/CellIdentity.java b/telephony/java/android/telephony/CellIdentity.java
index 15147da..06cfd67 100644
--- a/telephony/java/android/telephony/CellIdentity.java
+++ b/telephony/java/android/telephony/CellIdentity.java
@@ -20,7 +20,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
-import android.hardware.radio.V1_0.CellInfoType;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -359,104 +358,4 @@
return true;
}
-
- /** @hide */
- public static CellIdentity create(android.hardware.radio.V1_0.CellIdentity cellIdentity) {
- if (cellIdentity == null) return null;
- switch(cellIdentity.cellInfoType) {
- case CellInfoType.GSM: {
- if (cellIdentity.cellIdentityGsm.size() == 1) {
- return new CellIdentityGsm(cellIdentity.cellIdentityGsm.get(0));
- }
- break;
- }
- case CellInfoType.WCDMA: {
- if (cellIdentity.cellIdentityWcdma.size() == 1) {
- return new CellIdentityWcdma(cellIdentity.cellIdentityWcdma.get(0));
- }
- break;
- }
- case CellInfoType.TD_SCDMA: {
- if (cellIdentity.cellIdentityTdscdma.size() == 1) {
- return new CellIdentityTdscdma(cellIdentity.cellIdentityTdscdma.get(0));
- }
- break;
- }
- case CellInfoType.LTE: {
- if (cellIdentity.cellIdentityLte.size() == 1) {
- return new CellIdentityLte(cellIdentity.cellIdentityLte.get(0));
- }
- break;
- }
- case CellInfoType.CDMA: {
- if (cellIdentity.cellIdentityCdma.size() == 1) {
- return new CellIdentityCdma(cellIdentity.cellIdentityCdma.get(0));
- }
- break;
- }
- case CellInfoType.NONE: break;
- default: break;
- }
- return null;
- }
-
- /** @hide */
- public static CellIdentity create(android.hardware.radio.V1_2.CellIdentity cellIdentity) {
- if (cellIdentity == null) return null;
- switch(cellIdentity.cellInfoType) {
- case CellInfoType.GSM: {
- if (cellIdentity.cellIdentityGsm.size() == 1) {
- return new CellIdentityGsm(cellIdentity.cellIdentityGsm.get(0));
- }
- break;
- }
- case CellInfoType.WCDMA: {
- if (cellIdentity.cellIdentityWcdma.size() == 1) {
- return new CellIdentityWcdma(cellIdentity.cellIdentityWcdma.get(0));
- }
- break;
- }
- case CellInfoType.TD_SCDMA: {
- if (cellIdentity.cellIdentityTdscdma.size() == 1) {
- return new CellIdentityTdscdma(cellIdentity.cellIdentityTdscdma.get(0));
- }
- break;
- }
- case CellInfoType.LTE: {
- if (cellIdentity.cellIdentityLte.size() == 1) {
- return new CellIdentityLte(cellIdentity.cellIdentityLte.get(0));
- }
- break;
- }
- case CellInfoType.CDMA: {
- if (cellIdentity.cellIdentityCdma.size() == 1) {
- return new CellIdentityCdma(cellIdentity.cellIdentityCdma.get(0));
- }
- break;
- }
- case CellInfoType.NONE: break;
- default: break;
- }
- return null;
- }
-
- /** @hide */
- public static CellIdentity create(android.hardware.radio.V1_5.CellIdentity ci) {
- if (ci == null) return null;
- switch (ci.getDiscriminator()) {
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.gsm:
- return new CellIdentityGsm(ci.gsm());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.cdma:
- return new CellIdentityCdma(ci.cdma());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.lte:
- return new CellIdentityLte(ci.lte());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.wcdma:
- return new CellIdentityWcdma(ci.wcdma());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.tdscdma:
- return new CellIdentityTdscdma(ci.tdscdma());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.nr:
- return new CellIdentityNr(ci.nr());
- default: return null;
- }
- }
}
diff --git a/telephony/java/android/telephony/CellIdentityCdma.java b/telephony/java/android/telephony/CellIdentityCdma.java
index 58a01e9..ba3a192 100644
--- a/telephony/java/android/telephony/CellIdentityCdma.java
+++ b/telephony/java/android/telephony/CellIdentityCdma.java
@@ -112,17 +112,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityCdma(@NonNull android.hardware.radio.V1_0.CellIdentityCdma cid) {
- this(cid.networkId, cid.systemId, cid.baseStationId, cid.longitude, cid.latitude, "", "");
- }
-
- /** @hide */
- public CellIdentityCdma(@NonNull android.hardware.radio.V1_2.CellIdentityCdma cid) {
- this(cid.base.networkId, cid.base.systemId, cid.base.baseStationId, cid.base.longitude,
- cid.base.latitude, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort);
- }
-
private CellIdentityCdma(@NonNull CellIdentityCdma cid) {
this(cid.mNetworkId, cid.mSystemId, cid.mBasestationId, cid.mLongitude, cid.mLatitude,
cid.mAlphaLong, cid.mAlphaShort);
diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java
index a3bec33..2516a79 100644
--- a/telephony/java/android/telephony/CellIdentityGsm.java
+++ b/telephony/java/android/telephony/CellIdentityGsm.java
@@ -101,30 +101,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityGsm(@NonNull android.hardware.radio.V1_0.CellIdentityGsm cid) {
- this(cid.lac, cid.cid, cid.arfcn,
- cid.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.bsic,
- cid.mcc, cid.mnc, "", "", new ArraySet<>());
- }
-
- /** @hide */
- public CellIdentityGsm(@NonNull android.hardware.radio.V1_2.CellIdentityGsm cid) {
- this(cid.base.lac, cid.base.cid, cid.base.arfcn,
- cid.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.bsic, cid.base.mcc,
- cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- new ArraySet<>());
- }
-
- /** @hide */
- public CellIdentityGsm(@NonNull android.hardware.radio.V1_5.CellIdentityGsm cid) {
- this(cid.base.base.lac, cid.base.base.cid, cid.base.base.arfcn,
- cid.base.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE
- : cid.base.base.bsic, cid.base.base.mcc,
- cid.base.base.mnc, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns);
- }
-
private CellIdentityGsm(@NonNull CellIdentityGsm cid) {
this(cid.mLac, cid.mCid, cid.mArfcn, cid.mBsic, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns);
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index bd92d00a..4db00cf 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -136,31 +136,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityLte(@NonNull android.hardware.radio.V1_0.CellIdentityLte cid) {
- this(cid.ci, cid.pci, cid.tac, cid.earfcn, new int[] {},
- CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", "", new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityLte(@NonNull android.hardware.radio.V1_2.CellIdentityLte cid) {
- this(cid.base.ci, cid.base.pci, cid.base.tac, cid.base.earfcn, new int[] {},
- cid.bandwidth, cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong,
- cid.operatorNames.alphaShort, new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityLte(@NonNull android.hardware.radio.V1_5.CellIdentityLte cid) {
- this(cid.base.base.ci, cid.base.base.pci, cid.base.base.tac, cid.base.base.earfcn,
- cid.bands.stream().mapToInt(Integer::intValue).toArray(), cid.base.bandwidth,
- cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns,
- cid.optionalCsgInfo.getDiscriminator()
- == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
- : null);
- }
-
private CellIdentityLte(@NonNull CellIdentityLte cid) {
this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mBands, cid.mBandwidth, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo);
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index 4f50521..6aeb482 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -65,7 +65,6 @@
}
/**
- *
* @param pci Physical Cell Id in range [0, 1007].
* @param tac 24-bit Tracking Area Code.
* @param nrArfcn NR Absolute Radio Frequency Channel Number, in range [0, 3279165].
@@ -100,21 +99,6 @@
}
/** @hide */
- public CellIdentityNr(@NonNull android.hardware.radio.V1_4.CellIdentityNr cid) {
- this(cid.pci, cid.tac, cid.nrarfcn, new int[] {}, cid.mcc, cid.mnc, cid.nci,
- cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- new ArraySet<>());
- }
-
- /** @hide */
- public CellIdentityNr(@NonNull android.hardware.radio.V1_5.CellIdentityNr cid) {
- this(cid.base.pci, cid.base.tac, cid.base.nrarfcn,
- cid.bands.stream().mapToInt(Integer::intValue).toArray(), cid.base.mcc,
- cid.base.mnc, cid.base.nci, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns);
- }
-
- /** @hide */
@Override
public @NonNull CellIdentityNr sanitizeLocationInfo() {
return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mNrArfcn,
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index ec07d54..13d9373 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -113,31 +113,6 @@
}
/** @hide */
- public CellIdentityTdscdma(@NonNull android.hardware.radio.V1_0.CellIdentityTdscdma cid) {
- this(cid.mcc, cid.mnc, cid.lac, cid.cid, cid.cpid, CellInfo.UNAVAILABLE, "", "",
- Collections.emptyList(), null);
- }
-
- /** @hide */
- public CellIdentityTdscdma(@NonNull android.hardware.radio.V1_2.CellIdentityTdscdma cid) {
- this(cid.base.mcc, cid.base.mnc, cid.base.lac, cid.base.cid, cid.base.cpid,
- cid.uarfcn, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- Collections.emptyList(), null);
- }
-
- /** @hide */
- public CellIdentityTdscdma(@NonNull android.hardware.radio.V1_5.CellIdentityTdscdma cid) {
- this(cid.base.base.mcc, cid.base.base.mnc, cid.base.base.lac, cid.base.base.cid,
- cid.base.base.cpid, cid.base.uarfcn, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort,
- cid.additionalPlmns,
- cid.optionalCsgInfo.getDiscriminator()
- == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
- : null);
- }
-
- /** @hide */
@Override
public @NonNull CellIdentityTdscdma sanitizeLocationInfo() {
return new CellIdentityTdscdma(mMccStr, mMncStr, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java
index b04a51d..9b463da 100644
--- a/telephony/java/android/telephony/CellIdentityWcdma.java
+++ b/telephony/java/android/telephony/CellIdentityWcdma.java
@@ -107,30 +107,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityWcdma(@NonNull android.hardware.radio.V1_0.CellIdentityWcdma cid) {
- this(cid.lac, cid.cid, cid.psc, cid.uarfcn, cid.mcc, cid.mnc, "", "",
- new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityWcdma(@NonNull android.hardware.radio.V1_2.CellIdentityWcdma cid) {
- this(cid.base.lac, cid.base.cid, cid.base.psc, cid.base.uarfcn,
- cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong,
- cid.operatorNames.alphaShort, new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityWcdma(@NonNull android.hardware.radio.V1_5.CellIdentityWcdma cid) {
- this(cid.base.base.lac, cid.base.base.cid, cid.base.base.psc, cid.base.base.uarfcn,
- cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns,
- cid.optionalCsgInfo.getDiscriminator()
- == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
- : null);
- }
-
private CellIdentityWcdma(@NonNull CellIdentityWcdma cid) {
this(cid.mLac, cid.mCid, cid.mPsc, cid.mUarfcn, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo);
diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java
index 189a4b8..2b2df24 100644
--- a/telephony/java/android/telephony/CellInfo.java
+++ b/telephony/java/android/telephony/CellInfo.java
@@ -20,7 +20,6 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.compat.annotation.UnsupportedAppUsage;
-import android.hardware.radio.V1_4.CellInfo.Info;
import android.os.Parcel;
import android.os.Parcelable;
@@ -150,6 +149,13 @@
private long mTimeStamp;
/** @hide */
+ protected CellInfo(int cellConnectionStatus, boolean registered, long timestamp) {
+ mCellConnectionStatus = cellConnectionStatus;
+ mRegistered = registered;
+ mTimeStamp = timestamp;
+ }
+
+ /** @hide */
protected CellInfo() {
this.mRegistered = false;
this.mTimeStamp = Long.MAX_VALUE;
@@ -321,131 +327,4 @@
return new CellInfo[size];
}
};
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_0.CellInfo ci) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = ci.timeStamp;
- this.mCellConnectionStatus = CONNECTION_UNKNOWN;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_2.CellInfo ci) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = ci.timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- this.mRegistered = ci.isRegistered;
- this.mTimeStamp = timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_0.CellInfo ci) {
- if (ci == null) return null;
- switch(ci.cellInfoType) {
- case android.hardware.radio.V1_0.CellInfoType.GSM: return new CellInfoGsm(ci);
- case android.hardware.radio.V1_0.CellInfoType.CDMA: return new CellInfoCdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.LTE: return new CellInfoLte(ci);
- case android.hardware.radio.V1_0.CellInfoType.WCDMA: return new CellInfoWcdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.TD_SCDMA: return new CellInfoTdscdma(ci);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_2.CellInfo ci) {
- if (ci == null) return null;
- switch(ci.cellInfoType) {
- case android.hardware.radio.V1_0.CellInfoType.GSM: return new CellInfoGsm(ci);
- case android.hardware.radio.V1_0.CellInfoType.CDMA: return new CellInfoCdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.LTE: return new CellInfoLte(ci);
- case android.hardware.radio.V1_0.CellInfoType.WCDMA: return new CellInfoWcdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.TD_SCDMA: return new CellInfoTdscdma(ci);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- if (ci == null) return null;
- switch (ci.info.getDiscriminator()) {
- case Info.hidl_discriminator.gsm: return new CellInfoGsm(ci, timeStamp);
- case Info.hidl_discriminator.cdma: return new CellInfoCdma(ci, timeStamp);
- case Info.hidl_discriminator.lte: return new CellInfoLte(ci, timeStamp);
- case Info.hidl_discriminator.wcdma: return new CellInfoWcdma(ci, timeStamp);
- case Info.hidl_discriminator.tdscdma: return new CellInfoTdscdma(ci, timeStamp);
- case Info.hidl_discriminator.nr: return new CellInfoNr(ci, timeStamp);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- if (ci == null) return null;
- switch (ci.ratSpecificInfo.getDiscriminator()) {
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.gsm:
- return new CellInfoGsm(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.cdma:
- return new CellInfoCdma(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.lte:
- return new CellInfoLte(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
- return new CellInfoWcdma(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
- return new CellInfoTdscdma(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.nr:
- return new CellInfoNr(ci, timeStamp);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- if (ci == null) return null;
- switch (ci.ratSpecificInfo.getDiscriminator()) {
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.gsm:
- return new CellInfoGsm(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.cdma:
- return new CellInfoCdma(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.lte:
- return new CellInfoLte(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
- return new CellInfoWcdma(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
- return new CellInfoTdscdma(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.nr:
- return new CellInfoNr(ci, timeStamp);
- default: return null;
- }
- }
}
diff --git a/telephony/java/android/telephony/CellInfoCdma.java b/telephony/java/android/telephony/CellInfoCdma.java
index dbb30d2..aa8cff5 100644
--- a/telephony/java/android/telephony/CellInfoCdma.java
+++ b/telephony/java/android/telephony/CellInfoCdma.java
@@ -52,48 +52,11 @@
}
/** @hide */
- public CellInfoCdma(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoCdma cic = ci.cdma.get(0);
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.cdma.get(0);
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.info.cdma();
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.ratSpecificInfo.cdma();
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.ratSpecificInfo.cdma();
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
+ public CellInfoCdma(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityCdma cellIdentityCdma, CellSignalStrengthCdma cellSignalStrengthCdma) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityCdma = cellIdentityCdma;
+ mCellSignalStrengthCdma = cellSignalStrengthCdma;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoGsm.java b/telephony/java/android/telephony/CellInfoGsm.java
index e1d996e..76e825b 100644
--- a/telephony/java/android/telephony/CellInfoGsm.java
+++ b/telephony/java/android/telephony/CellInfoGsm.java
@@ -51,43 +51,11 @@
}
/** @hide */
- public CellInfoGsm(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoGsm cig = ci.gsm.get(0);
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoGsm cig = ci.gsm.get(0);
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoGsm cig = ci.info.gsm();
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoGsm cig = ci.ratSpecificInfo.gsm();
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoGsm cig = ci.ratSpecificInfo.gsm();
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
+ public CellInfoGsm(int cellConnectionStatus, boolean registered, long timeStamp,
+ CellIdentityGsm cellIdentityGsm, CellSignalStrengthGsm cellSignalStrengthGsm) {
+ super(cellConnectionStatus, registered, timeStamp);
+ mCellIdentityGsm = cellIdentityGsm;
+ mCellSignalStrengthGsm = cellSignalStrengthGsm;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoLte.java b/telephony/java/android/telephony/CellInfoLte.java
index 39b320a..2d176d5 100644
--- a/telephony/java/android/telephony/CellInfoLte.java
+++ b/telephony/java/android/telephony/CellInfoLte.java
@@ -56,48 +56,13 @@
}
/** @hide */
- public CellInfoLte(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoLte cil = ci.lte.get(0);
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoLte cil = ci.lte.get(0);
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_4.CellInfoLte cil = ci.info.lte();
- mCellIdentityLte = new CellIdentityLte(cil.base.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.base.signalStrengthLte);
- mCellConfig = new CellConfigLte(cil.cellConfig);
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoLte cil = ci.ratSpecificInfo.lte();
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_6.CellInfoLte cil = ci.ratSpecificInfo.lte();
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
+ public CellInfoLte(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityLte cellIdentityLte, CellSignalStrengthLte cellSignalStrengthLte,
+ CellConfigLte cellConfig) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityLte = cellIdentityLte;
+ mCellSignalStrengthLte = cellSignalStrengthLte;
+ mCellConfig = cellConfig;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoNr.java b/telephony/java/android/telephony/CellInfoNr.java
index 12e6a38..37fac24 100644
--- a/telephony/java/android/telephony/CellInfoNr.java
+++ b/telephony/java/android/telephony/CellInfoNr.java
@@ -53,27 +53,11 @@
}
/** @hide */
- public CellInfoNr(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_4.CellInfoNr cil = ci.info.nr();
- mCellIdentity = new CellIdentityNr(cil.cellidentity);
- mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrength);
- }
-
- /** @hide */
- public CellInfoNr(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoNr cil = ci.ratSpecificInfo.nr();
- mCellIdentity = new CellIdentityNr(cil.cellIdentityNr);
- mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrengthNr);
- }
-
- /** @hide */
- public CellInfoNr(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_6.CellInfoNr cil = ci.ratSpecificInfo.nr();
- mCellIdentity = new CellIdentityNr(cil.cellIdentityNr);
- mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrengthNr);
+ public CellInfoNr(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityNr cellIdentityNr, CellSignalStrengthNr cellSignalStrengthNr) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentity = cellIdentityNr;
+ mCellSignalStrength = cellSignalStrengthNr;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoTdscdma.java b/telephony/java/android/telephony/CellInfoTdscdma.java
index 994b317..d8db429 100644
--- a/telephony/java/android/telephony/CellInfoTdscdma.java
+++ b/telephony/java/android/telephony/CellInfoTdscdma.java
@@ -54,43 +54,12 @@
}
/** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoTdscdma cit = ci.tdscdma.get(0);
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoTdscdma cit = ci.tdscdma.get(0);
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoTdscdma cit = ci.info.tdscdma();
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoTdscdma cit = ci.ratSpecificInfo.tdscdma();
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoTdscdma cit = ci.ratSpecificInfo.tdscdma();
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
+ public CellInfoTdscdma(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityTdscdma cellIdentityTdscdma,
+ CellSignalStrengthTdscdma cellSignalStrengthTdscdma) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityTdscdma = cellIdentityTdscdma;
+ mCellSignalStrengthTdscdma = cellSignalStrengthTdscdma;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoWcdma.java b/telephony/java/android/telephony/CellInfoWcdma.java
index 62ac0b8..dc8e1fe 100644
--- a/telephony/java/android/telephony/CellInfoWcdma.java
+++ b/telephony/java/android/telephony/CellInfoWcdma.java
@@ -49,43 +49,11 @@
}
/** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoWcdma ciw = ci.wcdma.get(0);
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoWcdma ciw = ci.wcdma.get(0);
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoWcdma ciw = ci.info.wcdma();
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoWcdma ciw = ci.ratSpecificInfo.wcdma();
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoWcdma ciw = ci.ratSpecificInfo.wcdma();
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
+ public CellInfoWcdma(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityWcdma cellIdentityWcdma, CellSignalStrengthWcdma cellSignalStrengthWcdma) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityWcdma = cellIdentityWcdma;
+ mCellSignalStrengthWcdma = cellSignalStrengthWcdma;
}
/**
diff --git a/telephony/java/android/telephony/CellSignalStrength.java b/telephony/java/android/telephony/CellSignalStrength.java
index e089657..9727ab7 100644
--- a/telephony/java/android/telephony/CellSignalStrength.java
+++ b/telephony/java/android/telephony/CellSignalStrength.java
@@ -108,7 +108,7 @@
// Range for RSSI in ASU (0-31, 99) as defined in TS 27.007 8.69
/** @hide */
- protected static final int getRssiDbmFromAsu(int asu) {
+ public static final int getRssiDbmFromAsu(int asu) {
if (asu > 31 || asu < 0) return CellInfo.UNAVAILABLE;
return -113 + (2 * asu);
}
@@ -122,7 +122,7 @@
// Range for RSCP in ASU (0-96, 255) as defined in TS 27.007 8.69
/** @hide */
- protected static final int getRscpDbmFromAsu(int asu) {
+ public static final int getRscpDbmFromAsu(int asu) {
if (asu > 96 || asu < 0) return CellInfo.UNAVAILABLE;
return asu - 120;
}
@@ -136,7 +136,7 @@
// Range for SNR in ASU (0-49, 255) as defined in TS 27.007 8.69
/** @hide */
- protected static final int getEcNoDbFromAsu(int asu) {
+ public static final int getEcNoDbFromAsu(int asu) {
if (asu > 49 || asu < 0) return CellInfo.UNAVAILABLE;
return -24 + (asu / 2);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthCdma.java b/telephony/java/android/telephony/CellSignalStrengthCdma.java
index d00049c..5298e67 100644
--- a/telephony/java/android/telephony/CellSignalStrengthCdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthCdma.java
@@ -78,13 +78,6 @@
}
/** @hide */
- public CellSignalStrengthCdma(android.hardware.radio.V1_0.CdmaSignalStrength cdma,
- android.hardware.radio.V1_0.EvdoSignalStrength evdo) {
- // Convert from HAL values as part of construction.
- this(-cdma.dbm, -cdma.ecio, -evdo.dbm, -evdo.ecio, evdo.signalNoiseRatio);
- }
-
- /** @hide */
public CellSignalStrengthCdma(CellSignalStrengthCdma s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthGsm.java b/telephony/java/android/telephony/CellSignalStrengthGsm.java
index 51e1ebc..7b78084 100644
--- a/telephony/java/android/telephony/CellSignalStrengthGsm.java
+++ b/telephony/java/android/telephony/CellSignalStrengthGsm.java
@@ -67,16 +67,6 @@
}
/** @hide */
- public CellSignalStrengthGsm(android.hardware.radio.V1_0.GsmSignalStrength gsm) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(gsm.signalStrength), gsm.bitErrorRate, gsm.timingAdvance);
-
- if (mRssi == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
public CellSignalStrengthGsm(CellSignalStrengthGsm s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 9211482..e8633dd 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -166,25 +166,6 @@
}
/** @hide */
- public CellSignalStrengthLte(android.hardware.radio.V1_0.LteSignalStrength lte) {
- // Convert from HAL values as part of construction.
- this(convertRssiAsuToDBm(lte.signalStrength),
- lte.rsrp != CellInfo.UNAVAILABLE ? -lte.rsrp : lte.rsrp,
- lte.rsrq != CellInfo.UNAVAILABLE ? -lte.rsrq : lte.rsrq,
- convertRssnrUnitFromTenDbToDB(lte.rssnr), lte.cqi, lte.timingAdvance);
- }
-
- /** @hide */
- public CellSignalStrengthLte(android.hardware.radio.V1_6.LteSignalStrength lte) {
- // Convert from HAL values as part of construction.
- this(convertRssiAsuToDBm(lte.base.signalStrength),
- lte.base.rsrp != CellInfo.UNAVAILABLE ? -lte.base.rsrp : lte.base.rsrp,
- lte.base.rsrq != CellInfo.UNAVAILABLE ? -lte.base.rsrq : lte.base.rsrq,
- convertRssnrUnitFromTenDbToDB(lte.base.rssnr), lte.cqiTableIndex, lte.base.cqi,
- lte.base.timingAdvance);
- }
-
- /** @hide */
public CellSignalStrengthLte(CellSignalStrengthLte s) {
copyFrom(s);
}
@@ -617,11 +598,13 @@
Rlog.w(LOG_TAG, s);
}
- private static int convertRssnrUnitFromTenDbToDB(int rssnr) {
+ /** @hide */
+ public static int convertRssnrUnitFromTenDbToDB(int rssnr) {
return rssnr / 10;
}
- private static int convertRssiAsuToDBm(int rssiAsu) {
+ /** @hide */
+ public static int convertRssiAsuToDBm(int rssiAsu) {
if (rssiAsu == SIGNAL_STRENGTH_LTE_RSSI_ASU_UNKNOWN) {
return CellInfo.UNAVAILABLE;
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index 6ada32e..cd22abd 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -202,29 +202,12 @@
}
/**
- * @hide
- * @param ss signal strength from modem.
- */
- public CellSignalStrengthNr(android.hardware.radio.V1_4.NrSignalStrength ss) {
- this(flip(ss.csiRsrp), flip(ss.csiRsrq), ss.csiSinr, flip(ss.ssRsrp), flip(ss.ssRsrq),
- ss.ssSinr);
- }
-
- /**
- * @hide
- * @param ss signal strength from modem.
- */
- public CellSignalStrengthNr(android.hardware.radio.V1_6.NrSignalStrength ss) {
- this(flip(ss.base.csiRsrp), flip(ss.base.csiRsrq), ss.base.csiSinr, ss.csiCqiTableIndex,
- ss.csiCqiReport, flip(ss.base.ssRsrp), flip(ss.base.ssRsrq), ss.base.ssSinr);
- }
-
- /**
* Flip sign cell strength value when taking in the value from hal
* @param val cell strength value
* @return flipped value
+ * @hide
*/
- private static int flip(int val) {
+ public static int flip(int val) {
return val != CellInfo.UNAVAILABLE ? -val : val;
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
index e96f200..8a7c70e 100644
--- a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
@@ -75,28 +75,6 @@
}
/** @hide */
- public CellSignalStrengthTdscdma(android.hardware.radio.V1_0.TdScdmaSignalStrength tdscdma) {
- // Convert from HAL values as part of construction.
- this(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
- tdscdma.rscp != CellInfo.UNAVAILABLE ? -tdscdma.rscp : tdscdma.rscp);
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
- public CellSignalStrengthTdscdma(android.hardware.radio.V1_2.TdscdmaSignalStrength tdscdma) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(tdscdma.signalStrength),
- tdscdma.bitErrorRate, getRscpDbmFromAsu(tdscdma.rscp));
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
public CellSignalStrengthTdscdma(CellSignalStrengthTdscdma s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthWcdma.java b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
index 8b14b74..f30440d 100644
--- a/telephony/java/android/telephony/CellSignalStrengthWcdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
@@ -95,30 +95,6 @@
}
/** @hide */
- public CellSignalStrengthWcdma(android.hardware.radio.V1_0.WcdmaSignalStrength wcdma) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(wcdma.signalStrength), wcdma.bitErrorRate,
- CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE);
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
- public CellSignalStrengthWcdma(android.hardware.radio.V1_2.WcdmaSignalStrength wcdma) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(wcdma.base.signalStrength),
- wcdma.base.bitErrorRate,
- getRscpDbmFromAsu(wcdma.rscp),
- getEcNoDbFromAsu(wcdma.ecno));
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
public CellSignalStrengthWcdma(CellSignalStrengthWcdma s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java b/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java
index e926272..bf418ab 100644
--- a/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java
+++ b/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java
@@ -44,12 +44,6 @@
mCsgIdentity = csgIdentity;
}
- /** @hide */
- public ClosedSubscriberGroupInfo(
- @NonNull android.hardware.radio.V1_5.ClosedSubscriberGroupInfo csgInfo) {
- this(csgInfo.csgIndication, csgInfo.homeNodebName, csgInfo.csgIdentity);
- }
-
/**
* Indicates whether the cell is restricted to only CSG members.
*
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index b317c55..b7bc467 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -144,64 +144,6 @@
mTimestampMillis = SystemClock.elapsedRealtime();
}
- /**
- * Constructor for Radio HAL V1.0
- *
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_0.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gw),
- new CellSignalStrengthWcdma(),
- new CellSignalStrengthTdscdma(signalStrength.tdScdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr());
- }
-
- /**
- * Constructor for Radio HAL V1.2
- *
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_2.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gsm),
- new CellSignalStrengthWcdma(signalStrength.wcdma),
- new CellSignalStrengthTdscdma(signalStrength.tdScdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr());
- }
-
- /**
- * Constructor for Radio HAL V1.4.
- *
- * @param signalStrength signal strength reported from modem.
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_4.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gsm),
- new CellSignalStrengthWcdma(signalStrength.wcdma),
- new CellSignalStrengthTdscdma(signalStrength.tdscdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr(signalStrength.nr));
- }
-
- /**
- * Constructor for Radio HAL V1.6.
- *
- * @param signalStrength signal strength reported from modem.
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_6.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gsm),
- new CellSignalStrengthWcdma(signalStrength.wcdma),
- new CellSignalStrengthTdscdma(signalStrength.tdscdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr(signalStrength.nr));
- }
-
private CellSignalStrength getPrimary() {
// This behavior is intended to replicate the legacy behavior of getLevel() by prioritizing
// newer faster RATs for default/for display purposes.