diff options
| author | Jeff Brown <jeffbrown@google.com> | 2014-04-09 04:36:51 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-09 04:36:51 +0000 |
| commit | 7289f3ab8f05db6206d696d75f460fadc05dc731 (patch) | |
| tree | 73cd2bc9edaeb53467b875c1447211bd4def9ac7 /core/java/android | |
| parent | ea72cdf22f8efde4d3b872a60587e4b26bc93e43 (diff) | |
| parent | 13014b5fe5967b3c7e232ffaf81581ed178e6df6 (diff) | |
Merge "Move certain internal activity manager methods to new class." into klp-modular-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ActivityManagerInternal.java | 28 | ||||
| -rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 59 | ||||
| -rw-r--r-- | core/java/android/app/IActivityManager.java | 7 |
3 files changed, 28 insertions, 66 deletions
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java new file mode 100644 index 000000000000..5262a5f2b2b2 --- /dev/null +++ b/core/java/android/app/ActivityManagerInternal.java @@ -0,0 +1,28 @@ +/* + * 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 android.app; + +/** + * Activity manager local system service interface. + * + * @hide Only for use within the system server. + */ +public abstract class ActivityManagerInternal { + // Called by the power manager. + public abstract void goingToSleep(); + public abstract void wakingUp(); +} diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 7695eccabc60..0b8568626465 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -1199,20 +1199,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } - case GOING_TO_SLEEP_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - goingToSleep(); - reply.writeNoException(); - return true; - } - - case WAKING_UP_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - wakingUp(); - reply.writeNoException(); - return true; - } - case SET_LOCK_SCREEN_SHOWN_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); setLockScreenShown(data.readInt() != 0); @@ -1283,17 +1269,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } - case START_RUNNING_TRANSACTION: { - data.enforceInterface(IActivityManager.descriptor); - String pkg = data.readString(); - String cls = data.readString(); - String action = data.readString(); - String indata = data.readString(); - startRunning(pkg, cls, action, indata); - reply.writeNoException(); - return true; - } - case HANDLE_APPLICATION_CRASH_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder app = data.readStrongBinder(); @@ -3586,26 +3561,6 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); return pfd; } - public void goingToSleep() throws RemoteException - { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - mRemote.transact(GOING_TO_SLEEP_TRANSACTION, data, reply, 0); - reply.readException(); - data.recycle(); - reply.recycle(); - } - public void wakingUp() throws RemoteException - { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - mRemote.transact(WAKING_UP_TRANSACTION, data, reply, 0); - reply.readException(); - data.recycle(); - reply.recycle(); - } public void setLockScreenShown(boolean shown) throws RemoteException { Parcel data = Parcel.obtain(); @@ -3693,20 +3648,6 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); return res; } - public void startRunning(String pkg, String cls, String action, - String indata) throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - data.writeInterfaceToken(IActivityManager.descriptor); - data.writeString(pkg); - data.writeString(cls); - data.writeString(action); - data.writeString(indata); - mRemote.transact(START_RUNNING_TRANSACTION, data, reply, 0); - reply.readException(); - data.recycle(); - reply.recycle(); - } public boolean testIsSystemReady() { /* this base class version is never called */ diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index 02a6343bf746..4e2a57ddc41b 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -228,8 +228,6 @@ public interface IActivityManager extends IInterface { public void forceStopPackage(final String packageName, int userId) throws RemoteException; // Note: probably don't want to allow applications access to these. - public void goingToSleep() throws RemoteException; - public void wakingUp() throws RemoteException; public void setLockScreenShown(boolean shown) throws RemoteException; public void unhandledBack() throws RemoteException; @@ -249,8 +247,6 @@ public interface IActivityManager extends IInterface { public boolean killProcessesBelowForeground(String reason) throws RemoteException; // Special low-level communication with activity manager. - public void startRunning(String pkg, String cls, String action, - String data) throws RemoteException; public void handleApplicationCrash(IBinder app, ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException; public boolean handleApplicationWtf(IBinder app, String tag, @@ -525,7 +521,6 @@ public interface IActivityManager extends IInterface { // Please keep these transaction codes the same -- they are also // sent by C++ code. - int START_RUNNING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION; int HANDLE_APPLICATION_CRASH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+1; int START_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+2; int UNHANDLED_BACK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+3; @@ -561,8 +556,6 @@ public interface IActivityManager extends IInterface { int UNBIND_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+36; int PUBLISH_SERVICE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+37; int ACTIVITY_RESUMED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+38; - int GOING_TO_SLEEP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+39; - int WAKING_UP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+40; int SET_DEBUG_APP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+41; int SET_ALWAYS_FINISH_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+42; int START_INSTRUMENTATION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+43; |
