Reformat files using Android Studio

android-studio/bin/format.sh -m '*.java' -r brouter-routing-app

To rebase active branches on top of the new master just rebase your
branch onto the commit prior to the reformatting and format every commit
of your branch using (<commit> should be replaced by this commit)

git rebase \
        --strategy-option=theirs \
        --onto <commit> \
        --exec 'format.sh -m "*.java" -r brouter-routing-app' \
        --exec 'git commit --all --no-edit --amend' \
        <commit>~

To ignore this mass edit during git blame see `.git-blame-ignore-revs`
This commit is contained in:
Manuel Fuhr 2021-11-20 16:50:23 +01:00
parent 13e0e382c1
commit 54d5c5e943
18 changed files with 3025 additions and 3662 deletions

View file

@ -10,31 +10,25 @@ import java.io.File;
import android.content.Context;
public class ConfigHelper
{
public static File getBaseDir( Context ctx )
{
public class ConfigHelper {
public static File getBaseDir(Context ctx) {
// get base dir from private file
try (InputStream configInput = ctx.openFileInput( "config15.dat" );
InputStreamReader isr = new InputStreamReader( configInput );
try (InputStream configInput = ctx.openFileInput("config15.dat");
InputStreamReader isr = new InputStreamReader(configInput);
BufferedReader br = new BufferedReader(isr)) {
return new File ( br.readLine() );
}
catch (Exception e)
{
return new File(br.readLine());
} catch (Exception e) {
return null;
}
}
public static void writeBaseDir( Context ctx, File baseDir )
{
try (OutputStream configOutput = ctx.openFileOutput( "config15.dat", Context.MODE_PRIVATE );
OutputStreamWriter osw = new OutputStreamWriter( configOutput );
BufferedWriter bw = new BufferedWriter( osw)) {
bw.write( baseDir.getAbsolutePath () );
bw.write( '\n' );
}
catch (Exception e){ /* ignore */ }
public static void writeBaseDir(Context ctx, File baseDir) {
try (OutputStream configOutput = ctx.openFileOutput("config15.dat", Context.MODE_PRIVATE);
OutputStreamWriter osw = new OutputStreamWriter(configOutput);
BufferedWriter bw = new BufferedWriter(osw)) {
bw.write(baseDir.getAbsolutePath());
bw.write('\n');
} catch (Exception e) { /* ignore */ }
}
}