launcher-----启动器中的launcher.db文件的数据处理方法:
主要是查询,更新数据:
/**
* 类描述:缩略图帮助类
* @author hexiaoming
* @version
*/
public class PreviewHelper {
/********WorkspaceScreen的最大值*******/
public static final int MaxWorkspaceScreen = 40;
private Context context = null;
public static final String Preview_Helper = "Preview_Helper";
public static final String AUTHORITY = "com.konka.launcher2.settings";
public static final Uri CONTENT_URI =
Uri.parse("content://" + AUTHORITY + "/" + "favorites" + "?" + "notify" + "=true");
//Uri.parse("content://" + AUTHORITY + "favorites");
private static String[] projection = new String[] {"container","screen"};
private static String[] projection_delete = new String[] {"_id","container","screen"};
public static final int CONTAINER_DESKTOP = -100;
/**
* 方法描述:PreviewHelper的构造方法
* @param
* @return
* @see PreviewHelper
*/
public PreviewHelper(Context context) {
this.context = context;
}
/**
* 方法描述:getArrayListForScreenIsNull方法,获取表示当前界面是否没有APP和Weight的ArrayList
* @param
* @return ArrayList<Boolean>
* @see PreviewHelper
*/
public Boolean[] getScreenIsNull()
{
int length = LauncherPreviewActivity.bitmaps.size();
Boolean[] screenIsNull = new Boolean[length] ;
for(int i=0;i<screenIsNull.length;i++)
{
screenIsNull[i] = true;
}
final ContentResolver cr = context.getContentResolver();
Cursor c = cr.query(