Merge "Test extra info sent to NetworkMonitor"
diff --git a/api/current.txt b/api/current.txt
index 51f7f58..fea1f2f 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -45344,14 +45344,14 @@
public class MbmsDownloadSession implements java.lang.AutoCloseable {
method public void addProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadProgressListener);
- method public void addServiceAnnouncementFile(@NonNull byte[]);
+ method public void addServiceAnnouncement(@NonNull byte[]);
method public void addStatusListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadStatusListener);
method public void cancelDownload(@NonNull android.telephony.mbms.DownloadRequest);
method public void close();
method public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method @Nullable public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, int, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method public void download(@NonNull android.telephony.mbms.DownloadRequest);
- method public static int getMaximumServiceAnnouncementFileSize();
+ method public static int getMaximumServiceAnnouncementSize();
method @Nullable public java.io.File getTempFileRootDirectory();
method @NonNull public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads();
method public void removeProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull android.telephony.mbms.DownloadProgressListener);
@@ -46958,7 +46958,7 @@
public static class MbmsErrors.DownloadErrors {
field public static final int ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT = 401; // 0x191
- field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE = 404; // 0x194
+ field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT = 404; // 0x194
field public static final int ERROR_UNKNOWN_DOWNLOAD_REQUEST = 402; // 0x192
field public static final int ERROR_UNKNOWN_FILE_INFO = 403; // 0x193
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 26153ca..a10880b 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -10321,7 +10321,7 @@
public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface {
ctor public MbmsDownloadServiceBase();
method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
- method public int addServiceAnnouncementFile(int, @NonNull byte[]);
+ method public int addServiceAnnouncement(int, @NonNull byte[]);
method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public android.os.IBinder asBinder();
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
diff --git a/api/test-current.txt b/api/test-current.txt
index 68c9105..ecc69c0 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -4099,7 +4099,7 @@
public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface {
ctor public MbmsDownloadServiceBase();
method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
- method public int addServiceAnnouncementFile(int, @NonNull byte[]);
+ method public int addServiceAnnouncement(int, @NonNull byte[]);
method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public android.os.IBinder asBinder();
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index 0fbffba..ec87091 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -900,9 +900,17 @@
* <p>For NetworkCapability instances being sent from ConnectivityService, this value MUST be
* reset to Process.INVALID_UID unless all the following conditions are met:
*
+ * <p>The caller is the network owner, AND one of the following sets of requirements is met:
+ *
* <ol>
- * <li>The destination app is the network owner
- * <li>The destination app has the ACCESS_FINE_LOCATION permission granted
+ * <li>The described Network is a VPN
+ * </ol>
+ *
+ * <p>OR:
+ *
+ * <ol>
+ * <li>The calling app is the network owner
+ * <li>The calling app has the ACCESS_FINE_LOCATION permission granted
* <li>The user's location toggle is on
* </ol>
*
@@ -928,7 +936,16 @@
/**
* Retrieves the UID of the app that owns this network.
*
- * <p>For user privacy reasons, this field will only be populated if:
+ * <p>For user privacy reasons, this field will only be populated if the following conditions
+ * are met:
+ *
+ * <p>The caller is the network owner, AND one of the following sets of requirements is met:
+ *
+ * <ol>
+ * <li>The described Network is a VPN
+ * </ol>
+ *
+ * <p>OR:
*
* <ol>
* <li>The calling app is the network owner
@@ -936,8 +953,8 @@
* <li>The user's location toggle is on
* </ol>
*
- * Instances of NetworkCapabilities sent to apps without the appropriate permissions will
- * have this field cleared out.
+ * Instances of NetworkCapabilities sent to apps without the appropriate permissions will have
+ * this field cleared out.
*/
public int getOwnerUid() {
return mOwnerUid;
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index 4759818..be15246 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -1015,6 +1015,10 @@
addFeature(PackageManager.FEATURE_RAM_NORMAL, 0);
}
+ if (Build.VERSION.FIRST_SDK_INT >= Build.VERSION_CODES.Q) {
+ addFeature(PackageManager.FEATURE_IPSEC_TUNNELS, 0);
+ }
+
for (String featureName : mUnavailableFeatures) {
removeFeature(featureName);
}
diff --git a/core/tests/coretests/src/com/android/internal/os/KernelCpuUidBpfMapReaderTest.java b/core/tests/coretests/src/com/android/internal/os/KernelCpuUidBpfMapReaderTest.java
index 257b388..bda21c6 100644
--- a/core/tests/coretests/src/com/android/internal/os/KernelCpuUidBpfMapReaderTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/KernelCpuUidBpfMapReaderTest.java
@@ -179,6 +179,21 @@
testOpenAndReadData(changedData);
}
+ @Test
+ public void testRemoveUidsInRange_firstAndLastAbsent() {
+ final SparseArray<long[]> data = getTestSparseArray(200, 50);
+ data.delete(0);
+ data.delete(5);
+ mReader.setData(data);
+ testOpenAndReadData(data);
+ SparseArray<long[]> changedData = new SparseArray<>();
+ for (int i = 6; i < 200; i++) {
+ changedData.put(i, data.get(i));
+ }
+ mReader.removeUidsInRange(0, 5);
+ testOpenAndReadData(changedData);
+ }
+
private void testOpenAndReadData(SparseArray<long[]> expectedData) {
try (BpfMapIterator iter = mReader.open()) {
long[] actual;
diff --git a/data/keyboards/Vendor_0a5c_Product_8502.kl b/data/keyboards/Vendor_0a5c_Product_8502.kl
new file mode 100644
index 0000000..6d4a163
--- /dev/null
+++ b/data/keyboards/Vendor_0a5c_Product_8502.kl
@@ -0,0 +1,37 @@
+# Copyright (C) 2020 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.
+
+# SnakeByte iDroid:con
+
+key 304 BUTTON_A
+key 305 BUTTON_B
+key 306 BUTTON_THUMBL
+key 307 BUTTON_X
+key 308 BUTTON_Y
+key 309 BUTTON_THUMBR
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+key 312 BUTTON_L2
+key 313 BUTTON_R2
+key 314 BUTTON_SELECT
+key 315 BUTTON_START
+
+axis 0x00 X
+axis 0x01 Y
+axis 0x02 Z
+axis 0x03 RX
+axis 0x04 RY
+axis 0x05 RZ
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt
index 4dffc4b..3ad076f 100644
--- a/non-updatable-api/current.txt
+++ b/non-updatable-api/current.txt
@@ -45200,14 +45200,14 @@
public class MbmsDownloadSession implements java.lang.AutoCloseable {
method public void addProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadProgressListener);
- method public void addServiceAnnouncementFile(@NonNull byte[]);
+ method public void addServiceAnnouncement(@NonNull byte[]);
method public void addStatusListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.DownloadStatusListener);
method public void cancelDownload(@NonNull android.telephony.mbms.DownloadRequest);
method public void close();
method public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method @Nullable public static android.telephony.MbmsDownloadSession create(@NonNull android.content.Context, @NonNull java.util.concurrent.Executor, int, @NonNull android.telephony.mbms.MbmsDownloadSessionCallback);
method public void download(@NonNull android.telephony.mbms.DownloadRequest);
- method public static int getMaximumServiceAnnouncementFileSize();
+ method public static int getMaximumServiceAnnouncementSize();
method @Nullable public java.io.File getTempFileRootDirectory();
method @NonNull public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads();
method public void removeProgressListener(@NonNull android.telephony.mbms.DownloadRequest, @NonNull android.telephony.mbms.DownloadProgressListener);
@@ -46814,7 +46814,7 @@
public static class MbmsErrors.DownloadErrors {
field public static final int ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT = 401; // 0x191
- field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE = 404; // 0x194
+ field public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT = 404; // 0x194
field public static final int ERROR_UNKNOWN_DOWNLOAD_REQUEST = 402; // 0x192
field public static final int ERROR_UNKNOWN_FILE_INFO = 403; // 0x193
}
diff --git a/non-updatable-api/system-current.txt b/non-updatable-api/system-current.txt
index 6da5ad2..0b29909 100644
--- a/non-updatable-api/system-current.txt
+++ b/non-updatable-api/system-current.txt
@@ -10219,7 +10219,7 @@
public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface {
ctor public MbmsDownloadServiceBase();
method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException;
- method public int addServiceAnnouncementFile(int, @NonNull byte[]);
+ method public int addServiceAnnouncement(int, @NonNull byte[]);
method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException;
method public android.os.IBinder asBinder();
method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException;
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index ec53502..320f3fb 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -1698,6 +1698,12 @@
return newNc;
}
+ // Allow VPNs to see ownership of their own VPN networks - not location sensitive.
+ if (nc.hasTransport(TRANSPORT_VPN)) {
+ // Owner UIDs already checked above. No need to re-check.
+ return newNc;
+ }
+
Binder.withCleanCallingIdentity(
() -> {
if (!mLocationPermissionChecker.checkLocationPermission(
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index d012bd7..82ce7b1 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -1605,7 +1605,7 @@
for (Record r : mRecords) {
if (r.matchPhoneStateListenerEvent(
PhoneStateListener.LISTEN_DISPLAY_INFO_CHANGED)
- && idMatch(r.subId, subId, phoneId)) {
+ && idMatchWithoutDefaultPhoneCheck(r.subId, subId)) {
try {
r.callback.onDisplayInfoChanged(telephonyDisplayInfo);
} catch (RemoteException ex) {
@@ -2703,6 +2703,24 @@
Rlog.e(TAG, s);
}
+ /**
+ * If the registrant specified a subId, then we should only notify it if subIds match.
+ * If the registrant registered with DEFAULT subId, we should notify only when the related subId
+ * is default subId (which could be INVALID if there's no default subId).
+ *
+ * This should be the correct way to check record ID match. in idMatch the record's phoneId is
+ * speculated based on subId passed by the registrant so it's not a good reference.
+ * But to avoid triggering potential regression only replace idMatch with it when an issue with
+ * idMatch is reported. Eventually this should replace all instances of idMatch.
+ */
+ private boolean idMatchWithoutDefaultPhoneCheck(int subIdInRecord, int subIdToNotify) {
+ if (subIdInRecord == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID) {
+ return (subIdToNotify == mDefaultSubId);
+ } else {
+ return (subIdInRecord == subIdToNotify);
+ }
+ }
+
boolean idMatch(int rSubId, int subId, int phoneId) {
if(subId < 0) {
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 0cda7ca..0cde5b1 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -1106,7 +1106,8 @@
NetworkAgentConfig networkAgentConfig = new NetworkAgentConfig();
networkAgentConfig.allowBypass = mConfig.allowBypass && !mLockdown;
- mNetworkCapabilities.setOwnerUid(Binder.getCallingUid());
+ mNetworkCapabilities.setOwnerUid(mOwnerUID);
+ mNetworkCapabilities.setAdministratorUids(new int[] {mOwnerUID});
mNetworkCapabilities.setUids(createUserAndRestrictedProfilesRanges(mUserHandle,
mConfig.allowedApplications, mConfig.disallowedApplications));
long token = Binder.clearCallingIdentity();
diff --git a/telephony/java/android/telephony/MbmsDownloadSession.java b/telephony/java/android/telephony/MbmsDownloadSession.java
index 3d96fc6..3f671ca 100644
--- a/telephony/java/android/telephony/MbmsDownloadSession.java
+++ b/telephony/java/android/telephony/MbmsDownloadSession.java
@@ -231,7 +231,7 @@
private static final String DESTINATION_SANITY_CHECK_FILE_NAME = "destinationSanityCheckFile";
- private static final int MAX_SERVICE_ANNOUNCEMENT_FILE_SIZE = 10 * 1024; // 10KB
+ private static final int MAX_SERVICE_ANNOUNCEMENT_SIZE = 10 * 1024; // 10KB
private static AtomicBoolean sIsInitialized = new AtomicBoolean(false);
@@ -321,13 +321,13 @@
}
/**
- * Returns the maximum size of the service announcement file that can be provided via
- * {@link #addServiceAnnouncementFile}
+ * Returns the maximum size of the service announcement descriptor that can be provided via
+ * {@link #addServiceAnnouncement}
* @return The maximum length of the byte array passed as an argument to
- * {@link #addServiceAnnouncementFile}.
+ * {@link #addServiceAnnouncement}.
*/
- public static int getMaximumServiceAnnouncementFileSize() {
- return MAX_SERVICE_ANNOUNCEMENT_FILE_SIZE;
+ public static int getMaximumServiceAnnouncementSize() {
+ return MAX_SERVICE_ANNOUNCEMENT_SIZE;
}
private int bindAndInitialize() {
@@ -436,15 +436,15 @@
}
/**
- * Inform the middleware of a service announcement file received from a group communication
- * server.
+ * Inform the middleware of a service announcement descriptor received from a group
+ * communication server.
*
* When participating in a group call via the {@link MbmsGroupCallSession} API, applications may
- * receive a service announcement file from the group call server that informs them of
+ * receive a service announcement descriptor from the group call server that informs them of
* files that may be relevant to users communicating on the group call.
*
- * After supplying the service announcement file received from the server to the middleware via
- * this API, applications will receive information on the available files via
+ * After supplying the service announcement descriptor received from the server to the
+ * middleware via this API, applications will receive information on the available files via
* {@link MbmsDownloadSessionCallback#onFileServicesUpdated}, and the available files will be
* downloadable via {@link MbmsDownloadSession#download} like other files published via
* {@link MbmsDownloadSessionCallback#onFileServicesUpdated}.
@@ -453,26 +453,27 @@
* callback may include any of the errors that are not specific to the streaming use-case.
*
* May throw an {@link IllegalStateException} when the middleware has not yet been bound,
- * or an {@link IllegalArgumentException} if the file is too large.
+ * or an {@link IllegalArgumentException} if the byte array is too large, or an
+ * {@link UnsupportedOperationException} if the middleware has not implemented this method.
*
- * @param fileContents The contents of the service announcement file received from the group
- * call server. If the size of this array is greater than the value of
- * {@link #getMaximumServiceAnnouncementFileSize()}, an
+ * @param contents The contents of the service announcement descriptor received from the
+ * group call server. If the size of this array is greater than the value of
+ * {@link #getMaximumServiceAnnouncementSize()}, an
* {@link IllegalArgumentException} will be thrown.
*/
- public void addServiceAnnouncementFile(@NonNull byte[] fileContents) {
+ public void addServiceAnnouncement(@NonNull byte[] contents) {
IMbmsDownloadService downloadService = mService.get();
if (downloadService == null) {
throw new IllegalStateException("Middleware not yet bound");
}
- if (fileContents.length > MAX_SERVICE_ANNOUNCEMENT_FILE_SIZE) {
+ if (contents.length > MAX_SERVICE_ANNOUNCEMENT_SIZE) {
throw new IllegalArgumentException("File too large");
}
try {
- int returnCode = downloadService.addServiceAnnouncementFile(
- mSubscriptionId, fileContents);
+ int returnCode = downloadService.addServiceAnnouncement(
+ mSubscriptionId, contents);
if (returnCode == MbmsErrors.UNKNOWN) {
// Unbind and throw an obvious error
close();
diff --git a/telephony/java/android/telephony/mbms/MbmsErrors.java b/telephony/java/android/telephony/mbms/MbmsErrors.java
index 8611d26b..40f3ae8 100644
--- a/telephony/java/android/telephony/mbms/MbmsErrors.java
+++ b/telephony/java/android/telephony/mbms/MbmsErrors.java
@@ -144,11 +144,11 @@
public static final int ERROR_UNKNOWN_FILE_INFO = 403;
/**
- * Indicates that the service announcement file passed via
- * {@link android.telephony.MbmsDownloadSession#addServiceAnnouncementFile(byte[])}
+ * Indicates that the service announcement descriptor passed via
+ * {@link android.telephony.MbmsDownloadSession#addServiceAnnouncement(byte[])}
* is malformed.
*/
- public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE = 404;
+ public static final int ERROR_MALFORMED_SERVICE_ANNOUNCEMENT = 404;
}
/**
@@ -189,7 +189,7 @@
DownloadErrors.ERROR_CANNOT_CHANGE_TEMP_FILE_ROOT,
DownloadErrors.ERROR_UNKNOWN_DOWNLOAD_REQUEST,
DownloadErrors.ERROR_UNKNOWN_FILE_INFO,
- DownloadErrors.ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE,
+ DownloadErrors.ERROR_MALFORMED_SERVICE_ANNOUNCEMENT,
GroupCallErrors.ERROR_UNABLE_TO_START_SERVICE,
GroupCallErrors.ERROR_DUPLICATE_START_GROUP_CALL,
})
diff --git a/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl b/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
index 36136ab..04efd53 100755
--- a/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
+++ b/telephony/java/android/telephony/mbms/vendor/IMbmsDownloadService.aidl
@@ -35,7 +35,7 @@
int setTempFileRootDirectory(int subId, String rootDirectoryPath);
- int addServiceAnnouncementFile(int subId, in byte[] fileContents);
+ int addServiceAnnouncement(int subId, in byte[] contents);
int download(in DownloadRequest downloadRequest);
diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
index 3279ce6..3053ea0 100644
--- a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
+++ b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
@@ -217,24 +217,25 @@
/**
* Called when the client application wishes to receive file information according to a
- * service announcement file received from a group call server.
+ * service announcement descriptor received from a group call server.
*
- * The service announcement file is in the format of a multipart MIME file with XML parts,
- * though no validation is performed on the contents of the {@code fileContents} argument --
+ * The service announcement descriptor is in the format of a multipart MIME file with XML parts,
+ * though no validation is performed on the contents of the {@code contents} argument --
* implementing middleware applications should perform their own validation and return
- * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE} if the file is
+ * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT} if the descriptor is
* malformed.
*
* @param subscriptionId The subscription id the service announcement applies to.
- * @param fileContents The contents of the service announcement file.
+ * @param contents The contents of the service announcement descriptor.
* @return {@link MbmsErrors#SUCCESS}, or
- * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT_FILE}
+ * {@link MbmsErrors.DownloadErrors#ERROR_MALFORMED_SERVICE_ANNOUNCEMENT}
*/
// TODO: are there any public specifications of what the file format is that I can link to?
@Override
- public @MbmsErrors.MbmsError int addServiceAnnouncementFile(
- int subscriptionId, @NonNull byte[] fileContents) {
- return 0;
+ public @MbmsErrors.MbmsError int addServiceAnnouncement(
+ int subscriptionId, @NonNull byte[] contents) {
+ throw new UnsupportedOperationException("addServiceAnnouncement not supported by"
+ + " this middleware.");
}
/**
diff --git a/test-runner/api/current.txt b/test-runner/api/current.txt
index c093ac7..2c19a2e 100644
--- a/test-runner/api/current.txt
+++ b/test-runner/api/current.txt
@@ -100,6 +100,13 @@
method @Deprecated public java.util.List<android.content.Intent> getAndClearBroadcastIntents();
}
+ @Deprecated public class LaunchPerformanceBase extends android.app.Instrumentation {
+ ctor @Deprecated public LaunchPerformanceBase();
+ method @Deprecated protected void LaunchApp();
+ field @Deprecated protected android.content.Intent mIntent;
+ field @Deprecated protected android.os.Bundle mResults;
+ }
+
public class LoaderTestCase extends android.test.AndroidTestCase {
ctor public LoaderTestCase();
method public <T> T getLoaderResultSynchronously(android.content.Loader<T>);
@@ -285,6 +292,11 @@
method @Deprecated public void testSuiteConstructionFailed();
}
+ @Deprecated public class UnitTestSuiteBuilder extends android.test.suitebuilder.TestSuiteBuilder {
+ ctor @Deprecated public UnitTestSuiteBuilder(Class);
+ ctor @Deprecated public UnitTestSuiteBuilder(String, ClassLoader);
+ }
+
}
package junit.runner {
diff --git a/test-runner/src/android/test/LaunchPerformanceBase.java b/test-runner/src/android/test/LaunchPerformanceBase.java
index 62c90d6..d87a811 100644
--- a/test-runner/src/android/test/LaunchPerformanceBase.java
+++ b/test-runner/src/android/test/LaunchPerformanceBase.java
@@ -23,12 +23,11 @@
/**
* Base class for all launch performance Instrumentation classes.
- *
- * @hide
*/
@Deprecated
public class LaunchPerformanceBase extends Instrumentation {
+ /** @hide */
public static final String LOG_TAG = "Launch Performance";
protected Bundle mResults;
@@ -43,8 +42,6 @@
/**
* Launches intent, and waits for idle before returning.
- *
- * @hide
*/
protected void LaunchApp() {
startActivitySync(mIntent);
diff --git a/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java b/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java
index a746b35..ea7405b 100644
--- a/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java
+++ b/test-runner/src/android/test/suitebuilder/UnitTestSuiteBuilder.java
@@ -19,8 +19,9 @@
/**
* A suite builder that finds unit tests.
*
- * {@hide} Not needed for 1.0 SDK.
+ * @deprecated android.test.runner is obsolete
*/
+@Deprecated
public class UnitTestSuiteBuilder extends TestSuiteBuilder {
public UnitTestSuiteBuilder(Class clazz) {
diff --git a/test-runner/tests/Android.bp b/test-runner/tests/Android.bp
index 03c7398..d74cee4 100644
--- a/test-runner/tests/Android.bp
+++ b/test-runner/tests/Android.bp
@@ -25,7 +25,7 @@
//
libs: [
- "android.test.runner",
+ "android.test.runner.impl",
"android.test.base",
"android.test.mock",
],