android graphic(22)—android M 分屏功能开关

来源:互联网 发布:湖南海龙网络 编辑:程序博客网 时间:2024/06/06 13:23

关于android中的分屏功能(就是在单一屏幕上同时允许2个app的UI界面存在,可同时操作),在M上其实代码已经有了,估计有些功能还不是很完善,到N上才会正式发布。

在android M上,分屏功能是通过属性persist.sys.debug.multi_window控制,true为打开。

    /** Updates the states that need to be re-read whenever we re-initialize. */    void updateOnReinitialize(Context context, SystemServicesProxy ssp) {        // Check if the developer options are enabled        developerOptionsEnabled = ssp.getGlobalSetting(context,                Settings.Global.DEVELOPMENT_SETTINGS_ENABLED) != 0;        lockToAppEnabled = ssp.getSystemSetting(context,                Settings.System.LOCK_TO_APP_ENABLED) != 0;        //是否打开分屏功能        multiStackEnabled = "true".equals(ssp.getSystemProperty("persist.sys.debug.multi_window"));    }

关于分屏功能打开后,系统WMS,AMS及其他service都做了什么改变,分屏功能到底如何实现,待后续详细研究了。

0 0