Loading res/menu/menu_toolbar.xml +4 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,8 @@ android:checkable="true" android:title="@string/menu_mobile_data_warning" app:showAsAction="never" /> <item android:id="@+id/menu_show_changelog" android:title="@string/menu_show_changelog" app:showAsAction="never" /> </menu> res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ <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_changelog_url" translatable="false">https://download.lineageos.org/<xliff:g id="device_name">%1$s</xliff:g>/changes</string> <string name="dialog_checking_for_updates">Checking for updates</string> <string name="snack_updates_found">New updates found</string> Loading src/org/lineageos/updater/UpdatesActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.icu.text.DateFormat; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.IBinder; Loading Loading @@ -226,6 +227,12 @@ public class UpdatesActivity extends UpdatesListActivity { .apply(); return true; } case R.id.menu_show_changelog: { Intent openUrl = new Intent(Intent.ACTION_VIEW, Uri.parse(Utils.getChangelogURL(this))); startActivity(openUrl); return true; } } return super.onOptionsItemSelected(item); } Loading src/org/lineageos/updater/misc/Utils.java +6 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public class Utils { return serverUrl + "/v1/" + device + "/" + type + "/" + incrementalVersion; } public static String getChangelogURL(Context context) { String device = SystemProperties.get(Constants.PROP_NEXT_DEVICE, SystemProperties.get(Constants.PROP_DEVICE)); return context.getString(R.string.menu_changelog_url, device); } public static void triggerUpdate(Context context, String downloadId) { final Intent intent = new Intent(context, UpdaterService.class); intent.setAction(UpdaterService.ACTION_INSTALL_UPDATE); Loading Loading
res/menu/menu_toolbar.xml +4 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,8 @@ android:checkable="true" android:title="@string/menu_mobile_data_warning" app:showAsAction="never" /> <item android:id="@+id/menu_show_changelog" android:title="@string/menu_show_changelog" app:showAsAction="never" /> </menu>
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ <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_changelog_url" translatable="false">https://download.lineageos.org/<xliff:g id="device_name">%1$s</xliff:g>/changes</string> <string name="dialog_checking_for_updates">Checking for updates</string> <string name="snack_updates_found">New updates found</string> Loading
src/org/lineageos/updater/UpdatesActivity.java +7 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.icu.text.DateFormat; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.IBinder; Loading Loading @@ -226,6 +227,12 @@ public class UpdatesActivity extends UpdatesListActivity { .apply(); return true; } case R.id.menu_show_changelog: { Intent openUrl = new Intent(Intent.ACTION_VIEW, Uri.parse(Utils.getChangelogURL(this))); startActivity(openUrl); return true; } } return super.onOptionsItemSelected(item); } Loading
src/org/lineageos/updater/misc/Utils.java +6 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public class Utils { return serverUrl + "/v1/" + device + "/" + type + "/" + incrementalVersion; } public static String getChangelogURL(Context context) { String device = SystemProperties.get(Constants.PROP_NEXT_DEVICE, SystemProperties.get(Constants.PROP_DEVICE)); return context.getString(R.string.menu_changelog_url, device); } public static void triggerUpdate(Context context, String downloadId) { final Intent intent = new Intent(context, UpdaterService.class); intent.setAction(UpdaterService.ACTION_INSTALL_UPDATE); Loading