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

Commit e291fb9c authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge branch 'aayush_test_p' into 'v1-pie'

[P] Address backlogs related to Updater

See merge request e/os/android_packages_apps_Updater!37
parents 0cf33930 eebe93a0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
        android:title="@string/menu_preferences"
        app:showAsAction="never" />
    <item
        android:id="@+id/menu_show_changelog"
        android:title="@string/menu_show_changelog"
        android:id="@+id/menu_show_release_notes"
        android:title="@string/menu_show_release_notes"
        app:showAsAction="never" />
</menu>
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@
    <string name="menu_delete_update">Delete</string>
    <string name="menu_copy_url">Copy URL</string>
    <string name="menu_export_update">Export update</string>
    <string name="menu_show_changelog">Show changelog</string>
    <string name="menu_show_release_notes">Show release notes</string>
    <string name="menu_changelog_url" translatable="false">https://gitlab.e.foundation/e/os/releases/-/releases/v<xliff:g id="build_version">%1$s</xliff:g>-pie</string>
    <string name="menu_ab_perf_mode">Prioritize update process</string>

+3 −3
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ public class UpdatesActivity extends UpdatesListActivity {
                showPreferencesDialog();
                return true;
            }
            case R.id.menu_show_changelog: {
            case R.id.menu_show_release_notes: {
                Intent openUrl = new Intent(Intent.ACTION_VIEW,
                        Uri.parse(Utils.getChangelogURL(this)));
                startActivity(openUrl);
@@ -294,7 +294,7 @@ public class UpdatesActivity extends UpdatesListActivity {
            preferences.edit().putLong(Constants.PREF_LAST_UPDATE_CHECK, millis).apply();
            updateLastCheckedString();
            if (json.exists() && Utils.isUpdateCheckEnabled(this) &&
                    Utils.checkForNewUpdates(json, jsonNew)) {
                    Utils.checkForNewUpdates(jsonNew)) {
                UpdatesCheckReceiver.updateRepeatingUpdatesCheck(this);
            }
            // In case we set a one-shot check because of a previous failure
@@ -419,7 +419,7 @@ public class UpdatesActivity extends UpdatesListActivity {

        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
        autoCheckInterval.setSelection(Utils.getUpdateCheckSetting(this));
        autoDelete.setChecked(prefs.getBoolean(Constants.PREF_AUTO_DELETE_UPDATES, false));
        autoDelete.setChecked(prefs.getBoolean(Constants.PREF_AUTO_DELETE_UPDATES, true));
        dataWarning.setChecked(prefs.getBoolean(Constants.PREF_MOBILE_DATA_WARNING, true));
        abPerfMode.setChecked(prefs.getBoolean(Constants.PREF_AB_PERF_MODE, false));

+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class UpdatesCheckReceiver extends BroadcastReceiver {
            @Override
            public void onSuccess(File destination) {
                try {
                    if (json.exists() && Utils.checkForNewUpdates(json, jsonNew)) {
                    if (json.exists() && Utils.checkForNewUpdates(jsonNew)) {
                        showNotification(context);
                        updateRepeatingUpdatesCheck(context);
                    }
+2 −7
Original line number Diff line number Diff line
@@ -249,12 +249,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
        String buildDate = StringGenerator.getDateLocalizedUTC(mActivity,
                DateFormat.LONG, update.getTimestamp());
        String buildVersion = mActivity.getString(R.string.list_build_version,
                update.getDisplayVersion());

        if (buildVersion.equals("")) {
          buildVersion = mActivity.getString(R.string.list_build_version,
                update.getVersion());
        }
        
        viewHolder.mBuildDate.setText(buildDate);
        viewHolder.mBuildVersion.setText(buildVersion);
@@ -462,7 +457,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
        String buildDate = StringGenerator.getDateLocalizedUTC(mActivity,
                DateFormat.MEDIUM, update.getTimestamp());
        String buildInfoText = mActivity.getString(R.string.list_build_version_date,
                BuildInfoUtils.getBuildVersion(), buildDate);
                update.getVersion(), buildDate);
        return new AlertDialog.Builder(mActivity)
                .setTitle(R.string.apply_update_dialog_title)
                .setMessage(mActivity.getString(resId, buildInfoText,
Loading