From 27a2dee3bd14736863bb694b9f53d8a9cb4c8a86 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Wed, 24 Feb 2016 23:12:02 +0100 Subject: [PATCH] created error report activity --- app/src/main/AndroidManifest.xml | 44 ++++++---- .../schabi/newpipe/VideoItemListActivity.java | 7 ++ .../schabi/newpipe/VideoItemListFragment.java | 1 - .../newpipe/errorhandling/ErrorActivity.java | 15 ++++ app/src/main/res/layout/activity_error.xml | 87 +++++++++++++++++++ app/src/main/res/values-w820dp/dimens.xml | 6 ++ app/src/main/res/values/dimens.xml | 3 + app/src/main/res/values/strings.xml | 3 + 8 files changed, 146 insertions(+), 20 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/errorhandling/ErrorActivity.java create mode 100644 app/src/main/res/layout/activity_error.xml create mode 100644 app/src/main/res/values-w820dp/dimens.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 323da8bd6..618290f94 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,23 +1,25 @@ - - - - + package="org.schabi.newpipe"> + + + + + + + android:configChanges="orientation|screenSize" + android:label="@string/app_name"> @@ -26,10 +28,10 @@ + android:label="@string/title_videoitem_detail" + android:screenOrientation="portrait" + android:theme="@style/AppTheme"> @@ -76,20 +78,21 @@ - - + android:theme="@style/VideoPlayerTheme" + tools:ignore="UnusedAttribute"> + + android:exported="false" + android:label="@string/background_player_name" /> + - + android:label="@string/settings_activity_title"> + + + diff --git a/app/src/main/java/org/schabi/newpipe/VideoItemListActivity.java b/app/src/main/java/org/schabi/newpipe/VideoItemListActivity.java index ae80d6448..71284c99f 100644 --- a/app/src/main/java/org/schabi/newpipe/VideoItemListActivity.java +++ b/app/src/main/java/org/schabi/newpipe/VideoItemListActivity.java @@ -17,6 +17,7 @@ import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Toast; +import org.schabi.newpipe.errorhandling.ErrorActivity; import org.schabi.newpipe.extractor.ExtractionException; import org.schabi.newpipe.extractor.SearchEngine; import org.schabi.newpipe.extractor.ServiceList; @@ -240,6 +241,12 @@ public class VideoItemListActivity extends AppCompatActivity } PreferenceManager.setDefaultValues(this, R.xml.settings, false); + + + /* this is for debuging only if this is still pressent in master branch kill the programmer */ + startActivity(new Intent(this, ErrorActivity.class)); + + //------------------------------------------------------------------------- } @Override diff --git a/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java b/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java index e6a6a5060..75f80f7ae 100644 --- a/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java @@ -17,7 +17,6 @@ import java.io.IOException; import java.util.List; import org.schabi.newpipe.extractor.ExtractionException; -import org.schabi.newpipe.extractor.ParsingException; import org.schabi.newpipe.extractor.VideoPreviewInfo; import org.schabi.newpipe.extractor.SearchEngine; import org.schabi.newpipe.extractor.StreamingService; diff --git a/app/src/main/java/org/schabi/newpipe/errorhandling/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/errorhandling/ErrorActivity.java new file mode 100644 index 000000000..6529fa188 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/errorhandling/ErrorActivity.java @@ -0,0 +1,15 @@ +package org.schabi.newpipe.errorhandling; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; + +import org.schabi.newpipe.R; + +public class ErrorActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_error); + } +} diff --git a/app/src/main/res/layout/activity_error.xml b/app/src/main/res/layout/activity_error.xml new file mode 100644 index 000000000..378c66bdb --- /dev/null +++ b/app/src/main/res/layout/activity_error.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + +