Skip to content

Commit

Permalink
Fixed example app build error.
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Feb 11, 2017
1 parent 92345a4 commit 20b6874
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import org.piwik.sdk.Piwik;
import org.piwik.sdk.Tracker;

import java.net.MalformedURLException;

public abstract class PiwikApplication extends Application {
private Tracker mPiwikTracker;

Expand All @@ -28,14 +26,7 @@ public Piwik getPiwik() {
* @return a shared Tracker
*/
public synchronized Tracker getTracker() {
if (mPiwikTracker == null) {
try {
mPiwikTracker = getPiwik().newTracker(getTrackerUrl(), getSiteId(), "Default Tracker");
} catch (MalformedURLException e) {
e.printStackTrace();
throw new RuntimeException("Tracker URL was malformed.");
}
}
if (mPiwikTracker == null) mPiwikTracker = getPiwik().newTracker(getTrackerUrl(), getSiteId(), "Default Tracker");
return mPiwikTracker;
}

Expand Down

0 comments on commit 20b6874

Please sign in to comment.