Discuz! Board
标题:
修改关键界面和wifi输入密码输入框无法复制的问题
[打印本页]
作者:
zangcf
时间:
2016-6-3 23:09
标题:
修改关键界面和wifi输入密码输入框无法复制的问题
修改关键界面和wifi输入密码输入框无法复制的问题::
修改如下地方::
/media/doraemon/express/alps_VR_new/frameworks/native/services/surfaceflinger/Layer.cpp::::::::::
bool Layer::setSize(uint32_t w, uint32_t h) {
if (mCurrentState.requested.w == w && mCurrentState.requested.h == h)
return false;
// if(strcmp(getName().string(),"GlobalActions") == 0 ||
// strcmp(getName().string(),"InputMethod") == 0
// ){
if(w>16 && w<=960)w+=960; //zcfdebug++
// }
mCurrentState.requested.w = w;
mCurrentState.requested.h = h;
setTransactionFlags(eTransactionNeeded);
return true;
}
和
bool Layer::setCrop(const Rect& crop) {
if (mCurrentState.requested.crop == crop)
return false;
Rect mycrop(crop);
// if(strcmp(getName().string(),"GlobalActions") == 0 ||
// strcmp(getName().string(),"InputMethod") == 0
// ){
if(mycrop.right>16 && mycrop.right<=960)mycrop.right+=960;//zcfdebug++
// }
mCurrentState.sequence++;
mCurrentState.requested.crop = mycrop;
setTransactionFlags(eTransactionNeeded);
return true;
}
作者:
zangcf
时间:
2016-6-3 23:09
采用如下复制的方法::
if(mActiveBuffer!=NULL && mActiveBuffer->height>960){
// if(strcmp(getName().string(),"GlobalActions") == 0 //||
// //strcmp(getName().string(),"GlobalActions") == 0
// ){
uint8_t* img = NULL;
ALOGE("zcfdebug1 here copy GlobalActions");
mActiveBuffer->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
memcpy(img+960*mActiveBuffer->stride*4,img,mActiveBuffer->stride * mActiveBuffer->height*2);
mActiveBuffer->unlock();
// }
}
作者:
zangcf
时间:
2016-6-3 23:10
但是为何又导致底下导航栏没有复制呢?
欢迎光临 Discuz! Board (http://47.89.242.157:9000/bbs/discuz/)
Powered by Discuz! X3.2