vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\statusbar\phone\PanelView.java
构造方法中添加注册广播:
IntentFilter filter = new IntentFilter("com.starmini.allow_drop_down_menu");
context.registerReceiver(mallow_drop_down_menuReceiver, filter);
广播:
BroadcastReceiver mallow_drop_down_menuReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if ("com.starmini.allow_drop_down_menu".equals(intent.getAction())) {
boolean allow = intent.getBooleanExtra("allow",false);
Log.d("1900","allow_drop_down_menu receiver");
setTouchDisabled(allow);
}
}
};
在通过广播传递allow 参数即可控制状态栏能否下拉
网友评论