在Android 8.1版本上,每次刷机开机后,会弹出Android系统正在更新的提示,客户要求去掉该提示
1.首先,通过字符串找到相对应的title,R.string.android_upgrading_notification_title
2,屏蔽下面对应的2行代码即可frameworks/base/services/core/java/com/android/server/am/PreBootBroadcaster.java
final Notification notif =
new Notification.Builder(mService.mContext,
SystemNotificationChannels.UPDATES)
.setSmallIcon(R.drawable.stat_sys_adb)
.setWhen(0)
.setOngoing(true)
.setTicker(title)
.setColor(context.getColor(
com.android.internal.R.color.system_notification_accent_color))
.setContentTitle(title)
.setContentIntent(contentIntent)
.setVisibility(Notification.VISIBILITY_PUBLIC)
.setProgress(max, index, false)
.build();
// notifManager.notifyAsUser(TAG, SystemMessage.NOTE_SYSTEM_UPGRADING, // notif, UserHandle.of(mUserId));
break;
case MSG_HIDE:
notifManager.cancelAsUser(TAG, SystemMessage.NOTE_SYSTEM_UPGRADING,
UserHandle.of(mUserId));
break;*