Skip to content

Commit

Permalink
Code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
amcereijo committed Dec 8, 2012
1 parent 9226b7c commit 6b7fad6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions src/com/trcardmanager/adapter/RestaurantListViewAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
import java.util.List;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Color;
import android.graphics.Typeface;
import android.net.Uri;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
Expand All @@ -33,14 +29,11 @@
*/
public class RestaurantListViewAdapter extends ArrayAdapter<RestaurantDao> {

private static final String WAZE_APP_URL = "waze://?q=Hawaii";
private static final int MAPS_ICON_POSITION = 3;
private LayoutInflater inflater;
private Context context;
private ListView.LayoutParams linearLayoutParams;
private int numberOfPages;
private int actualPage;
private boolean wazeInstalled;

public RestaurantListViewAdapter(Context context, int textViewResourceId,
RestaurantSearchDao resturantSearchDao) {
Expand All @@ -56,7 +49,6 @@ public RestaurantListViewAdapter(Context context, int textViewResourceId,
inflater = LayoutInflater.from(context);
this.context = context;
this.linearLayoutParams = getDefaultLinearLayoutParams();
setWazeInstalled();
}

@Override
Expand Down Expand Up @@ -131,11 +123,4 @@ private ListView.LayoutParams getDefaultLinearLayoutParams(){
LinearLayout.LayoutParams.WRAP_CONTENT);
}


private void setWazeInstalled(){
Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( WAZE_APP_URL ) );
List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(intent,
PackageManager.MATCH_DEFAULT_ONLY);
wazeInstalled = (list.size()>0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;

import android.content.Context;
import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
Expand Down

0 comments on commit 6b7fad6

Please sign in to comment.