summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:26:43 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:26:43 +0000
commit859e1e9302a47fd1cf5167cc43fbda10b1e051ac (patch)
tree205a7df644a3c041b065d01177eb189795285c8a
parent192234c1485b1cf5f1177b5e3c5ea1ef58ae74e8 (diff)
parent1bfde93e51219462769a0251172c9d27e7642cb4 (diff)
downloadEmail-q_tzdata_aml_297100000.tar.gz
Change-Id: I9ececdcebb03be297a9ef636b616a7c22037e1a4
-rw-r--r--Android.mk11
-rw-r--r--AndroidManifest.xml10
-rw-r--r--TEST_MAPPING7
-rw-r--r--emailcommon/AndroidManifest.xml2
-rw-r--r--provider_src/com/android/email/EmailIntentService.java6
-rw-r--r--provider_src/com/android/email/provider/EmailProvider.java44
-rw-r--r--provider_src/com/android/email/service/AttachmentService.java51
-rw-r--r--provider_src/com/android/email/service/EmailBroadcastProcessorService.java23
-rw-r--r--res/values/strings.xml3
-rw-r--r--src/com/android/email/EmailNotificationController.java29
-rw-r--r--src/com/android/email/activity/ComposeActivityEmailExternal.java3
-rw-r--r--tests/Android.mk1
-rw-r--r--tests/AndroidManifest.xml8
-rw-r--r--tests/AndroidTest.xml28
14 files changed, 46 insertions, 180 deletions
diff --git a/Android.mk b/Android.mk
index 41b04fd6c..c354471bd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -38,13 +38,13 @@ LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages com.android.mail:com.android.email:com.android.emailcommon
-LOCAL_AAPT_FLAGS += --legacy
LOCAL_STATIC_ANDROID_LIBRARIES := \
com.android.emailcommon \
libchips \
libphotoviewer_appcompat \
android-opt-bitmap \
+ android-opt-datetimepicker \
androidx.core_core \
androidx.media_media \
androidx.legacy_legacy-support-core-utils \
@@ -67,13 +67,16 @@ LOCAL_PACKAGE_NAME := Email
LOCAL_PRODUCT_MODULE := true
LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags
-LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
+ifeq (eng,$(TARGET_BUILD_VARIANT))
+ LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
+endif
LOCAL_SDK_VERSION := current
-LOCAL_COMPATIBILITY_SUITE := general-tests
-
include $(BUILD_PACKAGE)
+# only include rules to build other stuff for the original package, not the derived package.
+ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
# additionally, build unit tests in a separate .apk
include $(call all-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 54235cf7e..d650d446a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -45,10 +45,9 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
- <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- This needs to be present when we are doing unbundled releases. -->
- <uses-sdk android:targetSdkVersion="28" android:minSdkVersion="14" />
+ <uses-sdk android:targetSdkVersion="24" android:minSdkVersion="14" />
<!-- additional uses -->
@@ -467,9 +466,7 @@
</intent-filter>
</receiver>
<service
- android:name=".service.EmailBroadcastProcessorService"
- android:permission="android.permission.BIND_JOB_SERVICE"
- android:exported="true" />
+ android:name=".service.EmailBroadcastProcessorService" />
<!-- Support for DeviceAdmin / DevicePolicyManager. See SecurityPolicy class for impl. -->
<receiver
@@ -489,7 +486,6 @@
<service
android:name=".service.AttachmentService"
android:enabled="false"
- android:permission="android.permission.BIND_JOB_SERVICE"
>
</service>
@@ -669,7 +665,6 @@
<provider
android:name=".provider.EmailProvider"
android:authorities="com.android.email.provider;com.android.email.notifier"
- android:enabled="true"
android:exported="true"
android:permission="com.android.email.permission.ACCESS_PROVIDER"
android:label="@string/app_name"
@@ -710,7 +705,6 @@
</service>
<service android:name="com.android.email.EmailIntentService"
- android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="com.android.mail.action.RESEND_NOTIFICATIONS" />
diff --git a/TEST_MAPPING b/TEST_MAPPING
deleted file mode 100644
index 9d320448f..000000000
--- a/TEST_MAPPING
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "presubmit": [
- {
- "name": "EmailTests"
- }
- ]
-}
diff --git a/emailcommon/AndroidManifest.xml b/emailcommon/AndroidManifest.xml
index 88573f7f5..bd1d35d9b 100644
--- a/emailcommon/AndroidManifest.xml
+++ b/emailcommon/AndroidManifest.xml
@@ -2,5 +2,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.emailcommon"
android:versionCode="1">
- <uses-sdk android:targetSdkVersion="28" android:minSdkVersion="14" />
+ <uses-sdk android:targetSdkVersion="24" android:minSdkVersion="14" />
</manifest>
diff --git a/provider_src/com/android/email/EmailIntentService.java b/provider_src/com/android/email/EmailIntentService.java
index 5924c90ce..0c6d76178 100644
--- a/provider_src/com/android/email/EmailIntentService.java
+++ b/provider_src/com/android/email/EmailIntentService.java
@@ -29,12 +29,12 @@ public class EmailIntentService extends MailIntentService {
private static final String LOG_TAG = LogTag.getLogTag();
public EmailIntentService() {
- super();
+ super("EmailIntentService");
}
@Override
- protected void onHandleWork(final Intent intent) {
- super.onHandleWork(intent);
+ protected void onHandleIntent(final Intent intent) {
+ super.onHandleIntent(intent);
if (UIProvider.ACTION_UPDATE_NOTIFICATION.equals(intent.getAction())) {
final NotificationController nc =
diff --git a/provider_src/com/android/email/provider/EmailProvider.java b/provider_src/com/android/email/provider/EmailProvider.java
index aadc51b0b..00d608f30 100644
--- a/provider_src/com/android/email/provider/EmailProvider.java
+++ b/provider_src/com/android/email/provider/EmailProvider.java
@@ -1346,10 +1346,8 @@ public class EmailProvider extends ContentProvider
c = uiQuery(match, uri, projection, unseenOnly);
return c;
case UI_FOLDERS:
- // TODO(rtenneti): Enable notifications.
- // c = uiFolders(uri, projection);
- // return c;
- return null;
+ c = uiFolders(uri, projection);
+ return c;
case UI_FOLDER_LOAD_MORE:
c = uiFolderLoadMore(getMailbox(uri));
return c;
@@ -1541,8 +1539,7 @@ public class EmailProvider extends ContentProvider
}
if ((c != null) && !isTemporary()) {
- // TODO(rtenneti): Enable notifications.
- // c.setNotificationUri(getContext().getContentResolver(), uri);
+ c.setNotificationUri(getContext().getContentResolver(), uri);
}
return c;
}
@@ -2549,8 +2546,7 @@ public class EmailProvider extends ContentProvider
final Set<Uri> notifications = getBatchNotificationsSet();
setBatchNotificationsSet(null);
for (final Uri uri : notifications) {
- // TODO(rtenneti): Enable notifications.
- // context.getContentResolver().notifyChange(uri, null);
+ context.getContentResolver().notifyChange(uri, null);
}
}
}
@@ -2566,8 +2562,7 @@ public class EmailProvider extends ContentProvider
@Override
public void attachmentChanged(final Context context, final long id, final int flags) {
// The default implementation delegates to the real service.
- // TODO(rtenneti): Enable AttachmentService.
- // AttachmentService.attachmentChanged(context, id, flags);
+ AttachmentService.attachmentChanged(context, id, flags);
}
};
private EmailAttachmentService mAttachmentService = DEFAULT_ATTACHMENT_SERVICE;
@@ -3981,8 +3976,7 @@ public class EmailProvider extends ContentProvider
} finally {
accountIdCursor.close();
}
- // TODO(rtenneti): Enable notifications.
- // mc.setNotificationUri(context.getContentResolver(), UIPROVIDER_ALL_ACCOUNTS_NOTIFIER);
+ mc.setNotificationUri(context.getContentResolver(), UIPROVIDER_ALL_ACCOUNTS_NOTIFIER);
return mc;
}
@@ -4643,9 +4637,8 @@ public class EmailProvider extends ContentProvider
// Return real and virtual mailboxes alike
final Cursor rawc = db.rawQuery(genQueryAccountAllMailboxes(uiProjection),
new String[] {id});
- // TODO(rtenneti): Enable notifications.
- // rawc.setNotificationUri(context.getContentResolver(), notifyUri);
- // vc.setNotificationUri(context.getContentResolver(), notifyUri);
+ rawc.setNotificationUri(context.getContentResolver(), notifyUri);
+ vc.setNotificationUri(context.getContentResolver(), notifyUri);
if (rawc.getCount() > 0) {
c = new MergeCursor(new Cursor[]{rawc, vc});
} else {
@@ -4786,8 +4779,7 @@ public class EmailProvider extends ContentProvider
break;
}
if (notifyUri != null) {
- // TODO(rtenneti): Enable notifications.
- // c.setNotificationUri(resolver, notifyUri);
+ c.setNotificationUri(resolver, notifyUri);
}
return c;
}
@@ -5242,8 +5234,7 @@ public class EmailProvider extends ContentProvider
mailPrefs.setConversationOverviewMode(overviewMode);
}
- // TODO(rtenneti): Enable notifications.
- // c.getContentResolver().notifyChange(UIPROVIDER_ALL_ACCOUNTS_NOTIFIER, null, false);
+ c.getContentResolver().notifyChange(UIPROVIDER_ALL_ACCOUNTS_NOTIFIER, null, false);
return 1;
}
@@ -5720,8 +5711,7 @@ public class EmailProvider extends ContentProvider
if (batchNotifications != null) {
batchNotifications.add(notifyUri);
} else {
- // TODO(rtenneti): Enable notifications.
- // getContext().getContentResolver().notifyChange(notifyUri, null);
+ getContext().getContentResolver().notifyChange(notifyUri, null);
}
}
@@ -6367,7 +6357,7 @@ public class EmailProvider extends ContentProvider
// Start/stop the various services depending on whether there are any accounts
// TODO: Make sure that the AttachmentService responds to this request as it
// expects a particular set of data in the intents that it receives or it ignores.
- startOrStopService(enabled, context);
+ startOrStopService(enabled, context, new Intent(context, AttachmentService.class));
final NotificationController controller =
NotificationControllerCreatorHolder.getInstance(context);
@@ -6377,16 +6367,16 @@ public class EmailProvider extends ContentProvider
}
/**
- * Starts or stops the attachment service as necessary.
- *
+ * Starts or stops the service as necessary.
* @param enabled If {@code true}, the service will be started. Otherwise, it will be stopped.
* @param context The context to manage the service with.
+ * @param intent The intent of the service to be managed.
*/
- private static void startOrStopService(boolean enabled, Context context) {
+ private static void startOrStopService(boolean enabled, Context context, Intent intent) {
if (enabled) {
- AttachmentService.startWithoutSpecificAttachmentChange(context);
+ context.startService(intent);
} else {
- AttachmentService.stop(context);
+ context.stopService(intent);
}
}
diff --git a/provider_src/com/android/email/service/AttachmentService.java b/provider_src/com/android/email/service/AttachmentService.java
index 1a628f799..632104931 100644
--- a/provider_src/com/android/email/service/AttachmentService.java
+++ b/provider_src/com/android/email/service/AttachmentService.java
@@ -27,20 +27,15 @@ import android.content.Intent;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.Uri;
-import android.os.Build.VERSION_CODES;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
import android.text.format.DateUtils;
-import androidx.core.os.BuildCompat;
-
import com.android.email.AttachmentInfo;
import com.android.email.EmailConnectivityManager;
-import com.android.email.EmailNotificationController;
import com.android.email.NotificationControllerCreatorHolder;
import com.android.email.NotificationController;
-import com.android.email.R;
import com.android.emailcommon.provider.Account;
import com.android.emailcommon.provider.EmailContent;
import com.android.emailcommon.provider.EmailContent.Attachment;
@@ -126,10 +121,6 @@ public class AttachmentService extends Service implements Runnable {
// Signify that we are being shut down & destroyed.
private volatile boolean mStop = false;
- // Indicates whether this service is currently running. Currently, only used for Android O+ to
- // decide whether to call startForegroundService or startService in start method.
- private static volatile boolean isRunning = false;
-
EmailConnectivityManager mConnectivityManager;
// Helper class that keeps track of in progress downloads to make sure that they
@@ -595,36 +586,7 @@ public class AttachmentService extends Service implements Runnable {
debugTrace("Calling startService with extras %d & %d", id, flags);
intent.putExtra(EXTRA_ATTACHMENT_ID, id);
intent.putExtra(EXTRA_ATTACHMENT_FLAGS, flags);
- start(context, intent);
- }
-
- public static void startWithoutSpecificAttachmentChange(Context context) {
- LogUtils.d(LOG_TAG, "Going to start AttachmentService without specifying an attachment.");
-
- Intent intent = new Intent(context, AttachmentService.class);
- start(context, intent);
- }
-
- /**
- * Starts running attachment service.
- *
- * @param intent an intent set to run AttachmentService class
- */
- public static void start(Context context, Intent intent) {
- // TODO(rtenneti): Enable notifications.
- // if (context.getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.O &&
- // !isRunning) {
- // LogUtils.i(LOG_TAG, "startForegroundService");
- // context.startForegroundService(intent);
- // } else {
- // LogUtils.i(LOG_TAG, "startService");
- // context.startService(intent);
- // }
- }
-
- public static void stop(Context context) {
- Intent intent = new Intent(context, AttachmentService.class);
- context.stopService(intent);
+ context.startService(intent);
}
/**
@@ -660,16 +622,6 @@ public class AttachmentService extends Service implements Runnable {
*/
@Override
public void onCreate() {
- isRunning = true;
- if (getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.O) {
- LogUtils.i(LOG_TAG, "startForeground");
- startForeground(
- EmailNotificationController.NOTIFICATION_ID_ONGOING_ATTACHMENT,
- EmailNotificationController.getOngoingDownloadNotification(
- getApplicationContext(),
- getApplicationContext().getString(
- R.string.notification_downloading_attachments_title)));
- }
// Start up our service thread.
new Thread(this, "AttachmentService").start();
}
@@ -697,7 +649,6 @@ public class AttachmentService extends Service implements Runnable {
mConnectivityManager.stopWait();
mConnectivityManager = null;
}
- isRunning = false;
}
/**
diff --git a/provider_src/com/android/email/service/EmailBroadcastProcessorService.java b/provider_src/com/android/email/service/EmailBroadcastProcessorService.java
index 5d264f007..7aa54673e 100644
--- a/provider_src/com/android/email/service/EmailBroadcastProcessorService.java
+++ b/provider_src/com/android/email/service/EmailBroadcastProcessorService.java
@@ -17,6 +17,7 @@
package com.android.email.service;
import android.accounts.AccountManager;
+import android.app.IntentService;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -33,8 +34,6 @@ import android.provider.ContactsContract;
import android.text.TextUtils;
import android.text.format.DateUtils;
-import androidx.core.app.JobIntentService;
-
import com.android.email.EmailIntentService;
import com.android.email.Preferences;
import com.android.email.R;
@@ -70,9 +69,7 @@ import java.util.Set;
* This also handles the DeviceAdminReceiver in SecurityPolicy, because it is also
* a BroadcastReceiver and requires the same processing semantics.
*/
-public class EmailBroadcastProcessorService extends JobIntentService {
- public static final int JOB_ID = 200;
-
+public class EmailBroadcastProcessorService extends IntentService {
// Action used for BroadcastReceiver entry point
private static final String ACTION_BROADCAST = "broadcast_receiver";
@@ -84,11 +81,11 @@ public class EmailBroadcastProcessorService extends JobIntentService {
private static final String ACTION_UPGRADE_BROADCAST = "upgrade_broadcast_receiver";
public EmailBroadcastProcessorService() {
- super();
- }
+ // Class name will be the thread name.
+ super(EmailBroadcastProcessorService.class.getName());
- public static void enqueueWork(Context context, Intent work) {
- enqueueWork(context, EmailBroadcastProcessorService.class, JOB_ID, work);
+ // Intent should be redelivered if the process gets killed before completing the job.
+ setIntentRedelivery(true);
}
/**
@@ -98,13 +95,13 @@ public class EmailBroadcastProcessorService extends JobIntentService {
Intent i = new Intent(context, EmailBroadcastProcessorService.class);
i.setAction(ACTION_BROADCAST);
i.putExtra(Intent.EXTRA_INTENT, broadcastIntent);
- EmailBroadcastProcessorService.enqueueWork(context, i);
+ context.startService(i);
}
public static void processUpgradeBroadcastIntent(final Context context) {
final Intent i = new Intent(context, EmailBroadcastProcessorService.class);
i.setAction(ACTION_UPGRADE_BROADCAST);
- EmailBroadcastProcessorService.enqueueWork(context, i);
+ context.startService(i);
}
/**
@@ -116,11 +113,11 @@ public class EmailBroadcastProcessorService extends JobIntentService {
Intent i = new Intent(context, EmailBroadcastProcessorService.class);
i.setAction(ACTION_DEVICE_POLICY_ADMIN);
i.putExtra(EXTRA_DEVICE_POLICY_ADMIN, message);
- EmailBroadcastProcessorService.enqueueWork(context, i);
+ context.startService(i);
}
@Override
- protected void onHandleWork(Intent intent) {
+ protected void onHandleIntent(Intent intent) {
// This method is called on a worker thread.
// Dispatch from entry point
diff --git a/res/values/strings.xml b/res/values/strings.xml
index dd1d5c158..2f39425a4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -110,9 +110,6 @@
<!-- Notification title when a forwarded attachment couldn't be sent [CHAR LIMIT=30]-->
<string name="forward_download_failed_title">Attachment not forwarded</string>
- <!-- Notification title when an attachment is being downloaded on Android O and later [CHAR LIMIT=30] -->
- <string name="notification_downloading_attachments_title">Syncing mail&#8230;</string>
-
<!-- Notification ticker when email account authentication fails [CHAR LIMIT=none] -->
<string name="login_failed_ticker">
<xliff:g id="account_name">%s</xliff:g> signin unsuccessful.</string>
diff --git a/src/com/android/email/EmailNotificationController.java b/src/com/android/email/EmailNotificationController.java
index c9254adc4..6773f1bee 100644
--- a/src/com/android/email/EmailNotificationController.java
+++ b/src/com/android/email/EmailNotificationController.java
@@ -68,10 +68,6 @@ public class EmailNotificationController implements NotificationController {
private static final int NOTIFICATION_ID_ATTACHMENT_WARNING = 3;
private static final int NOTIFICATION_ID_PASSWORD_EXPIRING = 4;
private static final int NOTIFICATION_ID_PASSWORD_EXPIRED = 5;
- private static final int NOTIFICATION_ID_PERMISSIONS_NEEDED = 6;
- public static final int NOTIFICATION_ID_ONGOING_ATTACHMENT = 7;
-
- public static final String NOTIFICATION_CHANNEL_ID_ATTACHMENTS = "^nc_~_z_attachments";
private static final int NOTIFICATION_ID_BASE_MASK = 0xF0000000;
private static final int NOTIFICATION_ID_BASE_LOGIN_WARNING = 0x20000000;
@@ -405,31 +401,6 @@ public class EmailNotificationController implements NotificationController {
}
/**
- * Creates a notification to be used with {@link com.android.email.service.AttachmentService},
- * which should be launched as a foreground service on Android O+.
- *
- * <p>The notification is sent with the lowest priority and contains an indefinite loading bar,
- * hence "ongoing".
- *
- * @param title The text that will be displayed on the ongoing notification.
- */
- public static Notification getOngoingDownloadNotification(Context context, String title) {
- NotificationCompat.Builder builder =
- new NotificationCompat.Builder(context)
- .setContentTitle(title)
- .setVisibility(Notification.VISIBILITY_SECRET)
- .setProgress(0, 0, true)
- .setSmallIcon(R.drawable.ic_notification_mail_24dp)
- .setOngoing(true);
-
- if (context.getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.O) {
- builder.setChannelId(NOTIFICATION_CHANNEL_ID_ATTACHMENTS);
- }
-
- return builder.build();
- }
-
- /**
* Returns a notification ID for login failed notifications for the given account account.
*/
private static int getLoginFailedNotificationId(long accountId) {
diff --git a/src/com/android/email/activity/ComposeActivityEmailExternal.java b/src/com/android/email/activity/ComposeActivityEmailExternal.java
index a9967c46b..07f6fe160 100644
--- a/src/com/android/email/activity/ComposeActivityEmailExternal.java
+++ b/src/com/android/email/activity/ComposeActivityEmailExternal.java
@@ -18,7 +18,6 @@ package com.android.email.activity;
import android.content.Intent;
import android.os.Bundle;
-import androidx.annotation.Nullable;
import com.android.mail.compose.ComposeActivity;
/**
@@ -27,7 +26,7 @@ import com.android.mail.compose.ComposeActivity;
public class ComposeActivityEmailExternal extends ComposeActivityEmail {
@Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
+ protected void onCreate(Bundle savedInstanceState) {
sanitizeIntent();
super.onCreate(savedInstanceState);
}
diff --git a/tests/Android.mk b/tests/Android.mk
index 60105f05c..d5e9d9616 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -31,7 +31,6 @@ LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
# stay at 1.6 as long as LOCAL_SDK_VERSION is set to a value < 19. See http://b/38495704
LOCAL_JAVA_LANGUAGE_VERSION := 1.6
LOCAL_SDK_VERSION := 14
-LOCAL_COMPATIBILITY_SUITE := general-tests
LOCAL_PACKAGE_NAME := EmailTests
LOCAL_INSTRUMENTATION_FOR := Email
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 81cb67e57..b5e087c37 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -4,9 +4,9 @@
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.
@@ -20,7 +20,7 @@
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
- which is needed when building test cases. -->
+ which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
@@ -28,7 +28,7 @@
<!--
This declares that this app uses the instrumentation test runner targeting
the package of com.android.email. To run the tests use the command:
- "adb shell am instrument -w com.android.email.tests"
+ "adb shell am instrument -w com.android.email.tests/androidx.test.runner.AndroidJUnitRunner"
-->
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.email"
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
deleted file mode 100644
index 8cced707b..000000000
--- a/tests/AndroidTest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-<configuration description="Runs Email Tests.">
- <option name="test-suite-tag" value="apct" />
- <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
- <option name="cleanup-apks" value="true" />
- <option name="test-file-name" value="EmailTests.apk" />
- <option name="test-file-name" value="Email.apk" />
- </target_preparer>
-
- <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
- <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
- <option name="package" value="com.android.email.tests" />
- </test>
-</configuration>