Esempio n. 1
0
 public static int resetWallpaperPlugIn(Context context) {
   String where = PlugInColumns.TYPE + "=?";
   return context
       .getContentResolver()
       .delete(
           DownLoadProvider.getContentURI(context, DownLoadProvider.TABLE_PLUGIN),
           where,
           new String[] {Product.ProductType.WALL_PAPER});
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    plugInObserver = new PlugInObserver(new Handler());
    registerContentObserver(
        DownLoadProvider.getContentURI(
            getActivity().getApplicationContext(), DownLoadProvider.TABLE_PLUGIN),
        true,
        plugInObserver);
    QiupuHelper.registerDownloadListener(WallpaperProductDetailFragment.class.getName(), this);

    if (savedInstanceState != null) {
      mData = savedInstanceState.getParcelable(FLAG_DATA);
    }
    return mConvertView;
  }