diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f75ea52..35734ce 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -15,7 +15,7 @@ list = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); - if (list.size() > 0) { + if (list.size() > 0) { startActivity(intent); } } catch (Exception e) { @@ -82,27 +82,29 @@ public class SettingsActivity extends Activity { cacheDir = getApplicationContext().getCacheDir(); setContentView(R.layout.activity_settings); Switch autostart_switch = findViewById(R.id.autostart_enable); - File onBoot= new File( cacheDir.getAbsolutePath()+onBootFileName); + File onBoot = new File(cacheDir.getAbsolutePath() + onBootFileName); autostart_switch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { // do something, the isChecked will be // true if the switch is in the On position - if(isChecked){ - if( !onBoot.exists() ) { + if (isChecked) { + if (!onBoot.exists()) { requestPermission(); addAutoStartupswitch(); try { - if( !onBoot.createNewFile()) Log.d(TAG, "Cant create new wile on: "+onBoot.getAbsolutePath()); + if (!onBoot.createNewFile()) + Log.d(TAG, "Cant create new wile on: "+onBoot.getAbsolutePath()); } catch (Exception e) { Log.d(TAG, "error: " + e.toString()); } } - }else{ - if( onBoot.exists() ) + } else { + if (onBoot.exists()) onBoot.delete(); } } }); - if(onBoot.exists()) autostart_switch.setChecked(true); + if(onBoot.exists()) + autostart_switch.setChecked(true); } } diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_logo.xml b/app/src/main/res/drawable/ic_logo.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_logo.xml rename to app/src/main/res/drawable/ic_logo.xml diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7c6493c..8fc4ef4 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -17,7 +17,7 @@ android:id="@+id/mainLogo" android:layout_width="match_parent" android:layout_height="140dp" - android:src="@mipmap/ic_logo" /> + android:src="@drawable/ic_logo" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/mipmap-hdpi/ic_logo.png b/app/src/main/res/mipmap-hdpi/ic_logo.png deleted file mode 100644 index 1de930d..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_logo.png and /dev/null differ diff --git a/app/src/main/res/mipmap-hdpi/logo.png b/app/src/main/res/mipmap-hdpi/logo.png new file mode 100644 index 0000000..ec0b272 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/logo.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_logo.png b/app/src/main/res/mipmap-mdpi/ic_logo.png deleted file mode 100644 index df56ba4..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_logo.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/logo.png b/app/src/main/res/mipmap-mdpi/logo.png new file mode 100644 index 0000000..7672280 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/logo.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_logo.png b/app/src/main/res/mipmap-xhdpi/ic_logo.png deleted file mode 100644 index 43fc3f9..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_logo.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/logo.png b/app/src/main/res/mipmap-xhdpi/logo.png new file mode 100644 index 0000000..87a4019 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/logo.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_logo.png b/app/src/main/res/mipmap-xxhdpi/ic_logo.png deleted file mode 100644 index f165819..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_logo.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/logo.png b/app/src/main/res/mipmap-xxhdpi/logo.png new file mode 100644 index 0000000..3f14894 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/logo.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_logo.png b/app/src/main/res/mipmap-xxxhdpi/ic_logo.png deleted file mode 100644 index 0f859e3..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_logo.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/logo.png b/app/src/main/res/mipmap-xxxhdpi/logo.png new file mode 100644 index 0000000..474d006 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/logo.png differ