ui: Codestyle cleanups
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
@@ -53,12 +53,12 @@ public class ModuleDownloaderPreference extends Preference {
|
||||
setState(State.SUCCESS);
|
||||
Application.getAsyncWorker().runAsync(() -> {
|
||||
Thread.sleep(1000 * 5);
|
||||
Intent i = getContext().getPackageManager().getLaunchIntentForPackage(getContext().getPackageName());
|
||||
if (i == null)
|
||||
final Intent restartIntent = getContext().getPackageManager().getLaunchIntentForPackage(getContext().getPackageName());
|
||||
if (restartIntent == null)
|
||||
return;
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Application.get().startActivity(i);
|
||||
restartIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
restartIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Application.get().startActivity(restartIntent);
|
||||
System.exit(0);
|
||||
});
|
||||
} else
|
||||
|
||||
@@ -42,7 +42,7 @@ public class VersionPreference extends Preference {
|
||||
});
|
||||
}
|
||||
|
||||
private String getBackendPrettyName(final Context context, final Backend backend) {
|
||||
private static String getBackendPrettyName(final Context context, final Backend backend) {
|
||||
if (backend instanceof WgQuickBackend)
|
||||
return context.getString(R.string.type_name_kernel_module);
|
||||
if (backend instanceof GoBackend)
|
||||
|
||||
Reference in New Issue
Block a user