From 1a7afcc302f0e317edb7865e97610daf869619da Mon Sep 17 00:00:00 2001 From: Aishwarya Mallampati Date: Fri, 24 Feb 2023 23:14:16 +0000 Subject: [PATCH] Add satellite datagrams in DB. The following changes are made in this CL: - Created a new db file SatelliteDatagrams.db - Created a datagrams table with two columns: datagram_id, datagram Bug: 269637555 Test: atest com.android.providers.telephony.SatelliteProviderTest, Basic sanity, making calls and sending sms Change-Id: Ia17d8e25d2c92af989bd2fdc020174afcbe7f6ab --- core/java/android/provider/Telephony.java | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index 6896e02447917..d14abfd5d7ae0 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -4937,4 +4937,66 @@ public final class Telephony { return ALL_COLUMNS; } } + + /** + * Stores incoming satellite datagrams. + * @hide + */ + public static final class SatelliteDatagrams { + /** + * Not instantiable. + * @hide + */ + private SatelliteDatagrams() {} + + /** + * Provider name for Satellite Datagrams table. + */ + public static final String PROVIDER_NAME = "satellite"; + + /** + * Table name for Satellite Datagrams table. + */ + public static final String TABLE_NAME = "incoming_datagrams"; + + /** + * URL for satellite incoming datagrams table. + */ + private static final String URL = "content://" + PROVIDER_NAME + "/" + TABLE_NAME; + + /** + * The {@code content://} style URI for this provider. + * @hide + */ + public static final Uri CONTENT_URI = Uri.parse(URL); + + /** + * SatelliteProvider unique key column name is the datagram id. + *

Type: INTEGER (int)

+ * @hide + */ + public static final String COLUMN_UNIQUE_KEY_DATAGRAM_ID = "datagram_id"; + + /** + * SatelliteProvider column name for storing datagram. + *

TYPE: BLOB + * @hide + */ + public static final String COLUMN_DATAGRAM = "datagram"; + + /** All columns in {@link SatelliteDatagrams} table. */ + private static final List ALL_COLUMNS = List.of( + COLUMN_UNIQUE_KEY_DATAGRAM_ID, + COLUMN_DATAGRAM + ); + + /** + * @return All columns in {@link SatelliteDatagrams} table. + * @hide + */ + @NonNull + public static List getAllColumns() { + return ALL_COLUMNS; + } + } }