Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb5cc4f1 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Updater: Avoid nullexception for android version check

- mAndroidVersion wasn't before update so getAndroidVersion() was null.

Change-Id: Ic195cc09dbbc4e7a082a6004316bc190ffe89dac
parent 61b81936
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -280,9 +280,10 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
        String buildVersion = mActivity.getString(R.string.list_build_version,
                update.getDisplayVersion());

        if (!update.getAndroidVersion().equals(Build.VERSION.RELEASE)){
        if (!Build.VERSION.RELEASE.equals(update.getAndroidVersion())) {
            viewHolder.mUpgradeType.setVisibility(TextView.VISIBLE);
        }

        viewHolder.mBuildDate.setText(buildDate);
        viewHolder.mBuildVersion.setText(buildVersion);
        viewHolder.mBuildVersion.setCompoundDrawables(null, null, null, null);
@@ -533,7 +534,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
                    mActivity.getString(
                            R.string.list_build_version_date, update.getVersion(), buildDate);

            if (update.getAndroidVersion().equals(Build.VERSION.RELEASE)) {
            if (Build.VERSION.RELEASE.equals(update.getAndroidVersion())) {
                title = R.string.apply_update_dialog_title;
                if (Utils.isABUpdate(update.getFile())) {
                    message =