From 8c126de51b19383b857cf99253861b0f618703d5 Mon Sep 17 00:00:00 2001 From: Robin Kamboj Date: Tue, 1 Aug 2017 16:37:17 +0530 Subject: [PATCH 1/3] warnings remove (redundant intents, etc) --- .../com/mindorks/framework/mvp/ui/about/AboutPresenter.java | 6 +++--- .../java/com/mindorks/framework/mvp/utils/AppConstants.java | 2 +- .../java/com/mindorks/framework/mvp/utils/CommonUtils.java | 1 + build.gradle | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/about/AboutPresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/about/AboutPresenter.java index 43fcef0..0edccd8 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/about/AboutPresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/about/AboutPresenter.java @@ -31,9 +31,9 @@ public class AboutPresenter extends BasePresenter implements AboutMvpPresenter { @Inject - public AboutPresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + AboutPresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } } diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java b/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java index 69cbb40..4e8057d 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java @@ -34,7 +34,7 @@ public final class AppConstants { public static final String SEED_DATABASE_OPTIONS = "seed/options.json"; public static final String SEED_DATABASE_QUESTIONS = "seed/questions.json"; - public static final String TIMESTAMP_FORMAT = "yyyyMMdd_HHmmss"; + static final String TIMESTAMP_FORMAT = "yyyyMMdd_HHmmss"; private AppConstants() { // This utility class is not publicly instantiable diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java b/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java index 1a44776..95afbb4 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java @@ -82,6 +82,7 @@ public static String loadJSONFromAsset(Context context, String jsonFileName) int size = is.available(); byte[] buffer = new byte[size]; + //noinspection ResultOfMethodCallIgnored is.read(buffer); is.close(); diff --git a/build.gradle b/build.gradle index 23972e7..e55906e 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:2.3.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -44,7 +44,7 @@ ext { minSdkVersion = 16 targetSdkVersion = 25 compileSdkVersion = 25 - buildToolsVersion = '25.0.2' + buildToolsVersion = '26.0.0' // App dependencies supportLibraryVersion = '25.3.1' From 564dc751a28a3ba40d2f41484c9d75d083d8914d Mon Sep 17 00:00:00 2001 From: Robin Kamboj Date: Tue, 1 Aug 2017 16:56:04 +0530 Subject: [PATCH 2/3] removed redundant codes, removed warnings, maintained package privacy --- .../framework/mvp/ui/base/BaseDialog.java | 5 +---- .../framework/mvp/ui/base/BaseFragment.java | 7 ++----- .../framework/mvp/ui/base/BasePresenter.java | 4 ++-- .../framework/mvp/ui/base/BaseSubView.java | 5 +---- .../framework/mvp/ui/base/SubMvpView.java | 2 +- .../framework/mvp/ui/feed/FeedActivity.java | 3 +-- .../mvp/ui/feed/FeedPagerAdapter.java | 2 +- .../framework/mvp/ui/feed/FeedPresenter.java | 6 +++--- .../mvp/ui/feed/blogs/BlogAdapter.java | 18 +++++++++--------- .../mvp/ui/feed/blogs/BlogPresenter.java | 6 +++--- .../ui/feed/opensource/OpenSourceAdapter.java | 16 ++++++++-------- .../ui/feed/opensource/OpenSourceFragment.java | 1 + .../feed/opensource/OpenSourcePresenter.java | 6 +++--- .../framework/mvp/ui/login/LoginActivity.java | 3 +-- .../framework/mvp/ui/login/LoginPresenter.java | 6 +++--- .../framework/mvp/ui/main/MainActivity.java | 11 +++-------- .../framework/mvp/ui/main/MainPresenter.java | 7 ++++--- .../framework/mvp/ui/main/QuestionCard.java | 3 ++- .../mvp/ui/splash/SplashActivity.java | 3 +-- .../mvp/ui/splash/SplashPresenter.java | 6 +++--- 20 files changed, 53 insertions(+), 67 deletions(-) diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseDialog.java b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseDialog.java index 8de0eb3..cfcc93b 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseDialog.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseDialog.java @@ -99,10 +99,7 @@ public void showMessage(@StringRes int resId) { @Override public boolean isNetworkConnected() { - if (mActivity != null) { - return mActivity.isNetworkConnected(); - } - return false; + return mActivity != null && mActivity.isNetworkConnected(); } @Override diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseFragment.java b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseFragment.java index 70f0811..948f64d 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseFragment.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseFragment.java @@ -103,10 +103,7 @@ public void showMessage(@StringRes int resId) { @Override public boolean isNetworkConnected() { - if (mActivity != null) { - return mActivity.isNetworkConnected(); - } - return false; + return mActivity != null && mActivity.isNetworkConnected(); } @Override @@ -154,7 +151,7 @@ public void onDestroy() { super.onDestroy(); } - public interface Callback { + interface Callback { void onFragmentAttached(); diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BasePresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BasePresenter.java index ccdfad0..0896cba 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BasePresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BasePresenter.java @@ -148,8 +148,8 @@ public void setUserAsLoggedOut() { getDataManager().setAccessToken(null); } - public static class MvpViewNotAttachedException extends RuntimeException { - public MvpViewNotAttachedException() { + private static class MvpViewNotAttachedException extends RuntimeException { + MvpViewNotAttachedException() { super("Please call Presenter.onAttach(MvpView) before" + " requesting data to the Presenter"); } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseSubView.java b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseSubView.java index 2c63a0b..4e545fe 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseSubView.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/base/BaseSubView.java @@ -102,10 +102,7 @@ public void hideKeyboard() { @Override public boolean isNetworkConnected() { - if (mParentMvpView != null) { - return mParentMvpView.isNetworkConnected(); - } - return false; + return mParentMvpView != null && mParentMvpView.isNetworkConnected(); } @Override diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/base/SubMvpView.java b/app/src/main/java/com/mindorks/framework/mvp/ui/base/SubMvpView.java index 88287e9..a8b3ca0 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/base/SubMvpView.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/base/SubMvpView.java @@ -24,7 +24,7 @@ * pattern must implement. Generally this interface will be extended by a more specific interface * that then usually will be implemented by an Activity or Fragment. */ -public interface SubMvpView extends MvpView { +interface SubMvpView extends MvpView { void onCreate(); diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedActivity.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedActivity.java index 74a7456..b9cbddc 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedActivity.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedActivity.java @@ -55,8 +55,7 @@ public class FeedActivity extends BaseActivity implements FeedMvpView { TabLayout mTabLayout; public static Intent getStartIntent(Context context) { - Intent intent = new Intent(context, FeedActivity.class); - return intent; + return new Intent(context, FeedActivity.class); } @Override diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPagerAdapter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPagerAdapter.java index 605d47a..36b5aee 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPagerAdapter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPagerAdapter.java @@ -53,7 +53,7 @@ public int getCount() { return mTabCount; } - public void setCount(int count) { + void setCount(int count) { mTabCount = count; } } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPresenter.java index 5e3cbe4..bd09e3b 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/FeedPresenter.java @@ -34,9 +34,9 @@ public class FeedPresenter extends BasePresenter implement private static final String TAG = "FeedPresenter"; @Inject - public FeedPresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + FeedPresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogAdapter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogAdapter.java index bb2aead..9b95b0f 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogAdapter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogAdapter.java @@ -43,8 +43,8 @@ public class BlogAdapter extends RecyclerView.Adapter { - public static final int VIEW_TYPE_EMPTY = 0; - public static final int VIEW_TYPE_NORMAL = 1; + private static final int VIEW_TYPE_EMPTY = 0; + private static final int VIEW_TYPE_NORMAL = 1; private Callback mCallback; private List mBlogResponseList; @@ -53,7 +53,7 @@ public BlogAdapter(List blogResponseList) { mBlogResponseList = blogResponseList; } - public void setCallback(Callback callback) { + void setCallback(Callback callback) { mCallback = callback; } @@ -94,16 +94,16 @@ public int getItemCount() { } } - public void addItems(List blogList) { + void addItems(List blogList) { mBlogResponseList.addAll(blogList); notifyDataSetChanged(); } - public interface Callback { + interface Callback { void onBlogEmptyViewRetryClick(); } - public class ViewHolder extends BaseViewHolder { + class ViewHolder extends BaseViewHolder { @BindView(R.id.cover_image_view) ImageView coverImageView; @@ -120,7 +120,7 @@ public class ViewHolder extends BaseViewHolder { @BindView(R.id.content_text_view) TextView contentTextView; - public ViewHolder(View itemView) { + ViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); } @@ -179,7 +179,7 @@ public void onClick(View v) { } } - public class EmptyViewHolder extends BaseViewHolder { + class EmptyViewHolder extends BaseViewHolder { @BindView(R.id.btn_retry) Button retryButton; @@ -187,7 +187,7 @@ public class EmptyViewHolder extends BaseViewHolder { @BindView(R.id.tv_message) TextView messageTextView; - public EmptyViewHolder(View itemView) { + EmptyViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogPresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogPresenter.java index 84ff0f8..52ca02a 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogPresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/blogs/BlogPresenter.java @@ -35,9 +35,9 @@ public class BlogPresenter extends BasePresenter implements BlogMvpPresenter { @Inject - public BlogPresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + BlogPresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceAdapter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceAdapter.java index 5cbb704..e0a9ceb 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceAdapter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceAdapter.java @@ -42,8 +42,8 @@ public class OpenSourceAdapter extends RecyclerView.Adapter { - public static final int VIEW_TYPE_EMPTY = 0; - public static final int VIEW_TYPE_NORMAL = 1; + private static final int VIEW_TYPE_EMPTY = 0; + private static final int VIEW_TYPE_NORMAL = 1; private Callback mCallback; private List mOpenSourceResponseList; @@ -52,7 +52,7 @@ public OpenSourceAdapter(List openSourceResponseList) { mOpenSourceResponseList = openSourceResponseList; } - public void setCallback(Callback callback) { + void setCallback(Callback callback) { mCallback = callback; } @@ -93,16 +93,16 @@ public int getItemCount() { } } - public void addItems(List repoList) { + void addItems(List repoList) { mOpenSourceResponseList.addAll(repoList); notifyDataSetChanged(); } - public interface Callback { + interface Callback { void onRepoEmptyViewRetryClick(); } - public class ViewHolder extends BaseViewHolder { + class ViewHolder extends BaseViewHolder { @BindView(R.id.cover_image_view) ImageView coverImageView; @@ -113,7 +113,7 @@ public class ViewHolder extends BaseViewHolder { @BindView(R.id.content_text_view) TextView contentTextView; - public ViewHolder(View itemView) { + ViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); } @@ -160,7 +160,7 @@ public void onClick(View v) { } } - public class EmptyViewHolder extends BaseViewHolder { + class EmptyViewHolder extends BaseViewHolder { @BindView(R.id.btn_retry) Button retryButton; diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceFragment.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceFragment.java index 7c97641..4a4b912 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceFragment.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourceFragment.java @@ -43,6 +43,7 @@ public class OpenSourceFragment extends BaseFragment implements OpenSourceMvpView, OpenSourceAdapter.Callback { + @SuppressWarnings("unused") private static final String TAG = "OpenSourceFragment"; @Inject diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourcePresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourcePresenter.java index 6c901cd..bb6e113 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourcePresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/feed/opensource/OpenSourcePresenter.java @@ -35,9 +35,9 @@ public class OpenSourcePresenter extends BasePresen implements OpenSourceMvpPresenter { @Inject - public OpenSourcePresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + OpenSourcePresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginActivity.java b/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginActivity.java index 9c35c24..c915191 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginActivity.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginActivity.java @@ -48,8 +48,7 @@ public class LoginActivity extends BaseActivity implements LoginMvpView { EditText mPasswordEditText; public static Intent getStartIntent(Context context) { - Intent intent = new Intent(context, LoginActivity.class); - return intent; + return new Intent(context, LoginActivity.class); } @Override diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginPresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginPresenter.java index 68f15e4..459c43c 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginPresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/login/LoginPresenter.java @@ -39,9 +39,9 @@ public class LoginPresenter extends BasePresenter private static final String TAG = "LoginPresenter"; @Inject - public LoginPresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + LoginPresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainActivity.java b/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainActivity.java index 74e80ad..6db197a 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainActivity.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainActivity.java @@ -86,13 +86,8 @@ public class MainActivity extends BaseActivity implements MainMvpView { private TextView mEmailTextView; - private RoundedImageView mProfileImageView; - - private ActionBarDrawerToggle mDrawerToggle; - public static Intent getStartIntent(Context context) { - Intent intent = new Intent(context, MainActivity.class); - return intent; + return new Intent(context, MainActivity.class); } @Override @@ -251,7 +246,7 @@ public boolean onOptionsItemSelected(MenuItem item) { @Override protected void setUp() { setSupportActionBar(mToolbar); - mDrawerToggle = new ActionBarDrawerToggle( + ActionBarDrawerToggle mDrawerToggle = new ActionBarDrawerToggle( this, mDrawer, mToolbar, @@ -310,7 +305,7 @@ public void run() { void setupNavMenu() { View headerLayout = mNavigationView.getHeaderView(0); - mProfileImageView = (RoundedImageView) headerLayout.findViewById(R.id.iv_profile_pic); + @SuppressWarnings("unused") RoundedImageView mProfileImageView = (RoundedImageView) headerLayout.findViewById(R.id.iv_profile_pic); mNameTextView = (TextView) headerLayout.findViewById(R.id.tv_name); mEmailTextView = (TextView) headerLayout.findViewById(R.id.tv_email); diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainPresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainPresenter.java index d6593b7..67379d9 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainPresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/main/MainPresenter.java @@ -37,12 +37,13 @@ public class MainPresenter extends BasePresenter implements MainMvpPresenter { + @SuppressWarnings("unused") private static final String TAG = "MainPresenter"; @Inject - public MainPresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + MainPresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/main/QuestionCard.java b/app/src/main/java/com/mindorks/framework/mvp/ui/main/QuestionCard.java index f5e17da..08f7a1f 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/main/QuestionCard.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/main/QuestionCard.java @@ -56,10 +56,11 @@ public class QuestionCard { private Question mQuestion; - public QuestionCard(Question question) { + QuestionCard(Question question) { mQuestion = question; } + @SuppressWarnings("unused") @Resolve private void onResolved() { diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashActivity.java b/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashActivity.java index 984b54b..2712d9f 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashActivity.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashActivity.java @@ -39,8 +39,7 @@ public class SplashActivity extends BaseActivity implements SplashMvpView { SplashMvpPresenter mPresenter; public static Intent getStartIntent(Context context) { - Intent intent = new Intent(context, SplashActivity.class); - return intent; + return new Intent(context, SplashActivity.class); } @Override diff --git a/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashPresenter.java b/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashPresenter.java index e2a3970..7f1f422 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashPresenter.java +++ b/app/src/main/java/com/mindorks/framework/mvp/ui/splash/SplashPresenter.java @@ -35,9 +35,9 @@ public class SplashPresenter extends BasePresenter implements SplashMvpPresenter { @Inject - public SplashPresenter(DataManager dataManager, - SchedulerProvider schedulerProvider, - CompositeDisposable compositeDisposable) { + SplashPresenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { super(dataManager, schedulerProvider, compositeDisposable); } From 69f7925f20de7d12f5f0c766fb7a2c6b74d1d423 Mon Sep 17 00:00:00 2001 From: Robin Kamboj Date: Tue, 1 Aug 2017 21:26:31 +0530 Subject: [PATCH 3/3] removed util classes warnings (annotated with suppression) --- .../main/java/com/mindorks/framework/mvp/utils/AppConstants.java | 1 + .../main/java/com/mindorks/framework/mvp/utils/AppLogger.java | 1 + .../main/java/com/mindorks/framework/mvp/utils/CommonUtils.java | 1 + .../java/com/mindorks/framework/mvp/utils/KeyboardUtils.java | 1 + .../main/java/com/mindorks/framework/mvp/utils/ScreenUtils.java | 1 + .../main/java/com/mindorks/framework/mvp/utils/ViewUtils.java | 1 + .../com/mindorks/framework/mvp/utils/rx/SchedulerProvider.java | 1 + 7 files changed, 7 insertions(+) diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java b/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java index 4e8057d..a6757f7 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/AppConstants.java @@ -19,6 +19,7 @@ * Created by amitshekhar on 08/01/17. */ +@SuppressWarnings("unused") public final class AppConstants { public static final String STATUS_CODE_SUCCESS = "success"; diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/AppLogger.java b/app/src/main/java/com/mindorks/framework/mvp/utils/AppLogger.java index 5f7985b..39b5215 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/AppLogger.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/AppLogger.java @@ -23,6 +23,7 @@ * Created by amitshekhar on 15/02/17. */ +@SuppressWarnings("unused") public class AppLogger { public static void init() { diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java b/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java index 95afbb4..1b969ce 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/CommonUtils.java @@ -37,6 +37,7 @@ * Created by janisharali on 27/01/17. */ +@SuppressWarnings("unused") public final class CommonUtils { private static final String TAG = "CommonUtils"; diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/KeyboardUtils.java b/app/src/main/java/com/mindorks/framework/mvp/utils/KeyboardUtils.java index 7f56a8a..ff613f2 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/KeyboardUtils.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/KeyboardUtils.java @@ -25,6 +25,7 @@ * Created by janisharali on 27/01/17. */ +@SuppressWarnings("unused") public final class KeyboardUtils { private KeyboardUtils() { diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/ScreenUtils.java b/app/src/main/java/com/mindorks/framework/mvp/utils/ScreenUtils.java index b05b79f..03b8ca5 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/ScreenUtils.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/ScreenUtils.java @@ -23,6 +23,7 @@ * Created by janisharali on 27/01/17. */ +@SuppressWarnings("unused") public class ScreenUtils { private ScreenUtils() { diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/ViewUtils.java b/app/src/main/java/com/mindorks/framework/mvp/utils/ViewUtils.java index 0969c7b..683bbe5 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/ViewUtils.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/ViewUtils.java @@ -27,6 +27,7 @@ * Created by janisharali on 27/01/17. */ +@SuppressWarnings("unused") public final class ViewUtils { private ViewUtils() { diff --git a/app/src/main/java/com/mindorks/framework/mvp/utils/rx/SchedulerProvider.java b/app/src/main/java/com/mindorks/framework/mvp/utils/rx/SchedulerProvider.java index 11f7486..1b651d7 100644 --- a/app/src/main/java/com/mindorks/framework/mvp/utils/rx/SchedulerProvider.java +++ b/app/src/main/java/com/mindorks/framework/mvp/utils/rx/SchedulerProvider.java @@ -6,6 +6,7 @@ * Created by hrskrs on 5/8/2017. */ +@SuppressWarnings("unused") public interface SchedulerProvider { Scheduler ui();