Android 8.1 来电默认全屏显示 如何修改

在Android 8.1上来电全屏显示 如何修改呢?直接上代码

1.alps\vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\phone\StatusBar.java

在shouldPeek方法里加入如下代码:

boolean inUse = mPowerManager.isScreenOn() && !mSystemServicesProxy.isDreaming();添加判断条件,

boolean inUse = mPowerManager.isScreenOn() && !mSystemServicesProxy.isDreaming()&&!"com.android.dialer".equals(sbn.getPackageName());

 protected boolean shouldPeek(Entry entry, StatusBarNotification sbn) {
        if (!mUseHeadsUp || isDeviceInVrMode()) {
            if (DEBUG) Log.d(TAG, "No peeking: no huns or vr mode");
            return false;
        }

        if (mNotificationData.shouldFilterOut(sbn)) {
            if (true/**DEBUG*/) Log.d(TAG, "No peeking: filtered notification: " + sbn.getKey());
            return false;
        }

        boolean inUse = mPowerManager.isScreenOn() && !mSystemServicesProxy.isDreaming()&&!"com.android.dialer".equals(sbn.getPackageName());

        if (!inUse && !isDozing()) {
            if (true/**DEBUG*/) {
                Log.d(TAG, "No peeking: not in use: " + sbn.getKey());
            }
            return false;
        }

 

你可能感兴趣的:(Android8.1)