-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AHOYAPPS-91: General Code Cleanup (#10)
* Move common functions to top level build.gradle * Remove unneeded global gradle versions * Upgrade to latest rxjava2 versions * Remove guava dependency - Replaced stats ImmutableList guava dependency with Kotlin Immutable list * Upgrade to latest crashlytics version * Use Kotlin isNullOrEmpty method instead of Guava * Upgrade from deprecated dagger version * Upgrade gradle, google services, and kotlin to latest versions * Apply formatter * Set kotlin spotless formatter * Ran formatter on kotlin files * Remove unused gradle functions * Remove IDE generated instrumentation test * Replace 2017 license text with 2019 * Add licensing to files that were missing it * Use Timber formatter * Log exception instead of message * Remove unused twilioapi directory * Reduce scope of variables to local * Clean up java syntax and access modifiers * Remove unneeded public access modifers * Remove unused code * Clean up JavaDoc * Change development flavor to community flavor to show display name * Fix potential NPE pug and accessibility warning * Add null checking to various areas with potential NPEs * Remove unused code * Cleanup assignment for field and remove unused boolean field * Add todos linking to JIRA stories * Apply Formatter
- Loading branch information
John Qualls
committed
Nov 8, 2019
1 parent
572f949
commit 3b1f5a0
Showing
89 changed files
with
931 additions
and
2,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#### 0.1.0 | ||
#### 0.1.0 | ||
|
||
This is the initial release of this application as an open source project. The full release | ||
to the Google Play Store will be part of the first major release. | ||
This is the initial release of this application as an open source project. The full release | ||
to the Google Play Store will be part of the first major release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
app/src/androidTest/java/com/twilio/video/app/ApplicationTest.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
app/src/community/java/com/twilio/video/app/CommunityTreeModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/src/community/java/com/twilio/video/app/VideoApplicationComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/src/community/java/com/twilio/video/app/auth/CommunityAuthModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
app/src/community/java/com/twilio/video/app/auth/CommunityAuthenticator.java
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
app/src/community/java/com/twilio/video/app/auth/CommunityAuthenticator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2019 Twilio, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.twilio.video.app.auth | ||
|
||
import android.content.SharedPreferences | ||
import com.twilio.video.app.base.BaseActivity | ||
import com.twilio.video.app.data.Preferences | ||
import com.twilio.video.app.ui.login.CommunityLoginActivity | ||
|
||
class CommunityAuthenticator(private val preferences: SharedPreferences) : Authenticator { | ||
|
||
override fun getLoginActivity(): Class<out BaseActivity> { | ||
return CommunityLoginActivity::class.java | ||
} | ||
|
||
override fun loggedIn(): Boolean { | ||
return !preferences.getString(Preferences.DISPLAY_NAME, null).isNullOrEmpty() | ||
} | ||
|
||
override fun logout() { | ||
preferences.edit().remove(Preferences.DISPLAY_NAME).apply() | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
app/src/community/java/com/twilio/video/app/data/CommunityDataModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.