checkpoint: split libutils into libutils + libbinder
This commit is contained in:
@@ -42,6 +42,7 @@ LOCAL_SRC_FILES:= \
|
||||
LOCAL_SHARED_LIBRARIES:= \
|
||||
libui \
|
||||
libutils \
|
||||
libbinder \
|
||||
libcutils \
|
||||
libmedia
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ LOCAL_SRC_FILES:= \
|
||||
dumpsys.cpp
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libutils
|
||||
libutils \
|
||||
libbinder
|
||||
|
||||
|
||||
ifeq ($(TARGET_OS),linux)
|
||||
LOCAL_CFLAGS += -DXP_UNIX
|
||||
|
||||
@@ -10,6 +10,7 @@ LOCAL_SRC_FILES:= \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libutils \
|
||||
libbinder \
|
||||
libandroid_runtime \
|
||||
libcutils \
|
||||
libui \
|
||||
|
||||
@@ -4,8 +4,7 @@ include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES:= \
|
||||
service.cpp
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libutils
|
||||
LOCAL_SHARED_LIBRARIES := libutils libbinder
|
||||
|
||||
ifeq ($(TARGET_OS),linux)
|
||||
LOCAL_CFLAGS += -DXP_UNIX
|
||||
|
||||
@@ -6,6 +6,7 @@ LOCAL_SRC_FILES:= \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libsurfaceflinger \
|
||||
libbinder \
|
||||
libutils
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
|
||||
@@ -6,6 +6,7 @@ LOCAL_SRC_FILES:= \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libutils \
|
||||
libbinder \
|
||||
libsystem_server
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
|
||||
@@ -20,6 +20,7 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
libcameraservice \
|
||||
libmediaplayerservice \
|
||||
libutils \
|
||||
libbinder \
|
||||
libcutils
|
||||
|
||||
LOCAL_MODULE:= libsystem_server
|
||||
|
||||
@@ -146,6 +146,7 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
libnativehelper \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libnetutils \
|
||||
libui \
|
||||
libskiagl \
|
||||
|
||||
39
include/private/binder/Static.h
Normal file
39
include/private/binder/Static.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2008 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.
|
||||
*/
|
||||
|
||||
// All static variables go here, to control initialization and
|
||||
// destruction order in the library.
|
||||
|
||||
#include <utils/threads.h>
|
||||
|
||||
#include <utils/IBinder.h>
|
||||
#include <utils/IMemory.h>
|
||||
#include <utils/ProcessState.h>
|
||||
#include <utils/IPermissionController.h>
|
||||
#include <utils/IServiceManager.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
// For ProcessState.cpp
|
||||
extern Mutex gProcessMutex;
|
||||
extern sp<ProcessState> gProcess;
|
||||
|
||||
// For ServiceManager.cpp
|
||||
extern Mutex gDefaultServiceManagerLock;
|
||||
extern sp<IServiceManager> gDefaultServiceManager;
|
||||
extern sp<IPermissionController> gPermissionController;
|
||||
|
||||
} // namespace android
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <utils/threads.h>
|
||||
#include <utils/KeyedVector.h>
|
||||
|
||||
/*
|
||||
#ifndef LIBUTILS_NATIVE
|
||||
#include <utils/IBinder.h>
|
||||
#include <utils/IMemory.h>
|
||||
@@ -27,6 +28,7 @@
|
||||
#include <utils/IPermissionController.h>
|
||||
#include <utils/IServiceManager.h>
|
||||
#endif
|
||||
*/
|
||||
|
||||
namespace android {
|
||||
// For TextStream.cpp
|
||||
@@ -41,7 +43,7 @@ extern void initialize_string16();
|
||||
extern void terminate_string16();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#ifndef LIBUTILS_NATIVE
|
||||
|
||||
// For ProcessState.cpp
|
||||
@@ -54,5 +56,6 @@ extern sp<IServiceManager> gDefaultServiceManager;
|
||||
extern sp<IPermissionController> gPermissionController;
|
||||
|
||||
#endif
|
||||
*/
|
||||
|
||||
} // namespace android
|
||||
|
||||
@@ -11,6 +11,7 @@ LOCAL_SRC_FILES:= \
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libmedia \
|
||||
libhardware_legacy
|
||||
|
||||
@@ -34,6 +35,7 @@ LOCAL_SRC_FILES:= \
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libmedia \
|
||||
libhardware_legacy
|
||||
|
||||
|
||||
44
libs/binder/Android.mk
Normal file
44
libs/binder/Android.mk
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright (C) 2009 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.
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# we have the common sources, plus some device-specific stuff
|
||||
LOCAL_SRC_FILES:= \
|
||||
Binder.cpp \
|
||||
BpBinder.cpp \
|
||||
IInterface.cpp \
|
||||
IMemory.cpp \
|
||||
IPCThreadState.cpp \
|
||||
IPermissionController.cpp \
|
||||
IServiceManager.cpp \
|
||||
MemoryDealer.cpp \
|
||||
MemoryBase.cpp \
|
||||
MemoryHeapBase.cpp \
|
||||
MemoryHeapPmem.cpp \
|
||||
Parcel.cpp \
|
||||
ProcessState.cpp \
|
||||
Static.cpp
|
||||
|
||||
LOCAL_LDLIBS += -lpthread
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
liblog \
|
||||
libcutils \
|
||||
libutils
|
||||
|
||||
LOCAL_MODULE:= libbinder
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -23,8 +23,8 @@
|
||||
#include <utils/TextOutput.h>
|
||||
#include <utils/threads.h>
|
||||
|
||||
#include <private/utils/binder_module.h>
|
||||
#include <private/utils/Static.h>
|
||||
#include <private/binder/binder_module.h>
|
||||
#include <private/binder/Static.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <utils/Parcel.h>
|
||||
#include <utils/String8.h>
|
||||
|
||||
#include <private/utils/Static.h>
|
||||
#include <private/binder/Static.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <utils/String8.h>
|
||||
#include <utils/SystemClock.h>
|
||||
|
||||
#include <private/utils/Static.h>
|
||||
#include <private/binder/Static.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <utils/TextOutput.h>
|
||||
#include <utils/misc.h>
|
||||
|
||||
#include <private/utils/binder_module.h>
|
||||
#include <private/binder/binder_module.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -29,8 +29,8 @@
|
||||
#include <utils/String8.h>
|
||||
#include <utils/threads.h>
|
||||
|
||||
#include <private/utils/binder_module.h>
|
||||
#include <private/utils/Static.h>
|
||||
#include <private/binder/binder_module.h>
|
||||
#include <private/binder/Static.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
53
libs/binder/Static.cpp
Normal file
53
libs/binder/Static.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2008 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.
|
||||
*/
|
||||
|
||||
// All static variables go here, to control initialization and
|
||||
// destruction order in the library.
|
||||
|
||||
#include <private/binder/Static.h>
|
||||
|
||||
#include <utils/IPCThreadState.h>
|
||||
#include <utils/Log.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
// ------------ ProcessState.cpp
|
||||
|
||||
Mutex gProcessMutex;
|
||||
sp<ProcessState> gProcess;
|
||||
|
||||
class LibUtilsIPCtStatics
|
||||
{
|
||||
public:
|
||||
LibUtilsIPCtStatics()
|
||||
{
|
||||
}
|
||||
|
||||
~LibUtilsIPCtStatics()
|
||||
{
|
||||
IPCThreadState::shutdown();
|
||||
}
|
||||
};
|
||||
|
||||
static LibUtilsIPCtStatics gIPCStatics;
|
||||
|
||||
// ------------ ServiceManager.cpp
|
||||
|
||||
Mutex gDefaultServiceManagerLock;
|
||||
sp<IServiceManager> gDefaultServiceManager;
|
||||
sp<IPermissionController> gPermissionController;
|
||||
|
||||
} // namespace android
|
||||
@@ -34,6 +34,7 @@ endif
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libhardware \
|
||||
libutils \
|
||||
libbinder \
|
||||
libcutils \
|
||||
libui \
|
||||
libcorecg \
|
||||
|
||||
@@ -32,6 +32,7 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
libcorecg \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libpixelflinger \
|
||||
libhardware \
|
||||
libhardware_legacy
|
||||
|
||||
@@ -103,19 +103,6 @@ include $(CLEAR_VARS)
|
||||
# we have the common sources, plus some device-specific stuff
|
||||
LOCAL_SRC_FILES:= \
|
||||
$(commonSources) \
|
||||
Binder.cpp \
|
||||
BpBinder.cpp \
|
||||
IInterface.cpp \
|
||||
IMemory.cpp \
|
||||
IPCThreadState.cpp \
|
||||
MemoryDealer.cpp \
|
||||
MemoryBase.cpp \
|
||||
MemoryHeapBase.cpp \
|
||||
MemoryHeapPmem.cpp \
|
||||
Parcel.cpp \
|
||||
ProcessState.cpp \
|
||||
IPermissionController.cpp \
|
||||
IServiceManager.cpp \
|
||||
Unicode.cpp \
|
||||
backup_data.cpp \
|
||||
backup_helper_file.cpp
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <private/utils/Static.h>
|
||||
|
||||
#include <utils/BufferedTextOutput.h>
|
||||
#include <utils/IPCThreadState.h>
|
||||
#include <utils/Log.h>
|
||||
|
||||
namespace android {
|
||||
@@ -87,34 +86,4 @@ TextOutput& alog(gLogTextOutput);
|
||||
TextOutput& aout(gStdoutTextOutput);
|
||||
TextOutput& aerr(gStderrTextOutput);
|
||||
|
||||
#ifndef LIBUTILS_NATIVE
|
||||
|
||||
// ------------ ProcessState.cpp
|
||||
|
||||
Mutex gProcessMutex;
|
||||
sp<ProcessState> gProcess;
|
||||
|
||||
class LibUtilsIPCtStatics
|
||||
{
|
||||
public:
|
||||
LibUtilsIPCtStatics()
|
||||
{
|
||||
}
|
||||
|
||||
~LibUtilsIPCtStatics()
|
||||
{
|
||||
IPCThreadState::shutdown();
|
||||
}
|
||||
};
|
||||
|
||||
static LibUtilsIPCtStatics gIPCStatics;
|
||||
|
||||
// ------------ ServiceManager.cpp
|
||||
|
||||
Mutex gDefaultServiceManagerLock;
|
||||
sp<IServiceManager> gDefaultServiceManager;
|
||||
sp<IPermissionController> gPermissionController;
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace android
|
||||
|
||||
@@ -18,6 +18,7 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
libnativehelper \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libmedia \
|
||||
libsgl \
|
||||
libui
|
||||
|
||||
@@ -9,6 +9,7 @@ LOCAL_SRC_FILES:= \
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libandroid_runtime \
|
||||
libnativehelper \
|
||||
libmedia
|
||||
|
||||
@@ -21,7 +21,7 @@ LOCAL_SRC_FILES:= \
|
||||
JetPlayer.cpp
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libui libcutils libutils libsonivox
|
||||
libui libcutils libutils libbinder libsonivox
|
||||
|
||||
LOCAL_MODULE:= libmedia
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ endif
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
libutils \
|
||||
libbinder \
|
||||
libvorbisidec \
|
||||
libsonivox \
|
||||
libopencore_player \
|
||||
|
||||
@@ -8,7 +8,8 @@ LOCAL_SHARED_LIBRARIES := \
|
||||
libaudioflinger \
|
||||
libcameraservice \
|
||||
libmediaplayerservice \
|
||||
libutils
|
||||
libutils \
|
||||
libbinder
|
||||
|
||||
base := $(LOCAL_PATH)/../..
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ LOCAL_SRC_FILES:= \
|
||||
EGL/gpu.cpp \
|
||||
#
|
||||
|
||||
LOCAL_SHARED_LIBRARIES += libcutils libutils libui
|
||||
LOCAL_SHARED_LIBRARIES += libcutils libutils libbinder libui
|
||||
LOCAL_LDLIBS := -lpthread -ldl
|
||||
LOCAL_MODULE:= libEGL
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
#include "JNIHelp.h"
|
||||
#include "jni.h"
|
||||
#include "utils/Log.h"
|
||||
#include "utils/misc.h"
|
||||
#include <utils/Log.h>
|
||||
#include <utils/misc.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#include "JNIHelp.h"
|
||||
#include "jni.h"
|
||||
#include "utils/Log.h"
|
||||
#include "utils/misc.h"
|
||||
#include <utils/Log.h>
|
||||
#include <utils/misc.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user