Add release notes to install button

This commit is contained in:
topjohnwu 2017-01-11 19:18:27 +08:00
parent 01d847ae4e
commit a9dc1b32e0

View File

@ -1,6 +1,8 @@
package com.topjohnwu.magisk;
import android.app.Fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.CardView;
@ -62,6 +64,9 @@ public class InstallFragment extends Fragment implements CallbackHandler.EventLi
new MagiskDlReceiver(finalBootImage, keepEncChkbox.isChecked(), keepVerityChkbox.isChecked()),
StatusFragment.magiskLink,
Utils.getLegalFilename(filename)))
.setNeutralButton(R.string.check_release_notes, (dialog, which) -> {
getActivity().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(StatusFragment.releaseNoteLink)));
})
.setNegativeButton(R.string.no_thanks, null)
.show();
});