互动屏保无法使用google相册显示,将此菜单隐藏
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
预置条件:
安装GMS包,已登录google帐户并存有图片;
测试步骤:
settings-->display-->daydream-->google photos-->start now;
预期结果:
能进入互动屏保界面;
实测结果:
终端不能进入屏保界面,终端闪退。
对比机也有该问题,能否将此菜单隐藏,该如何处理?
[SOLUTION]
修改Settings源码中的DreamSettings.java
添加
import java.util.ArrayList;
......
修改refreshFROMBackend的实现
private void refreshFromBackend() {
logd("refreshFromBackend()");
mRefreshing = true;
boolean dreamsEnabled = mBackend.isEnabled();
if (mSwitch.isChecked() != dreamsEnabled)
mSwitch.setChecked(dreamsEnabled);
mAdapter.clear();
if (dreamsEnabled) {
List<DreamInfo> dreamInfos = mBackend.getDreamInfos();
List<DreamInfo> fiLTEredDreamInfo = new ArrayList<DreamInfo>(); // modify begin
for(int i= 0;i< dreamInfos.size();i++){
DreamInfo info = dreamInfos.get(i);
if(info.componentName.toString().contains("com.google.android.apps.plus"))
continue;
filteredDreamInfo.add(info);
}
mAdapter.addAll(filteredDreamInfo); //modify end
}
if (mMenuItEMSWhenEnabled != null)
for (MenuItem menuItem : mMenuItemsWhenEnabled)
menuItem.setEnabled(dreamsEnabled);
mRefreshing = false;
}
预置条件:
安装GMS包,已登录google帐户并存有图片;
测试步骤:
settings-->display-->daydream-->google photos-->start now;
预期结果:
能进入互动屏保界面;
实测结果:
终端不能进入屏保界面,终端闪退。
对比机也有该问题,能否将此菜单隐藏,该如何处理?
[SOLUTION]
修改Settings源码中的DreamSettings.java
添加
import java.util.ArrayList;
......
修改refreshFROMBackend的实现
private void refreshFromBackend() {
logd("refreshFromBackend()");
mRefreshing = true;
boolean dreamsEnabled = mBackend.isEnabled();
if (mSwitch.isChecked() != dreamsEnabled)
mSwitch.setChecked(dreamsEnabled);
mAdapter.clear();
if (dreamsEnabled) {
List<DreamInfo> dreamInfos = mBackend.getDreamInfos();
List<DreamInfo> fiLTEredDreamInfo = new ArrayList<DreamInfo>(); // modify begin
for(int i= 0;i< dreamInfos.size();i++){
DreamInfo info = dreamInfos.get(i);
if(info.componentName.toString().contains("com.google.android.apps.plus"))
continue;
filteredDreamInfo.add(info);
}
mAdapter.addAll(filteredDreamInfo); //modify end
}
if (mMenuItEMSWhenEnabled != null)
for (MenuItem menuItem : mMenuItemsWhenEnabled)
menuItem.setEnabled(dreamsEnabled);
mRefreshing = false;
}
签到专用