Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2|回复: 2
打印 上一主题 下一主题

修改关键界面和wifi输入密码输入框无法复制的问题

[复制链接]

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
跳转到指定楼层
楼主
发表于 2016-6-3 23:09:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
修改关键界面和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;
}


回复

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
沙发
 楼主| 发表于 2016-6-3 23:09:47 | 只看该作者
采用如下复制的方法::
                        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();

                        //        }
                        }
回复 支持 反对

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
板凳
 楼主| 发表于 2016-6-3 23:10:44 | 只看该作者
但是为何又导致底下导航栏没有复制呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2025-12-14 18:48 , Processed in 0.010034 second(s), 8 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表