Android 12.0 系统应用启用/禁用statusBar下拉功能

修改记录

//申明权限
--- a/vendor/kingtop/packages/InterfaceSettings/AndroidManifest.xml
+++ b/vendor/kingtop/packages/InterfaceSettings/AndroidManifest.xml
@@ -33,6 +33,8 @@
    
    

//特殊权限
--- a/frameworks/base/data/etc/privapp-permissions-platform.xml
+++ b/frameworks/base/data/etc/privapp-permissions-platform.xml
@@ -576,6 +576,7 @@ applications that come with the platform
     
     
        
     
     

//系统应用的服务中调用启用/禁用的方法
--- a/vendor/kingtop/packages/InterfaceSettings/src/com/kte/interfacesettings/service/To
olService.java
+++ b/vendor/kingtop/packages/InterfaceSettings/src/com/kte/interfacesettings/service/To
olService.java
@@ -81,6 +81,7 @@ import static android.app.ActivityTaskManager.RESIZE_MODE_USER;
import android.app.StatusBarManager;

@@ -273,7 +274,12 @@ public class ToolService extends ITools.Stub{
        @Override
        public void setStatusBarDropEnable(boolean enable) throws RemoteException {
               StatusBarManager mStatusBarManager = (StatusBarManager) mContext.getSyst
emService(Context.STATUS_BAR_SERVICE);
               if (enable) {
                       mStatusBarManager.disable(StatusBarManager.DISABLE_NONE);
               }else{
                       mStatusBarManager.disable(StatusBarManager.DISABLE_EXPAND);
               }
        }

你可能感兴趣的:(Android,android,android,studio)