|
|
定义,修改文件:/home/doraemon/temp_android/6572/808/alps/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp::
info->w = hwc.getWidth(type);
info->h = hwc.getHeight(type);
//zcfdebug++<<
info->w = hwc.getWidth(type);
info->h = hwc.getHeight(type)/2;
ALOGE(" zcfdebug here (info->w=%d, info->h=%d)",
int(info->w), int(info->h));
//zcfdebug>>++
info->xdpi = xdpi;
info->ydpi = ydpi;
info->fps = float(1e9 / hwc.getRefreshPeriod(type));
// All non-virtual displays are currently considered secure.
第二步骤,修改旋转:
/home/doraemon/temp_android/6572/808/alps/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@Override
public int rotationForOrientationLw(int orientation, int lastRotation) {
synchronized (mLock) {
int sensorRotation = mOrientationListener.getProposedRotation(); // may be -1
if (sensorRotation < 0) {
sensorRotation = lastRotation;
return Surface.ROTATION_90; //zcfdebug++
}
if(true)return Surface.ROTATION_90; //zcfdebug++
|
|