天天看点

sprd 11.0默认开启勿扰模式

--- a/sprd/frameworks/base/core/java/android/app/ActivityThread.java
+++ b/sprd/frameworks/base/core/java/android/app/ActivityThread.java
@@ -242,6 +242,7 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import android.app.LinkTurboApp;
+import android.app.NotificationManager;
 
 final class RemoteServiceException extends AndroidRuntimeException {
     public RemoteServiceException(String msg) {
@@ -3649,6 +3650,8 @@ public final class ActivityThread extends ClientTransactionHandler {
         unscheduleGcIdler();
         mSomeActivitiesChanged = true;
                try{
+                       final NotificationManager mgr = mInitialApplication.getApplicationContext().getSystemService(NotificationManager.class);
+                       mgr.setNotificationPolicyAccessGranted("com.neostra.settings", true);                   
                if("com.android.launcher3".equals(r.intent.getComponent().getPackageName())){   
                        Intent intentY = new Intent();
                        intentY.setAction("is.launcher3.broad");  
@@ -4508,6 +4511,8 @@ public final class ActivityThread extends ClientTransactionHandler {
         }
                
                try{
+                       final NotificationManager mgr = mInitialApplication.getApplicationContext().getSystemService(NotificationManager.class);
+                       mgr.setNotificationPolicyAccessGranted("com.neostra.settings", true);                           
                if("com.android.launcher3".equals(r.intent.getComponent().getPackageName())){   
                        Intent intentY = new Intent();
                        intentY.setAction("is.launcher3.broad");