classes_dex2jar

16:33:30.699 INFO  jd.cli.Main - Decompiling classes_dex2jar.jar
package android.annotation;

import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.CLASS)
@Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE})
public @interface SuppressLint
{
  String[] value();
}

/* Location:
 * Qualified Name:     android.annotation.SuppressLint
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package android.annotation;

import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.CLASS)
@Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.CONSTRUCTOR})
public @interface TargetApi
{
  int value();
}

/* Location:
 * Qualified Name:     android.annotation.TargetApi
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.app.Activity;
import android.os.Bundle;

public class AboutAppActivity
  extends Activity
{
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903040);
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.AboutAppActivity
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

public final class BuildConfig
{
  public static final boolean DEBUG;
}

/* Location:
 * Qualified Name:     com.imslpdroid.BuildConfig
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.TextView;

class ComposersActivity$1
  implements AdapterView.OnItemClickListener
{
  ComposersActivity$1(ComposersActivity paramComposersActivity) {}
  
  public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong)
  {
    String str = (String)((TextView)paramView).getText();
    Intent localIntent = new Intent();
    Bundle localBundle = new Bundle();
    localBundle.putString("composer", str);
    localBundle.putString("prevPage", "ComposersActivity");
    localIntent.setClass(paramAdapterView.getContext(), PiecesActivity.class);
    localIntent.putExtras(localBundle);
    this$0.startActivity(localIntent);
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.ComposersActivity.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid.gui;

import android.app.Activity;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class RestrictableListView
  extends Activity
{
  private static Map<Integer, String> accentsTable = null;
  private List<Pattern> completeList = new LinkedList();
  private String composerNameToStrip = null;
  private String matchPattern = null;
  private boolean sortingDisabled = false;
  
  private void createAccentsTable()
  {
    accentsTable = new HashMap(210);
    Object localObject;
    do
    {
      try
      {
        localBufferedReader = new BufferedReader(new InputStreamReader(getAssets().open("accents.csv")));
        localObject = localBufferedReader.readLine();
      }
      catch (IOException localIOException)
      {
        BufferedReader localBufferedReader;
        Integer localInteger;
        String str1;
        String str2;
        Log.e("restrictablelistview", "this should NEVER EVER happen");
        break;
      }
      localObject = ((String)localObject).trim();
      if (((String)localObject).length() > 0)
      {
        localInteger = Integer.valueOf(Integer.parseInt(((String)localObject).substring(0, ((String)localObject).indexOf(","))));
        str1 = ((String)localObject).substring(1 + ((String)localObject).indexOf(","));
        accentsTable.put(localInteger, str1);
        str2 = localBufferedReader.readLine();
        localObject = str2;
      }
    } while (localObject != null);
  }
  
  public static String noAccents(String paramString)
  {
    StringBuilder localStringBuilder = new StringBuilder(2 * paramString.length());
    char[] arrayOfChar = paramString.toCharArray();
    int i = 0;
    if (i >= arrayOfChar.length) {
      return localStringBuilder.toString();
    }
    String str;
    if (arrayOfChar[i] > '')
    {
      str = (String)accentsTable.get(Integer.valueOf(arrayOfChar[i]));
      if (str == null) {
        localStringBuilder.append(arrayOfChar[i]);
      }
    }
    for (;;)
    {
      i++;
      break;
      localStringBuilder.append(str);
      continue;
      localStringBuilder.append(arrayOfChar[i]);
    }
  }
  
  private void renderList()
  {
    runOnUiThread(new Runnable()
    {
      public void run()
      {
        LinkedList localLinkedList = new LinkedList();
        Iterator localIterator = completeList.iterator();
        for (;;)
        {
          if (!localIterator.hasNext())
          {
            if (!sortingDisabled) {
              Collections.sort(localLinkedList, new RestrictableListView.ListItemComparator(RestrictableListView.this, matchPattern));
            }
            ListView localListView = (ListView)findViewById(2131099673);
            List localList = toArrayString(localLinkedList);
            localListView.setAdapter(new ArrayAdapter(localListView.getContext(), 17367043, localList));
            localListView.setTextFilterEnabled(true);
            TextView localTextView = (TextView)findViewById(2131099672);
            Object[] arrayOfObject = new Object[1];
            arrayOfObject[0] = Integer.valueOf(localList.size());
            localTextView.setText(String.format("total: %d", arrayOfObject));
            return;
          }
          RestrictableListView.Pattern localPattern = (RestrictableListView.Pattern)localIterator.next();
          if (matchPattern == null) {
            localLinkedList.add(localPattern);
          } else if (localPattern.getPatternModified().contains(matchPattern)) {
            localLinkedList.add(localPattern);
          }
        }
      }
    });
  }
  
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    if (accentsTable == null) {
      createAccentsTable();
    }
    setContentView(2130903046);
    ((EditText)findViewById(2131099671)).addTextChangedListener(new TextWatcher()
    {
      public void afterTextChanged(Editable paramAnonymousEditable)
      {
        setMatchingPattern(paramAnonymousEditable.toString());
      }
      
      public void beforeTextChanged(CharSequence paramAnonymousCharSequence, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3) {}
      
      public void onTextChanged(CharSequence paramAnonymousCharSequence, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3) {}
    });
  }
  
  protected void onResume()
  {
    super.onResume();
    ((LinearLayout)findViewById(2131099669)).removeAllViews();
    getWindow().setSoftInputMode(3);
  }
  
  public String patterMod(String paramString)
  {
    if (paramString == null) {}
    for (String str = null;; str = noAccents(paramString).toLowerCase().trim()) {
      return str;
    }
  }
  
  public void setComposerNameToStrip(String paramString)
  {
    composerNameToStrip = paramString;
  }
  
  public void setListViewElements(List<String> paramList)
  {
    completeList = toArrayPattern(paramList);
    renderList();
  }
  
  public void setMatchingPattern(String paramString)
  {
    if (paramString.trim().length() == 0) {
      paramString = null;
    }
    matchPattern = patterMod(paramString);
    renderList();
  }
  
  public void setSortingDisabled(boolean paramBoolean)
  {
    sortingDisabled = paramBoolean;
  }
  
  public List<Pattern> toArrayPattern(List<String> paramList)
  {
    LinkedList localLinkedList = new LinkedList();
    Iterator localIterator = paramList.iterator();
    for (;;)
    {
      if (!localIterator.hasNext()) {
        return localLinkedList;
      }
      localLinkedList.add(new Pattern((String)localIterator.next()));
    }
  }
  
  public List<String> toArrayString(List<Pattern> paramList)
  {
    LinkedList localLinkedList = new LinkedList();
    Iterator localIterator = paramList.iterator();
    for (;;)
    {
      if (!localIterator.hasNext()) {
        return localLinkedList;
      }
      Pattern localPattern = (Pattern)localIterator.next();
      if (composerNameToStrip != null)
      {
        if ((localPattern.getPattern().contains(composerNameToStrip)) && (localPattern.getPattern().lastIndexOf(composerNameToStrip) == localPattern.getPattern().length() - composerNameToStrip.length()))
        {
          String str = localPattern.getPattern().substring(0, localPattern.getPattern().lastIndexOf(composerNameToStrip));
          if (localLinkedList.isEmpty()) {
            localLinkedList.add(str);
          } else if (!((String)localLinkedList.get(-1 + localLinkedList.size())).equals(str)) {
            localLinkedList.add(str);
          }
        }
        else if (localLinkedList.isEmpty())
        {
          localLinkedList.add(localPattern.getPattern());
        }
        else if (!((String)localLinkedList.get(-1 + localLinkedList.size())).equals(localPattern.getPattern()))
        {
          localLinkedList.add(localPattern.getPattern());
        }
      }
      else {
        localLinkedList.add(localPattern.getPattern());
      }
    }
  }
  
  private class ListItemComparator
    implements Comparator<RestrictableListView.Pattern>
  {
    private String pattern;
    
    public ListItemComparator(String paramString)
    {
      if (paramString != null) {}
      for (;;)
      {
        pattern = paramString;
        return;
        paramString = null;
      }
    }
    
    public int compare(RestrictableListView.Pattern paramPattern1, RestrictableListView.Pattern paramPattern2)
    {
      int i;
      if (pattern != null) {
        if ((RestrictableListView.Pattern.access$0(paramPattern1).startsWith(pattern)) && (!RestrictableListView.Pattern.access$0(paramPattern2).startsWith(pattern))) {
          i = -1;
        }
      }
      for (;;)
      {
        return i;
        if ((RestrictableListView.Pattern.access$0(paramPattern2).startsWith(pattern)) && (!RestrictableListView.Pattern.access$0(paramPattern1).startsWith(pattern))) {
          i = 1;
        } else {
          i = RestrictableListView.Pattern.access$0(paramPattern1).compareTo(RestrictableListView.Pattern.access$0(paramPattern2));
        }
      }
    }
  }
  
  private class Pattern
  {
    private String Pattern;
    private String PatternModified;
    
    public Pattern(String paramString)
    {
      Pattern = paramString;
      PatternModified = patterMod(paramString);
    }
    
    public String getPattern()
    {
      return Pattern;
    }
    
    public String getPatternModified()
    {
      return PatternModified;
    }
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.gui.RestrictableListView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid.gui;

import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.os.AsyncTask;
import android.os.AsyncTask.Status;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;
import com.imslpdroid.data.DataStorage;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

public abstract class StorableRestrictableListView
  extends RestrictableListView
{
  private static final int DIALOG_PROGRESS;
  private GetListTask currentTask = null;
  private ProgressDialog progressDialog = null;
  
  public static Message getNotificationMessage(String paramString1, String paramString2)
  {
    if (paramString2 == null) {
      paramString2 = "";
    }
    if (paramString1 == null) {
      paramString1 = "";
    }
    Message localMessage = new Message();
    Bundle localBundle = new Bundle();
    localBundle.putString("msg", paramString1);
    localBundle.putString("title", paramString2);
    localMessage.setData(localBundle);
    return localMessage;
  }
  
  public abstract List<String> downloadList(Handler paramHandler, AtomicBoolean paramAtomicBoolean)
    throws IOException;
  
  public abstract String getBaseUrl();
  
  public List<String> getPreCachedItems()
  {
    return new LinkedList();
  }
  
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    new GetListTask(null).execute(new String[0]);
  }
  
  protected Dialog onCreateDialog(int paramInt)
  {
    switch (paramInt)
    {
    }
    for (Object localObject = super.onCreateDialog(paramInt);; localObject = progressDialog)
    {
      return (Dialog)localObject;
      progressDialog = new ProgressDialog(this);
      progressDialog.setProgressStyle(0);
      progressDialog.setCancelable(true);
      progressDialog.setMessage("");
      progressDialog.setOnCancelListener(new DialogInterface.OnCancelListener()
      {
        public void onCancel(DialogInterface paramAnonymousDialogInterface)
        {
          currentTask.cancel(true);
        }
      });
    }
  }
  
  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    getMenuInflater().inflate(2131034112, paramMenu);
    return true;
  }
  
  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    boolean bool = true;
    switch (paramMenuItem.getItemId())
    {
    default: 
      bool = super.onOptionsItemSelected(paramMenuItem);
    }
    for (;;)
    {
      return bool;
      GetListTask localGetListTask = new GetListTask(null);
      String[] arrayOfString = new String[bool];
      arrayOfString[0] = "forcerefresh";
      localGetListTask.execute(arrayOfString);
    }
  }
  
  private class GetListTask
    extends AsyncTask<String, String, List<String>>
  {
    private Handler h = new GLTHandler(null);
    private AtomicBoolean stopFlag = new AtomicBoolean(false);
    
    private GetListTask() {}
    
    protected List<String> doInBackground(String... paramVarArgs)
    {
      int i = 0;
      int j = 0;
      int k = paramVarArgs.length;
      for (;;)
      {
        if ((i < k) || (j != 0)) {}
        try
        {
          String[] arrayOfString3 = new String[1];
          arrayOfString3[0] = getString(2130968594);
          publishProgress(arrayOfString3);
          localList = downloadList(h, stopFlag);
          if (!stopFlag.get()) {
            DataStorage.writeGenericListToDB(getApplicationContext(), getBaseUrl(), localList);
          }
          for (;;)
          {
            return localList;
            if (paramVarArgs[i].equals("forcerefresh")) {
              j = 1;
            }
            i++;
            break;
            localList = DataStorage.readGenericListFromDB(getApplicationContext(), getBaseUrl());
            if (localList.isEmpty())
            {
              localList = getPreCachedItems();
              if (localList.size() > 0)
              {
                String[] arrayOfString2 = new String[1];
                arrayOfString2[0] = getString(2130968621);
                publishProgress(arrayOfString2);
                DataStorage.writeGenericListToDB(getApplicationContext(), getBaseUrl(), localList);
              }
            }
            if (localList.isEmpty())
            {
              String[] arrayOfString1 = new String[1];
              arrayOfString1[0] = getString(2130968594);
              publishProgress(arrayOfString1);
              localList = downloadList(h, stopFlag);
              if (!stopFlag.get()) {
                DataStorage.writeGenericListToDB(getApplicationContext(), getBaseUrl(), localList);
              }
            }
          }
        }
        catch (IOException localIOException)
        {
          for (;;)
          {
            Log.e("StorableRestrictableListView", "EXCEPTION - " + localIOException.toString());
            List localList = null;
          }
        }
      }
    }
    
    protected void onCancelled()
    {
      super.onCancelled();
      if ((progressDialog != null) && (progressDialog.isShowing())) {
        dismissDialog(0);
      }
      stopFlag.set(true);
    }
    
    protected void onPostExecute(List<String> paramList)
    {
      if (paramList != null) {
        setListViewElements(paramList);
      }
      for (;;)
      {
        if ((progressDialog != null) && (progressDialog.isShowing())) {
          dismissDialog(0);
        }
        return;
        Toast.makeText(StorableRestrictableListView.this, getString(2130968583), 1).show();
      }
    }
    
    protected void onPreExecute()
    {
      if ((progressDialog != null) && (progressDialog.isShowing())) {
        dismissDialog(0);
      }
      if ((currentTask != null) && (currentTask.getStatus() == AsyncTask.Status.RUNNING)) {
        currentTask.cancel(true);
      }
      currentTask = this;
    }
    
    protected void onProgressUpdate(String... paramVarArgs)
    {
      if (progressDialog == null) {
        showDialog(0);
      }
      if (progressDialog.isShowing()) {
        progressDialog.setMessage(paramVarArgs[0]);
      }
    }
    
    private class GLTHandler
      extends Handler
    {
      private GLTHandler() {}
      
      public void handleMessage(Message paramMessage)
      {
        StorableRestrictableListView.GetListTask localGetListTask = StorableRestrictableListView.GetListTask.this;
        String[] arrayOfString = new String[1];
        arrayOfString[0] = paramMessage.getData().getString("msg");
        localGetListTask.publishProgress(arrayOfString);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.gui.StorableRestrictableListView
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.content.Intent;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.TextView;
import com.imslpdroid.gui.StorableRestrictableListView;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class ComposersActivity
  extends StorableRestrictableListView
{
  private static final String baseUrl = "http://imslp.org/wiki/Category:Composers";
  
  public List<String> downloadList(Handler paramHandler, AtomicBoolean paramAtomicBoolean)
    throws IOException
  {
    paramHandler.sendMessage(StorableRestrictableListView.getNotificationMessage(getString(2130968578), null));
    String str = "http://imslp.org/wiki/Category:Composers";
    LinkedList localLinkedList = new LinkedList();
    Document localDocument;
    Element localElement1;
    do
    {
      if ((str == null) || (paramAtomicBoolean.get())) {
        return localLinkedList;
      }
      localDocument = Jsoup.connect(str).timeout(5000).get();
      localElement1 = localDocument.getElementById("mw-subcategories");
    } while (localElement1 == null);
    Iterator localIterator1 = localElement1.getElementsByTag("a").iterator();
    label89:
    Iterator localIterator2;
    if (!localIterator1.hasNext())
    {
      str = null;
      localIterator2 = localDocument.getElementsByTag("a").iterator();
      label114:
      if (localIterator2.hasNext()) {
        break label290;
      }
    }
    for (;;)
    {
      try
      {
        Matcher localMatcher = Pattern.compile("out of ([0-9\\,]*) total", 8).matcher(localDocument.getElementById("mw-subcategories").getElementsByTag("p").get(0).text());
        localMatcher.find();
        int i = Integer.parseInt(localMatcher.group(1).replace(",", ""));
        Object[] arrayOfObject = new Object[2];
        arrayOfObject[0] = getString(2130968578);
        arrayOfObject[1] = Double.valueOf(Math.min(100.0D, 100.0D * localLinkedList.size() / i));
        paramHandler.sendMessage(StorableRestrictableListView.getNotificationMessage(String.format("%s - %5.2f %%", arrayOfObject), null));
      }
      catch (Exception localException)
      {
        Log.e("getComposerList()", localException.toString());
      }
      break;
      localLinkedList.add(((Element)localIterator1.next()).attr("title").substring(9));
      break label89;
      label290:
      Element localElement2 = (Element)localIterator2.next();
      if ((!localElement2.hasText()) || (!localElement2.text().contains("next 200"))) {
        break label114;
      }
      str = "http://imslp.org/" + localElement2.attr("href");
    }
  }
  
  public String getBaseUrl()
  {
    return "http://imslp.org/wiki/Category:Composers";
  }
  
  public List<String> getPreCachedItems()
  {
    LinkedList localLinkedList = new LinkedList();
    Object localObject;
    do
    {
      try
      {
        localBufferedReader = new BufferedReader(new InputStreamReader(getAssets().open("composers.txt")));
        localObject = localBufferedReader.readLine();
      }
      catch (IOException localIOException)
      {
        BufferedReader localBufferedReader;
        String str;
        Log.e("composersactivity", "getPreCachedItems ...");
        break;
      }
      localObject = ((String)localObject).trim();
      if (((String)localObject).length() > 0)
      {
        localLinkedList.add(localObject);
        str = localBufferedReader.readLine();
        localObject = str;
      }
    } while (localObject != null);
    return localLinkedList;
  }
  
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    ((ListView)findViewById(2131099673)).setOnItemClickListener(new AdapterView.OnItemClickListener()
    {
      public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
      {
        String str = (String)((TextView)paramAnonymousView).getText();
        Intent localIntent = new Intent();
        Bundle localBundle = new Bundle();
        localBundle.putString("composer", str);
        localBundle.putString("prevPage", "ComposersActivity");
        localIntent.setClass(paramAnonymousAdapterView.getContext(), PiecesActivity.class);
        localIntent.putExtras(localBundle);
        startActivity(localIntent);
      }
    });
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.ComposersActivity
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

class DownloadedActivity$1$1
  implements DialogInterface.OnClickListener
{
  DownloadedActivity$1$1(DownloadedActivity.1 param1) {}
  
  public void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    paramDialogInterface.cancel();
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.DownloadedActivity.1.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.TextView;
import com.imslpdroid.data.DataStorage;
import com.imslpdroid.gui.IntentUtils;
import java.io.File;

class DownloadedActivity$1
  implements AdapterView.OnItemClickListener
{
  DownloadedActivity$1(DownloadedActivity paramDownloadedActivity) {}
  
  public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong)
  {
    String[] arrayOfString = ((String)((TextView)paramView).getText()).split("IMSLP");
    String str = arrayOfString[(-1 + arrayOfString.length)].trim() + ".pdf";
    Intent localIntent = new Intent("android.intent.action.VIEW");
    localIntent.setDataAndType(Uri.fromFile(new File(DataStorage.getExternalDownloadPath(), str)), "application/pdf");
    localIntent.setFlags(67108864);
    if (IntentUtils.isPdfReaderAvailable(this$0.getApplicationContext())) {
      this$0.startActivity(localIntent);
    }
    for (;;)
    {
      return;
      Log.i("imslpdroidactivity", "no pdf viewer installed");
      AlertDialog.Builder localBuilder = new AlertDialog.Builder(this$0);
      localBuilder.setMessage(2130968603).setCancelable(false).setPositiveButton("ok", new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
        {
          paramAnonymousDialogInterface.cancel();
        }
      });
      localBuilder.create().show();
    }
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.DownloadedActivity.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.util.Log;
import com.imslpdroid.data.DataStorage;

class DownloadedActivity$2$1
  implements DialogInterface.OnClickListener
{
  DownloadedActivity$2$1(DownloadedActivity.2 param2, CharSequence[] paramArrayOfCharSequence, String paramString) {}
  
  public void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    CharSequence localCharSequence = val$items[paramInt];
    if (localCharSequence.equals(DownloadedActivity.2.access$0(this$1).getString(2130968605)))
    {
      Log.i("scoresactivity", "deleting file");
      DataStorage.deleteDownloadedFile(DownloadedActivity.2.access$0(this$1).getApplicationContext(), val$score);
      DownloadedActivity.2.access$0(this$1).loadFileList();
    }
    String[] arrayOfString;
    int i;
    int j;
    for (;;)
    {
      return;
      if (localCharSequence.equals(DownloadedActivity.2.access$0(this$1).getString(2130968606)))
      {
        arrayOfString = DataStorage.getDownloadedFileinfo(DownloadedActivity.2.access$0(this$1).getApplicationContext(), val$score.replace(".pdf", ""));
        i = 1;
        j = 0;
        if (j < arrayOfString.length) {
          break;
        }
        if (i != 0) {
          arrayOfString[0] = DownloadedActivity.2.access$0(this$1).getString(2130968622);
        }
        Object[] arrayOfObject = new Object[3];
        arrayOfObject[0] = arrayOfString[0];
        arrayOfObject[1] = arrayOfString[1];
        arrayOfObject[2] = arrayOfString[2];
        DownloadedActivity.access$0(String.format("<h3>%s</h3><p><i>%s</i></p><p>%s</p>", arrayOfObject));
        DownloadedActivity.2.access$0(this$1).showDialog(1);
      }
    }
    if (arrayOfString[j] == null) {
      arrayOfString[j] = "";
    }
    for (;;)
    {
      j++;
      break;
      i = 0;
    }
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.DownloadedActivity.2.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.TextView;
import com.imslpdroid.data.DataStorage;
import java.util.LinkedList;
import java.util.List;

class DownloadedActivity$2
  implements AdapterView.OnItemLongClickListener
{
  DownloadedActivity$2(DownloadedActivity paramDownloadedActivity) {}
  
  public boolean onItemLongClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong)
  {
    String[] arrayOfString = ((String)((TextView)paramView).getText()).split("IMSLP");
    final String str = arrayOfString[(-1 + arrayOfString.length)].trim() + ".pdf";
    LinkedList localLinkedList = new LinkedList();
    localLinkedList.add(this$0.getString(2130968606));
    localLinkedList.add(this$0.getString(2130968605));
    final CharSequence[] arrayOfCharSequence = (CharSequence[])localLinkedList.toArray(new CharSequence[0]);
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(this$0);
    localBuilder.setTitle(this$0.getString(2130968607));
    localBuilder.setItems(arrayOfCharSequence, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        CharSequence localCharSequence = arrayOfCharSequence[paramAnonymousInt];
        if (localCharSequence.equals(this$0.getString(2130968605)))
        {
          Log.i("scoresactivity", "deleting file");
          DataStorage.deleteDownloadedFile(this$0.getApplicationContext(), str);
          this$0.loadFileList();
        }
        String[] arrayOfString;
        int i;
        int j;
        for (;;)
        {
          return;
          if (localCharSequence.equals(this$0.getString(2130968606)))
          {
            arrayOfString = DataStorage.getDownloadedFileinfo(this$0.getApplicationContext(), str.replace(".pdf", ""));
            i = 1;
            j = 0;
            if (j < arrayOfString.length) {
              break;
            }
            if (i != 0) {
              arrayOfString[0] = this$0.getString(2130968622);
            }
            Object[] arrayOfObject = new Object[3];
            arrayOfObject[0] = arrayOfString[0];
            arrayOfObject[1] = arrayOfString[1];
            arrayOfObject[2] = arrayOfString[2];
            DownloadedActivity.access$0(String.format("<h3>%s</h3><p><i>%s</i></p><p>%s</p>", arrayOfObject));
            this$0.showDialog(1);
          }
        }
        if (arrayOfString[j] == null) {
          arrayOfString[j] = "";
        }
        for (;;)
        {
          j++;
          break;
          i = 0;
        }
      }
    });
    localBuilder.create().show();
    return false;
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.DownloadedActivity.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

class DownloadedActivity$3
  implements DialogInterface.OnClickListener
{
  DownloadedActivity$3(DownloadedActivity paramDownloadedActivity) {}
  
  public void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    this$0.dismissDialog(1);
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.DownloadedActivity.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

class DownloadedActivity$4
  implements DialogInterface.OnClickListener
{
  DownloadedActivity$4(DownloadedActivity paramDownloadedActivity) {}
  
  public void onClick(DialogInterface paramDialogInterface, int paramInt)
  {
    this$0.dismissDialog(0);
  }
}

/* Location:
 * Qualified Name:     com.imslpdroid.DownloadedActivity.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.imslpdroid;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ListView;
import android.widget.TextView;
import com.imslpdroid.data.DataStorage;
import com.imslpdroid.gui.IntentUtils;
import com.imslpdroid.gui.RestrictableListView;
import java.io.File;
import java.util.LinkedList;
import java.util.List;

public class DownloadedActivity
  extends RestrictableListView
{
  private static final int DIALOG_NOFILE = 0;
  private static final int DIALOG_SCOREINFO = 1;
  private static String infodialog_display = null;
  
  public void loadFileList()
  {
    DataStorage.syncronizeDownloadedFileTable(getApplicationContext());
    setListViewElements(DataStorage.getDownloadedFilesName(getApplicationContext()));
  }
  
  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    loadFileList();
    ListView localListView = (ListView)findViewById(2131099673);
    localListView.setOnItemClickListener(new AdapterView.OnItemClickListener()
    {
      public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
      {
        String[] arrayOfString = ((String)((TextView)paramAnonymousView).getText()).split("IMSLP");
        String str = arrayOfString[(-1 + arrayOfString.length)].trim() + ".pdf";
        Intent localIntent = new Intent("android.intent.action.VIEW");
        localIntent.setDataAndType(Uri.fromFile(new File(DataStorage.getExternalDownloadPath(), str)), "application/pdf");
        localIntent.setFlags(67108864);
        if (IntentUtils.isPdfReaderAvailable(getApplicationContext())) {
          startActivity(localIntent);
        }
        for (;;)
        {
          return;
          Log.i("imslpdroidactivity", "no pdf viewer installed");
          AlertDialog.Builder localBuilder = new AlertDialog.Builder(DownloadedActivity.this);
          localBuilder.setMessage(2130968603).setCancelable(false).setPositiveButton("ok", new DialogInterface.OnClickListener()
          {
            public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int)
            {
              paramAnonymous2DialogInterface.cancel();
            }
          });
          localBuilder.create().show();
        }
      }
    });
    localListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener()
    {
      public boolean onItemLongClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
      {
        String[] arrayOfString = ((String)((TextView)paramAnonymousView).getText()).split("IMSLP");
        final String str = arrayOfString[(-1 + arrayOfString.length)].trim() + ".pdf";
        LinkedList localLinkedList = new LinkedList();
        localLinkedList.add(getString(2130968606));
        localLinkedList.add(getString(2130968605));
        final CharSequence[] arrayOfCharSequence = (CharSequence[])localLinkedList.toArray(new CharSequence[0]);
        AlertDialog.Builder localBuilder = new AlertDialog.Builder(DownloadedActivity.this);
        localBuilder.setTitle(getString(2130968607));
        localBuilder.setItems(arrayOfCharSequence, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int)
          {
            CharSequence localCharSequence = arrayOfCharSequence[paramAnonymous2Int];
            if (localCharSequence.equals(getString(2130968605)))
            {
              Log.i("scoresactivity", "deleting file");
              DataStorage.deleteDownloadedFile(getApplicationContext(), str);
              loadFileList();
            }
            String[] arrayOfString;
            int i;
            int j;
            for (;;)
            {
              return;
              if (localCharSequence.equals(getString(2130968606)))
              {
                arrayOfString = DataStorage.getDownloadedFileinfo(getApplicationContext(), str.replace(".pdf", ""));
                i = 1;
                j = 0;
                if (j < arrayOfString.length) {
                  break;
                }
                if (i != 0) {
                  arrayOfString[0] = getString(2130968622);
                }
                Object[] arrayOfObject = new Object[3];
                arrayOfObject[0] = arrayOfString[0];
                arrayOfObject[1] = arrayOfString[1];
                arrayOfObject[2] = arrayOfString[2];
                DownloadedActivity.infodialog_display = String.format("<h3>%s</h3><p><i>%s</i></p><p>%s</p>", arrayOfObject);
                showDialog(1);
              }
            }
            if (arrayOfString[j] == null) {
              arrayOfString[j] = "";
            }
            for (;;)
            {
              j++;
              break;
              i = 0;
            }
          }
        });
        localBuilder.create().show();
        return false;
      }
    });
  }
  
  protected Dialog onCreateDialog(int paramInt)
  {
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(this);
    Object localObject;
    switch (paramInt)
    {
    default: 
      localObject = super.onCreateDialog(paramInt);
    }
    for (;;)
    {
      return (Dialog)localObject;
      localBuilder.setMessage(Html.fromHtml(infodialog_display)).setCancelable(false).setPositiveButton("ok", new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
        {
          dismissDialog(1);
        }
      });
      localObject = localBuilder.create();
      continue;
      localBuilder.setMessage(getString(2130968620)).setCancelable(false).setPositiveButton("ok", new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
        {
          dismissDialog(0);
        }
      });
      localObject = localBuilder.create();
    }
  }
  
  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    getMenuInflater().inflate(2131034114, paramMenu);
    return true;
  }
  
  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    }
    for (boolean bool = super.onOptionsItemSelected(paramMenuItem);; bool = true)
    {
      return bool;
      DataStorage.deleteAllDownloadedFiles(getApplicationContext());
      Log.i("downloadedactivity", "deleting all downloaded files");
      loadFileList();
    }
  }
  
  protected void onPrepareDialog(int paramInt, Dialog paramDialog)
  {
    super.onPrepareDialog(paramInt, paramDialog);
1 2 3 4 5 6 7 8 9 10 11

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd