Skip to content

Commit 1184b91

Browse files
committed
Review comments and lint checks
Change-Id: I5fecad0d92466b727eea47b0ec03da876652b143
1 parent 0783098 commit 1184b91

File tree

14 files changed

+32
-220
lines changed

14 files changed

+32
-220
lines changed

.travis.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,3 @@ after_failure:
3232
- cat app/build/reports/lint-results.html
3333
- cat app/build/reports/findbugs.html
3434
- cat app/build/reports/pmd.html
35-
36-
# auth
37-
- cat auth/build/reports/checkstyle.html
38-
- cat auth/build/reports/lint-results.xml
39-
- cat auth/build/reports/lint-results.html
40-
- cat auth/build/reports/findbugs.html
41-
- cat auth/build/reports/pmd.html
42-
43-
# database
44-
- cat database/build/reports/checkstyle.html
45-
- cat database/build/reports/lint-results.xml
46-
- cat database/build/reports/lint-results.html
47-
- cat database/build/reports/findbugs.html
48-
- cat database/build/reports/pmd.html
49-
50-
# storage
51-
- cat storage/build/reports/checkstyle.html
52-
- cat storage/build/reports/lint-results.xml
53-
- cat storage/build/reports/lint-results.html
54-
- cat storage/build/reports/findbugs.html
55-
- cat storage/build/reports/pmd.html

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest
33
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
45
package="com.firebase.uidemo">
56

67
<uses-permission android:name="android.permission.INTERNET"/>
@@ -13,7 +14,8 @@
1314
android:icon="@mipmap/ic_launcher"
1415
android:label="@string/app_name"
1516
android:theme="@style/AppTheme"
16-
android:supportsRtl="true">
17+
android:supportsRtl="true"
18+
tools:ignore="GoogleAppIndexingWarning">
1719
<activity android:name=".ChooserActivity">
1820
<intent-filter>
1921
<action android:name="android.intent.action.MAIN"/>

app/src/main/java/com/firebase/uidemo/database/ChatActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import com.google.firebase.database.FirebaseDatabase;
4747
import com.google.firebase.database.Query;
4848

