(求助)本地Android源码与网上他人文章所述不一样
向大家请教个问题,还望大家不吝赐教。
我之前通过git在https://android.googlesource.com/ 下载了
Android的部分代码,在阅读代码过程中,发现与网上他人
分析的代码流程及贴出的代码片段很不同。
请问是版本问题吗? 如何知道自己的代码版本?
我本地: \platform\frameworks\av\camera\camera.cpp里面的connect为:
sp<Camera> Camera::connect(int cameraId, const String16& clientPackageName,
int clientUid)
{
return CameraBaseT::connect(cameraId, clientPackageName, clientUid);
}
网上别人贴出的片段(与我朋友在公司看到的一样)为:
===>>>frameworks/av/camera/Camera.cpp
sp<Camera>Camera::connect(int cameraId)
{
ALOGV("connect");
sp<Camera> c = new Camera();
const sp<ICameraService>& cs =getCameraService();
if (cs != 0) {
c->mCamera = cs->connect(c,cameraId);
}
if (c->mCamera != 0) {
c->mCamera->asBinder()->linkToDeath(c);
c->mStatus = NO_ERROR;
} else {
c.clear();
}
return c;
}
希望各位XDJM可以看看自己的源码,帮忙确认下我的代码有问题没。
本来比较菜,要是源码都跟别人很不一样,就不知道该怎么继续了。。
谢谢各位了!!!
android源码 --------------------编程问答-------------------- 通过查看platform\build\core\version_defaults.mk ,
ifeq "" "$(PLATFORM_VERSION)"
# This is the canonical definition of the platform version,
# which is the version that we reveal to the end user.
# Update this value when the platform version changes (rather
# than overriding it somewhere else). Can be an arbitrary string.
PLATFORM_VERSION := 4.3.2.1.000.000
endif
ifeq "" "$(PLATFORM_SDK_VERSION)"
# This is the canonical definition of the SDK version, which defines
# the set of APIs and functionality available in the platform. It
# is a single integer that increases monotonically as updates to
# the SDK are released. It should only be incremented when the APIs for
# the new release are frozen (so that developers don't write apps against
# intermediate builds). During development, this number remains at the
# SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
# the code-name of the new development work.
PLATFORM_SDK_VERSION := 18
endif
得知,我的PLATFORM_VERSION := 4.3.2.1.000.000
PLATFORM_SDK_VERSION := 18
补充:移动开发 , Android