Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from mouyase/dev
Browse files Browse the repository at this point in the history
v4.4.3(443006)
  • Loading branch information
mouyase authored Nov 3, 2019
2 parents edee232 + 8262501 commit 335356c
Show file tree
Hide file tree
Showing 21 changed files with 57 additions and 75 deletions.
9 changes: 6 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
defaultConfig {
applicationId "tech.yojigen.pivisionm"
minSdkVersion 21
minSdkVersion 19
targetSdkVersion 29
versionCode 443005
versionName '4.4.3(443005)'
versionCode 443006
versionName '4.4.3(443006)'
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
}
Expand Down Expand Up @@ -63,8 +65,10 @@ dependencies {
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

implementation 'com.squareup.okhttp3:okhttp:4.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
// implementation 'com.squareup.okhttp3:okhttp:4.2.0'
//向下兼容4.4
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.6'

implementation 'com.squareup.retrofit2:retrofit:2.6.1'
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;

import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
Expand Down Expand Up @@ -43,13 +42,13 @@ protected void onCreate(Bundle savedInstanceState) {
webView.getSettings().setJavaScriptEnabled(true);
webView.setWebViewClient(new WebViewClient() {
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Nullable

@Override
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
return super.shouldInterceptRequest(view, request);
}

@Nullable

@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
return super.shouldInterceptRequest(view, url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.view.ViewGroup;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.PopupMenu;
import androidx.recyclerview.widget.DefaultItemAnimator;

Expand Down Expand Up @@ -45,7 +44,7 @@ public static FavoriteWorksFragment newInstance(int page) {
return fragment;
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mPresenter = new CollectionPresenter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.view.ViewGroup;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.PopupMenu;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
Expand Down Expand Up @@ -43,7 +42,7 @@ public static FavoriteUsersFragment newInstance(int page) {
return fragment;
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mPresenter = new ConcernPresenter();
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/com/reiya/pixiv/dialog/LoginDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import android.widget.EditText;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;

import com.google.android.material.textfield.TextInputLayout;
Expand All @@ -22,7 +21,7 @@
public class LoginDialog extends DialogFragment {
private LoginListener listener;

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dialog_login, null);
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/com/reiya/pixiv/group/GroupFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.reiya.pixiv.image.ImageLoader;
Expand Down Expand Up @@ -41,9 +40,9 @@ public void onCreate(Bundle savedInstanceState) {
// urlBig = getArguments().getString(URL_BIG);
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final ImageView iv = new ImageView(getActivity().getApplicationContext());
if (!url.equals("")) {
ImageLoader.loadImage(getActivity(), url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
import com.reiya.pixiv.bean.Work;
import com.reiya.pixiv.util.ItemOperation;

import org.jetbrains.annotations.NotNull;

import tech.yojigen.pivisionm.R;

public class GroupViewActivity extends AppCompatActivity implements View.OnClickListener {
Expand Down Expand Up @@ -86,7 +84,7 @@ class GroupPagerAdapter extends FragmentPagerAdapter {
this.count = count;
}

@NotNull

@Override
public Fragment getItem(int position) {
return GroupFragment.newInstance(position, mWork.getImageUrl(2, position));
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/java/com/reiya/pixiv/main/RecommendFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.google.android.material.snackbar.Snackbar;
import com.reiya.pixiv.adapter.ImageAdapter;
import com.reiya.pixiv.bean.Work;
Expand Down Expand Up @@ -39,14 +37,14 @@ public static RecommendFragment newInstance() {
}

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBlacklist = PreferenceManager.getDefaultSharedPreferences(getActivity()).getString(getString(R.string.key_blacklist), "").split("\n");
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mRecyclerView = (LoaderRecyclerView) inflater.inflate(R.layout.recycler_view, container, false);
mAdapter = new ImageAdapter(getActivity());
mAdapter.setBlackList(mBlacklist);
Expand Down Expand Up @@ -82,7 +80,7 @@ public void onNext(HttpService.RecommendResponse recommendResponse) {
}

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getList();
}
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/java/com/reiya/pixiv/main/SubscribeFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.google.android.material.snackbar.Snackbar;
import com.reiya.pixiv.adapter.ImageAdapter;
import com.reiya.pixiv.network.HttpService;
Expand Down Expand Up @@ -38,14 +36,14 @@ public static SubscribeFragment newInstance() {
}

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBlacklist = PreferenceManager.getDefaultSharedPreferences(getActivity()).getString(getString(R.string.key_blacklist), "").split("\n");
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mRecyclerView = (LoaderRecyclerView) inflater.inflate(R.layout.recycler_view, container, false);
mAdapter = new ImageAdapter(getActivity());
mAdapter.setBlackList(mBlacklist);
Expand Down Expand Up @@ -81,7 +79,7 @@ public void onNext(HttpService.IllustListResponse illustListResponse) {
}

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (UserData.isLoggedIn()) {
getList();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.reiya.pixiv.network.fuckgfw;

import org.jetbrains.annotations.NotNull;

import java.net.InetAddress;
import java.net.UnknownHostException;
Expand Down Expand Up @@ -64,8 +63,7 @@ public static PixivDNS getInstance() {
}


@NotNull
public List<InetAddress> lookup(@NotNull String s) throws UnknownHostException {
public List<InetAddress> lookup(String s) throws UnknownHostException {
if (s.contains("pixiv.net")) {
try {
return newDns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

import android.net.SSLCertificateSocketFactory;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
Expand All @@ -28,28 +25,28 @@ public static PixivSSLSocketFactory getInstance() {
return mPixivSSLSocketFactory;
}

@Nullable
public Socket createSocket(@Nullable String paramString, int paramInt) {

public Socket createSocket(String paramString, int paramInt) {
return null;
}

@Nullable
public Socket createSocket(@Nullable String paramString, int paramInt1, @Nullable InetAddress paramInetAddress, int paramInt2) {

public Socket createSocket(String paramString, int paramInt1, InetAddress paramInetAddress, int paramInt2) {
return null;
}

@Nullable
public Socket createSocket(@Nullable InetAddress paramInetAddress, int paramInt) {

public Socket createSocket(InetAddress paramInetAddress, int paramInt) {
return null;
}

@Nullable
public Socket createSocket(@Nullable InetAddress paramInetAddress1, int paramInt1, @Nullable InetAddress paramInetAddress2, int paramInt2) {

public Socket createSocket(InetAddress paramInetAddress1, int paramInt1, InetAddress paramInetAddress2, int paramInt2) {
return null;
}

@NotNull
public Socket createSocket(@Nullable Socket paramSocket, @Nullable String paramString, int paramInt, boolean paramBoolean) throws IOException {

public Socket createSocket(Socket paramSocket, String paramString, int paramInt, boolean paramBoolean) throws IOException {
if (paramSocket == null)
Intrinsics.throwNpe();
InetAddress inetAddress = paramSocket.getInetAddress();
Expand Down Expand Up @@ -77,12 +74,12 @@ public Socket createSocket(@Nullable Socket paramSocket, @Nullable String paramS
throw new TypeCastException("null cannot be cast to non-null type android.net.SSLCertificateSocketFactory");
}

@NotNull

public String[] getDefaultCipherSuites() {
return new String[0];
}

@NotNull

public String[] getSupportedCipherSuites() {
return new String[0];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.DefaultItemAnimator;

import com.reiya.pixiv.adapter.ImageAdapter;
Expand Down Expand Up @@ -55,9 +54,9 @@ public void onCreate(Bundle savedInstanceState) {
mPresenter.setView(this);
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
switch (mPage) {
case 1:
mView = LayoutInflater.from(getActivity()).inflate(R.layout.layout_profile_info, null);
Expand Down Expand Up @@ -85,7 +84,7 @@ public void load() {
}

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
switch (mPage) {
case 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.RecyclerView;

Expand Down Expand Up @@ -59,7 +58,7 @@ public void onCreate(Bundle savedInstanceState) {
mPresenter.setView(this);
}

@Nullable

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final String type = TYPE[mPage];
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/java/com/reiya/pixiv/search/SearchActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import com.reiya.pixiv.network.NetworkRequest;
import com.reiya.pixiv.view.WorkGridLayoutManager;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -174,7 +172,7 @@ class MyFragmentPagerAdapter extends FragmentPagerAdapter {
fragmentTransaction.commitNow();
}

@NotNull

@Override
public Fragment getItem(int position) {
return SearchFragment.newInstance(position, mKeyword);
Expand Down
Loading

0 comments on commit 335356c

Please sign in to comment.