Skip to content

Commit

Permalink
centralize openLink
Browse files Browse the repository at this point in the history
  • Loading branch information
zfdang committed May 14, 2016
1 parent 52e6642 commit a36a821
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.preference.CheckBoxPreference;
Expand All @@ -17,6 +15,7 @@
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.core.ImagePipeline;
import com.zfdang.SMTHApplication;
import com.zfdang.zsmth_android.helpers.ActivityUtils;
import com.zfdang.zsmth_android.helpers.FileLess;
import com.zfdang.zsmth_android.helpers.FileSizeUtil;

Expand Down Expand Up @@ -206,7 +205,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
app_version.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://zsmth-android.zfdang.com/release.html")));
ActivityUtils.openLink("http://zsmth-android.zfdang.com/release.html", getActivity());
return true;
}
});
Expand Down

0 comments on commit a36a821

Please sign in to comment.