49+
@SuppressWarnings("LogConditional")
4950
public class ChatActivity extends AppCompatActivity implements FirebaseAuth.AuthStateListener {
5051
private static final String TAG = "RecyclerViewDemo";
5152

app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import pub.devrel.easypermissions.AfterPermissionGranted;
3535
import pub.devrel.easypermissions.EasyPermissions;
3636

37+
@SuppressWarnings("LogConditional")
3738
public class ImageActivity extends AppCompatActivity {
3839

3940
private static final String TAG = "ImageDemo";

app/src/main/res/values-v21/styles.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363
<item name="android:colorForeground">@color/material_gray_850</item>
6464
<item name="android:navigationBarColor">@android:color/black</item>
6565
<item name="android:statusBarColor">@android:color/black</item>
66-
<item name="android:textColor">@color/abc_primary_text_material_dark</item>
67-
<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
68-
<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item>
69-
<item name="android:textColorSecondary">@color/abc_secondary_text_material_dark</item>
70-
<item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_light</item>
66+
<item name="android:textColor">@color/text_default_material_dark_primary</item>
67+
<item name="android:textColorPrimary">@color/text_default_material_dark_primary</item>
68+
<item name="android:textColorPrimaryInverse">@color/text_default_material_light_primary</item>
69+
<item name="android:textColorSecondary">@color/text_default_material_dark_secondary</item>
70+
<item name="android:textColorSecondaryInverse">@color/text_default_material_light_secondary</item>
7171
<item name="android:windowBackground">@color/material_gray_850</item>
7272
</style>
7373

app/src/main/res/values/colors.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
<color name="colorPrimaryDark">#0288D1</color>
44
<color name="colorAccent">#FFA000</color>
55

6+
<!-- Text -->
7+
<color name="text_default_material_dark_primary">#ffffffff</color>
8+
<color name="text_default_material_light_primary">#de000000</color>
9+
<color name="text_default_material_dark_secondary">#b3ffffff</color>
10+
<color name="text_default_material_light_secondary">#8a000000</color>
11+
612
<color name="material_deep_purple_50">#EDE7F6</color>
713
<color name="material_deep_purple_500">#673AB7</color>
814
<color name="material_deep_purple_700">#512DA8</color>

app/src/main/res/values/styles.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
<item name="colorAccent">@android:color/black</item>
3939
<item name="android:colorBackground">@color/material_gray_850</item>
4040
<item name="android:colorForeground">@android:color/white</item>
41-
<item name="android:textColor">@color/abc_primary_text_material_dark</item>
42-
<item name="android:textColorPrimary">@color/abc_primary_text_material_dark</item>
43-
<item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item>
44-
<item name="android:textColorSecondary">@color/abc_secondary_text_material_dark</item>
45-
<item name="android:textColorSecondaryInverse">@color/abc_secondary_text_material_light</item>
41+
<item name="android:textColor">@color/text_default_material_dark_primary</item>
42+
<item name="android:textColorPrimary">@color/text_default_material_dark_primary</item>
43+
<item name="android:textColorPrimaryInverse">@color/text_default_material_light_primary</item>
44+
<item name="android:textColorSecondary">@color/text_default_material_dark_secondary</item>
45+
<item name="android:textColorSecondaryInverse">@color/text_default_material_light_secondary</item>
4646
<item name="android:windowBackground">@color/material_gray_850</item>
4747
</style>
4848

auth/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
<activity
3535
android:name=".ui.email.RegisterEmailActivity"
36+
android:label="@string/title_check_email"
3637
android:exported="false"
3738
android:theme="@style/FirebaseUI"/>
3839

auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232

3333
/**
3434
* Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment}
35-
* and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt}.
35+
* and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt}
36+
* and {@link WelcomeBackIdpPrompt}.
3637
*/
3738
public class RegisterEmailActivity extends AppCompatBase implements
3839
CheckEmailFragment.CheckEmailListener {

auth/src/main/res/anim/slide_in_right.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@
44
android:duration="@android:integer/config_mediumAnimTime"
55
android:fromXDelta="100%p"
66
android:toXDelta="0%p" />
7-
<!--<alpha-->
8-
<!--android:duration="@android:integer/config_mediumAnimTime"-->
9-
<!--android:fromAlpha="0.0"-->
10-
<!--android:toAlpha="1.0" />-->
117
</set>

auth/src/main/res/anim/slide_out_left.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@
44
android:duration="@android:integer/config_mediumAnimTime"
55
android:fromXDelta="0%p"
66
android:toXDelta="-100%p" />
7-
<!--<alpha-->
8-
<!--android:duration="@android:integer/config_mediumAnimTime"-->
9-
<!--android:fromAlpha="1.0"-->
10-
<!--android:toAlpha="0.0" />-->
117
</set>

auth/src/main/res/layout/check_email_layout.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
45
style="@style/FirebaseUI.WrapperStyle"
56
android:layout_width="match_parent"
67
android:layout_height="wrap_content">
@@ -14,7 +15,8 @@
1415
android:transitionGroup="true"
1516
android:transitionName="email_field"
1617
app:errorTextAppearance="@style/FirebaseUI.Text.ErrorText"
17-
app:hintTextAppearance="@style/FirebaseUI.Text.HintText">
18+
app:hintTextAppearance="@style/FirebaseUI.Text.HintText"
19+
tools:ignore="UnusedAttribute">
1820

1921
<android.support.design.widget.TextInputEditText
2022
android:id="@+id/email"

auth/src/main/res/layout/register_email_layout.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
5+
android:layout_height="match_parent"
6+
xmlns:tools="http://schemas.android.com/tools">
67

78
<RelativeLayout
89
style="@style/FirebaseUI.WrapperStyle"
@@ -22,7 +23,8 @@
2223
android:transitionGroup="true"
2324
android:transitionName="email_field"
2425
app:errorTextAppearance="@style/FirebaseUI.Text.ErrorText"
25-
app:hintTextAppearance="@style/FirebaseUI.Text.HintText">
26+
app:hintTextAppearance="@style/FirebaseUI.Text.HintText"
27+
tools:ignore="UnusedAttribute">
2628

2729
<android.support.design.widget.TextInputEditText
2830
android:id="@+id/email"

library/quality/lint-baseline.xml

Lines changed: 1 addition & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<issues format="4" by="lint 2.3.0-alpha1">
2+
<issues format="4" by="lint 2.3.0-alpha2">
33

44
<issue
55
id="UnusedIds"
@@ -73,169 +73,6 @@
7373
column="5"/>
7474
</issue>
7575

76-
<issue
77-
id="RtlEnabled"
78-
message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest">
79-
<location
80-
file="src\main\AndroidManifest.xml"/>
81-
</issue>
82-
83-
<issue
84-
id="PrivateResource"
85-
message="The resource `@color/abc_primary_text_material_dark` is marked as private in com.android.support:appcompat-v7"
86-
errorLine1=" &lt;item name=&quot;android:textColor&quot;>@color/abc_primary_text_material_dark&lt;/item>
87-
"
88-
errorLine2=" ^">
89-
<location
90-
file="src\main\res\values\styles.xml"
91-
line="41"
92-
column="40"/>
93-
</issue>
94-
95-
<issue
96-
id="PrivateResource"
97-
message="The resource `@color/abc_primary_text_material_dark` is marked as private in com.android.support:appcompat-v7"
98-
errorLine1=" &lt;item name=&quot;android:textColorPrimary&quot;>@color/abc_primary_text_material_dark&lt;/item>
99-
"
100-
errorLine2=" ^">
101-
<location
102-
file="src\main\res\values\styles.xml"
103-
line="42"
104-
column="47"/>
105-
</issue>
106-
107-
<issue
108-
id="PrivateResource"
109-
message="The resource `@color/abc_primary_text_material_light` is marked as private in com.android.support:appcompat-v7"
110-
errorLine1=" &lt;item name=&quot;android:textColorPrimaryInverse&quot;>@color/abc_primary_text_material_light&lt;/item>
111-
"
112-
errorLine2=" ^">
113-
<location
114-
file="src\main\res\values\styles.xml"
115-
line="43"
116-
column="54"/>
117-
</issue>
118-
119-
<issue
120-
id="PrivateResource"
121-
message="The resource `@color/abc_secondary_text_material_dark` is marked as private in com.android.support:appcompat-v7"
122-
errorLine1=" &lt;item name=&quot;android:textColorSecondary&quot;>@color/abc_secondary_text_material_dark&lt;/item>
123-
"
124-
errorLine2=" ^">
125-
<location
126-
file="src\main\res\values\styles.xml"
127-
line="44"
128-
column="49"/>
129-
</issue>
130-
131-
<issue
132-
id="PrivateResource"
133-
message="The resource `@color/abc_secondary_text_material_light` is marked as private in com.android.support:appcompat-v7"
134-
errorLine1=" &lt;item name=&quot;android:textColorSecondaryInverse&quot;>@color/abc_secondary_text_material_light&lt;/item>
135-
"
136-
errorLine2=" ^">
137-
<location
138-
file="src\main\res\values\styles.xml"
139-
line="45"
140-
column="56"/>
141-
</issue>
142-
143-
<issue
144-
id="PrivateResource"
145-
message="The resource `@color/abc_primary_text_material_dark` is marked as private in com.android.support:appcompat-v7"
146-
errorLine1=" &lt;item name=&quot;android:textColor&quot;>@color/abc_primary_text_material_dark&lt;/item>
147-
"
148-
errorLine2=" ^">
149-
<location
150-
file="src\main\res\values-v21\styles.xml"
151-
line="66"
152-
column="40"/>
153-
</issue>
154-
155-
<issue
156-
id="PrivateResource"
157-
message="The resource `@color/abc_primary_text_material_dark` is marked as private in com.android.support:appcompat-v7"
158-
errorLine1=" &lt;item name=&quot;android:textColorPrimary&quot;>@color/abc_primary_text_material_dark&lt;/item>
159-
"
160-
errorLine2=" ^">
161-
<location
162-
file="src\main\res\values-v21\styles.xml"
163-
line="67"
164-
column="47"/>
165-
</issue>
166-
167-
<issue
168-
id="PrivateResource"
169-
message="The resource `@color/abc_primary_text_material_light` is marked as private in com.android.support:appcompat-v7"
170-
errorLine1=" &lt;item name=&quot;android:textColorPrimaryInverse&quot;>@color/abc_primary_text_material_light&lt;/item>
171-
"
172-
errorLine2=" ^">
173-
<location
174-
file="src\main\res\values-v21\styles.xml"
175-
line="68"
176-
column="54"/>
177-
</issue>
178-
179-
<issue
180-
id="PrivateResource"
181-
message="The resource `@color/abc_secondary_text_material_dark` is marked as private in com.android.support:appcompat-v7"
182-
errorLine1=" &lt;item name=&quot;android:textColorSecondary&quot;>@color/abc_secondary_text_material_dark&lt;/item>
183-
"
184-
errorLine2=" ^">
185-
<location
186-
file="src\main\res\values-v21\styles.xml"
187-
line="69"
188-
column="49"/>
189-
</issue>
190-
191-
<issue
192-
id="PrivateResource"
193-
message="The resource `@color/abc_secondary_text_material_light` is marked as private in com.android.support:appcompat-v7"
194-
errorLine1=" &lt;item name=&quot;android:textColorSecondaryInverse&quot;>@color/abc_secondary_text_material_light&lt;/item>
195-
"
196-
errorLine2=" ^">
197-
<location
198-
file="src\main\res\values-v21\styles.xml"
199-
line="70"
200-
column="56"/>
201-
</issue>
202-
203-
<issue
204-
id="LogConditional"
205-
message="The log call Log.d(...) should be conditional: surround with `if (Log.isLoggable(...))` or `if (BuildConfig.DEBUG) { ... }`"
206-
errorLine1=" Log.d(TAG, &quot;signInAnonymously:onComplete:&quot; + task.isSuccessful());
207-
"
208-
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
209-
<location
210-
file="src\main\java\com\firebase\uidemo\database\ChatActivity.java"
211-
line="174"
212-
column="25"/>
213-
</issue>
214-
215-
<issue
216-
id="LogConditional"
217-
message="The log call Log.d(...) should be conditional: surround with `if (Log.isLoggable(...))` or `if (BuildConfig.DEBUG) { ... }`"
218-
errorLine1=" Log.d(TAG, &quot;signInAnonymously:&quot; + task.isSuccessful());
219-
"
220-
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
221-
<location
222-
file="src\main\java\com\firebase\uidemo\storage\ImageActivity.java"
223-
line="67"
224-
column="25"/>
225-
</issue>
226-
227-
<issue
228-
id="LogConditional"
229-
message="The log call Log.d(...) should be conditional: surround with `if (Log.isLoggable(...))` or `if (BuildConfig.DEBUG) { ... }`"
230-
errorLine1=" Log.d(TAG, &quot;uploadPhoto:onSuccess:&quot; +
231-
"
232-
errorLine2=" ^">
233-
<location
234-
file="src\main\java\com\firebase\uidemo\storage\ImageActivity.java"
235-
line="126"
236-
column="25"/>
237-
</issue>
238-
23976
<issue
24077
id="UnusedResources"
24178
message="The resource `R.string.google_crash_reporting_api_key` appears to be unused"
@@ -251,16 +88,4 @@
25188
column="13"/>
25289
</issue>
25390

254-
<issue
255-
id="GoogleAppIndexingWarning"
256-
message="App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details."
257-
errorLine1=" &lt;application
258-
"
259-
errorLine2=" ^">
260-
<location
261-
file="src\main\AndroidManifest.xml"
262-
line="9"
263-
column="5"/>
264-
</issue>
265-
26691
</issues>

0 commit comments

Comments
 (0)