android 11 HOME键不能返回
目录android 11 HOME键不能返回android 11 HOME键不能返回这里说的是能完整接收到按键问题,后面返回的一些逻辑处理导致的问题!Android 9处理settings put secure user_setup_complete 1boolean isUserSetupComplete() {boolean isSetupComplete = Settings.Secure.
·
目录
android 11 HOME键不能返回
这里说的是能完整接收到按键问题,后面返回的一些逻辑处理导致的问题!
Android 9处理
settings put secure user_setup_complete 1
boolean isUserSetupComplete() {
boolean isSetupComplete = Settings.Secure.getIntForUser(mContext.getContentResolver(),
Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
if (mHasFeatureLeanback) {
isSetupComplete &= isTvUserSetupComplete();
}
return isSetupComplete;
}
Android 11处理
settings put secure user_setup_complete 1
//Android 11新增处理(相对android 9)
settings put secure tv_user_setup_complete 1
@Override
public boolean isUserSetupComplete() {
boolean isSetupComplete = Settings.Secure.getIntForUser(mContext.getContentResolver(),
Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
Log.d(TAG,"isSetupComplete 1 = " + isSetupComplete);
if (mHasFeatureLeanback) {
isSetupComplete &= isTvUserSetupComplete();
}
Log.d(TAG,"isSetupComplete 2 = " + isSetupComplete);
return isSetupComplete;
}
更多推荐
已为社区贡献1条内容
所有评论(0)