From f8cfd7ea8c45a9ee1829838d27dce815975d0ed3 Mon Sep 17 00:00:00 2001 From: Stefan Schueller Date: Tue, 13 Nov 2018 21:04:06 +0100 Subject: [PATCH] - Cleanup - Removed play services --- app/build.gradle | 80 ++++++++++--------- .../activity/AppCompatPreferenceActivity.java | 6 +- .../peertube/activity/SearchActivity.java | 2 +- .../peertube/activity/SettingsActivity.java | 5 -- .../peertube/activity/VideoListActivity.java | 42 +++++----- .../peertube/activity/VideoPlayActivity.java | 1 - .../peertube/adapter/VideoAdapter.java | 2 - 7 files changed, 69 insertions(+), 69 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 15a2380..a30218b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,6 +9,49 @@ android { versionCode 103 versionName "1.0.3" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + // Layouts and design + implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:cardview-v7:28.0.0' + implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' + implementation 'de.hdodenhof:circleimageview:2.2.0' + implementation 'com.android.support:support-v13:28.0.0' + + // font awesome + implementation 'com.blackboardtheory:android-iconify-fontawesome:3.0.1-SNAPSHOT' + + // BottomNavigationViewEx -> https://github.com/ittianyu/BottomNavigationViewEx + implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.2' + + // http client / REST + implementation 'com.squareup.okhttp3:okhttp:3.10.0' + implementation 'com.squareup.retrofit2:retrofit:2.3.0' + + // image downloading and caching library + implementation 'com.squareup.picasso:picasso:2.5.2' + + // json decoder/encoder + implementation 'com.google.code.gson:gson:2.8.2' + implementation 'com.squareup.retrofit2:converter-gson:2.3.0' + + // Torrents and WebRTC + implementation 'com.github.TorrentStream:TorrentStream-Android:2.5.0' +// implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1" +// implementation 'org.webrtc:google-webrtc:1.0.+' + + // video player + implementation 'com.google.android.exoplayer:exoplayer:2.8.1' +// implementation 'com.devbrackets.android:exomedia:4.1.0' + + // testing + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + } } buildTypes { release { @@ -26,40 +69,3 @@ android { } } -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:cardview-v7:28.0.0' - implementation 'com.android.support:recyclerview-v7:28.0.0' - - implementation 'com.google.android.gms:play-services-auth:16.0.1' - - implementation 'com.squareup.okhttp3:okhttp:3.10.0' - implementation 'com.squareup.retrofit2:retrofit:2.3.0' - implementation 'com.squareup.retrofit2:converter-gson:2.3.0' - implementation 'com.squareup.picasso:picasso:2.5.2' - - implementation 'com.google.code.gson:gson:2.8.2' - -// implementation 'org.webrtc:google-webrtc:1.0.+' - implementation 'com.android.support:design:28.0.0' - - // BottomNavigationViewEx -> https://github.com/ittianyu/BottomNavigationViewEx - implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.2' - - - implementation 'com.blackboardtheory:android-iconify-fontawesome:3.0.1-SNAPSHOT' - - implementation 'com.github.TorrentStream:TorrentStream-Android:2.5.0' - implementation 'com.google.android.exoplayer:exoplayer:2.8.1' -// implementation "com.github.TorrentStream:TorrentStreamServer-Android:1.0.1" -// implementation 'com.devbrackets.android:exomedia:4.1.0' - - implementation 'de.hdodenhof:circleimageview:2.2.0' - - implementation 'com.android.support:support-v4:28.0.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' -} diff --git a/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java b/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java index 1ea9f48..8675d18 100644 --- a/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/AppCompatPreferenceActivity.java @@ -37,9 +37,9 @@ public abstract class AppCompatPreferenceActivity extends PreferenceActivity { return getDelegate().getSupportActionBar(); } - public void setSupportActionBar(@Nullable Toolbar toolbar) { - getDelegate().setSupportActionBar(toolbar); - } +// public void setSupportActionBar(@Nullable Toolbar toolbar) { +// getDelegate().setSupportActionBar(toolbar); +// } @Override public MenuInflater getMenuInflater() { diff --git a/app/src/main/java/net/schueller/peertube/activity/SearchActivity.java b/app/src/main/java/net/schueller/peertube/activity/SearchActivity.java index 9cc00c3..55876b6 100644 --- a/app/src/main/java/net/schueller/peertube/activity/SearchActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/SearchActivity.java @@ -11,10 +11,10 @@ import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.widget.Toast; + import net.schueller.peertube.R; import net.schueller.peertube.adapter.VideoAdapter; import net.schueller.peertube.helper.APIUrlHelper; diff --git a/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java b/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java index c35773f..33755b3 100644 --- a/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/SettingsActivity.java @@ -4,19 +4,14 @@ import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; - import android.os.Build; import android.os.Bundle; import android.preference.Preference; import android.support.v7.app.ActionBar; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; - import android.view.MenuItem; - - import net.schueller.peertube.R; - import java.util.List; diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java index 75312b7..939ae1a 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoListActivity.java @@ -8,7 +8,6 @@ import android.content.pm.PackageManager; import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; @@ -22,10 +21,10 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.widget.Toast; -import com.google.android.gms.common.GooglePlayServicesNotAvailableException; -import com.google.android.gms.common.GooglePlayServicesRepairableException; -import com.google.android.gms.common.GooglePlayServicesUtil; -import com.google.android.gms.security.ProviderInstaller; +//import com.google.android.gms.common.GooglePlayServicesNotAvailableException; +//import com.google.android.gms.common.GooglePlayServicesRepairableException; +//import com.google.android.gms.common.GooglePlayServicesUtil; +//import com.google.android.gms.security.ProviderInstaller; import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx; import com.joanzapata.iconify.IconDrawable; import com.joanzapata.iconify.Iconify; @@ -95,6 +94,9 @@ public class VideoListActivity extends AppCompatActivity { //Log.v(TAG, "navigation_account"); Toast.makeText(VideoListActivity.this, "Account Not Implemented", Toast.LENGTH_SHORT).show(); + Intent intent = new Intent(this, LoginActivity.class); + this.startActivity(intent); + return false; } return false; @@ -116,14 +118,14 @@ public class VideoListActivity extends AppCompatActivity { setSupportActionBar(toolbar); // fix android trying to use SSLv3 for handshake - updateAndroidSecurityProvider(this); +// updateAndroidSecurityProvider(this); // Bottom Navigation BottomNavigationViewEx navigation = findViewById(R.id.navigation); navigation.enableAnimation(false); - navigation.enableShiftingMode(false); - navigation.enableItemShiftingMode(false); + navigation.setLabelVisibilityMode(1); // enableShiftingMode + navigation.setItemHorizontalTranslationEnabled(false); // enableItemShiftingMode Menu navMenu = navigation.getMenu(); navMenu.findItem(R.id.navigation_home).setIcon( @@ -278,19 +280,19 @@ public class VideoListActivity extends AppCompatActivity { /** * Force android to not use SSLv3 * - * @param callingActivity Activity +// * @param callingActivity Activity */ - private void updateAndroidSecurityProvider(Activity callingActivity) { - try { - ProviderInstaller.installIfNeeded(this); - } catch (GooglePlayServicesRepairableException e) { - // Thrown when Google Play Services is not installed, up-to-date, or enabled - // Show dialog to allow users to install, update, or otherwise enable Google Play services. - GooglePlayServicesUtil.getErrorDialog(e.getConnectionStatusCode(), callingActivity, 0); - } catch (GooglePlayServicesNotAvailableException e) { - Log.e("SecurityException", "Google Play Services not available."); - } - } +// private void updateAndroidSecurityProvider(Activity callingActivity) { +// try { +// ProviderInstaller.installIfNeeded(this); +// } catch (GooglePlayServicesRepairableException e) { +// // Thrown when Google Play Services is not installed, up-to-date, or enabled +// // Show dialog to allow users to install, update, or otherwise enable Google Play services. +// GooglePlayServicesUtil.getErrorDialog(e.getConnectionStatusCode(), callingActivity, 0); +// } catch (GooglePlayServicesNotAvailableException e) { +// Log.e("SecurityException", "Google Play Services not available."); +// } +// } @Override protected void onResume() { diff --git a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java index 46e58e5..6c4adff 100644 --- a/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java +++ b/app/src/main/java/net/schueller/peertube/activity/VideoPlayActivity.java @@ -15,7 +15,6 @@ import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; -import android.widget.FrameLayout; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; diff --git a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java index dfe9c40..c9fb785 100644 --- a/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java +++ b/app/src/main/java/net/schueller/peertube/adapter/VideoAdapter.java @@ -2,8 +2,6 @@ package net.schueller.peertube.adapter; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; -import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater;