diff options
author | Christopher Tate <ctate@google.com> | 2014-06-16 15:51:39 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2014-06-17 12:14:45 -0700 |
commit | cf1a2f73fc102be2ac7060ac97d4682bb2565ca5 (patch) | |
tree | f00e01d283dbf43199d2d3692d578b7e18e9326c /tests | |
parent | 6b2df21ecacfa6826a85cabdf8d6fe0e81fe11d9 (diff) | |
download | frameworks_base-cf1a2f73fc102be2ac7060ac97d4682bb2565ca5.zip frameworks_base-cf1a2f73fc102be2ac7060ac97d4682bb2565ca5.tar.gz frameworks_base-cf1a2f73fc102be2ac7060ac97d4682bb2565ca5.tar.bz2 |
Switch everything to scheduled jobs
Everything that used the IdleMaintenance APIs/broadcasts gets to use the
spiffy new JobScheduler instead. Hooray!
On top of that, the now-obsolete "idle maintenance" APIs are now gone
entirely. Double hooray!
Bug 14993295
Change-Id: I5fb67c296ca8cd0ba8a2c8760a0f0d9d962d813b
Diffstat (limited to 'tests')
6 files changed, 0 insertions, 246 deletions
diff --git a/tests/IdleServiceTest/Android.mk b/tests/IdleServiceTest/Android.mk deleted file mode 100644 index a7879c5..0000000 --- a/tests/IdleServiceTest/Android.mk +++ /dev/null @@ -1,13 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := tests - -LOCAL_SRC_FILES := $(call all-subdir-java-files) - -LOCAL_PACKAGE_NAME := IdleServiceTest -LOCAL_CERTIFICATE := platform - -LOCAL_PROGUARD_ENABLED := disabled - -include $(BUILD_PACKAGE) diff --git a/tests/IdleServiceTest/AndroidManifest.xml b/tests/IdleServiceTest/AndroidManifest.xml deleted file mode 100644 index 16d2324..0000000 --- a/tests/IdleServiceTest/AndroidManifest.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2014 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. ---> - -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.android.idleservicetest"> - - <application> - <service android:name="TestService" - android:exported="true" - android:enabled="true" - android:permission="android.permission.BIND_IDLE_SERVICE" > - <intent-filter> - <action android:name="android.service.idle.IdleService" /> - </intent-filter> - </service> - - <service android:name="CrashingTestService" - android:exported="true" - android:enabled="true" - android:permission="android.permission.BIND_IDLE_SERVICE" > - <intent-filter> - <action android:name="android.service.idle.IdleService" /> - </intent-filter> - </service> - - <service android:name="TimeoutTestService" - android:exported="true" - android:enabled="true" - android:permission="android.permission.BIND_IDLE_SERVICE" > - <intent-filter> - <action android:name="android.service.idle.IdleService" /> - </intent-filter> - </service> - - <!-- UnpermissionedTestService should never run because it does - not require the necessary permission in its <service> block --> - <service android:name="UnpermissionedTestService" - android:exported="true" - android:enabled="true" > - <intent-filter> - <action android:name="android.service.idle.IdleService" /> - </intent-filter> - </service> - - </application> -</manifest> diff --git a/tests/IdleServiceTest/src/com/android/idleservicetest/CrashingTestService.java b/tests/IdleServiceTest/src/com/android/idleservicetest/CrashingTestService.java deleted file mode 100644 index 022ebcf..0000000 --- a/tests/IdleServiceTest/src/com/android/idleservicetest/CrashingTestService.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2014 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.idleservicetest; - -import android.app.maintenance.IdleService; -import android.os.Handler; -import android.util.Log; - -public class CrashingTestService extends IdleService { - static final String TAG = "CrashingTestService"; - - String mNull = null; - - @Override - public boolean onIdleStart() { - Log.i(TAG, "Idle maintenance: onIdleStart()"); - - Handler h = new Handler(); - Runnable r = new Runnable() { - @Override - public void run() { - Log.i(TAG, "Explicitly crashing"); - if (mNull.equals("")) { - Log.i(TAG, "won't happen"); - } - } - }; - Log.i(TAG, "Posting explicit crash in 15 seconds"); - h.postDelayed(r, 15 * 1000); - return true; - } - - @Override - public void onIdleStop() { - Log.i(TAG, "Idle maintenance: onIdleStop()"); - } - -} diff --git a/tests/IdleServiceTest/src/com/android/idleservicetest/TestService.java b/tests/IdleServiceTest/src/com/android/idleservicetest/TestService.java deleted file mode 100644 index 7e9805f..0000000 --- a/tests/IdleServiceTest/src/com/android/idleservicetest/TestService.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2014 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.idleservicetest; - -import android.app.maintenance.IdleService; -import android.os.Handler; -import android.util.Log; - -public class TestService extends IdleService { - static final String TAG = "TestService"; - - @Override - public boolean onIdleStart() { - Log.i(TAG, "Idle maintenance: onIdleStart()"); - - Handler h = new Handler(); - Runnable r = new Runnable() { - @Override - public void run() { - Log.i(TAG, "Explicitly finishing idle"); - finishIdle(); - } - }; - Log.i(TAG, "Posting explicit finish in 15 seconds"); - h.postDelayed(r, 15 * 1000); - return true; - } - - @Override - public void onIdleStop() { - Log.i(TAG, "Idle maintenance: onIdleStop()"); - } - -} diff --git a/tests/IdleServiceTest/src/com/android/idleservicetest/TimeoutTestService.java b/tests/IdleServiceTest/src/com/android/idleservicetest/TimeoutTestService.java deleted file mode 100644 index b2ba21b..0000000 --- a/tests/IdleServiceTest/src/com/android/idleservicetest/TimeoutTestService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2014 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.idleservicetest; - -import android.app.maintenance.IdleService; -import android.util.Log; - -public class TimeoutTestService extends IdleService { - private static final String TAG = "TimeoutTestService"; - - @Override - public boolean onIdleStart() { - Log.i(TAG, "onIdleStart() but anticipating time-slice timeout"); - return true; - } - - @Override - public void onIdleStop() { - Log.i(TAG, "onIdleStop() so we're done"); - } - -} diff --git a/tests/IdleServiceTest/src/com/android/idleservicetest/UnpermissionedTestService.java b/tests/IdleServiceTest/src/com/android/idleservicetest/UnpermissionedTestService.java deleted file mode 100644 index b9fe32b..0000000 --- a/tests/IdleServiceTest/src/com/android/idleservicetest/UnpermissionedTestService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2014 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.idleservicetest; - -import android.app.maintenance.IdleService; -import android.util.Log; - -// Should never be invoked because its manifest declaration does not -// require the necessary permission. -public class UnpermissionedTestService extends IdleService { - private static final String TAG = "UnpermissionedTestService"; - - @Override - public boolean onIdleStart() { - Log.e(TAG, "onIdleStart() for this service should never be called!"); - return false; - } - - @Override - public void onIdleStop() { - Log.e(TAG, "onIdleStop() for this service should never be called!"); - } - -} |