调整项目屏幕适配大小:
在项目下的mk文件里FREEME_DEVICE_LCD_DENSITY改大这个值就成。 这是所有都变大.。直接改remak不生效,需要在device下面的projecconfig下面改
adb 连上可以直接修改density ,先进入adb shell然后命令wm density 240
后面的数字随意
增加系统应用电子邮件,录音机,小区广播,音乐:
这些app属于系统源码就有的,不是apk,/override/device/droi/common/device.mk
在最后加上,这些名字可以去对应的mk文件里找PACKAGE NAME
PRODUCT_PACKAGES += MtkEmail
PRODUCT_PACKAGES += OP01Music
PRODUCT_PACKAGES += OP01SoundRecorder
以上宏加的这些应用路径在
vendor/mediatek/proprietary/operator/packages/apps
小区广播这个packages/apps/CellBroadcastReceiver就是无线紧急警报
在这个清单文件里AndroidManifest.xml
<category android:name="android.intent.category.LAUNCHER" />
把这个加进去就成。在这个<activity android:name="com.android.cellbroadcastreceiver.CellBroadcastListActivity"
android.intent.action.MAIN决定应用程序最先启动的
android.intent.category.LAUNCHER决定应用程序是否显示在程序列表里
就是加上这句话后这个应用就能在菜单上显示。
锁屏界面也能自动旋转:
overlay/frameworks/base/core/res/res/values/config.xml
<!-- Disable lockscreen rotation by default -->
+ <bool name="config_enableLockScreenRotation">true</bool>
锁屏界面时间显示有通知和没通知一样都显示在上方,而不是中间(原来无通知会显示大号的且在中间):
vendor/mediatek/proprietary/packages/apps/SystemUI下
src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
final boolean hasVisibleNotifications = mNotificationStackScrollLayoutController
- .getVisibleNotificationCount() != 0 || mMediaDataManager.hasActiveMedia();
把这个变成true就可。原理如下。
在这个文件中这个布尔值用于mKeyguardStatusViewController.setHasVisibleNotifications(hasVisibleNotifications);
那去KeyguardStatusViewController这里面看到
public void setHasVisibleNotifications(boolean hasVisibleNotifications) {
mKeyguardClockSwitchController.setHasVisibleNotifications(hasVisibleNotifications);
}
就把这个true值传到了KeyguardClockSwitchController
./src/com/android/keyguard/KeyguardClockSwitchController.java
中
public void setHasVisibleNotifications(boolean hasVisibleNotifications) {
if (mView.willSwitchToLargeClock(hasVisibleNotifications)) {
mLargeClockViewController.animateAppear();
}
这个方法,里面,这个willSwitchToLargeClock 传的是true,但是这个方法返回的 是相反的就是false,所以这个意思就是不调用大时钟,意思就是有通知的时候不返回
这个方法在src/com/android/keyguard/KeyguardClockSwitch.java
boolean willSwitchToLargeClock(boolean hasVisibleNotifications) {
if (mHasVisibleNotifications != null
&& hasVisibleNotifications == mHasVisibleNotifications) {
return false;
}
boolean useLargeClock = !hasVisibleNotifications;
animateClockChange(useLargeClock);
mHasVisibleNotifications = hasVisibleNotifications;
return useLargeClock;
}
useLargeClock这个是不在通知状态返回true,!hasVisibleNotifications;