if(SystemProperties.getInt("ro.cenon_f27", 0)==1){// add by csc
mItems.add(new RebootAction());
}
}else if (GLOBAL_ACTION_KEY_AIRPLANE.equals(actionKey)) {
if(SystemProperties.getInt("ro.cenon_f27", 0)==1){// add by csc
mItems.add(mAirplaneModeOn);
//mItems.add(new AirplaneAction());
}
0dp
if (keyCode == KeyEvent.KEYCODE_CAMERA && SystemProperties.getInt("ro.cenon_f27", 0)==1) {// add by csc
if(isHome(mContext)){// isHome(mContext) 判断是否在主界面
Intent intent = new Intent();
intent.setAction("android.media.action.STILL_IMAGE_CAMERA");
startActivityAsUser(intent, UserHandle.CURRENT);
}else{
}
}
case KeyEvent.KEYCODE_HOME:// add by csc
if(SystemProperties.getInt("ro.cenon_f27", 0)==1){// add by csc
}else{
break;
}
/alps/device/mediatek/mt6755/device.mk:
ifeq ($(strip $(CENON_F27)), yes)
PRODUCT_PACKAGES += F27_Launcher3
else
PRODUCT_PACKAGES += Launcher3
endif
# add by csc
ifeq ($(strip $(CENON_F27)), yes)
PRODUCT_PROPERTY_OVERRIDES += ro.cenon_f27=1
endif
#add by csc
CENON_F27 = yes
ArrayList getPredefinedDeviceProfiles() {
ArrayList predefinedDeviceProfiles = new ArrayList<>();
// width, height, #rows, #columns, #folder rows, #folder columns,
// iconSize, iconTextSize, #hotseat, #hotseatIconSize, defaultLayoutId.
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Super Short Stubby",
255, 300, 2, 3, 2, 3, 3, 48, 13, 3, 48, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Shorter Stubby",
255, 400, 3, 3, 3, 3, 3, 48, 13, 3, 48, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Short Stubby",
275, 420, 3, 4, 3, 4, 4, 48, 13, 5, 48, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Stubby",
255, 450, 3, 4, 3, 4, 4, 48, 13, 5, 48, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus S",
296, 491.33f, 4, 4, 4, 4, 4, 48, 13, 5, 48, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 4",
335, 567, 4, 4, 4, 4, 4, DEFAULT_ICON_SIZE_DP, 13, 5, 56, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 5",
359, 567, 4, 4, 4, 4, 4, DEFAULT_ICON_SIZE_DP, 13, 5, 56, R.xml.default_workspace_4x4));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Large Phone",
406, 694, 5, 5, 4, 4, 4, 64, 14.4f, 5, 56, R.xml.default_workspace_5x5));
// The tablet profile is odd in that the landscape orientation
// also includes the nav bar on the side
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 7",
575, 904, 5, 6, 4, 5, 4, 72, 14.4f, 7, 60, R.xml.default_workspace_5x6));
// Larger tablet profiles always have system bars on the top & bottom
predefinedDeviceProfiles.add(new InvariantDeviceProfile("Nexus 10",
727, 1207, 5, 6, 4, 5, 4, 76, 14.4f, 7, 64, R.xml.default_workspace_5x6));
predefinedDeviceProfiles.add(new InvariantDeviceProfile("20-inch Tablet",
1527, 2527, 7, 7, 6, 6, 4, 100, 20, 7, 72, R.xml.default_workspace_4x4));
return predefinedDeviceProfiles;
}
filename1=cenon/vendor/$CENON_CUSTOM_DIR
filename2=cenon/kernel-3.18/$CENON_CUSTOM_DIR
filename3=cenon/device/$CENON_CUSTOM_DIR
filename4=cenon/frameworks/$CENON_CUSTOM_DIR
if [ ! -e $filename1 ];
then
echo $filename1 $filename2 $filename3 $filename4 not exist,pls check in the directory $filename1 $filename2 $filename3 $filename4
else
mkdir cenon_temp1 cenon_temp2 cenon_temp3 cenon_temp4
cp -rf $filename1/* cenon_temp1/
cp -rf $filename2/* cenon_temp2/
cp -rf $filename3/* cenon_temp3/
cp -rf $filename4/* cenon_temp4/
find cenon_temp1/ -name .svn | xargs rm -rf
find cenon_temp2/ -name .svn | xargs rm -rf
find cenon_temp3/ -name .svn | xargs rm -rf
find cenon_temp4/ -name .svn | xargs rm -rf
cp -rf cenon_temp1/* vendor
cp -rf cenon_temp2/* kernel-3.18
cp -rf cenon_temp3/* device/cenon/$PROJECT_NAME
cp -rf cenon_temp4/* frameworks
rm -r cenon_temp1 cenon_temp2 cenon_temp3 cenon_temp4
fi
src/com/android/incallui/CallButtonFragment.java
onResume()里面加入:
new Handler().postDelayed(new Runnable(){
public void run() {
AudioManager audioManager = (AudioManager) mContext.getSystemService (Context.AUDIO_SERVICE);
if(!audioManager.isSpeakerphoneOn()) {
getPresenter().toggleSpeakerphone();
}
updateAudioButtons(getPresenter().getSupportedAudio());
}
}, 500);
+