Merge "Fix regression in Dalvik:HEAP_TOTAL"
diff --git a/api/TEST_MAPPING b/api/TEST_MAPPING
new file mode 100644
index 0000000..8a676e9
--- /dev/null
+++ b/api/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsCurrentApiSignatureTestCases"
+ }
+ ]
+}
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 3da5e0c..65ebbed 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -1731,9 +1731,9 @@
// Salt: Randomly generated 256 bit value
// Hash algorithm: HMAC-SHA256
// Size: 32 byte
- // Default: null or empty if the device identifier is not known
+ // Default: null or empty if this is a server listener socket
optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES];
- // Port of this socket
+ // Temporary port of this socket for the current connection or session only
// Default 0 when unknown or don't care
optional int32 port = 2;
// Socket type as mentioned in
@@ -1747,6 +1747,14 @@
optional int64 tx_bytes = 5;
// Number of bytes received from remote device during this connection
optional int64 rx_bytes = 6;
+ // Socket owner's UID
+ optional int32 uid = 7 [(is_uid) = true];
+ // Server port of this socket, if any. When both |server_port| and |port| fields are populated,
+ // |port| must be spawned by |server_port|
+ // Default 0 when unknown or don't care
+ optional int32 server_port = 8;
+ // Whether this is a server listener socket
+ optional android.bluetooth.SocketRoleEnum is_server = 9;
}
/**
diff --git a/core/java/android/webkit/OWNERS b/core/java/android/webkit/OWNERS
index 00e540a..b33da57 100644
--- a/core/java/android/webkit/OWNERS
+++ b/core/java/android/webkit/OWNERS
@@ -1,3 +1,4 @@
changwan@google.com
+ntfschr@google.com
tobiasjs@google.com
torne@google.com
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 1048cb4..56eb128 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -93,6 +93,11 @@
*/
public static final int PROFILE_SYSTEM_SERVER = 1 << 14;
+ /*
+ * Enable using the ART app image startup cache
+ */
+ public static final int USE_APP_IMAGE_STARTUP_CACHE = 1 << 16;
+
/** No external storage should be mounted. */
public static final int MOUNT_EXTERNAL_NONE = IVold.REMOUNT_MODE_NONE;
/** Default external storage should be mounted. */
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 9f23797..e132abd 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -41,6 +41,7 @@
import android.system.StructCapUserData;
import android.system.StructCapUserHeader;
import android.text.Hyphenator;
+import android.text.TextUtils;
import android.util.EventLog;
import android.util.Log;
import android.util.Slog;
@@ -84,6 +85,8 @@
private static final String PROPERTY_DISABLE_OPENGL_PRELOADING = "ro.zygote.disable_gl_preload";
private static final String PROPERTY_GFX_DRIVER = "ro.gfx.driver.0";
+ private static final String PROPERTY_USE_APP_IMAGE_STARTUP_CACHE =
+ "persist.device_config.runtime_native.use_app_image_startup_cache";
private static final int LOG_BOOT_PROGRESS_PRELOAD_START = 3020;
private static final int LOG_BOOT_PROGRESS_PRELOAD_END = 3030;
@@ -705,6 +708,13 @@
parsedArgs.mRuntimeFlags |= Zygote.PROFILE_SYSTEM_SERVER;
}
+ String use_app_image_cache = SystemProperties.get(
+ PROPERTY_USE_APP_IMAGE_STARTUP_CACHE, "");
+ // Property defaults to true currently.
+ if (!TextUtils.isEmpty(use_app_image_cache) && !use_app_image_cache.equals("false")) {
+ parsedArgs.mRuntimeFlags |= Zygote.USE_APP_IMAGE_STARTUP_CACHE;
+ }
+
/* Request to fork the system server process */
pid = Zygote.forkSystemServer(
parsedArgs.mUid, parsedArgs.mGid,
diff --git a/core/proto/android/bluetooth/enums.proto b/core/proto/android/bluetooth/enums.proto
index 5b5c9c2..b4f3d1e 100644
--- a/core/proto/android/bluetooth/enums.proto
+++ b/core/proto/android/bluetooth/enums.proto
@@ -132,3 +132,9 @@
// This socket is closed
SOCKET_CONNECTION_STATE_DISCONNECTED = 5;
}
+
+enum SocketRoleEnum {
+ SOCKET_ROLE_UNKNOWN = 0;
+ SOCKET_ROLE_LISTEN = 1;
+ SOCKET_ROLE_CONNECTION = 2;
+}
diff --git a/packages/SettingsLib/Android.bp b/packages/SettingsLib/Android.bp
index 4791517..0cae894 100644
--- a/packages/SettingsLib/Android.bp
+++ b/packages/SettingsLib/Android.bp
@@ -22,4 +22,20 @@
}
+// NOTE: Keep this module in sync with ./common.mk
+java_defaults {
+ name: "SettingsLibDefaults",
+ static_libs: [
+ "androidx.annotation_annotation",
+ "androidx.lifecycle_lifecycle-common",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.lifecycle_lifecycle-runtime",
+ "androidx.recyclerview_recyclerview",
+ "androidx.preference_preference",
+ "androidx.appcompat_appcompat",
+ "androidx.legacy_legacy-preference-v14",
+ "SettingsLib",
+ ],
+}
+
// For the test package.
diff --git a/packages/SettingsLib/common.mk b/packages/SettingsLib/common.mk
index 834b83b..8c309ff 100644
--- a/packages/SettingsLib/common.mk
+++ b/packages/SettingsLib/common.mk
@@ -12,6 +12,11 @@
#
# include frameworks/base/packages/SettingsLib/common.mk
#
+# During the conversion to Soong bluprint files, the equivalent
+# functionality is provided by adding
+# defaults: ["SettingsLibDefaults"],
+# to the corresponding module.
+# NOTE: keep this file and ./Android.bp in sync.
LOCAL_STATIC_JAVA_LIBRARIES += \
androidx.annotation_annotation \
diff --git a/services/core/java/com/android/server/pm/dex/ArtManagerService.java b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
index a8be07d..08dea7f 100644
--- a/services/core/java/com/android/server/pm/dex/ArtManagerService.java
+++ b/services/core/java/com/android/server/pm/dex/ArtManagerService.java
@@ -480,8 +480,10 @@
final String apkPath = pkg.baseCodePath;
final ApplicationInfo appInfo = pkg.applicationInfo;
final String outDexFile = appInfo.dataDir + "/code_cache/compiled_view.dex";
- if (appInfo.isPrivilegedApp()) {
+ if (appInfo.isPrivilegedApp() || appInfo.isDefaultToDeviceProtectedStorage()) {
// Privileged apps prefer to load trusted code so they don't use compiled views.
+ // Also disable the view compiler for protected storage apps since there are
+ // selinux permissions required for writing to user_de.
return false;
}
Log.i("PackageManager", "Compiling layouts in " + packageName + " (" + apkPath +
diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java
index 9c64cf6..75165af 100644
--- a/telephony/java/android/telephony/AccessNetworkConstants.java
+++ b/telephony/java/android/telephony/AccessNetworkConstants.java
@@ -54,8 +54,15 @@
*/
@SystemApi
public static final class TransportType {
+ /**
+ * Invalid transport type.
+ * @hide
+ */
+ public static final int INVALID = -1;
+
/** Wireless Wide Area Networks (i.e. Cellular) */
public static final int WWAN = 1;
+
/** Wireless Local Area Networks (i.e. Wifi) */
public static final int WLAN = 2;
@@ -65,6 +72,7 @@
/** @hide */
public static String toString(int type) {
switch (type) {
+ case INVALID: return "INVALID";
case WWAN: return "WWAN";
case WLAN: return "WLAN";
default: return Integer.toString(type);
diff --git a/telephony/java/android/telephony/CellSignalStrengthGsm.java b/telephony/java/android/telephony/CellSignalStrengthGsm.java
index 30e641d..a4207c9 100644
--- a/telephony/java/android/telephony/CellSignalStrengthGsm.java
+++ b/telephony/java/android/telephony/CellSignalStrengthGsm.java
@@ -63,6 +63,10 @@
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 */
diff --git a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
index 6f52b85..5ae89b0 100644
--- a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
@@ -72,6 +72,10 @@
// 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 */
@@ -79,6 +83,10 @@
// 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 */
diff --git a/telephony/java/android/telephony/CellSignalStrengthWcdma.java b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
index 0760407..efa3647 100644
--- a/telephony/java/android/telephony/CellSignalStrengthWcdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
@@ -92,8 +92,12 @@
/** @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);
+ this(getRssiDbmFromAsu(wcdma.signalStrength), wcdma.bitErrorRate,
+ CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE);
+
+ if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
+ setDefaultValues();
+ }
}
/** @hide */
@@ -103,6 +107,10 @@
wcdma.base.bitErrorRate,
getRscpDbmFromAsu(wcdma.rscp),
getEcNoDbFromAsu(wcdma.ecno));
+
+ if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
+ setDefaultValues();
+ }
}
/** @hide */
diff --git a/telephony/java/android/telephony/SmsMessage.java b/telephony/java/android/telephony/SmsMessage.java
index 91e24a9..52a2085 100644
--- a/telephony/java/android/telephony/SmsMessage.java
+++ b/telephony/java/android/telephony/SmsMessage.java
@@ -187,15 +187,7 @@
int activePhone = TelephonyManager.getDefault().getCurrentPhoneType();
String format = (PHONE_TYPE_CDMA == activePhone) ?
SmsConstants.FORMAT_3GPP2 : SmsConstants.FORMAT_3GPP;
- message = createFromPdu(pdu, format);
-
- if (null == message || null == message.mWrappedSmsMessage) {
- // decoding pdu failed based on activePhone type, must be other format
- format = (PHONE_TYPE_CDMA == activePhone) ?
- SmsConstants.FORMAT_3GPP : SmsConstants.FORMAT_3GPP2;
- message = createFromPdu(pdu, format);
- }
- return message;
+ return createFromPdu(pdu, format);
}
/**
@@ -211,11 +203,18 @@
* {@link android.provider.Telephony.Sms.Intents#SMS_RECEIVED_ACTION} intent
*/
public static SmsMessage createFromPdu(byte[] pdu, String format) {
- SmsMessageBase wrappedMessage;
+ return createFromPdu(pdu, format, true);
+ }
+
+ private static SmsMessage createFromPdu(byte[] pdu, String format,
+ boolean fallbackToOtherFormat) {
if (pdu == null) {
Rlog.i(LOG_TAG, "createFromPdu(): pdu is null");
return null;
}
+ SmsMessageBase wrappedMessage;
+ String otherFormat = SmsConstants.FORMAT_3GPP2.equals(format) ? SmsConstants.FORMAT_3GPP :
+ SmsConstants.FORMAT_3GPP2;
if (SmsConstants.FORMAT_3GPP2.equals(format)) {
wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromPdu(pdu);
} else if (SmsConstants.FORMAT_3GPP.equals(format)) {
@@ -228,8 +227,12 @@
if (wrappedMessage != null) {
return new SmsMessage(wrappedMessage);
} else {
- Rlog.e(LOG_TAG, "createFromPdu(): wrappedMessage is null");
- return null;
+ if (fallbackToOtherFormat) {
+ return createFromPdu(pdu, otherFormat, false);
+ } else {
+ Rlog.e(LOG_TAG, "createFromPdu(): wrappedMessage is null");
+ return null;
+ }
}
}
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 845d23e..d5a153a 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -2048,6 +2048,8 @@
putPhoneIdAndSubIdExtra(intent, phoneId, subIds[0]);
} else {
logd("putPhoneIdAndSubIdExtra: no valid subs");
+ intent.putExtra(PhoneConstants.PHONE_KEY, phoneId);
+ intent.putExtra(PhoneConstants.SLOT_KEY, phoneId);
}
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 148563a..6ac0929 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -4866,12 +4866,13 @@
*
* <p>Apps targeting {@link android.os.Build.VERSION_CODES#Q Android Q} or higher will no
* longer trigger a refresh of the cached CellInfo by invoking this API. Instead, those apps
- * will receive the latest cached results. Apps targeting
+ * will receive the latest cached results, which may not be current. Apps targeting
* {@link android.os.Build.VERSION_CODES#Q Android Q} or higher that wish to request updated
* CellInfo should call
- * {android.telephony.TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate()} and
- * listen for responses via {@link android.telephony.PhoneStateListener#onCellInfoChanged
- * onCellInfoChanged()}.
+ * {@link android.telephony.TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate()};
+ * however, in all cases, updates will be rate-limited and are not guaranteed. To determine the
+ * recency of CellInfo data, callers should check
+ * {@link android.telephony.CellInfo#getTimeStamp CellInfo#getTimeStamp()}.
*
* <p>This method returns valid data for devices with
* {@link android.content.pm.PackageManager#FEATURE_TELEPHONY FEATURE_TELEPHONY}. In cases
diff --git a/telephony/java/android/telephony/ims/Rcs1To1Thread.java b/telephony/java/android/telephony/ims/Rcs1To1Thread.java
index cc28ee0..3255f8d 100644
--- a/telephony/java/android/telephony/ims/Rcs1To1Thread.java
+++ b/telephony/java/android/telephony/ims/Rcs1To1Thread.java
@@ -23,7 +23,7 @@
* {@link RcsParticipant}s. Please see Section 5 (1-to-1 Messaging) - GSMA RCC.71 (RCS Universal
* Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public class Rcs1To1Thread extends RcsThread {
private int mThreadId;
diff --git a/telephony/java/android/telephony/ims/RcsEvent.java b/telephony/java/android/telephony/ims/RcsEvent.java
index 744ac76..ef359a1 100644
--- a/telephony/java/android/telephony/ims/RcsEvent.java
+++ b/telephony/java/android/telephony/ims/RcsEvent.java
@@ -16,14 +16,17 @@
package android.telephony.ims;
import android.os.Parcel;
-import android.os.Parcelable;
/**
* The base class for events that can happen on {@link RcsParticipant}s and {@link RcsThread}s.
- * @hide - TODO(109759350) make this public
+ *
+ * @hide - TODO: make public
*/
-public abstract class RcsEvent implements Parcelable {
- protected long mTimestamp;
+public abstract class RcsEvent {
+ /**
+ * @hide
+ */
+ protected final long mTimestamp;
protected RcsEvent(long timestamp) {
mTimestamp = timestamp;
@@ -44,17 +47,17 @@
*/
abstract void persist() throws RcsMessageStoreException;
+ /**
+ * @hide
+ */
RcsEvent(Parcel in) {
mTimestamp = in.readLong();
}
- @Override
+ /**
+ * @hide
+ */
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(mTimestamp);
}
-
- @Override
- public int describeContents() {
- return 0;
- }
}
diff --git a/telephony/java/android/telephony/ims/RcsEventQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsEventQueryParameters.aidl
deleted file mode 100644
index 9a3600b..0000000
--- a/telephony/java/android/telephony/ims/RcsEventQueryParameters.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2019, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims;
-
-parcelable RcsEventQueryParameters;
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsEventQueryParams.aidl
similarity index 94%
copy from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
copy to telephony/java/android/telephony/ims/RcsEventQueryParams.aidl
index 52e73ce..f18c4df 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsEventQueryParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsEventQueryParams;
diff --git a/telephony/java/android/telephony/ims/RcsEventQueryParameters.java b/telephony/java/android/telephony/ims/RcsEventQueryParams.java
similarity index 83%
rename from telephony/java/android/telephony/ims/RcsEventQueryParameters.java
rename to telephony/java/android/telephony/ims/RcsEventQueryParams.java
index 6aee56f..5249bec 100644
--- a/telephony/java/android/telephony/ims/RcsEventQueryParameters.java
+++ b/telephony/java/android/telephony/ims/RcsEventQueryParams.java
@@ -35,29 +35,29 @@
/**
* The parameters to pass into
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} in order to select a
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} in order to select a
* subset of {@link RcsEvent}s present in the message store.
*
- * @hide TODO - make the Builder and builder() public. The rest should stay internal only.
+ * @hide - TODO: make public
*/
-public class RcsEventQueryParameters implements Parcelable {
+public final class RcsEventQueryParams implements Parcelable {
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return all types of
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return all types of
* {@link RcsEvent}s
*/
public static final int ALL_EVENTS = -1;
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return sub-types of
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return sub-types of
* {@link RcsGroupThreadEvent}s
*/
public static final int ALL_GROUP_THREAD_EVENTS = 0;
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsParticipantAliasChangedEvent}s
*/
public static final int PARTICIPANT_ALIAS_CHANGED_EVENT =
@@ -65,7 +65,7 @@
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadParticipantJoinedEvent}s
*/
public static final int GROUP_THREAD_PARTICIPANT_JOINED_EVENT =
@@ -73,7 +73,7 @@
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadParticipantLeftEvent}s
*/
public static final int GROUP_THREAD_PARTICIPANT_LEFT_EVENT =
@@ -81,14 +81,14 @@
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadNameChangedEvent}s
*/
public static final int GROUP_THREAD_NAME_CHANGED_EVENT = NAME_CHANGED_EVENT_TYPE;
/**
* Flag to be used with {@link Builder#setEventType(int)} to make
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)} return only
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)} return only
* {@link RcsGroupThreadIconChangedEvent}s
*/
public static final int GROUP_THREAD_ICON_CHANGED_EVENT = ICON_CHANGED_EVENT_TYPE;
@@ -134,7 +134,7 @@
// The thread that the results are limited to
private int mThreadId;
- RcsEventQueryParameters(@EventType int eventType, int threadId,
+ RcsEventQueryParams(@EventType int eventType, int threadId,
@SortingProperty int sortingProperty, boolean isAscending, int limit) {
mEventType = eventType;
mSortingProperty = sortingProperty;
@@ -144,7 +144,7 @@
}
/**
- * @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParameters} is
+ * @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParams} is
* set to query for.
*/
public @EventType int getEventType() {
@@ -152,7 +152,7 @@
}
/**
- * @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParameters} is
+ * @return Returns the type of {@link RcsEvent}s that this {@link RcsEventQueryParams} is
* set to query for.
*/
public int getLimit() {
@@ -186,7 +186,7 @@
}
/**
- * A helper class to build the {@link RcsEventQueryParameters}.
+ * A helper class to build the {@link RcsEventQueryParams}.
*/
public static class Builder {
private @EventType int mEventType;
@@ -196,8 +196,8 @@
private int mThreadId;
/**
- * Creates a new builder for {@link RcsEventQueryParameters} to be used in
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)}
+ * Creates a new builder for {@link RcsEventQueryParams} to be used in
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)}
*/
public Builder() {
// empty implementation
@@ -236,7 +236,7 @@
/**
* Sets the property where the results should be sorted against. Defaults to
- * {@link RcsEventQueryParameters.SortingProperty#SORT_BY_CREATION_ORDER}
+ * {@link RcsEventQueryParams.SortingProperty#SORT_BY_CREATION_ORDER}
*
* @param sortingProperty against which property the results should be sorted
* @return The same instance of the builder to chain parameters.
@@ -273,18 +273,18 @@
}
/**
- * Builds the {@link RcsEventQueryParameters} to use in
- * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)}
+ * Builds the {@link RcsEventQueryParams} to use in
+ * {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)}
*
- * @return An instance of {@link RcsEventQueryParameters} to use with the event query.
+ * @return An instance of {@link RcsEventQueryParams} to use with the event query.
*/
- public RcsEventQueryParameters build() {
- return new RcsEventQueryParameters(mEventType, mThreadId, mSortingProperty,
+ public RcsEventQueryParams build() {
+ return new RcsEventQueryParams(mEventType, mThreadId, mSortingProperty,
mIsAscending, mLimit);
}
}
- protected RcsEventQueryParameters(Parcel in) {
+ private RcsEventQueryParams(Parcel in) {
mEventType = in.readInt();
mThreadId = in.readInt();
mSortingProperty = in.readInt();
@@ -292,20 +292,19 @@
mLimit = in.readInt();
}
- public static final Creator<RcsEventQueryParameters> CREATOR =
- new Creator<RcsEventQueryParameters>() {
+ public static final Creator<RcsEventQueryParams> CREATOR =
+ new Creator<RcsEventQueryParams>() {
@Override
- public RcsEventQueryParameters createFromParcel(Parcel in) {
- return new RcsEventQueryParameters(in);
+ public RcsEventQueryParams createFromParcel(Parcel in) {
+ return new RcsEventQueryParams(in);
}
@Override
- public RcsEventQueryParameters[] newArray(int size) {
- return new RcsEventQueryParameters[size];
+ public RcsEventQueryParams[] newArray(int size) {
+ return new RcsEventQueryParams[size];
}
};
-
@Override
public int describeContents() {
return 0;
diff --git a/telephony/java/android/telephony/ims/RcsEventQueryResult.java b/telephony/java/android/telephony/ims/RcsEventQueryResult.java
index 27898ab..f8d57fa 100644
--- a/telephony/java/android/telephony/ims/RcsEventQueryResult.java
+++ b/telephony/java/android/telephony/ims/RcsEventQueryResult.java
@@ -22,13 +22,13 @@
import java.util.List;
/**
- * The result of a {@link RcsMessageStore#getRcsEvents(RcsEventQueryParameters)}
+ * The result of a {@link RcsMessageStore#getRcsEvents(RcsEventQueryParams)}
* call. This class allows getting the token for querying the next batch of events in order to
* prevent handling large amounts of data at once.
*
- * @hide
+ * @hide - TODO: make public
*/
-public class RcsEventQueryResult implements Parcelable {
+public final class RcsEventQueryResult implements Parcelable {
private RcsQueryContinuationToken mContinuationToken;
private List<RcsEvent> mEvents;
@@ -63,7 +63,8 @@
return mEvents;
}
- protected RcsEventQueryResult(Parcel in) {
+ private RcsEventQueryResult(Parcel in) {
+ mContinuationToken = in.readParcelable(RcsQueryContinuationToken.class.getClassLoader());
}
public static final Creator<RcsEventQueryResult> CREATOR = new Creator<RcsEventQueryResult>() {
diff --git a/telephony/java/android/telephony/ims/RcsFileTransferCreationParameters.aidl b/telephony/java/android/telephony/ims/RcsFileTransferCreationParameters.aidl
deleted file mode 100644
index 5fec021..0000000
--- a/telephony/java/android/telephony/ims/RcsFileTransferCreationParameters.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2019, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims;
-
-parcelable RcsFileTransferCreationParameters;
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsFileTransferCreationParams.aidl
similarity index 93%
copy from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
copy to telephony/java/android/telephony/ims/RcsFileTransferCreationParams.aidl
index 52e73ce..1552190 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsFileTransferCreationParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsFileTransferCreationParams;
diff --git a/telephony/java/android/telephony/ims/RcsFileTransferCreationParameters.java b/telephony/java/android/telephony/ims/RcsFileTransferCreationParams.java
similarity index 92%
rename from telephony/java/android/telephony/ims/RcsFileTransferCreationParameters.java
rename to telephony/java/android/telephony/ims/RcsFileTransferCreationParams.java
index bd7cb4b..663def5 100644
--- a/telephony/java/android/telephony/ims/RcsFileTransferCreationParameters.java
+++ b/telephony/java/android/telephony/ims/RcsFileTransferCreationParams.java
@@ -22,12 +22,12 @@
/**
* Pass an instance of this class to
- * {@link RcsMessage#insertFileTransfer(RcsFileTransferCreationParameters)} create an
+ * {@link RcsMessage#insertFileTransfer(RcsFileTransferCreationParams)} create an
* {@link RcsFileTransferPart} and save it into storage.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
-public class RcsFileTransferCreationParameters implements Parcelable {
+public final class RcsFileTransferCreationParams implements Parcelable {
private String mRcsFileTransferSessionId;
private Uri mContentUri;
private String mContentMimeType;
@@ -128,7 +128,7 @@
/**
* @hide
*/
- RcsFileTransferCreationParameters(Builder builder) {
+ RcsFileTransferCreationParams(Builder builder) {
mRcsFileTransferSessionId = builder.mRcsFileTransferSessionId;
mContentUri = builder.mContentUri;
mContentMimeType = builder.mContentMimeType;
@@ -143,7 +143,7 @@
}
/**
- * A builder to create instances of {@link RcsFileTransferCreationParameters}
+ * A builder to create instances of {@link RcsFileTransferCreationParams}
*/
public class Builder {
private String mRcsFileTransferSessionId;
@@ -300,18 +300,18 @@
}
/**
- * Creates an instance of {@link RcsFileTransferCreationParameters} with the given
+ * Creates an instance of {@link RcsFileTransferCreationParams} with the given
* parameters.
*
* @return The same instance of {@link Builder} to chain methods
- * @see RcsMessage#insertFileTransfer(RcsFileTransferCreationParameters)
+ * @see RcsMessage#insertFileTransfer(RcsFileTransferCreationParams)
*/
- public RcsFileTransferCreationParameters build() {
- return new RcsFileTransferCreationParameters(this);
+ public RcsFileTransferCreationParams build() {
+ return new RcsFileTransferCreationParams(this);
}
}
- protected RcsFileTransferCreationParameters(Parcel in) {
+ private RcsFileTransferCreationParams(Parcel in) {
mRcsFileTransferSessionId = in.readString();
mContentUri = in.readParcelable(Uri.class.getClassLoader());
mContentMimeType = in.readString();
@@ -325,16 +325,16 @@
mFileTransferStatus = in.readInt();
}
- public static final Creator<RcsFileTransferCreationParameters> CREATOR =
- new Creator<RcsFileTransferCreationParameters>() {
+ public static final Creator<RcsFileTransferCreationParams> CREATOR =
+ new Creator<RcsFileTransferCreationParams>() {
@Override
- public RcsFileTransferCreationParameters createFromParcel(Parcel in) {
- return new RcsFileTransferCreationParameters(in);
+ public RcsFileTransferCreationParams createFromParcel(Parcel in) {
+ return new RcsFileTransferCreationParams(in);
}
@Override
- public RcsFileTransferCreationParameters[] newArray(int size) {
- return new RcsFileTransferCreationParameters[size];
+ public RcsFileTransferCreationParams[] newArray(int size) {
+ return new RcsFileTransferCreationParams[size];
}
};
diff --git a/telephony/java/android/telephony/ims/RcsFileTransferPart.java b/telephony/java/android/telephony/ims/RcsFileTransferPart.java
index 2eadc4a..1ce7999 100644
--- a/telephony/java/android/telephony/ims/RcsFileTransferPart.java
+++ b/telephony/java/android/telephony/ims/RcsFileTransferPart.java
@@ -27,7 +27,7 @@
* A part of a composite {@link RcsMessage} that holds a file transfer. Please see Section 7
* (File Transfer) - GSMA RCC.71 (RCS Universal Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public class RcsFileTransferPart {
/**
diff --git a/telephony/java/android/telephony/ims/RcsGroupThread.java b/telephony/java/android/telephony/ims/RcsGroupThread.java
index 6f6258e..2c42494 100644
--- a/telephony/java/android/telephony/ims/RcsGroupThread.java
+++ b/telephony/java/android/telephony/ims/RcsGroupThread.java
@@ -30,7 +30,7 @@
* or leave. Please see Section 6 (Group Chat) - GSMA RCC.71 (RCS Universal Profile Service
* Definition Document)
*
- * @hide - TODO(sahinc) make this public
+ * @hide - TODO: make public
*/
public class RcsGroupThread extends RcsThread {
/**
@@ -166,8 +166,8 @@
@WorkerThread
@NonNull
public Set<RcsParticipant> getParticipants() throws RcsMessageStoreException {
- RcsParticipantQueryParameters queryParameters =
- new RcsParticipantQueryParameters.Builder().setThread(this).build();
+ RcsParticipantQueryParams queryParameters =
+ new RcsParticipantQueryParams.Builder().setThread(this).build();
RcsParticipantQueryResult queryResult = RcsControllerCall.call(
iRcs -> iRcs.getParticipants(queryParameters));
diff --git a/telephony/java/android/telephony/ims/RcsGroupThreadEvent.java b/telephony/java/android/telephony/ims/RcsGroupThreadEvent.java
index a18437b..bc61877 100644
--- a/telephony/java/android/telephony/ims/RcsGroupThreadEvent.java
+++ b/telephony/java/android/telephony/ims/RcsGroupThreadEvent.java
@@ -21,7 +21,7 @@
/**
* An event that happened on an {@link RcsGroupThread}.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public abstract class RcsGroupThreadEvent extends RcsEvent {
private final int mRcsGroupThreadId;
@@ -50,13 +50,18 @@
return new RcsParticipant(mOriginatingParticipantId);
}
+ /**
+ * @hide
+ */
RcsGroupThreadEvent(Parcel in) {
super(in);
mRcsGroupThreadId = in.readInt();
mOriginatingParticipantId = in.readInt();
}
- @Override
+ /**
+ * @hide
+ */
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(mRcsGroupThreadId);
diff --git a/telephony/java/android/telephony/ims/RcsGroupThreadIconChangedEvent.java b/telephony/java/android/telephony/ims/RcsGroupThreadIconChangedEvent.java
index 7beed3b..74af973 100644
--- a/telephony/java/android/telephony/ims/RcsGroupThreadIconChangedEvent.java
+++ b/telephony/java/android/telephony/ims/RcsGroupThreadIconChangedEvent.java
@@ -19,14 +19,16 @@
import android.annotation.Nullable;
import android.net.Uri;
import android.os.Parcel;
+import android.os.Parcelable;
/**
* An event that indicates an {@link RcsGroupThread}'s icon was changed. Please see R6-2-5 - GSMA
* RCC.71 (RCS Universal Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
-public class RcsGroupThreadIconChangedEvent extends RcsGroupThreadEvent {
+public final class RcsGroupThreadIconChangedEvent extends RcsGroupThreadEvent implements
+ Parcelable {
private final Uri mNewIcon;
/**
@@ -91,7 +93,7 @@
}
};
- protected RcsGroupThreadIconChangedEvent(Parcel in) {
+ private RcsGroupThreadIconChangedEvent(Parcel in) {
super(in);
mNewIcon = in.readParcelable(Uri.class.getClassLoader());
}
diff --git a/telephony/java/android/telephony/ims/RcsGroupThreadNameChangedEvent.java b/telephony/java/android/telephony/ims/RcsGroupThreadNameChangedEvent.java
index 0d2ea4f..06f4d5b 100644
--- a/telephony/java/android/telephony/ims/RcsGroupThreadNameChangedEvent.java
+++ b/telephony/java/android/telephony/ims/RcsGroupThreadNameChangedEvent.java
@@ -18,15 +18,17 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
+import android.os.Parcelable;
/**
* An event that indicates an {@link RcsGroupThread}'s name was changed. Please see R6-2-5 - GSMA
* RCC.71 (RCS Universal Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
-public class RcsGroupThreadNameChangedEvent extends RcsGroupThreadEvent {
- private String mNewName;
+public final class RcsGroupThreadNameChangedEvent extends RcsGroupThreadEvent implements
+ Parcelable {
+ private final String mNewName;
/**
* Creates a new {@link RcsGroupThreadNameChangedEvent}. This event is not persisted into
@@ -89,7 +91,7 @@
}
};
- protected RcsGroupThreadNameChangedEvent(Parcel in) {
+ private RcsGroupThreadNameChangedEvent(Parcel in) {
super(in);
mNewName = in.readString();
}
diff --git a/telephony/java/android/telephony/ims/RcsGroupThreadParticipantJoinedEvent.java b/telephony/java/android/telephony/ims/RcsGroupThreadParticipantJoinedEvent.java
index 2adafc7..4932707 100644
--- a/telephony/java/android/telephony/ims/RcsGroupThreadParticipantJoinedEvent.java
+++ b/telephony/java/android/telephony/ims/RcsGroupThreadParticipantJoinedEvent.java
@@ -17,15 +17,17 @@
import android.annotation.NonNull;
import android.os.Parcel;
+import android.os.Parcelable;
/**
* An event that indicates an RCS participant has joined an {@link RcsThread}. Please see US6-3 -
* GSMA RCC.71 (RCS Universal Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
-public class RcsGroupThreadParticipantJoinedEvent extends RcsGroupThreadEvent {
- private int mJoinedParticipantId;
+public final class RcsGroupThreadParticipantJoinedEvent extends RcsGroupThreadEvent implements
+ Parcelable {
+ private final int mJoinedParticipantId;
/**
* Creates a new {@link RcsGroupThreadParticipantJoinedEvent}. This event is not persisted into
@@ -89,7 +91,7 @@
}
};
- protected RcsGroupThreadParticipantJoinedEvent(Parcel in) {
+ private RcsGroupThreadParticipantJoinedEvent(Parcel in) {
super(in);
mJoinedParticipantId = in.readInt();
}
diff --git a/telephony/java/android/telephony/ims/RcsGroupThreadParticipantLeftEvent.java b/telephony/java/android/telephony/ims/RcsGroupThreadParticipantLeftEvent.java
index 87c1852..970a046 100644
--- a/telephony/java/android/telephony/ims/RcsGroupThreadParticipantLeftEvent.java
+++ b/telephony/java/android/telephony/ims/RcsGroupThreadParticipantLeftEvent.java
@@ -17,15 +17,17 @@
import android.annotation.NonNull;
import android.os.Parcel;
+import android.os.Parcelable;
/**
* An event that indicates an RCS participant has left an {@link RcsThread}. Please see US6-23 -
* GSMA RCC.71 (RCS Universal Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
-public class RcsGroupThreadParticipantLeftEvent extends RcsGroupThreadEvent {
- private int mLeavingParticipantId;
+public final class RcsGroupThreadParticipantLeftEvent extends RcsGroupThreadEvent implements
+ Parcelable {
+ private final int mLeavingParticipantId;
/**
* Creates a new {@link RcsGroupThreadParticipantLeftEvent}. his event is not persisted into
@@ -88,7 +90,7 @@
}
};
- protected RcsGroupThreadParticipantLeftEvent(Parcel in) {
+ private RcsGroupThreadParticipantLeftEvent(Parcel in) {
super(in);
mLeavingParticipantId = in.readInt();
}
diff --git a/telephony/java/android/telephony/ims/RcsIncomingMessage.java b/telephony/java/android/telephony/ims/RcsIncomingMessage.java
index 2ea115b..f3b7815 100644
--- a/telephony/java/android/telephony/ims/RcsIncomingMessage.java
+++ b/telephony/java/android/telephony/ims/RcsIncomingMessage.java
@@ -20,7 +20,7 @@
/**
* This is a single instance of a message received over RCS.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public class RcsIncomingMessage extends RcsMessage {
/**
diff --git a/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParameters.aidl b/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParameters.aidl
deleted file mode 100644
index 76073c2..0000000
--- a/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParameters.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2019, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims;
-
-parcelable RcsIncomingMessageCreationParameters;
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParams.aidl
similarity index 93%
copy from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
copy to telephony/java/android/telephony/ims/RcsIncomingMessageCreationParams.aidl
index 52e73ce..1f1d4f6 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsIncomingMessageCreationParams;
diff --git a/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParameters.java b/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParams.java
similarity index 81%
rename from telephony/java/android/telephony/ims/RcsIncomingMessageCreationParameters.java
rename to telephony/java/android/telephony/ims/RcsIncomingMessageCreationParams.java
index acde8af..64b2339 100644
--- a/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParameters.java
+++ b/telephony/java/android/telephony/ims/RcsIncomingMessageCreationParams.java
@@ -21,13 +21,13 @@
import android.os.Parcelable;
/**
- * {@link RcsIncomingMessageCreationParameters} is a collection of parameters that should be passed
- * into {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParameters)} to generate an
+ * {@link RcsIncomingMessageCreationParams} is a collection of parameters that should be passed
+ * into {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParams)} to generate an
* {@link RcsIncomingMessage} on that {@link RcsThread}
*
- * @hide TODO:make public
+ * @hide - TODO: make public
*/
-public class RcsIncomingMessageCreationParameters extends RcsMessageCreationParameters implements
+public final class RcsIncomingMessageCreationParams extends RcsMessageCreationParams implements
Parcelable {
// The arrival timestamp for the RcsIncomingMessage to be created
private final long mArrivalTimestamp;
@@ -37,18 +37,18 @@
private final int mSenderParticipantId;
/**
- * Builder to help create an {@link RcsIncomingMessageCreationParameters}
+ * Builder to help create an {@link RcsIncomingMessageCreationParams}
*
- * @see RcsThread#addIncomingMessage(RcsIncomingMessageCreationParameters)
+ * @see RcsThread#addIncomingMessage(RcsIncomingMessageCreationParams)
*/
- public static class Builder extends RcsMessageCreationParameters.Builder {
+ public static class Builder extends RcsMessageCreationParams.Builder {
private RcsParticipant mSenderParticipant;
private long mArrivalTimestamp;
private long mSeenTimestamp;
/**
* Creates a {@link Builder} to create an instance of
- * {@link RcsIncomingMessageCreationParameters}
+ * {@link RcsIncomingMessageCreationParams}
*
* @param originationTimestamp The timestamp of {@link RcsMessage} creation. The origination
* timestamp value in milliseconds passed after midnight,
@@ -103,22 +103,22 @@
/**
* Creates parameters for creating a new incoming message.
- * @return A new instance of {@link RcsIncomingMessageCreationParameters} to create a new
+ * @return A new instance of {@link RcsIncomingMessageCreationParams} to create a new
* {@link RcsIncomingMessage}
*/
- public RcsIncomingMessageCreationParameters build() {
- return new RcsIncomingMessageCreationParameters(this);
+ public RcsIncomingMessageCreationParams build() {
+ return new RcsIncomingMessageCreationParams(this);
}
}
- private RcsIncomingMessageCreationParameters(Builder builder) {
+ private RcsIncomingMessageCreationParams(Builder builder) {
super(builder);
mArrivalTimestamp = builder.mArrivalTimestamp;
mSeenTimestamp = builder.mSeenTimestamp;
mSenderParticipantId = builder.mSenderParticipant.getId();
}
- protected RcsIncomingMessageCreationParameters(Parcel in) {
+ private RcsIncomingMessageCreationParams(Parcel in) {
super(in);
mArrivalTimestamp = in.readLong();
mSeenTimestamp = in.readLong();
@@ -152,16 +152,16 @@
return mSenderParticipantId;
}
- public static final Creator<RcsIncomingMessageCreationParameters> CREATOR =
- new Creator<RcsIncomingMessageCreationParameters>() {
+ public static final Creator<RcsIncomingMessageCreationParams> CREATOR =
+ new Creator<RcsIncomingMessageCreationParams>() {
@Override
- public RcsIncomingMessageCreationParameters createFromParcel(Parcel in) {
- return new RcsIncomingMessageCreationParameters(in);
+ public RcsIncomingMessageCreationParams createFromParcel(Parcel in) {
+ return new RcsIncomingMessageCreationParams(in);
}
@Override
- public RcsIncomingMessageCreationParameters[] newArray(int size) {
- return new RcsIncomingMessageCreationParameters[size];
+ public RcsIncomingMessageCreationParams[] newArray(int size) {
+ return new RcsIncomingMessageCreationParams[size];
}
};
@@ -172,7 +172,7 @@
@Override
public void writeToParcel(Parcel dest, int flags) {
- super.writeToParcel(dest, flags);
+ super.writeToParcel(dest);
dest.writeLong(mArrivalTimestamp);
dest.writeLong(mSeenTimestamp);
dest.writeInt(mSenderParticipantId);
diff --git a/telephony/java/android/telephony/ims/RcsManager.java b/telephony/java/android/telephony/ims/RcsManager.java
index e84d4ed..90bd044 100644
--- a/telephony/java/android/telephony/ims/RcsManager.java
+++ b/telephony/java/android/telephony/ims/RcsManager.java
@@ -20,11 +20,19 @@
/**
* The manager class for RCS related utilities.
- * @hide
+ *
+ * @hide - TODO: make public
*/
@SystemService(Context.TELEPHONY_RCS_SERVICE)
public class RcsManager {
+ /**
+ * @hide
+ */
+ public RcsManager() {
+ // empty constructor
+ }
+
private static final RcsMessageStore sRcsMessageStoreInstance = new RcsMessageStore();
/**
diff --git a/telephony/java/android/telephony/ims/RcsMessage.java b/telephony/java/android/telephony/ims/RcsMessage.java
index b70a9a7..1700941 100644
--- a/telephony/java/android/telephony/ims/RcsMessage.java
+++ b/telephony/java/android/telephony/ims/RcsMessage.java
@@ -28,7 +28,7 @@
/**
* This is a single instance of a message sent or received over RCS.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public abstract class RcsMessage {
/**
@@ -83,7 +83,10 @@
*/
public static final int SEEN = 9;
- protected int mId;
+ /**
+ * @hide
+ */
+ protected final int mId;
@IntDef({
DRAFT, QUEUED, SENDING, SENT, RETRYING, FAILED, RECEIVED, SEEN
@@ -277,7 +280,7 @@
@NonNull
@WorkerThread
public RcsFileTransferPart insertFileTransfer(
- RcsFileTransferCreationParameters fileTransferCreationParameters)
+ RcsFileTransferCreationParams fileTransferCreationParameters)
throws RcsMessageStoreException {
return new RcsFileTransferPart(RcsControllerCall.call(
iRcs -> iRcs.storeFileTransfer(mId, isIncoming(), fileTransferCreationParameters)));
diff --git a/telephony/java/android/telephony/ims/RcsMessageCreationParameters.aidl b/telephony/java/android/telephony/ims/RcsMessageCreationParameters.aidl
deleted file mode 100644
index 5774d00..0000000
--- a/telephony/java/android/telephony/ims/RcsMessageCreationParameters.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2019, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims;
-
-parcelable RcsMessageCreationParameters;
diff --git a/telephony/java/android/telephony/ims/RcsMessageCreationParameters.java b/telephony/java/android/telephony/ims/RcsMessageCreationParams.java
similarity index 80%
rename from telephony/java/android/telephony/ims/RcsMessageCreationParameters.java
rename to telephony/java/android/telephony/ims/RcsMessageCreationParams.java
index ff3f33e..9ac4dcd 100644
--- a/telephony/java/android/telephony/ims/RcsMessageCreationParameters.java
+++ b/telephony/java/android/telephony/ims/RcsMessageCreationParams.java
@@ -21,18 +21,16 @@
import android.annotation.CheckResult;
import android.annotation.Nullable;
import android.os.Parcel;
-import android.os.Parcelable;
-import android.telephony.SubscriptionInfo;
/**
* The collection of parameters to be passed into
- * {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParameters)} and
- * {@link RcsThread#addOutgoingMessage(RcsMessageCreationParameters)} to create and persist
+ * {@link RcsThread#addIncomingMessage(RcsIncomingMessageCreationParams)} and
+ * {@link RcsThread#addOutgoingMessage(RcsOutgoingMessageCreationParams)} to create and persist
* {@link RcsMessage}s on an {@link RcsThread}
*
- * @hide TODO - make public
+ * @hide - TODO: make public
*/
-public class RcsMessageCreationParameters implements Parcelable {
+public class RcsMessageCreationParams {
// The globally unique id of the RcsMessage to be created.
private final String mRcsMessageGlobalId;
@@ -110,7 +108,7 @@
/**
* The base builder for creating {@link RcsMessage}s on {@link RcsThread}s.
*
- * @see RcsIncomingMessageCreationParameters
+ * @see RcsIncomingMessageCreationParams
*/
public static class Builder {
private String mRcsMessageGlobalId;
@@ -122,15 +120,7 @@
private double mLongitude = LOCATION_NOT_SET;
/**
- * Creates a new {@link Builder} to create an instance of
- * {@link RcsMessageCreationParameters}.
- *
- * @param originationTimestamp The timestamp of {@link RcsMessage} creation. The origination
- * timestamp value in milliseconds passed after midnight,
- * January 1, 1970 UTC
- * @param subscriptionId The subscription ID that was used to send or receive this
- * {@link RcsMessage}
- * @see SubscriptionInfo#getSubscriptionId()
+ * @hide
*/
public Builder(long originationTimestamp, int subscriptionId) {
mOriginationTimestamp = originationTimestamp;
@@ -207,14 +197,14 @@
}
/**
- * @hide
+ * @return Builds and returns a newly created {@link RcsMessageCreationParams}
*/
- public RcsMessageCreationParameters build() {
- return new RcsMessageCreationParameters(this);
+ public RcsMessageCreationParams build() {
+ return new RcsMessageCreationParams(this);
}
}
- protected RcsMessageCreationParameters(Builder builder) {
+ protected RcsMessageCreationParams(Builder builder) {
mRcsMessageGlobalId = builder.mRcsMessageGlobalId;
mSubId = builder.mSubId;
mMessageStatus = builder.mMessageStatus;
@@ -224,7 +214,10 @@
mLongitude = builder.mLongitude;
}
- protected RcsMessageCreationParameters(Parcel in) {
+ /**
+ * @hide
+ */
+ RcsMessageCreationParams(Parcel in) {
mRcsMessageGlobalId = in.readString();
mSubId = in.readInt();
mMessageStatus = in.readInt();
@@ -234,26 +227,10 @@
mLongitude = in.readDouble();
}
- public static final Creator<RcsMessageCreationParameters> CREATOR =
- new Creator<RcsMessageCreationParameters>() {
- @Override
- public RcsMessageCreationParameters createFromParcel(Parcel in) {
- return new RcsMessageCreationParameters(in);
- }
-
- @Override
- public RcsMessageCreationParameters[] newArray(int size) {
- return new RcsMessageCreationParameters[size];
- }
- };
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
+ /**
+ * @hide
+ */
+ public void writeToParcel(Parcel dest) {
dest.writeString(mRcsMessageGlobalId);
dest.writeInt(mSubId);
dest.writeInt(mMessageStatus);
diff --git a/telephony/java/android/telephony/ims/RcsMessageQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsMessageQueryParameters.aidl
deleted file mode 100644
index c325c23..0000000
--- a/telephony/java/android/telephony/ims/RcsMessageQueryParameters.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2019, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims;
-
-parcelable RcsMessageQueryParameters;
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsMessageQueryParams.aidl
similarity index 94%
rename from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
rename to telephony/java/android/telephony/ims/RcsMessageQueryParams.aidl
index 52e73ce..e9cbd9c 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsMessageQueryParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsMessageQueryParams;
diff --git a/telephony/java/android/telephony/ims/RcsMessageQueryParameters.java b/telephony/java/android/telephony/ims/RcsMessageQueryParams.java
similarity index 86%
rename from telephony/java/android/telephony/ims/RcsMessageQueryParameters.java
rename to telephony/java/android/telephony/ims/RcsMessageQueryParams.java
index c964cf9..fae0d97 100644
--- a/telephony/java/android/telephony/ims/RcsMessageQueryParameters.java
+++ b/telephony/java/android/telephony/ims/RcsMessageQueryParams.java
@@ -29,12 +29,12 @@
/**
* The parameters to pass into
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} in order to select a
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} in order to select a
* subset of {@link RcsMessage}s present in the message store.
*
- * @hide TODO - make the Builder and builder() public. The rest should stay internal only.
+ * @hide - TODO: make public
*/
-public class RcsMessageQueryParameters implements Parcelable {
+public final class RcsMessageQueryParams implements Parcelable {
/**
* @hide - not meant for public use
*/
@@ -60,28 +60,28 @@
/**
* Bitmask flag to be used with {@link Builder#setMessageType(int)} to make
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return
* {@link RcsIncomingMessage}s.
*/
public static final int MESSAGE_TYPE_INCOMING = 0x0001;
/**
* Bitmask flag to be used with {@link Builder#setMessageType(int)} to make
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return
* {@link RcsOutgoingMessage}s.
*/
public static final int MESSAGE_TYPE_OUTGOING = 0x0002;
/**
* Bitmask flag to be used with {@link Builder#setFileTransferPresence(int)} to make
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return {@link RcsMessage}s
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return {@link RcsMessage}s
* that have an {@link RcsFileTransferPart} attached.
*/
public static final int MESSAGES_WITH_FILE_TRANSFERS = 0x0004;
/**
* Bitmask flag to be used with {@link Builder#setFileTransferPresence(int)} to make
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)} return {@link RcsMessage}s
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)} return {@link RcsMessage}s
* that don't have an {@link RcsFileTransferPart} attached.
*/
public static final int MESSAGES_WITHOUT_FILE_TRANSFERS = 0x0008;
@@ -106,7 +106,7 @@
// The thread that the results should be limited to
private int mThreadId;
- RcsMessageQueryParameters(int messageType, int fileTransferPresence, String messageLike,
+ RcsMessageQueryParams(int messageType, int fileTransferPresence, String messageLike,
int threadId, @SortingProperty int sortingProperty, boolean isAscending, int limit) {
mMessageType = messageType;
mFileTransferPresence = fileTransferPresence;
@@ -118,7 +118,7 @@
}
/**
- * @return Returns the type of {@link RcsMessage}s that this {@link RcsMessageQueryParameters}
+ * @return Returns the type of {@link RcsMessage}s that this {@link RcsMessageQueryParams}
* is set to query for.
*/
public int getMessageType() {
@@ -177,7 +177,7 @@
}
/**
- * A helper class to build the {@link RcsMessageQueryParameters}.
+ * A helper class to build the {@link RcsMessageQueryParams}.
*/
public static class Builder {
private @SortingProperty int mSortingProperty;
@@ -189,8 +189,8 @@
private int mThreadId = THREAD_ID_NOT_SET;
/**
- * Creates a new builder for {@link RcsMessageQueryParameters} to be used in
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
+ * Creates a new builder for {@link RcsMessageQueryParams} to be used in
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
*
*/
public Builder() {
@@ -221,8 +221,8 @@
*
* @param messageType The type of message to be returned.
* @return The same instance of the builder to chain parameters.
- * @see RcsMessageQueryParameters#MESSAGE_TYPE_INCOMING
- * @see RcsMessageQueryParameters#MESSAGE_TYPE_OUTGOING
+ * @see RcsMessageQueryParams#MESSAGE_TYPE_INCOMING
+ * @see RcsMessageQueryParams#MESSAGE_TYPE_OUTGOING
*/
@CheckResult
public Builder setMessageType(int messageType) {
@@ -235,8 +235,8 @@
*
* @param fileTransferPresence Whether file transfers should be included in the result
* @return The same instance of the builder to chain parameters.
- * @see RcsMessageQueryParameters#MESSAGES_WITH_FILE_TRANSFERS
- * @see RcsMessageQueryParameters#MESSAGES_WITHOUT_FILE_TRANSFERS
+ * @see RcsMessageQueryParams#MESSAGES_WITH_FILE_TRANSFERS
+ * @see RcsMessageQueryParams#MESSAGES_WITHOUT_FILE_TRANSFERS
*/
@CheckResult
public Builder setFileTransferPresence(int fileTransferPresence) {
@@ -264,7 +264,7 @@
/**
* Sets the property where the results should be sorted against. Defaults to
- * {@link RcsMessageQueryParameters.SortingProperty#SORT_BY_CREATION_ORDER}
+ * {@link RcsMessageQueryParams.SortingProperty#SORT_BY_CREATION_ORDER}
*
* @param sortingProperty against which property the results should be sorted
* @return The same instance of the builder to chain parameters.
@@ -305,14 +305,14 @@
}
/**
- * Builds the {@link RcsMessageQueryParameters} to use in
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
+ * Builds the {@link RcsMessageQueryParams} to use in
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
*
- * @return An instance of {@link RcsMessageQueryParameters} to use with the message
+ * @return An instance of {@link RcsMessageQueryParams} to use with the message
* query.
*/
- public RcsMessageQueryParameters build() {
- return new RcsMessageQueryParameters(mMessageType, mFileTransferPresence, mMessageLike,
+ public RcsMessageQueryParams build() {
+ return new RcsMessageQueryParams(mMessageType, mFileTransferPresence, mMessageLike,
mThreadId, mSortingProperty, mIsAscending, mLimit);
}
}
@@ -320,7 +320,7 @@
/**
* Parcelable boilerplate below.
*/
- protected RcsMessageQueryParameters(Parcel in) {
+ private RcsMessageQueryParams(Parcel in) {
mMessageType = in.readInt();
mFileTransferPresence = in.readInt();
mMessageLike = in.readString();
@@ -330,16 +330,16 @@
mThreadId = in.readInt();
}
- public static final Creator<RcsMessageQueryParameters> CREATOR =
- new Creator<RcsMessageQueryParameters>() {
+ public static final Creator<RcsMessageQueryParams> CREATOR =
+ new Creator<RcsMessageQueryParams>() {
@Override
- public RcsMessageQueryParameters createFromParcel(Parcel in) {
- return new RcsMessageQueryParameters(in);
+ public RcsMessageQueryParams createFromParcel(Parcel in) {
+ return new RcsMessageQueryParams(in);
}
@Override
- public RcsMessageQueryParameters[] newArray(int size) {
- return new RcsMessageQueryParameters[size];
+ public RcsMessageQueryParams[] newArray(int size) {
+ return new RcsMessageQueryParams[size];
}
};
diff --git a/telephony/java/android/telephony/ims/RcsMessageQueryResult.java b/telephony/java/android/telephony/ims/RcsMessageQueryResult.java
index c3846fd..5adab76 100644
--- a/telephony/java/android/telephony/ims/RcsMessageQueryResult.java
+++ b/telephony/java/android/telephony/ims/RcsMessageQueryResult.java
@@ -29,13 +29,13 @@
import java.util.List;
/**
- * The result of a {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
+ * The result of a {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
* call. This class allows getting the token for querying the next batch of messages in order to
* prevent handling large amounts of data at once.
*
- * @hide
+ * @hide - TODO: make public
*/
-public class RcsMessageQueryResult implements Parcelable {
+public final class RcsMessageQueryResult implements Parcelable {
// The token to continue the query to get the next batch of results
private RcsQueryContinuationToken mContinuationToken;
// The message type and message ID pairs for all the messages in this query result
@@ -83,7 +83,7 @@
return messages;
}
- protected RcsMessageQueryResult(Parcel in) {
+ private RcsMessageQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(
RcsQueryContinuationToken.class.getClassLoader());
in.readTypedList(mMessageTypeIdPairs, RcsTypeIdPair.CREATOR);
diff --git a/telephony/java/android/telephony/ims/RcsMessageSnippet.java b/telephony/java/android/telephony/ims/RcsMessageSnippet.java
index 9399c20..565bb99 100644
--- a/telephony/java/android/telephony/ims/RcsMessageSnippet.java
+++ b/telephony/java/android/telephony/ims/RcsMessageSnippet.java
@@ -24,9 +24,9 @@
/**
* An immutable summary of the latest {@link RcsMessage} on an {@link RcsThread}
*
- * @hide TODO: make public
+ * @hide - TODO: make public
*/
-public class RcsMessageSnippet implements Parcelable {
+public final class RcsMessageSnippet implements Parcelable {
private final String mText;
private final @RcsMessageStatus int mStatus;
private final long mTimestamp;
@@ -65,7 +65,7 @@
return mTimestamp;
}
- protected RcsMessageSnippet(Parcel in) {
+ private RcsMessageSnippet(Parcel in) {
mText = in.readString();
mStatus = in.readInt();
mTimestamp = in.readLong();
diff --git a/telephony/java/android/telephony/ims/RcsMessageStore.java b/telephony/java/android/telephony/ims/RcsMessageStore.java
index c8c36a8..eca5ed5 100644
--- a/telephony/java/android/telephony/ims/RcsMessageStore.java
+++ b/telephony/java/android/telephony/ims/RcsMessageStore.java
@@ -27,7 +27,7 @@
* RcsMessageStore is the application interface to RcsProvider and provides access methods to
* RCS related database tables.
*
- * @hide - TODO make this public
+ * @hide - TODO: make public
*/
public class RcsMessageStore {
/**
@@ -39,7 +39,7 @@
*/
@WorkerThread
@NonNull
- public RcsThreadQueryResult getRcsThreads(@Nullable RcsThreadQueryParameters queryParameters)
+ public RcsThreadQueryResult getRcsThreads(@Nullable RcsThreadQueryParams queryParameters)
throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getRcsThreads(queryParameters));
}
@@ -68,7 +68,7 @@
@WorkerThread
@NonNull
public RcsParticipantQueryResult getRcsParticipants(
- @Nullable RcsParticipantQueryParameters queryParameters)
+ @Nullable RcsParticipantQueryParams queryParameters)
throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getParticipants(queryParameters));
}
@@ -99,7 +99,7 @@
@WorkerThread
@NonNull
public RcsMessageQueryResult getRcsMessages(
- @Nullable RcsMessageQueryParameters queryParameters) throws RcsMessageStoreException {
+ @Nullable RcsMessageQueryParams queryParameters) throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getMessages(queryParameters));
}
@@ -127,7 +127,7 @@
@WorkerThread
@NonNull
public RcsEventQueryResult getRcsEvents(
- @Nullable RcsEventQueryParameters queryParameters) throws RcsMessageStoreException {
+ @Nullable RcsEventQueryParams queryParameters) throws RcsMessageStoreException {
return RcsControllerCall.call(iRcs -> iRcs.getEvents(queryParameters));
}
diff --git a/telephony/java/android/telephony/ims/RcsMessageStoreException.java b/telephony/java/android/telephony/ims/RcsMessageStoreException.java
index e158f1a..7c00749 100644
--- a/telephony/java/android/telephony/ims/RcsMessageStoreException.java
+++ b/telephony/java/android/telephony/ims/RcsMessageStoreException.java
@@ -20,7 +20,7 @@
* An exception that happened on {@link RcsMessageStore} or one of the derived storage classes in
* {@link android.telephony.ims}
*
- * @hide TODO: make public
+ * @hide - TODO: make public
*/
public class RcsMessageStoreException extends Exception {
diff --git a/telephony/java/android/telephony/ims/RcsOutgoingMessage.java b/telephony/java/android/telephony/ims/RcsOutgoingMessage.java
index 0bd55ec..dfcdee4 100644
--- a/telephony/java/android/telephony/ims/RcsOutgoingMessage.java
+++ b/telephony/java/android/telephony/ims/RcsOutgoingMessage.java
@@ -24,7 +24,7 @@
/**
* This is a single instance of a message sent over RCS.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public class RcsOutgoingMessage extends RcsMessage {
RcsOutgoingMessage(int id) {
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsOutgoingMessageCreationParams.aidl
similarity index 93%
copy from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
copy to telephony/java/android/telephony/ims/RcsOutgoingMessageCreationParams.aidl
index 52e73ce..0c38d9f 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsOutgoingMessageCreationParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsOutgoingMessageCreationParams;
diff --git a/telephony/java/android/telephony/ims/RcsOutgoingMessageCreationParams.java b/telephony/java/android/telephony/ims/RcsOutgoingMessageCreationParams.java
new file mode 100644
index 0000000..ca466e8
--- /dev/null
+++ b/telephony/java/android/telephony/ims/RcsOutgoingMessageCreationParams.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.ims;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * {@link RcsOutgoingMessageCreationParams} is a collection of parameters that should be passed
+ * into {@link RcsThread#addOutgoingMessage(RcsOutgoingMessageCreationParams)} to generate an
+ * {@link RcsOutgoingMessage} on that {@link RcsThread}
+ *
+ * @hide - TODO: make public
+ */
+public final class RcsOutgoingMessageCreationParams extends RcsMessageCreationParams
+ implements Parcelable {
+ /**
+ * A builder to instantiate and persist an {@link RcsOutgoingMessage}
+ */
+ public static class Builder extends RcsMessageCreationParams.Builder {
+
+ /**
+ * Creates a new {@link Builder} to create an instance of
+ * {@link RcsOutgoingMessageCreationParams}.
+ *
+ * @param originationTimestamp The timestamp of {@link RcsMessage} creation. The origination
+ * timestamp value in milliseconds passed after midnight,
+ * January 1, 1970 UTC
+ * @param subscriptionId The subscription ID that was used to send or receive this
+ * {@link RcsMessage}
+ * @see android.telephony.SubscriptionInfo#getSubscriptionId()
+ */
+ public Builder(long originationTimestamp, int subscriptionId) {
+ super(originationTimestamp, subscriptionId);
+ }
+
+ /**
+ * Creates configuration parameters for a new message.
+ */
+ public RcsOutgoingMessageCreationParams build() {
+ return new RcsOutgoingMessageCreationParams(this);
+ }
+ }
+
+ private RcsOutgoingMessageCreationParams(Builder builder) {
+ super(builder);
+ }
+
+ private RcsOutgoingMessageCreationParams(Parcel in) {
+ super(in);
+ }
+
+ public static final Creator<RcsOutgoingMessageCreationParams> CREATOR =
+ new Creator<RcsOutgoingMessageCreationParams>() {
+ @Override
+ public RcsOutgoingMessageCreationParams createFromParcel(Parcel in) {
+ return new RcsOutgoingMessageCreationParams(in);
+ }
+
+ @Override
+ public RcsOutgoingMessageCreationParams[] newArray(int size) {
+ return new RcsOutgoingMessageCreationParams[size];
+ }
+ };
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ super.writeToParcel(dest);
+ }
+}
diff --git a/telephony/java/android/telephony/ims/RcsOutgoingMessageDelivery.java b/telephony/java/android/telephony/ims/RcsOutgoingMessageDelivery.java
index b93f892..5a3062a 100644
--- a/telephony/java/android/telephony/ims/RcsOutgoingMessageDelivery.java
+++ b/telephony/java/android/telephony/ims/RcsOutgoingMessageDelivery.java
@@ -22,7 +22,7 @@
* This class holds the delivery information of an {@link RcsOutgoingMessage} for each
* {@link RcsParticipant} that the message was intended for.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public class RcsOutgoingMessageDelivery {
// The participant that this delivery is intended for
diff --git a/telephony/java/android/telephony/ims/RcsParticipant.java b/telephony/java/android/telephony/ims/RcsParticipant.java
index ce0ad2c..37b827b 100644
--- a/telephony/java/android/telephony/ims/RcsParticipant.java
+++ b/telephony/java/android/telephony/ims/RcsParticipant.java
@@ -21,7 +21,7 @@
/**
* RcsParticipant is an RCS capable contact that can participate in {@link RcsThread}s.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public class RcsParticipant {
// The row ID of this participant in the database
diff --git a/telephony/java/android/telephony/ims/RcsParticipantAliasChangedEvent.java b/telephony/java/android/telephony/ims/RcsParticipantAliasChangedEvent.java
index 04cdf86..aa278b3 100644
--- a/telephony/java/android/telephony/ims/RcsParticipantAliasChangedEvent.java
+++ b/telephony/java/android/telephony/ims/RcsParticipantAliasChangedEvent.java
@@ -18,18 +18,19 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
+import android.os.Parcelable;
/**
* An event that indicates an {@link RcsParticipant}'s alias was changed. Please see US18-2 - GSMA
* RCC.71 (RCS Universal Profile Service Definition Document)
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
-public class RcsParticipantAliasChangedEvent extends RcsEvent {
+public final class RcsParticipantAliasChangedEvent extends RcsEvent implements Parcelable {
// The ID of the participant that changed their alias
- private int mParticipantId;
+ private final int mParticipantId;
// The new alias of the above participant
- private String mNewAlias;
+ private final String mNewAlias;
/**
* Creates a new {@link RcsParticipantAliasChangedEvent}. This event is not persisted into
@@ -98,7 +99,7 @@
}
};
- protected RcsParticipantAliasChangedEvent(Parcel in) {
+ private RcsParticipantAliasChangedEvent(Parcel in) {
super(in);
mNewAlias = in.readString();
mParticipantId = in.readInt();
diff --git a/telephony/java/android/telephony/ims/RcsParticipantQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsParticipantQueryParameters.aidl
deleted file mode 100644
index ea8288c..0000000
--- a/telephony/java/android/telephony/ims/RcsParticipantQueryParameters.aidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * Copyright 2019, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telephony.ims;
-
-parcelable RcsParticipantQueryParameters;
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsParticipantQueryParams.aidl
similarity index 94%
copy from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
copy to telephony/java/android/telephony/ims/RcsParticipantQueryParams.aidl
index 52e73ce..b7c0f93 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsParticipantQueryParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsParticipantQueryParams;
diff --git a/telephony/java/android/telephony/ims/RcsParticipantQueryParameters.java b/telephony/java/android/telephony/ims/RcsParticipantQueryParams.java
similarity index 89%
rename from telephony/java/android/telephony/ims/RcsParticipantQueryParameters.java
rename to telephony/java/android/telephony/ims/RcsParticipantQueryParams.java
index 3611fc1..57c67fa 100644
--- a/telephony/java/android/telephony/ims/RcsParticipantQueryParameters.java
+++ b/telephony/java/android/telephony/ims/RcsParticipantQueryParams.java
@@ -28,12 +28,12 @@
/**
* The parameters to pass into
- * {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)} in order to select a
+ * {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)} in order to select a
* subset of {@link RcsThread}s present in the message store.
*
- * @hide TODO - make the Builder and builder() public. The rest should stay internal only.
+ * @hide - TODO: make public
*/
-public class RcsParticipantQueryParameters implements Parcelable {
+public final class RcsParticipantQueryParams implements Parcelable {
/**
* Flag to set with {@link Builder#setSortProperty(int)} to sort the results in the order of
* creation time for faster query results
@@ -75,7 +75,7 @@
*/
public static final String PARTICIPANT_QUERY_PARAMETERS_KEY = "participant_query_parameters";
- RcsParticipantQueryParameters(int rcsThreadId, String aliasLike, String canonicalAddressLike,
+ RcsParticipantQueryParams(int rcsThreadId, String aliasLike, String canonicalAddressLike,
@SortingProperty int sortingProperty, boolean isAscending,
int limit) {
mThreadId = rcsThreadId;
@@ -143,7 +143,7 @@
}
/**
- * A helper class to build the {@link RcsParticipantQueryParameters}.
+ * A helper class to build the {@link RcsParticipantQueryParams}.
*/
public static class Builder {
private String mAliasLike;
@@ -154,8 +154,8 @@
private int mThreadId;
/**
- * Creates a new builder for {@link RcsParticipantQueryParameters} to be used in
- * {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)}
+ * Creates a new builder for {@link RcsParticipantQueryParams} to be used in
+ * {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)}
*/
public Builder() {
// empty implementation
@@ -231,7 +231,7 @@
/**
* Sets the property where the results should be sorted against. Defaults to
- * {@link RcsParticipantQueryParameters.SortingProperty#SORT_BY_CREATION_ORDER}
+ * {@link RcsParticipantQueryParams.SortingProperty#SORT_BY_CREATION_ORDER}
*
* @param sortingProperty against which property the results should be sorted
* @return The same instance of the builder to chain parameters.
@@ -255,14 +255,14 @@
}
/**
- * Builds the {@link RcsParticipantQueryParameters} to use in
- * {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)}
+ * Builds the {@link RcsParticipantQueryParams} to use in
+ * {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)}
*
- * @return An instance of {@link RcsParticipantQueryParameters} to use with the participant
+ * @return An instance of {@link RcsParticipantQueryParams} to use with the participant
* query.
*/
- public RcsParticipantQueryParameters build() {
- return new RcsParticipantQueryParameters(mThreadId, mAliasLike, mCanonicalAddressLike,
+ public RcsParticipantQueryParams build() {
+ return new RcsParticipantQueryParams(mThreadId, mAliasLike, mCanonicalAddressLike,
mSortingProperty, mIsAscending, mLimit);
}
}
@@ -270,7 +270,7 @@
/**
* Parcelable boilerplate below.
*/
- protected RcsParticipantQueryParameters(Parcel in) {
+ private RcsParticipantQueryParams(Parcel in) {
mAliasLike = in.readString();
mCanonicalAddressLike = in.readString();
mSortingProperty = in.readInt();
@@ -279,16 +279,16 @@
mThreadId = in.readInt();
}
- public static final Creator<RcsParticipantQueryParameters> CREATOR =
- new Creator<RcsParticipantQueryParameters>() {
+ public static final Creator<RcsParticipantQueryParams> CREATOR =
+ new Creator<RcsParticipantQueryParams>() {
@Override
- public RcsParticipantQueryParameters createFromParcel(Parcel in) {
- return new RcsParticipantQueryParameters(in);
+ public RcsParticipantQueryParams createFromParcel(Parcel in) {
+ return new RcsParticipantQueryParams(in);
}
@Override
- public RcsParticipantQueryParameters[] newArray(int size) {
- return new RcsParticipantQueryParameters[size];
+ public RcsParticipantQueryParams[] newArray(int size) {
+ return new RcsParticipantQueryParams[size];
}
};
diff --git a/telephony/java/android/telephony/ims/RcsParticipantQueryResult.java b/telephony/java/android/telephony/ims/RcsParticipantQueryResult.java
index 2f4ab46..4eae39d 100644
--- a/telephony/java/android/telephony/ims/RcsParticipantQueryResult.java
+++ b/telephony/java/android/telephony/ims/RcsParticipantQueryResult.java
@@ -25,13 +25,13 @@
import java.util.List;
/**
- * The result of a {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParameters)}
+ * The result of a {@link RcsMessageStore#getRcsParticipants(RcsParticipantQueryParams)}
* call. This class allows getting the token for querying the next batch of participants in order to
* prevent handling large amounts of data at once.
*
- * @hide
+ * @hide - TODO: make public
*/
-public class RcsParticipantQueryResult implements Parcelable {
+public final class RcsParticipantQueryResult implements Parcelable {
// A token for the caller to continue their query for the next batch of results
private RcsQueryContinuationToken mContinuationToken;
// The list of participant IDs returned with this query
@@ -75,7 +75,7 @@
return participantList;
}
- protected RcsParticipantQueryResult(Parcel in) {
+ private RcsParticipantQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(
RcsQueryContinuationToken.class.getClassLoader());
}
diff --git a/telephony/java/android/telephony/ims/RcsQueryContinuationToken.java b/telephony/java/android/telephony/ims/RcsQueryContinuationToken.java
index e880651..c1ff396 100644
--- a/telephony/java/android/telephony/ims/RcsQueryContinuationToken.java
+++ b/telephony/java/android/telephony/ims/RcsQueryContinuationToken.java
@@ -24,11 +24,17 @@
import java.lang.annotation.RetentionPolicy;
/**
- * This interface allows using the same implementation for continuation token usage in
- * {@link com.android.providers.telephony.RcsProvider}
- * @hide - TODO make getQueryType() and types public - the rest should stay internal
+ * A token for enabling continuation queries. Instances are acquired through
+ * {@code getContinuationToken} on result objects after initial query is done.
+ *
+ * @see RcsEventQueryResult#getContinuationToken()
+ * @see RcsMessageQueryResult#getContinuationToken()
+ * @see RcsParticipantQueryResult#getContinuationToken()
+ * @see RcsThreadQueryResult#getContinuationToken()
+ *
+ * @hide - TODO: make public
*/
-public class RcsQueryContinuationToken implements Parcelable {
+public final class RcsQueryContinuationToken implements Parcelable {
/**
* Denotes that this {@link RcsQueryContinuationToken} token is meant to allow continuing
* {@link RcsEvent} queries
@@ -116,7 +122,7 @@
return mQueryType;
}
- protected RcsQueryContinuationToken(Parcel in) {
+ private RcsQueryContinuationToken(Parcel in) {
mQueryType = in.readInt();
mRawQuery = in.readString();
mLimit = in.readInt();
diff --git a/telephony/java/android/telephony/ims/RcsThread.java b/telephony/java/android/telephony/ims/RcsThread.java
index 238f5e7..8865586 100644
--- a/telephony/java/android/telephony/ims/RcsThread.java
+++ b/telephony/java/android/telephony/ims/RcsThread.java
@@ -28,10 +28,13 @@
* RcsThread represents a single RCS conversation thread. It holds messages that were sent and
* received and events that occurred on that thread.
*
- * @hide - TODO(109759350) make this public
+ * @hide - TODO: make public
*/
public abstract class RcsThread {
- // The rcs_participant_thread_id that represents this thread in the database
+ /**
+ * The rcs_participant_thread_id that represents this thread in the database
+ * @hide
+ */
protected int mThreadId;
/**
@@ -59,10 +62,10 @@
@WorkerThread
@NonNull
public RcsIncomingMessage addIncomingMessage(
- @NonNull RcsIncomingMessageCreationParameters rcsIncomingMessageCreationParameters)
+ @NonNull RcsIncomingMessageCreationParams rcsIncomingMessageCreationParams)
throws RcsMessageStoreException {
return new RcsIncomingMessage(RcsControllerCall.call(iRcs -> iRcs.addIncomingMessage(
- mThreadId, rcsIncomingMessageCreationParameters)));
+ mThreadId, rcsIncomingMessageCreationParams)));
}
/**
@@ -73,10 +76,10 @@
@WorkerThread
@NonNull
public RcsOutgoingMessage addOutgoingMessage(
- @NonNull RcsMessageCreationParameters rcsMessageCreationParameters)
+ @NonNull RcsOutgoingMessageCreationParams rcsOutgoingMessageCreationParams)
throws RcsMessageStoreException {
int messageId = RcsControllerCall.call(iRcs -> iRcs.addOutgoingMessage(
- mThreadId, rcsMessageCreationParameters));
+ mThreadId, rcsOutgoingMessageCreationParams));
return new RcsOutgoingMessage(messageId);
}
@@ -97,7 +100,7 @@
/**
* Convenience function for loading all the {@link RcsMessage}s in this {@link RcsThread}. For
* a more detailed and paginated query, please use
- * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParameters)}
+ * {@link RcsMessageStore#getRcsMessages(RcsMessageQueryParams)}
*
* @return Loads the {@link RcsMessage}s in this thread and returns them in an immutable list.
* @throws RcsMessageStoreException if the messages could not be read from the storage
@@ -105,8 +108,8 @@
@WorkerThread
@NonNull
public RcsMessageQueryResult getMessages() throws RcsMessageStoreException {
- RcsMessageQueryParameters queryParameters =
- new RcsMessageQueryParameters.Builder().setThread(this).build();
+ RcsMessageQueryParams queryParameters =
+ new RcsMessageQueryParams.Builder().setThread(this).build();
return RcsControllerCall.call(iRcs -> iRcs.getMessages(queryParameters));
}
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl b/telephony/java/android/telephony/ims/RcsThreadQueryParams.aidl
similarity index 94%
copy from telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
copy to telephony/java/android/telephony/ims/RcsThreadQueryParams.aidl
index 52e73ce..3f351dc 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.aidl
+++ b/telephony/java/android/telephony/ims/RcsThreadQueryParams.aidl
@@ -17,4 +17,4 @@
package android.telephony.ims;
-parcelable RcsThreadQueryParameters;
+parcelable RcsThreadQueryParams;
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.java b/telephony/java/android/telephony/ims/RcsThreadQueryParams.java
similarity index 86%
rename from telephony/java/android/telephony/ims/RcsThreadQueryParameters.java
rename to telephony/java/android/telephony/ims/RcsThreadQueryParams.java
index 4aa4207..ba32e32 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryParameters.java
+++ b/telephony/java/android/telephony/ims/RcsThreadQueryParams.java
@@ -33,22 +33,22 @@
import java.util.Set;
/**
- * The parameters to pass into {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)} in
+ * The parameters to pass into {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)} in
* order to select a subset of {@link RcsThread}s present in the message store.
*
- * @hide TODO - make the Builder and builder() public. The rest should stay internal only.
+ * @hide - TODO: make public
*/
-public class RcsThreadQueryParameters implements Parcelable {
+public final class RcsThreadQueryParams implements Parcelable {
/**
* Bitmask flag to be used with {@link Builder#setThreadType(int)} to make
- * {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)} return
+ * {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)} return
* {@link RcsGroupThread}s.
*/
public static final int THREAD_TYPE_GROUP = 0x0001;
/**
* Bitmask flag to be used with {@link Builder#setThreadType(int)} to make
- * {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)} return
+ * {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)} return
* {@link Rcs1To1Thread}s.
*/
public static final int THREAD_TYPE_1_TO_1 = 0x0002;
@@ -86,7 +86,7 @@
*/
public static final String THREAD_QUERY_PARAMETERS_KEY = "thread_query_parameters";
- RcsThreadQueryParameters(int threadType, Set<RcsParticipant> participants,
+ RcsThreadQueryParams(int threadType, Set<RcsParticipant> participants,
int limit, int sortingProperty, boolean isAscending) {
mThreadType = threadType;
mRcsParticipantIds = convertParticipantSetToIdList(participants);
@@ -148,7 +148,7 @@
}
/**
- * A helper class to build the {@link RcsThreadQueryParameters}.
+ * A helper class to build the {@link RcsThreadQueryParams}.
*/
public static class Builder {
private int mThreadType;
@@ -158,8 +158,8 @@
private boolean mIsAscending;
/**
- * Constructs a {@link RcsThreadQueryParameters.Builder} to help build an
- * {@link RcsThreadQueryParameters}
+ * Constructs a {@link RcsThreadQueryParams.Builder} to help build an
+ * {@link RcsThreadQueryParams}
*/
public Builder() {
mParticipants = new HashSet<>();
@@ -170,8 +170,8 @@
*
* @param threadType Whether to limit the query result to group threads.
* @return The same instance of the builder to chain parameters.
- * @see RcsThreadQueryParameters#THREAD_TYPE_GROUP
- * @see RcsThreadQueryParameters#THREAD_TYPE_1_TO_1
+ * @see RcsThreadQueryParams#THREAD_TYPE_GROUP
+ * @see RcsThreadQueryParams#THREAD_TYPE_1_TO_1
*/
@CheckResult
public Builder setThreadType(int threadType) {
@@ -253,13 +253,13 @@
}
/**
- * Builds the {@link RcsThreadQueryParameters} to use in
- * {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)}
+ * Builds the {@link RcsThreadQueryParams} to use in
+ * {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)}
*
- * @return An instance of {@link RcsThreadQueryParameters} to use with the thread query.
+ * @return An instance of {@link RcsThreadQueryParams} to use with the thread query.
*/
- public RcsThreadQueryParameters build() {
- return new RcsThreadQueryParameters(mThreadType, mParticipants, mLimit,
+ public RcsThreadQueryParams build() {
+ return new RcsThreadQueryParams(mThreadType, mParticipants, mLimit,
mSortingProperty, mIsAscending);
}
}
@@ -267,7 +267,7 @@
/**
* Parcelable boilerplate below.
*/
- protected RcsThreadQueryParameters(Parcel in) {
+ private RcsThreadQueryParams(Parcel in) {
mThreadType = in.readInt();
mRcsParticipantIds = new ArrayList<>();
in.readList(mRcsParticipantIds, Integer.class.getClassLoader());
@@ -276,16 +276,16 @@
mIsAscending = in.readByte() == 1;
}
- public static final Creator<RcsThreadQueryParameters> CREATOR =
- new Creator<RcsThreadQueryParameters>() {
+ public static final Creator<RcsThreadQueryParams> CREATOR =
+ new Creator<RcsThreadQueryParams>() {
@Override
- public RcsThreadQueryParameters createFromParcel(Parcel in) {
- return new RcsThreadQueryParameters(in);
+ public RcsThreadQueryParams createFromParcel(Parcel in) {
+ return new RcsThreadQueryParams(in);
}
@Override
- public RcsThreadQueryParameters[] newArray(int size) {
- return new RcsThreadQueryParameters[size];
+ public RcsThreadQueryParams[] newArray(int size) {
+ return new RcsThreadQueryParams[size];
}
};
diff --git a/telephony/java/android/telephony/ims/RcsThreadQueryResult.java b/telephony/java/android/telephony/ims/RcsThreadQueryResult.java
index 6515933..a91126b 100644
--- a/telephony/java/android/telephony/ims/RcsThreadQueryResult.java
+++ b/telephony/java/android/telephony/ims/RcsThreadQueryResult.java
@@ -29,13 +29,13 @@
import java.util.List;
/**
- * The result of a {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParameters)}
+ * The result of a {@link RcsMessageStore#getRcsThreads(RcsThreadQueryParams)}
* call. This class allows getting the token for querying the next batch of threads in order to
* prevent handling large amounts of data at once.
*
- * @hide
+ * @hide - TODO: make public
*/
-public class RcsThreadQueryResult implements Parcelable {
+public final class RcsThreadQueryResult implements Parcelable {
// A token for the caller to continue their query for the next batch of results
private RcsQueryContinuationToken mContinuationToken;
// The list of thread IDs returned with this query
@@ -84,7 +84,7 @@
return rcsThreads;
}
- protected RcsThreadQueryResult(Parcel in) {
+ private RcsThreadQueryResult(Parcel in) {
mContinuationToken = in.readParcelable(
RcsQueryContinuationToken.class.getClassLoader());
mRcsThreadIds = new ArrayList<>();
diff --git a/telephony/java/android/telephony/ims/aidl/IRcs.aidl b/telephony/java/android/telephony/ims/aidl/IRcs.aidl
index a399786..2478f8c 100644
--- a/telephony/java/android/telephony/ims/aidl/IRcs.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IRcs.aidl
@@ -17,18 +17,18 @@
package android.telephony.ims.aidl;
import android.net.Uri;
-import android.telephony.ims.RcsEventQueryParameters;
+import android.telephony.ims.RcsEventQueryParams;
import android.telephony.ims.RcsEventQueryResult;
-import android.telephony.ims.RcsFileTransferCreationParameters;
-import android.telephony.ims.RcsIncomingMessageCreationParameters;
-import android.telephony.ims.RcsMessageCreationParameters;
+import android.telephony.ims.RcsFileTransferCreationParams;
+import android.telephony.ims.RcsIncomingMessageCreationParams;
import android.telephony.ims.RcsMessageSnippet;
-import android.telephony.ims.RcsMessageQueryParameters;
+import android.telephony.ims.RcsMessageQueryParams;
import android.telephony.ims.RcsMessageQueryResult;
-import android.telephony.ims.RcsParticipantQueryParameters;
+import android.telephony.ims.RcsOutgoingMessageCreationParams;
+import android.telephony.ims.RcsParticipantQueryParams;
import android.telephony.ims.RcsParticipantQueryResult;
import android.telephony.ims.RcsQueryContinuationToken;
-import android.telephony.ims.RcsThreadQueryParameters;
+import android.telephony.ims.RcsThreadQueryParams;
import android.telephony.ims.RcsThreadQueryResult;
/**
@@ -39,22 +39,22 @@
/////////////////////////
// RcsMessageStore APIs
/////////////////////////
- RcsThreadQueryResult getRcsThreads(in RcsThreadQueryParameters queryParameters);
+ RcsThreadQueryResult getRcsThreads(in RcsThreadQueryParams queryParams);
RcsThreadQueryResult getRcsThreadsWithToken(
in RcsQueryContinuationToken continuationToken);
- RcsParticipantQueryResult getParticipants(in RcsParticipantQueryParameters queryParameters);
+ RcsParticipantQueryResult getParticipants(in RcsParticipantQueryParams queryParams);
RcsParticipantQueryResult getParticipantsWithToken(
in RcsQueryContinuationToken continuationToken);
- RcsMessageQueryResult getMessages(in RcsMessageQueryParameters queryParameters);
+ RcsMessageQueryResult getMessages(in RcsMessageQueryParams queryParams);
RcsMessageQueryResult getMessagesWithToken(
in RcsQueryContinuationToken continuationToken);
- RcsEventQueryResult getEvents(in RcsEventQueryParameters queryParameters);
+ RcsEventQueryResult getEvents(in RcsEventQueryParams queryParams);
RcsEventQueryResult getEventsWithToken(
in RcsQueryContinuationToken continuationToken);
@@ -74,11 +74,11 @@
// Creates a new RcsIncomingMessage on the given thread and returns its row ID
int addIncomingMessage(int rcsThreadId,
- in RcsIncomingMessageCreationParameters rcsIncomingMessageCreationParameters);
+ in RcsIncomingMessageCreationParams rcsIncomingMessageCreationParams);
// Creates a new RcsOutgoingMessage on the given thread and returns its row ID
int addOutgoingMessage(int rcsThreadId,
- in RcsMessageCreationParameters rcsMessageCreationParameters);
+ in RcsOutgoingMessageCreationParams rcsOutgoingMessageCreationParams);
// TODO: modify RcsProvider URI's to allow deleting a message without specifying its thread
void deleteMessage(int rcsMessageId, boolean isIncoming, int rcsThreadId, boolean isGroup);
@@ -203,7 +203,7 @@
// Performs the initial write to storage and returns the row ID.
int storeFileTransfer(int messageId, boolean isIncoming,
- in RcsFileTransferCreationParameters fileTransferCreationParameters);
+ in RcsFileTransferCreationParams fileTransferCreationParams);
void deleteFileTransfer(int partId);
diff --git a/test-base/api/TEST_MAPPING b/test-base/api/TEST_MAPPING
new file mode 100644
index 0000000..3535954
--- /dev/null
+++ b/test-base/api/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsAndroidTestBase27ApiSignatureTestCases"
+ }
+ ]
+}
diff --git a/test-mock/api/TEST_MAPPING b/test-mock/api/TEST_MAPPING
new file mode 100644
index 0000000..d1bd9af
--- /dev/null
+++ b/test-mock/api/TEST_MAPPING
@@ -0,0 +1,10 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsAndroidTestMockCurrentApiSignatureTestCases"
+ },
+ {
+ "name": "CtsCurrentApiSignatureTestCases"
+ }
+ ]
+}
diff --git a/test-runner/api/TEST_MAPPING b/test-runner/api/TEST_MAPPING
new file mode 100644
index 0000000..76ade3c
--- /dev/null
+++ b/test-runner/api/TEST_MAPPING
@@ -0,0 +1,10 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsAndroidTestRunnerCurrentApiSignatureTestCases"
+ },
+ {
+ "name": "CtsCurrentApiSignatureTestCases"
+ }
+ ]
+}
diff --git a/tests/RcsTests/src/com/android/tests/ims/RcsParticipantQueryParametersTest.java b/tests/RcsTests/src/com/android/tests/ims/RcsParticipantQueryParametersTest.java
deleted file mode 100644
index b4bcb5d..0000000
--- a/tests/RcsTests/src/com/android/tests/ims/RcsParticipantQueryParametersTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.tests.ims;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.os.Parcel;
-import android.support.test.runner.AndroidJUnit4;
-import android.telephony.ims.RcsParticipantQueryParameters;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-public class RcsParticipantQueryParametersTest {
-
- @Test
- public void testCanUnparcel() {
- RcsParticipantQueryParameters rcsParticipantQueryParameters =
- new RcsParticipantQueryParameters.Builder()
- .setAliasLike("%alias_")
- .setCanonicalAddressLike("_canonical%")
- .setSortProperty(RcsParticipantQueryParameters.SORT_BY_CANONICAL_ADDRESS)
- .setSortDirection(true)
- .setResultLimit(432)
- .build();
-
-
- Parcel parcel = Parcel.obtain();
- rcsParticipantQueryParameters.writeToParcel(parcel,
- rcsParticipantQueryParameters.describeContents());
-
- parcel.setDataPosition(0);
- rcsParticipantQueryParameters = RcsParticipantQueryParameters.CREATOR.createFromParcel(
- parcel);
-
- assertThat(rcsParticipantQueryParameters.getAliasLike()).isEqualTo("%alias_");
- assertThat(rcsParticipantQueryParameters.getCanonicalAddressLike()).contains("_canonical%");
- assertThat(rcsParticipantQueryParameters.getLimit()).isEqualTo(432);
- assertThat(rcsParticipantQueryParameters.getSortingProperty()).isEqualTo(
- RcsParticipantQueryParameters.SORT_BY_CANONICAL_ADDRESS);
- assertThat(rcsParticipantQueryParameters.getSortDirection()).isTrue();
- }
-}
diff --git a/tests/RcsTests/src/com/android/tests/ims/RcsParticipantQueryParamsTest.java b/tests/RcsTests/src/com/android/tests/ims/RcsParticipantQueryParamsTest.java
new file mode 100644
index 0000000..6361a39
--- /dev/null
+++ b/tests/RcsTests/src/com/android/tests/ims/RcsParticipantQueryParamsTest.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.tests.ims;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.os.Parcel;
+import android.support.test.runner.AndroidJUnit4;
+import android.telephony.ims.RcsParticipantQueryParams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class RcsParticipantQueryParamsTest {
+
+ @Test
+ public void testCanUnparcel() {
+ RcsParticipantQueryParams rcsParticipantQueryParams =
+ new RcsParticipantQueryParams.Builder()
+ .setAliasLike("%alias_")
+ .setCanonicalAddressLike("_canonical%")
+ .setSortProperty(RcsParticipantQueryParams.SORT_BY_CANONICAL_ADDRESS)
+ .setSortDirection(true)
+ .setResultLimit(432)
+ .build();
+
+
+ Parcel parcel = Parcel.obtain();
+ rcsParticipantQueryParams.writeToParcel(parcel,
+ rcsParticipantQueryParams.describeContents());
+
+ parcel.setDataPosition(0);
+ rcsParticipantQueryParams = RcsParticipantQueryParams.CREATOR.createFromParcel(
+ parcel);
+
+ assertThat(rcsParticipantQueryParams.getAliasLike()).isEqualTo("%alias_");
+ assertThat(rcsParticipantQueryParams.getCanonicalAddressLike()).contains("_canonical%");
+ assertThat(rcsParticipantQueryParams.getLimit()).isEqualTo(432);
+ assertThat(rcsParticipantQueryParams.getSortingProperty()).isEqualTo(
+ RcsParticipantQueryParams.SORT_BY_CANONICAL_ADDRESS);
+ assertThat(rcsParticipantQueryParams.getSortDirection()).isTrue();
+ }
+}
diff --git a/tests/RcsTests/src/com/android/tests/ims/RcsThreadQueryParametersTest.java b/tests/RcsTests/src/com/android/tests/ims/RcsThreadQueryParametersTest.java
deleted file mode 100644
index 0a70eec..0000000
--- a/tests/RcsTests/src/com/android/tests/ims/RcsThreadQueryParametersTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.tests.ims;
-
-import static android.telephony.ims.RcsThreadQueryParameters.SORT_BY_TIMESTAMP;
-import static android.telephony.ims.RcsThreadQueryParameters.THREAD_TYPE_GROUP;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.os.Parcel;
-import android.support.test.runner.AndroidJUnit4;
-import android.telephony.ims.RcsParticipant;
-import android.telephony.ims.RcsThreadQueryParameters;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-public class RcsThreadQueryParametersTest {
-
- @Test
- public void testCanUnparcel() {
- RcsParticipant rcsParticipant = new RcsParticipant(1);
- RcsThreadQueryParameters rcsThreadQueryParameters = new RcsThreadQueryParameters.Builder()
- .setThreadType(THREAD_TYPE_GROUP)
- .setParticipant(rcsParticipant)
- .setResultLimit(50)
- .setSortProperty(SORT_BY_TIMESTAMP)
- .setSortDirection(true)
- .build();
-
- Parcel parcel = Parcel.obtain();
- rcsThreadQueryParameters.writeToParcel(parcel, rcsThreadQueryParameters.describeContents());
-
- parcel.setDataPosition(0);
- rcsThreadQueryParameters = RcsThreadQueryParameters.CREATOR.createFromParcel(parcel);
-
- assertThat(rcsThreadQueryParameters.getThreadType()).isEqualTo(THREAD_TYPE_GROUP);
- assertThat(rcsThreadQueryParameters.getRcsParticipantsIds())
- .contains(rcsParticipant.getId());
- assertThat(rcsThreadQueryParameters.getLimit()).isEqualTo(50);
- assertThat(rcsThreadQueryParameters.getSortingProperty()).isEqualTo(SORT_BY_TIMESTAMP);
- assertThat(rcsThreadQueryParameters.getSortDirection()).isTrue();
- }
-}
diff --git a/tests/RcsTests/src/com/android/tests/ims/RcsThreadQueryParamsTest.java b/tests/RcsTests/src/com/android/tests/ims/RcsThreadQueryParamsTest.java
new file mode 100644
index 0000000..beb4f8a
--- /dev/null
+++ b/tests/RcsTests/src/com/android/tests/ims/RcsThreadQueryParamsTest.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.tests.ims;
+
+import static android.telephony.ims.RcsThreadQueryParams.SORT_BY_TIMESTAMP;
+import static android.telephony.ims.RcsThreadQueryParams.THREAD_TYPE_GROUP;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.os.Parcel;
+import android.support.test.runner.AndroidJUnit4;
+import android.telephony.ims.RcsParticipant;
+import android.telephony.ims.RcsThreadQueryParams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class RcsThreadQueryParamsTest {
+
+ @Test
+ public void testCanUnparcel() {
+ RcsParticipant rcsParticipant = new RcsParticipant(1);
+ RcsThreadQueryParams rcsThreadQueryParams = new RcsThreadQueryParams.Builder()
+ .setThreadType(THREAD_TYPE_GROUP)
+ .setParticipant(rcsParticipant)
+ .setResultLimit(50)
+ .setSortProperty(SORT_BY_TIMESTAMP)
+ .setSortDirection(true)
+ .build();
+
+ Parcel parcel = Parcel.obtain();
+ rcsThreadQueryParams.writeToParcel(parcel, rcsThreadQueryParams.describeContents());
+
+ parcel.setDataPosition(0);
+ rcsThreadQueryParams = RcsThreadQueryParams.CREATOR.createFromParcel(parcel);
+
+ assertThat(rcsThreadQueryParams.getThreadType()).isEqualTo(THREAD_TYPE_GROUP);
+ assertThat(rcsThreadQueryParams.getRcsParticipantsIds())
+ .contains(rcsParticipant.getId());
+ assertThat(rcsThreadQueryParams.getLimit()).isEqualTo(50);
+ assertThat(rcsThreadQueryParams.getSortingProperty()).isEqualTo(SORT_BY_TIMESTAMP);
+ assertThat(rcsThreadQueryParams.getSortDirection()).isTrue();
+ }
+}