Skip to content

Commit

Permalink
Deprecated API use in ErrorReport.java (#1494)
Browse files Browse the repository at this point in the history
- Replace setOnTabSelectedListener with addOnTabSelectedListener
  • Loading branch information
darind committed Oct 9, 2019
1 parent 5d35c7a commit 1dc7d67
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test-app/app/src/debug/java/com/tns/ErrorReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,12 @@ public void onPageScrollStateChanged(int state) {
}
});

this.setOnTabSelectedListener(tabLayout);
this.addOnTabSelectedListener(tabLayout);
}

@SuppressWarnings("deprecation")
private void setOnTabSelectedListener(TabLayout tabLayout) {
tabLayout.setOnTabSelectedListener(this);
private void addOnTabSelectedListener(TabLayout tabLayout) {
tabLayout.addOnTabSelectedListener(this);
}

private static void createErrorFile(final Context context) {
try {
File errFile = new File(context.getFilesDir(), ERROR_FILE_NAME);
Expand Down

0 comments on commit 1dc7d67

Please sign in to comment.