public File mapUriToFile(Uri paramUri) {
   assertBackgroundThread();
   switch (getUriType(paramUri)) {
   }
   do {
     return null;
     return new File(paramUri.getPath());
     paramUri = contentResolver.query(paramUri, LOCAL_FILE_PROJECTION, null, null, null);
   } while (paramUri == null);
   try {
     int i = paramUri.getColumnIndex(LOCAL_FILE_PROJECTION[0]);
     if ((i != -1) && (paramUri.getCount() > 0)) {
       paramUri.moveToFirst();
       Object localObject1 = paramUri.getString(i);
       if (localObject1 != null) {
         localObject1 = new File((String) localObject1);
         return (File) localObject1;
       }
     }
     return null;
   } finally {
     paramUri.close();
   }
 }
示例#2
0
 public Cursor query(
     Uri paramUri,
     String[] paramArrayOfString1,
     String paramString1,
     String[] paramArrayOfString2,
     String paramString2) {
   paramUri =
       super.query(paramUri, paramArrayOfString1, paramString1, paramArrayOfString2, paramString2);
   if (TextUtils.isEmpty(paramArrayOfString2[0])) {
     if (paramUri.getCount() == 0) {
       paramUri = new MatrixCursor(COLUMNS);
       paramUri.addRow(columnValuesOfWord(0, "没有搜索记录", ""));
       this.bFirstSearch = true;
       return paramUri;
     }
     totalRecord = paramUri.getCount();
     this.bFirstSearch = false;
     return paramUri;
   }
   if (StringUtil.isAllPunctuation(paramArrayOfString2[0])) return paramUri;
   int i = DPApplication.instance().cityConfig().currentCity().id();
   paramString1 = DPApplication.instance().locationService().location();
   paramString2 = paramArrayOfString2[0];
   paramArrayOfString1 = Boolean.valueOf(false);
   paramUri = paramArrayOfString1;
   if (!TextUtils.isEmpty(paramArrayOfString2[1])) {
     paramUri = paramArrayOfString1;
     if ("true".equals(paramArrayOfString2[1])) paramUri = Boolean.valueOf(true);
   }
   if (paramUri.booleanValue()) {
     paramArrayOfString1 =
         ""
             + "http://m.api.dianping.com/advancedsuggest.bin?cityid="
             + i
             + "&keyword="
             + URLEncoder.encode(paramString2);
     paramUri = paramArrayOfString1;
     if (paramString1 != null) {
       paramUri = paramArrayOfString1;
       if (paramString1.getDouble("Lat") != 0.0D) {
         paramUri = paramArrayOfString1;
         if (paramString1.getDouble("Lng") != 0.0D)
           paramUri =
               paramArrayOfString1
                   + "&mylat="
                   + Location.FMT.format(paramString1.getDouble("Lat"))
                   + "&mylng="
                   + Location.FMT.format(paramString1.getDouble("Lng"))
                   + "&myacc="
                   + paramString1.getInt("Accuracy");
       }
     }
   }
   for (paramUri = new BasicMApiRequest(paramUri, "GET", null, CacheType.DISABLED, false, null);
       ;
       paramUri = new BasicMApiRequest(paramUri, "GET", null, CacheType.DISABLED, false, null)) {
     paramString1 =
         (DPObject)
             ((MApiResponse) DPApplication.instance().mapiService().execSync(paramUri)).result();
     paramArrayOfString1 = new MatrixCursor(COLUMNS);
     if (paramString1 == null) break label750;
     if ((paramString1.getArray("List") == null) || (paramString1.getArray("List").length <= 0))
       break label679;
     i = 0;
     while (true) {
       paramUri = paramArrayOfString1;
       if (i >= paramString1.getArray("List").length) break;
       paramUri = "约" + paramString1.getArray("List")[i].getInt("Count") + "个结果";
       paramArrayOfString2 = paramString1.getArray("List")[i].getString("Url");
       paramString2 = paramString1.getArray("List")[i].getString("Value");
       paramArrayOfString1.addRow(
           columnValuesOfWord(
               i,
               paramString1.getArray("List")[i].getString("Keyword"),
               paramUri,
               paramArrayOfString2,
               paramString2));
       i += 1;
     }
     paramArrayOfString1 =
         ""
             + "http://m.api.dianping.com/searchsuggest.bin?cityid="
             + i
             + "&keyword="
             + URLEncoder.encode(paramString2);
     paramUri = paramArrayOfString1;
     if (paramString1 == null) continue;
     paramUri = paramArrayOfString1;
     if (paramString1.getDouble("Lat") == 0.0D) continue;
     paramUri = paramArrayOfString1;
     if (paramString1.getDouble("Lng") == 0.0D) continue;
     paramUri =
         paramArrayOfString1
             + "&mylat="
             + Location.FMT.format(paramString1.getDouble("Lat"))
             + "&mylng="
             + Location.FMT.format(paramString1.getDouble("Lng"))
             + "&myacc="
             + paramString1.getInt("Accuracy");
   }
   label679:
   paramUri = paramString1.getString("EmptyMsg");
   if (TextUtils.isEmpty(paramUri)) {
     paramArrayOfString1.addRow(columnValuesOfWord(0, "查找 “" + paramArrayOfString2[0] + "”", ""));
     return paramArrayOfString1;
   }
   paramArrayOfString1.addRow(columnValuesOfWord(0, paramUri, ""));
   return paramArrayOfString1;
   label750:
   paramArrayOfString1.addRow(columnValuesOfWord(0, "查找 “" + paramArrayOfString2[0] + "”", ""));
   return paramArrayOfString1;
 }