Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 9045d2b

Browse files
authored
Merge pull request #96 from android/yaraki/lint
Fix all lint errors
2 parents 28c43c4 + 42fe226 commit 9045d2b

File tree

29 files changed

+120
-90
lines changed

29 files changed

+120
-90
lines changed

ActivitySceneTransitionBasic/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
}
2222

2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:7.2.1'
24+
classpath 'com.android.tools.build:gradle:7.3.0'
2525
}
2626
}
2727

ActivitySceneTransitionBasic/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

BasicTransition/Application/src/main/java/com/example/android/common/logger/LogView.java

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717

1818
import android.app.Activity;
1919
import android.content.Context;
20-
import android.util.*;
21-
import android.widget.TextView;
20+
import android.util.AttributeSet;
2221

23-
/** Simple TextView which is used to output log data received through the LogNode interface.
24-
*/
25-
public class LogView extends TextView implements LogNode {
22+
import androidx.appcompat.widget.AppCompatTextView;
23+
24+
/**
25+
* Simple TextView which is used to output log data received through the LogNode interface.
26+
*/
27+
public class LogView extends AppCompatTextView implements LogNode {
2628

2729
public LogView(Context context) {
2830
super(context);
@@ -38,20 +40,21 @@ public LogView(Context context, AttributeSet attrs, int defStyle) {
3840

3941
/**
4042
* Formats the log data and prints it out to the LogView.
43+
*
4144
* @param priority Log level of the data being logged. Verbose, Error, etc.
42-
* @param tag Tag for for the log data. Can be used to organize log statements.
43-
* @param msg The actual message to be logged. The actual message to be logged.
44-
* @param tr If an exception was thrown, this can be sent along for the logging facilities
45-
* to extract and print useful information.
45+
* @param tag Tag for for the log data. Can be used to organize log statements.
46+
* @param msg The actual message to be logged. The actual message to be logged.
47+
* @param tr If an exception was thrown, this can be sent along for the logging facilities
48+
* to extract and print useful information.
4649
*/
4750
@Override
4851
public void println(int priority, String tag, String msg, Throwable tr) {
4952

50-
53+
5154
String priorityStr = null;
5255

5356
// For the purposes of this View, we want to print the priority as readable text.
54-
switch(priority) {
57+
switch (priority) {
5558
case android.util.Log.VERBOSE:
5659
priorityStr = "VERBOSE";
5760
break;
@@ -92,7 +95,7 @@ public void println(int priority, String tag, String msg, Throwable tr) {
9295

9396
// In case this was originally called from an AsyncTask or some other off-UI thread,
9497
// make sure the update occurs within the UI thread.
95-
((Activity) getContext()).runOnUiThread( (new Thread(new Runnable() {
98+
((Activity) getContext()).runOnUiThread((new Thread(new Runnable() {
9699
@Override
97100
public void run() {
98101
// Display the text we just generated within the LogView.
@@ -113,11 +116,13 @@ public void setNext(LogNode node) {
113116
mNext = node;
114117
}
115118

116-
/** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
119+
/**
120+
* Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
117121
* the logger takes so many arguments that might be null, this method helps cut out some of the
118122
* agonizing tedium of writing the same 3 lines over and over.
119-
* @param source StringBuilder containing the text to append to.
120-
* @param addStr The String to append
123+
*
124+
* @param source StringBuilder containing the text to append to.
125+
* @param addStr The String to append
121126
* @param delimiter The String to separate the source and appended strings. A tab or comma,
122127
* for instance.
123128
* @return The fully concatenated String as a StringBuilder
@@ -136,7 +141,9 @@ private StringBuilder appendIfNotNull(StringBuilder source, String addStr, Strin
136141
// The next LogNode in the chain.
137142
LogNode mNext;
138143

139-
/** Outputs the string as a new line of log data in the LogView. */
144+
/**
145+
* Outputs the string as a new line of log data in the LogView.
146+
*/
140147
public void appendToLog(String s) {
141148
append("\n" + s);
142149
}

BasicTransition/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
}
2222

2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:7.2.1'
24+
classpath 'com.android.tools.build:gradle:7.3.0'
2525
}
2626
}
2727

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

CustomTransition/Application/src/main/java/com/example/android/common/logger/LogView.java

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717

1818
import android.app.Activity;
1919
import android.content.Context;
20-
import android.util.*;
21-
import android.widget.TextView;
20+
import android.util.AttributeSet;
2221

23-
/** Simple TextView which is used to output log data received through the LogNode interface.
24-
*/
25-
public class LogView extends TextView implements LogNode {
22+
import androidx.appcompat.widget.AppCompatTextView;
23+
24+
/**
25+
* Simple TextView which is used to output log data received through the LogNode interface.
26+
*/
27+
public class LogView extends AppCompatTextView implements LogNode {
2628

2729
public LogView(Context context) {
2830
super(context);
@@ -38,20 +40,21 @@ public LogView(Context context, AttributeSet attrs, int defStyle) {
3840

3941
/**
4042
* Formats the log data and prints it out to the LogView.
43+
*
4144
* @param priority Log level of the data being logged. Verbose, Error, etc.
42-
* @param tag Tag for for the log data. Can be used to organize log statements.
43-
* @param msg The actual message to be logged. The actual message to be logged.
44-
* @param tr If an exception was thrown, this can be sent along for the logging facilities
45-
* to extract and print useful information.
45+
* @param tag Tag for for the log data. Can be used to organize log statements.
46+
* @param msg The actual message to be logged. The actual message to be logged.
47+
* @param tr If an exception was thrown, this can be sent along for the logging facilities
48+
* to extract and print useful information.
4649
*/
4750
@Override
4851
public void println(int priority, String tag, String msg, Throwable tr) {
4952

50-
53+
5154
String priorityStr = null;
5255

5356
// For the purposes of this View, we want to print the priority as readable text.
54-
switch(priority) {
57+
switch (priority) {
5558
case android.util.Log.VERBOSE:
5659
priorityStr = "VERBOSE";
5760
break;
@@ -92,7 +95,7 @@ public void println(int priority, String tag, String msg, Throwable tr) {
9295

9396
// In case this was originally called from an AsyncTask or some other off-UI thread,
9497
// make sure the update occurs within the UI thread.
95-
((Activity) getContext()).runOnUiThread( (new Thread(new Runnable() {
98+
((Activity) getContext()).runOnUiThread((new Thread(new Runnable() {
9699
@Override
97100
public void run() {
98101
// Display the text we just generated within the LogView.
@@ -113,11 +116,13 @@ public void setNext(LogNode node) {
113116
mNext = node;
114117
}
115118

116-
/** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
119+
/**
120+
* Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
117121
* the logger takes so many arguments that might be null, this method helps cut out some of the
118122
* agonizing tedium of writing the same 3 lines over and over.
119-
* @param source StringBuilder containing the text to append to.
120-
* @param addStr The String to append
123+
*
124+
* @param source StringBuilder containing the text to append to.
125+
* @param addStr The String to append
121126
* @param delimiter The String to separate the source and appended strings. A tab or comma,
122127
* for instance.
123128
* @return The fully concatenated String as a StringBuilder
@@ -136,7 +141,9 @@ private StringBuilder appendIfNotNull(StringBuilder source, String addStr, Strin
136141
// The next LogNode in the chain.
137142
LogNode mNext;
138143

139-
/** Outputs the string as a new line of log data in the LogView. */
144+
/**
145+
* Outputs the string as a new line of log data in the LogView.
146+
*/
140147
public void appendToLog(String s) {
141148
append("\n" + s);
142149
}

CustomTransition/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
}
2222

2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:7.2.1'
24+
classpath 'com.android.tools.build:gradle:7.3.0'
2525
}
2626
}
2727

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

DrawableAnimations/app/src/main/res/drawable/ic_hourglass_animated.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
-->
1717
<animated-vector
1818
xmlns:android="http://schemas.android.com/apk/res/android"
19-
xmlns:aapt="http://schemas.android.com/aapt">
19+
xmlns:aapt="http://schemas.android.com/aapt"
20+
xmlns:tools="http://schemas.android.com/tools"
21+
tools:targetApi="21">
2022

2123
<aapt:attr name="android:drawable">
2224
<vector

DrawableAnimations/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
mavenCentral()
2222
}
2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:7.2.1'
24+
classpath 'com.android.tools.build:gradle:7.3.0'
2525
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2626
}
2727
}

0 commit comments

Comments
 (0)