From 27d06eaa6b6170a07d2f5c5e9be8caab8a3980da Mon Sep 17 00:00:00 2001
From: Christian Schabesberger <chris.schabesberger@mailbox.org>
Date: Tue, 5 Jan 2016 21:41:55 +0100
Subject: [PATCH] removed hardcoded string, and add licece to some files.

---
 app/src/main/java/org/schabi/newpipe/App.java  | 18 ++++++++++++++++++
 .../java/org/schabi/newpipe/ExitActivity.java  | 18 ++++++++++++++++++
 .../java/org/schabi/newpipe/Localization.java  | 16 ++++++++++++++++
 .../schabi/newpipe/PanicResponderActivity.java | 18 ++++++++++++++++++
 .../schabi/newpipe/VideoItemListFragment.java  |  9 ++++++---
 app/src/main/res/values/strings.xml            |  1 +
 6 files changed, 77 insertions(+), 3 deletions(-)

diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java
index 55e782259..d976e0a59 100644
--- a/app/src/main/java/org/schabi/newpipe/App.java
+++ b/app/src/main/java/org/schabi/newpipe/App.java
@@ -8,6 +8,24 @@ import android.preference.PreferenceManager;
 import info.guardianproject.netcipher.NetCipher;
 import info.guardianproject.netcipher.proxy.OrbotHelper;
 
+/**
+ * Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
+ * App.java is part of NewPipe.
+ *
+ * NewPipe is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * NewPipe is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NewPipe.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 public class App extends Application {
 
     private static boolean useTor;
diff --git a/app/src/main/java/org/schabi/newpipe/ExitActivity.java b/app/src/main/java/org/schabi/newpipe/ExitActivity.java
index c193ffbde..6e14cfd9f 100644
--- a/app/src/main/java/org/schabi/newpipe/ExitActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/ExitActivity.java
@@ -7,6 +7,24 @@ import android.content.Intent;
 import android.os.Build;
 import android.os.Bundle;
 
+/**
+ * Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
+ * ExitActivity.java is part of NewPipe.
+ *
+ * NewPipe is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * NewPipe is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NewPipe.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 public class ExitActivity extends Activity {
 
     @SuppressLint("NewApi")
diff --git a/app/src/main/java/org/schabi/newpipe/Localization.java b/app/src/main/java/org/schabi/newpipe/Localization.java
index 796b7878d..221c7a2a9 100644
--- a/app/src/main/java/org/schabi/newpipe/Localization.java
+++ b/app/src/main/java/org/schabi/newpipe/Localization.java
@@ -14,6 +14,22 @@ import java.util.Locale;
 
 /**
  * Created by chschtsch on 12/29/15.
+ *
+ * Copyright (C) Gregory Arkhipov 2015
+ * Localization.java is part of NewPipe.
+ *
+ * NewPipe is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * NewPipe is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NewPipe.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 public class Localization {
diff --git a/app/src/main/java/org/schabi/newpipe/PanicResponderActivity.java b/app/src/main/java/org/schabi/newpipe/PanicResponderActivity.java
index e9bf0e985..8a36f5d5e 100644
--- a/app/src/main/java/org/schabi/newpipe/PanicResponderActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/PanicResponderActivity.java
@@ -7,6 +7,24 @@ import android.content.Intent;
 import android.os.Build;
 import android.os.Bundle;
 
+/**
+ * Copyright (C) Hans-Christoph Steiner 2016 <hans@eds.org>
+ * PanicResponderActivity.java is part of NewPipe.
+ *
+ * NewPipe is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * NewPipe is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NewPipe.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 public class PanicResponderActivity extends Activity {
 
     public static final String PANIC_TRIGGER_ACTION = "info.guardianproject.panic.action.TRIGGER";
diff --git a/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java b/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java
index 58c622f1a..a06d99985 100644
--- a/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/VideoItemListFragment.java
@@ -118,7 +118,8 @@ public class VideoItemListFragment extends ListFragment {
                 h.post(new Runnable() {
                     @Override
                     public void run() {
-                        Toast.makeText(getActivity(), "Network Error", Toast.LENGTH_SHORT).show();
+                        Toast.makeText(getActivity(), getString(R.string.networkError),
+                                Toast.LENGTH_SHORT).show();
                     }
                 });
             }
@@ -298,7 +299,8 @@ public class VideoItemListFragment extends ListFragment {
         super.onViewCreated(view, savedInstanceState);
         list = getListView();
         videoListAdapter = new VideoListAdapter(getActivity(), this);
-        footer = ((LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.paginate_footer, null, false);
+        footer = ((LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE))
+                .inflate(R.layout.paginate_footer, null, false);
 
 
         setListAdapter(videoListAdapter);
@@ -319,7 +321,8 @@ public class VideoItemListFragment extends ListFragment {
             }
 
             @Override
-            public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
+            public void onScroll(AbsListView view, int firstVisibleItem,
+                                 int visibleItemCount, int totalItemCount) {
                 if (mode != PRESENT_VIDEOS_MODE
                         && list.getChildAt(0) != null
                         && list.getLastVisiblePosition() == list.getAdapter().getCount() - 1
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c7058759e..0eb72fb38 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -56,6 +56,7 @@
     <string name="backgroundPlayerStartPlayingToast">Playing in background</string>
     <string name="c3sUrl" translatable="false">https://www.c3s.cc/</string>
     <string name="play">Play</string>
+    <string name="networkError">Network Error</string>
 
     <!-- Content descriptions (for better accessibility) -->
     <string name="itemThumbnailViewDescription">Video preview thumbnail</string>