diff --git a/.gitignore b/.gitignore index 0af4856..30624f8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ /.idea/libraries .DS_Store /build -*.apk +build/*.apk *.ap_ *.dex *.class diff --git a/Beta/0.1.0/OctoDroid-0.1.0-Beta.apk b/Beta/0.1.0/OctoDroid-0.1.0-Beta.apk new file mode 100644 index 0000000..d00d0ac Binary files /dev/null and b/Beta/0.1.0/OctoDroid-0.1.0-Beta.apk differ diff --git a/app/build.gradle b/app/build.gradle index 6fa73e0..69961d3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 14 targetSdkVersion 20 versionCode 1 - versionName "1.0" + versionName "0.1.0" } buildTypes { release { diff --git a/app/src/main/java/com/mariogrip/octodroid/Activity.java b/app/src/main/java/com/mariogrip/octodroid/Activity.java index 65e79a0..c734819 100644 --- a/app/src/main/java/com/mariogrip/octodroid/Activity.java +++ b/app/src/main/java/com/mariogrip/octodroid/Activity.java @@ -66,17 +66,8 @@ public class Activity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { - //Just for testing, allow network access in the main thread - //NEVER use this is productive code - //StrictMode.ThreadPolicy policy = new StrictMode. - // ThreadPolicy.Builder().permitAll().build(); - //StrictMode.setThreadPolicy(policy); - - super.onCreate(savedInstanceState); setContentView(R.layout.nawdraw); - - mTitle = mDrawerTitle = getTitle(); nawTitle = getResources().getStringArray(R.array.nawbars); nawlay = (DrawerLayout) findViewById(R.id.drawer_layout); @@ -84,11 +75,8 @@ protected void onCreate(Bundle savedInstanceState) { nawList.setAdapter(new ArrayAdapter(this, R.layout.nawlist, nawTitle)); nawList.setOnItemClickListener(new DrawerItemClickListener()); - - getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setHomeButtonEnabled(true); - mDrawerToggle = new ActionBarDrawerToggle( this, nawlay, @@ -111,12 +99,10 @@ public void onDrawerOpened(View drawerView) { selectItem(0); } prefs = PreferenceManager.getDefaultSharedPreferences(Activity.this); - ip = prefs.getString("ip", "localhost"); key = prefs.getString("api", "0"); senderr = prefs.getBoolean("err", true); push = prefs.getBoolean("push", true); - running = false; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Warning!"); @@ -345,8 +331,10 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { } public void onPause(){ super.onPause(); - running = false; - timerTask.cancel(); //TODO CRASH NullPointerException + if (running) { + running = false; + timerTask.cancel(); //TODO CRASH NullPointerException + } } public void onResume(){ super.onResume(); @@ -354,8 +342,10 @@ public void onResume(){ } public void onStop(){ super.onStop(); - running = false; - timerTask.cancel(); + if (running) { + running = false; + timerTask.cancel(); + } } public void onStart(){ super.onStart(); diff --git a/app/src/main/java/com/mariogrip/octodroid/iu/controls.java b/app/src/main/java/com/mariogrip/octodroid/iu/controls.java index 1c21cbd..d3cd55e 100644 --- a/app/src/main/java/com/mariogrip/octodroid/iu/controls.java +++ b/app/src/main/java/com/mariogrip/octodroid/iu/controls.java @@ -14,6 +14,8 @@ /** * Created by mariogrip on 31.10.14. + * + * GNU Affero General Public License http://www.gnu.org/licenses/agpl.html */ public class controls extends Fragment { diff --git a/app/src/main/res/layout/controls.xml b/app/src/main/res/layout/controls.xml index 1ce790e..32f4c0d 100644 --- a/app/src/main/res/layout/controls.xml +++ b/app/src/main/res/layout/controls.xml @@ -69,7 +69,7 @@ android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:textSize="37dp" - android:text="00:00" + android:text="00:00:00" android:layout_centerHorizontal="true" android:id="@+id/printTimeControls" android:layout_below="@id/printTimeControlsText"/> diff --git a/app/src/main/res/layout/status_tab.xml b/app/src/main/res/layout/status_tab.xml index f2ebef5..ad04bec 100644 --- a/app/src/main/res/layout/status_tab.xml +++ b/app/src/main/res/layout/status_tab.xml @@ -25,7 +25,7 @@ android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:textSize="37dp" - android:text="00:00" + android:text="00:00:00" android:layout_centerHorizontal="true" android:id="@+id/textView11_time" android:layout_below="@id/textView10"/>