Skip to content

Commit

Permalink
Removing test logs
Browse files Browse the repository at this point in the history
  • Loading branch information
this-Aditya committed Jul 27, 2024
1 parent 61c88f7 commit 09602d7
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,13 @@ abstract class MainActivity : AppCompatActivity(), LoginListener {
clearAppData(this)
logger.debug("Disabling Firebase Analytics")
FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(false)
logger.info("Starting SplashActivity: ${packageManager.getLaunchIntentForPackage(packageName)}")
radarConfig.resetStatus()
// Start Launcher Activity in overriding method
}

private fun clearConfigSharedPrefs() {
val sharedPreferences = getSharedPreferences("org.radarbase.android.config.LocalConfiguration", Context.MODE_PRIVATE)
sharedPreferences.all.forEach { (key, value) ->
logger.info("Finalizing Source service: Shared Prefs: Deleting: $key -> $value")
}
sharedPreferences.edit().clear().apply()
}
Expand All @@ -265,13 +263,11 @@ abstract class MainActivity : AppCompatActivity(), LoginListener {
}

private fun clearFilesDir(context: Context) {
logger.info("Finalizing Source Service: clearing files")
val filesDir = context.filesDir
deleteFilesInDirectory(filesDir)
}

private fun clearCache(context: Context) {
logger.info("Finalizing Source Service: clearing cache")
val cacheDir = context.cacheDir
deleteFilesInDirectory(cacheDir)
}
Expand All @@ -282,7 +278,6 @@ abstract class MainActivity : AppCompatActivity(), LoginListener {
if (children != null) {
for (child in children) {
if (child.absolutePath.toString().contains("firebase")) return
logger.info("Finalizing Source Service: deleting: ${child.absolutePath}")
deleteFilesInDirectory(child)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,16 +530,12 @@ abstract class RadarService : LifecycleService(), ServerStatusListener, LoginLis

override fun loggedOut(manager: LoginManager?, authState: AppAuthState) {
mHandler.execute {
logger.info("RADAR Service: Start: Finalizing Source Service")
updateProviders(authState, configuration.latestConfig)
val oldProviders = mConnections
logger.info("RADAR Service: Mid: Finalizing Source Service")
removeProviders(mConnections.toSet())
logger.info("RADAR Service: End: Finalizing Source Service")
oldProviders.forEach {
it.stopService()
}
logger.info("Finalizing Source Services")
stopForeground(STOP_FOREGROUND_REMOVE)
stopSelf()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ abstract class AuthService : Service(), LoginListener {
logger.info("Logout Succeed")
appAuth = authState
callListeners {
logger.debug("Finalizing Source Service: LL #{}: {} (starting with {} listeners)", it.id, it.loginListener, listeners.size)
it.loginListener.loggedOut(manager, appAuth)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ class ManagementPortalLoginManager(private val listener: AuthService, state: App
logger.error("Cannot construct ManagementPortalClient without client credentials")
null
}
logger.debug("Client Config: {} and new client config: {}", clientConfig, newClientConfig)
if (newClientConfig == clientConfig) return

client = newClientConfig?.let {
Expand All @@ -285,7 +284,6 @@ class ManagementPortalLoginManager(private val listener: AuthService, state: App
).also { restClient = it.client }
}

logger.info("Ensured new client: id: {}, secret: {}", {config.getString(OAUTH2_CLIENT_ID)}, {config.getString(OAUTH2_CLIENT_SECRET, "")})
}

private fun addSource(authState: AppAuthState, source: SourceMetadata): AppAuthState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,8 @@ abstract class SourceProvider<T : BaseSourceState>(protected val radarService: R
}

fun stopService() {
logger.info("Start of Finalizing Source Service")
val intent = Intent(radarService, serviceClass)
val isStopped = radarService.stopService(intent)
logger.info("Mid of Finalizing Source Service: ${serviceClass.name} isStopped: ${isStopped}")
logger.info("End of Finalizing Source Service: ${serviceClass.name}")
radarService.stopService(intent)
}

/**
Expand Down

0 comments on commit 09602d7

Please sign in to comment.