Home | History | Annotate | Download | only in binder
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef ANDROID_IACTIVITY_MANAGER_H
     18 #define ANDROID_IACTIVITY_MANAGER_H
     19 
     20 #ifndef __ANDROID_VNDK__
     21 
     22 #include <binder/IInterface.h>
     23 #include <binder/IUidObserver.h>
     24 
     25 namespace android {
     26 
     27 // ------------------------------------------------------------------------------------
     28 
     29 class IActivityManager : public IInterface
     30 {
     31 public:
     32     DECLARE_META_INTERFACE(ActivityManager)
     33 
     34     virtual int openContentUri(const String16& stringUri) = 0;
     35     virtual void registerUidObserver(const sp<IUidObserver>& observer,
     36                                      const int32_t event,
     37                                      const int32_t cutpoint,
     38                                      const String16& callingPackage) = 0;
     39     virtual void unregisterUidObserver(const sp<IUidObserver>& observer) = 0;
     40     virtual bool isUidActive(const uid_t uid, const String16& callingPackage) = 0;
     41 
     42     enum {
     43         OPEN_CONTENT_URI_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
     44         REGISTER_UID_OBSERVER_TRANSACTION,
     45         UNREGISTER_UID_OBSERVER_TRANSACTION,
     46         IS_UID_ACTIVE_TRANSACTION
     47     };
     48 };
     49 
     50 // ------------------------------------------------------------------------------------
     51 
     52 }; // namespace android
     53 
     54 #else // __ANDROID_VNDK__
     55 #error "This header is not visible to vendors"
     56 #endif // __ANDROID_VNDK__
     57 
     58 #endif // ANDROID_IACTIVITY_MANAGER_H
     59