diff options
| author | 2020-03-17 19:12:22 +0000 | |
|---|---|---|
| committer | 2020-03-17 19:12:22 +0000 | |
| commit | 8ee67363d178f024d714d33ab0dcade65fd89876 (patch) | |
| tree | 698853bf4c8be42e781a0afb7c0756f771095ef7 | |
| parent | 803b0f1b83242cd08f58f6b0d4b161bf98cb19ba (diff) | |
| parent | ef155afdbaddd2ff4111aa4164eb165b5fbd1aee (diff) | |
Merge "Revert "Enabled Content Capture in Service"" into rvc-dev am: 18ee16a6d5 am: ef155afdba
Change-Id: I1a159692cf3c3cc17c2eb8ce82d3e981b8a88ec4
| -rw-r--r-- | core/java/android/app/Service.java | 27 | ||||
| -rw-r--r-- | services/tests/uiservicestests/src/com/android/server/notification/ScheduleConditionProviderTest.java | 4 |
2 files changed, 3 insertions, 28 deletions
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index 81396fe6a270..dc8269f900b7 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -34,7 +34,6 @@ import android.os.Build; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; -import android.view.contentcapture.ContentCaptureManager; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -307,8 +306,7 @@ import java.lang.annotation.RetentionPolicy; * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java * bind} */ -public abstract class Service extends ContextWrapper implements ComponentCallbacks2, - ContentCaptureManager.ContentCaptureClient { +public abstract class Service extends ContextWrapper implements ComponentCallbacks2 { private static final String TAG = "Service"; /** @@ -819,16 +817,8 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac writer.println("nothing to dump"); } - @Override - protected void attachBaseContext(Context newBase) { - super.attachBaseContext(newBase); - if (newBase != null) { - newBase.setContentCaptureOptions(getContentCaptureOptions()); - } - } - // ------------------ Internal API ------------------ - + /** * @hide */ @@ -845,7 +835,6 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac mActivityManager = (IActivityManager)activityManager; mStartCompatibility = getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.ECLAIR; - setContentCaptureOptions(application.getContentCaptureOptions()); } /** @@ -860,18 +849,6 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac return mClassName; } - /** @hide */ - @Override - public final ContentCaptureManager.ContentCaptureClient getContentCaptureClient() { - return this; - } - - /** @hide */ - @Override - public final ComponentName contentCaptureClientGetComponentName() { - return new ComponentName(this, mClassName); - } - // set by the thread after the constructor and before onCreate(Bundle icicle) is called. @UnsupportedAppUsage private ActivityThread mThread = null; diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ScheduleConditionProviderTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ScheduleConditionProviderTest.java index 5a527a219055..551e1860d9b3 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/ScheduleConditionProviderTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/ScheduleConditionProviderTest.java @@ -3,10 +3,8 @@ package com.android.server.notification; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; -import android.app.Application; import android.content.Intent; import android.net.Uri; import android.service.notification.Condition; @@ -47,7 +45,7 @@ public class ScheduleConditionProviderTest extends UiServiceTestCase { null, // ActivityThread not actually used in Service ScheduleConditionProvider.class.getName(), null, // token not needed when not talking with the activity manager - mock(Application.class), + null, null // mocked services don't talk with the activity manager ); service.onCreate(); |