Browse Source

removed Log.d calls

yattoz 5 years ago
parent
commit
25810d5a0c

+ 4 - 4
app/src/main/java/fr/forum_thalie/tsumugi/Async.kt View File

13
             execute()
13
             execute()
14
         } catch (e: Exception)
14
         } catch (e: Exception)
15
         {
15
         {
16
-            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag,e.toString())
16
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag,e.toString())
17
         }
17
         }
18
     }
18
     }
19
 
19
 
46
         }
46
         }
47
 
47
 
48
 
48
 
49
-        //[REMOVE LOG CALLS]Log.d(tag, "fallback for no network. Store reset : $storeReset")
49
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "fallback for no network. Store reset : $storeReset")
50
     }
50
     }
51
 
51
 
52
     override fun doInBackground(vararg params: Any?): Any? {
52
     override fun doInBackground(vararg params: Any?): Any? {
53
         try {
53
         try {
54
             return handler(parameters)
54
             return handler(parameters)
55
         } catch (e: Exception) {
55
         } catch (e: Exception) {
56
-            //[REMOVE LOG CALLS]Log.d(tag,e.toString())
56
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag,e.toString())
57
             onException(e)
57
             onException(e)
58
         }
58
         }
59
         return null
59
         return null
63
         try {
63
         try {
64
             post(result)
64
             post(result)
65
         } catch (e: Exception) {
65
         } catch (e: Exception) {
66
-            //[REMOVE LOG CALLS]Log.d(tag,e.toString())
66
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag,e.toString())
67
             onException(e)
67
             onException(e)
68
         }
68
         }
69
     }
69
     }

+ 3 - 3
app/src/main/java/fr/forum_thalie/tsumugi/BaseActivity.kt View File

21
         val height =  ((rootLayout?.height ?: 0))
21
         val height =  ((rootLayout?.height ?: 0))
22
         val width =  ((rootLayout?.width ?: 0))
22
         val width =  ((rootLayout?.width ?: 0))
23
 
23
 
24
-        //[REMOVE LOG CALLS]Log.d(tag, "$viewWidth, $viewHeight, $width, $height, ${viewHeight.toDouble()/viewWidth.toDouble()}, ${height.toDouble()/width.toDouble()}")
24
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "$viewWidth, $viewHeight, $width, $height, ${viewHeight.toDouble()/viewWidth.toDouble()}, ${height.toDouble()/width.toDouble()}")
25
 
25
 
26
         val broadcastManager = LocalBroadcastManager.getInstance(this@BaseActivity)
26
         val broadcastManager = LocalBroadcastManager.getInstance(this@BaseActivity)
27
         if(height <= viewHeight * 2 / 3 /*height.toDouble()/width.toDouble() < 1.20 */){
27
         if(height <= viewHeight * 2 / 3 /*height.toDouble()/width.toDouble() < 1.20 */){
49
         // do things when keyboard is shown
49
         // do things when keyboard is shown
50
         val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottom_nav)
50
         val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottom_nav)
51
         bottomNavigationView.visibility = View.GONE
51
         bottomNavigationView.visibility = View.GONE
52
-        //[REMOVE LOG CALLS]Log.d(tag, "bottomNav visibility set to GONE (height $keyboardHeight)")
52
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "bottomNav visibility set to GONE (height $keyboardHeight)")
53
     }
53
     }
54
 
54
 
55
      private fun onHideKeyboard() {
55
      private fun onHideKeyboard() {
56
         // do things when keyboard is hidden
56
         // do things when keyboard is hidden
57
         val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottom_nav)
57
         val bottomNavigationView = findViewById<BottomNavigationView>(R.id.bottom_nav)
58
         bottomNavigationView.visibility = View.VISIBLE
58
         bottomNavigationView.visibility = View.VISIBLE
59
-        //[REMOVE LOG CALLS]Log.d(tag, "bottomNav visibility set to VISIBLE")
59
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "bottomNav visibility set to VISIBLE")
60
     }
60
     }
61
 
61
 
62
     protected fun attachKeyboardListeners() {
62
     protected fun attachKeyboardListeners() {

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/BootBroadcastReceiver.kt View File

12
 class BootBroadcastReceiver : BroadcastReceiver(){
12
 class BootBroadcastReceiver : BroadcastReceiver(){
13
 
13
 
14
     override fun onReceive(context: Context, arg1: Intent) {
14
     override fun onReceive(context: Context, arg1: Intent) {
15
-        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "Broadcast Receiver received $arg1")
15
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "Broadcast Receiver received $arg1")
16
         // define preferenceStore for places of the program that needs to access Preferences without a context
16
         // define preferenceStore for places of the program that needs to access Preferences without a context
17
         preferenceStore = PreferenceManager.getDefaultSharedPreferences(context)
17
         preferenceStore = PreferenceManager.getDefaultSharedPreferences(context)
18
 
18
 

+ 6 - 6
app/src/main/java/fr/forum_thalie/tsumugi/MainActivity.kt View File

132
         // Post-UI Launch
132
         // Post-UI Launch
133
         if (PlayerStore.instance.isInitialized)
133
         if (PlayerStore.instance.isInitialized)
134
         {
134
         {
135
-            //[REMOVE LOG CALLS]Log.d(tag, "skipped initialization")
135
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "skipped initialization")
136
         } else {
136
         } else {
137
             // if the service is not started, start it in STOP mode.
137
             // if the service is not started, start it in STOP mode.
138
             // It's not a dummy action : with STOP mode, the player does not buffer audio (and does not use data connection without the user's consent).
138
             // It's not a dummy action : with STOP mode, the player does not buffer audio (and does not use data connection without the user's consent).
193
             val i = Intent(this, RadioService::class.java)
193
             val i = Intent(this, RadioService::class.java)
194
             i.putExtra("action", a.name)
194
             i.putExtra("action", a.name)
195
             i.putExtra("value", v)
195
             i.putExtra("value", v)
196
-            //[REMOVE LOG CALLS]Log.d(tag, "Sending intent ${a.name}")
196
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "Sending intent ${a.name}")
197
             startService(i)
197
             startService(i)
198
     }
198
     }
199
 
199
 
238
                 // File(getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS) + "/MyPersonalAppFolder")
238
                 // File(getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS) + "/MyPersonalAppFolder")
239
                 val logDirectory = File("$appDirectory/log")
239
                 val logDirectory = File("$appDirectory/log")
240
                 val logFile = File(logDirectory, "logcat" + System.currentTimeMillis() + ".txt")
240
                 val logFile = File(logDirectory, "logcat" + System.currentTimeMillis() + ".txt")
241
-                //[REMOVE LOG CALLS]Log.d(
241
+                //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(
242
                     tag,
242
                     tag,
243
                     "appDirectory : $appDirectory, logDirectory : $logDirectory, logFile : $logFile"
243
                     "appDirectory : $appDirectory, logDirectory : $logDirectory, logFile : $logFile"
244
                 )
244
                 )
246
                 // create app folder
246
                 // create app folder
247
                 if (!appDirectory.exists()) {
247
                 if (!appDirectory.exists()) {
248
                     appDirectory.mkdir()
248
                     appDirectory.mkdir()
249
-                    //[REMOVE LOG CALLS]Log.d(tag, "$appDirectory created")
249
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "$appDirectory created")
250
                 }
250
                 }
251
 
251
 
252
                 // create log folder
252
                 // create log folder
253
                 if (!logDirectory.exists()) {
253
                 if (!logDirectory.exists()) {
254
                     logDirectory.mkdir()
254
                     logDirectory.mkdir()
255
-                    //[REMOVE LOG CALLS]Log.d(tag, "$logDirectory created")
255
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "$logDirectory created")
256
                 }
256
                 }
257
 
257
 
258
                 // clear the previous logcat and then write the new one to the file
258
                 // clear the previous logcat and then write the new one to the file
259
                 try {
259
                 try {
260
                     Runtime.getRuntime().exec("logcat -c")
260
                     Runtime.getRuntime().exec("logcat -c")
261
                     Runtime.getRuntime().exec("logcat -v time -f $logFile *:E $tag:V ")
261
                     Runtime.getRuntime().exec("logcat -v time -f $logFile *:E $tag:V ")
262
-                    //[REMOVE LOG CALLS]Log.d(tag, "logcat started")
262
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "logcat started")
263
                 } catch (e: IOException) {
263
                 } catch (e: IOException) {
264
                     e.printStackTrace()
264
                     e.printStackTrace()
265
                 }
265
                 }

+ 14 - 14
app/src/main/java/fr/forum_thalie/tsumugi/RadioService.kt View File

68
                 // This *should* work in any case...
68
                 // This *should* work in any case...
69
                 when (intent.getIntExtra("state", -1)) {
69
                 when (intent.getIntExtra("state", -1)) {
70
                 0 -> {
70
                 0 -> {
71
-                    //[REMOVE LOG CALLS]Log.d(tag, radioTag + "Headset is unplugged")
71
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "Headset is unplugged")
72
                 }
72
                 }
73
                 1 -> {
73
                 1 -> {
74
-                    //[REMOVE LOG CALLS]Log.d(tag, radioTag + "Headset is plugged")
74
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "Headset is plugged")
75
                     headsetPluggedIn = true
75
                     headsetPluggedIn = true
76
                 }
76
                 }
77
                 else -> {
77
                 else -> {
78
-                    //[REMOVE LOG CALLS]Log.d(tag, radioTag + "I have no idea what the headset state is")
78
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "I have no idea what the headset state is")
79
                 }
79
                 }
80
                 }
80
                 }
81
                 /*
81
                 /*
91
                 }
91
                 }
92
                 else
92
                 else
93
                 {
93
                 {
94
-                    //[REMOVE LOG CALLS]Log.d(tag, radioTag + "Can't get state?")
94
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "Can't get state?")
95
                 }
95
                 }
96
 
96
 
97
                  */
97
                  */
205
         startForeground(radioServiceId, nowPlayingNotification.notification)
205
         startForeground(radioServiceId, nowPlayingNotification.notification)
206
 
206
 
207
         PlayerStore.instance.isServiceStarted.value = true
207
         PlayerStore.instance.isServiceStarted.value = true
208
-        //[REMOVE LOG CALLS]Log.d(tag, radioTag + "created")
208
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "created")
209
     }
209
     }
210
 
210
 
211
     private val handler = Handler()
211
     private val handler = Handler()
246
             Actions.CANCEL_FADE_OUT.name -> { handler.removeCallbacks(lowerVolumeRunnable) }
246
             Actions.CANCEL_FADE_OUT.name -> { handler.removeCallbacks(lowerVolumeRunnable) }
247
             Actions.SNOOZE.name -> { RadioAlarm.instance.snooze(this) }
247
             Actions.SNOOZE.name -> { RadioAlarm.instance.snooze(this) }
248
         }
248
         }
249
-        //[REMOVE LOG CALLS]Log.d(tag, radioTag + "intent received : " + intent.getStringExtra("action"))
249
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "intent received : " + intent.getStringExtra("action"))
250
         super.onStartCommand(intent, flags, startId)
250
         super.onStartCommand(intent, flags, startId)
251
         // The service must be re-created if it is destroyed by the system. This allows the user to keep actions like Bluetooth and headphones plug available.
251
         // The service must be re-created if it is destroyed by the system. This allows the user to keep actions like Bluetooth and headphones plug available.
252
         return START_STICKY
252
         return START_STICKY
258
             stopSelf()
258
             stopSelf()
259
         }
259
         }
260
         super.onTaskRemoved(rootIntent)
260
         super.onTaskRemoved(rootIntent)
261
-        //[REMOVE LOG CALLS]Log.d(tag, radioTag + "task removed")
261
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "task removed")
262
     }
262
     }
263
 
263
 
264
     override fun onDestroy() {
264
     override fun onDestroy() {
290
         }
290
         }
291
 
291
 
292
         apiTicker.cancel() // stops the timer.
292
         apiTicker.cancel() // stops the timer.
293
-        //[REMOVE LOG CALLS]Log.d(tag, radioTag + "destroyed")
293
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "destroyed")
294
         // if the service is destroyed, the application had become useless.
294
         // if the service is destroyed, the application had become useless.
295
         exitProcess(0)
295
         exitProcess(0)
296
     }
296
     }
361
             for (i in 0 until it.length()) {
361
             for (i in 0 until it.length()) {
362
                 val entry  = it.get(i)
362
                 val entry  = it.get(i)
363
                 if (entry is IcyHeaders) {
363
                 if (entry is IcyHeaders) {
364
-                    //[REMOVE LOG CALLS]Log.d(tag, radioTag + "onMetadata: IcyHeaders $entry")
364
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "onMetadata: IcyHeaders $entry")
365
                 }
365
                 }
366
                 if (entry is IcyInfo) {
366
                 if (entry is IcyInfo) {
367
-                    //[REMOVE LOG CALLS]Log.d(tag, radioTag + "onMetadata: Title ----> ${entry.title}")
367
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "onMetadata: Title ----> ${entry.title}")
368
                     // Note : Kotlin supports UTF-8 by default.
368
                     // Note : Kotlin supports UTF-8 by default.
369
                     numberOfSongs++
369
                     numberOfSongs++
370
                     val data = entry.title!!
370
                     val data = entry.title!!
439
             {
439
             {
440
                 Thread.sleep(1000)
440
                 Thread.sleep(1000)
441
                 i++
441
                 i++
442
-                //[REMOVE LOG CALLS]Log.d(tag, "$i, isAlarmStopped=$isAlarmStopped")
442
+                //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "$i, isAlarmStopped=$isAlarmStopped")
443
             }
443
             }
444
         }
444
         }
445
         val post: (Any?) -> Unit = {
445
         val post: (Any?) -> Unit = {
512
             SystemClock.elapsedRealtime()
512
             SystemClock.elapsedRealtime()
513
         )
513
         )
514
         mediaSession.setPlaybackState(playbackStateBuilder.build())
514
         mediaSession.setPlaybackState(playbackStateBuilder.build())
515
-        //[REMOVE LOG CALLS]Log.d(tag, radioTag + "begin playing")
515
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "begin playing")
516
     }
516
     }
517
 
517
 
518
     private fun pausePlaying()
518
     private fun pausePlaying()
541
             1.0f,
541
             1.0f,
542
             SystemClock.elapsedRealtime()
542
             SystemClock.elapsedRealtime()
543
         )
543
         )
544
-        //[REMOVE LOG CALLS]Log.d(tag, radioTag + "stopped")
544
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "stopped")
545
 
545
 
546
         mediaSession.setPlaybackState(playbackStateBuilder.build())
546
         mediaSession.setPlaybackState(playbackStateBuilder.build())
547
     }
547
     }
629
                 Player.STATE_ENDED -> state = "Player.STATE_ENDED"
629
                 Player.STATE_ENDED -> state = "Player.STATE_ENDED"
630
                 Player.STATE_READY -> state = "Player.STATE_READY"
630
                 Player.STATE_READY -> state = "Player.STATE_READY"
631
             }
631
             }
632
-            //[REMOVE LOG CALLS]Log.d(tag, radioTag + "Player changed state: ${state}. numberOfSongs reset.")
632
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, radioTag + "Player changed state: ${state}. numberOfSongs reset.")
633
         }
633
         }
634
     }
634
     }
635
 
635
 

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/alarm/RadioAlarm.kt View File

97
         calendar.isLenient = true
97
         calendar.isLenient = true
98
         calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH) + i, hourOfDay, minute)
98
         calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH) + i, hourOfDay, minute)
99
 
99
 
100
-        //[REMOVE LOG CALLS]Log.d(tag, calendar.toString())
100
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, calendar.toString())
101
 
101
 
102
 
102
 
103
         return calendar.timeInMillis
103
         return calendar.timeInMillis

+ 2 - 2
app/src/main/java/fr/forum_thalie/tsumugi/alarm/RadioSleeper.kt View File

61
 
61
 
62
             AlarmManagerCompat.setExactAndAllowWhileIdle(alarmManager, AlarmManager.RTC_WAKEUP, currentMillis + (minutes * 60 * 1000) - (1 * 60 * 1000), fadeOutIntent)
62
             AlarmManagerCompat.setExactAndAllowWhileIdle(alarmManager, AlarmManager.RTC_WAKEUP, currentMillis + (minutes * 60 * 1000) - (1 * 60 * 1000), fadeOutIntent)
63
             sleepAtMillis.value = System.currentTimeMillis() + (minutes * 60 * 1000) - 1 // this -1 allows to round the division for display at the right integer
63
             sleepAtMillis.value = System.currentTimeMillis() + (minutes * 60 * 1000) - 1 // this -1 allows to round the division for display at the right integer
64
-            //[REMOVE LOG CALLS]Log.d(tag, "set sleep to $minutes minutes")
64
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "set sleep to $minutes minutes")
65
         }
65
         }
66
     }
66
     }
67
 
67
 
79
             c.startService(cancelFadeOutIntent)
79
             c.startService(cancelFadeOutIntent)
80
         }
80
         }
81
 
81
 
82
-        //[REMOVE LOG CALLS]Log.d(tag, "cancelled sleep")
82
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "cancelled sleep")
83
         sleepAtMillis.value = null
83
         sleepAtMillis.value = null
84
     }
84
     }
85
 }
85
 }

+ 2 - 2
app/src/main/java/fr/forum_thalie/tsumugi/planning/Programme.kt View File

35
         val isSpanningOverNight =
35
         val isSpanningOverNight =
36
             (((0b1000000 shr ((currentDay - 1) % 7) and (periodicity)) != 0) && hourEnd < hourBegin)
36
             (((0b1000000 shr ((currentDay - 1) % 7) and (periodicity)) != 0) && hourEnd < hourBegin)
37
 
37
 
38
-        //[REMOVE LOG CALLS]Log.d(tag, "$title is today: $isToday or spanning $isSpanningOverNight")
38
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "$title is today: $isToday or spanning $isSpanningOverNight")
39
         // shr = shift-right. It's a binary mask.
39
         // shr = shift-right. It's a binary mask.
40
 
40
 
41
         // if the program started yesterday, and spanned over night, it means that there could be a chance that it's still active.
41
         // if the program started yesterday, and spanned over night, it means that there could be a chance that it's still active.
87
      */
87
      */
88
 
88
 
89
     init {
89
     init {
90
-        //[REMOVE LOG CALLS]Log.d(tag, this.toString())
90
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, this.toString())
91
     }
91
     }
92
 }
92
 }

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/playerstore/PlayerStore.kt View File

56
                 lp.add(0, n)
56
                 lp.add(0, n)
57
             currentSongBackup.copy(currentSong)
57
             currentSongBackup.copy(currentSong)
58
             isLpUpdated.value = true
58
             isLpUpdated.value = true
59
-            //[REMOVE LOG CALLS]Log.d(tag, playerStoreTag +  lp.toString())
59
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, playerStoreTag +  lp.toString())
60
         //}
60
         //}
61
     }
61
     }
62
 
62
 

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/ui/news/NewsAdapter.kt View File

40
     override fun doInBackground(vararg params: TextView?): Bitmap? {
40
     override fun doInBackground(vararg params: TextView?): Bitmap? {
41
         t = params[0]
41
         t = params[0]
42
         return try {
42
         return try {
43
-            ////[REMOVE LOG CALLS]Log.d(LOG_CAT, "Downloading the image from: $source")
43
+            ////[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(LOG_CAT, "Downloading the image from: $source")
44
             var k: InputStream? = null
44
             var k: InputStream? = null
45
             var pic: Bitmap? = null
45
             var pic: Bitmap? = null
46
             try {
46
             try {

+ 3 - 3
app/src/main/java/fr/forum_thalie/tsumugi/ui/news/NewsFragment.kt View File

43
                 }
43
                 }
44
 
44
 
45
                 newsViewModel.isWebViewLoaded = true
45
                 newsViewModel.isWebViewLoaded = true
46
-                //[REMOVE LOG CALLS]Log.d(tag, "webview created")
46
+                //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "webview created")
47
             } else {
47
             } else {
48
-                //[REMOVE LOG CALLS]Log.d(tag, "webview already created!?")
48
+                //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "webview already created!?")
49
             }
49
             }
50
 
50
 
51
             newsViewModel.root.addOnLayoutChangeListener(orientationLayoutListener)
51
             newsViewModel.root.addOnLayoutChangeListener(orientationLayoutListener)
101
             ViewModelProviders.of(this).get(NewsViewModel::class.java)
101
             ViewModelProviders.of(this).get(NewsViewModel::class.java)
102
 
102
 
103
         newsViewModel.fetch(c = context!!, isPreloading = true)
103
         newsViewModel.fetch(c = context!!, isPreloading = true)
104
-        //[REMOVE LOG CALLS]Log.d(tag, "news fetched onCreate")
104
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "news fetched onCreate")
105
         super.onCreate(savedInstanceState)
105
         super.onCreate(savedInstanceState)
106
     }
106
     }
107
 }
107
 }

+ 3 - 3
app/src/main/java/fr/forum_thalie/tsumugi/ui/news/NewsViewModel.kt View File

43
 
43
 
44
         val maxNumberOfArticles = 5
44
         val maxNumberOfArticles = 5
45
         coroutineScope.launch(Dispatchers.Main) {
45
         coroutineScope.launch(Dispatchers.Main) {
46
-            //[REMOVE LOG CALLS]Log.d(tag, "launching coroutine")
46
+            //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "launching coroutine")
47
                 val parser = Parser()
47
                 val parser = Parser()
48
             try {
48
             try {
49
                 val articleList = parser.getArticles(urlToScrape)
49
                 val articleList = parser.getArticles(urlToScrape)
50
                 newsArray.clear()
50
                 newsArray.clear()
51
                 for (i in 0 until min(articleList.size, maxNumberOfArticles)) {
51
                 for (i in 0 until min(articleList.size, maxNumberOfArticles)) {
52
                     val item = articleList[i]
52
                     val item = articleList[i]
53
-                    //[REMOVE LOG CALLS]Log.d(tag, "i = $i / ${articleList.size}")
53
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "i = $i / ${articleList.size}")
54
                     val news = News()
54
                     val news = News()
55
                     news.title = item.title ?: ""
55
                     news.title = item.title ?: ""
56
                     news.link = item.link ?: urlToScrape
56
                     news.link = item.link ?: urlToScrape
60
 
60
 
61
                     val formatter6 = SimpleDateFormat(newsDateTimePattern, Locale.ENGLISH)
61
                     val formatter6 = SimpleDateFormat(newsDateTimePattern, Locale.ENGLISH)
62
                     val dateString = item.pubDate.toString()
62
                     val dateString = item.pubDate.toString()
63
-                    //[REMOVE LOG CALLS]Log.d(tag, "$news --- $dateString")
63
+                    //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "$news --- $dateString")
64
 
64
 
65
                     news.date = formatter6.parse(dateString) ?: Date(0)
65
                     news.date = formatter6.parse(dateString) ?: Date(0)
66
 
66
 

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/ui/nowplaying/NowPlayingFragment.kt View File

273
                 (viewHeight*100)/viewWidth
273
                 (viewHeight*100)/viewWidth
274
         else
274
         else
275
             100
275
             100
276
-        //[REMOVE LOG CALLS]Log.d(tag, "orientation set")
276
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "orientation set")
277
     }
277
     }
278
 
278
 
279
     override fun onResume() {
279
     override fun onResume() {

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/ui/programme/ProgrammeFragment.kt View File

41
 
41
 
42
         val tabLayout : TabLayout = root.findViewById(R.id.dayTabLayout)
42
         val tabLayout : TabLayout = root.findViewById(R.id.dayTabLayout)
43
         tabLayout.setupWithViewPager(viewPager)
43
         tabLayout.setupWithViewPager(viewPager)
44
-        //[REMOVE LOG CALLS]Log.d(tag, "SongFragment view created")
44
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "SongFragment view created")
45
 
45
 
46
         return root
46
         return root
47
     }
47
     }

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/ui/songs/SongsFragment.kt View File

39
 
39
 
40
         val tabLayout : TabLayout = root.findViewById(R.id.tabLayout)
40
         val tabLayout : TabLayout = root.findViewById(R.id.tabLayout)
41
         tabLayout.setupWithViewPager(viewPager)
41
         tabLayout.setupWithViewPager(viewPager)
42
-        //[REMOVE LOG CALLS]Log.d(tag, "SongFragment view created")
42
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, "SongFragment view created")
43
 
43
 
44
         return root
44
         return root
45
     }
45
     }

+ 1 - 1
app/src/main/java/fr/forum_thalie/tsumugi/ui/songs/queuelp/LastPlayedFragment.kt View File

31
 
31
 
32
 
32
 
33
     private val queueObserver = Observer<Boolean> {
33
     private val queueObserver = Observer<Boolean> {
34
-        //[REMOVE LOG CALLS]Log.d(tag, lastPlayedFragmentTag + "queue changed")
34
+        //[REMOVE LOG CALLS]//[REMOVE LOG CALLS]Log.d(tag, lastPlayedFragmentTag + "queue changed")
35
         viewAdapter.notifyDataSetChanged()
35
         viewAdapter.notifyDataSetChanged()
36
     }
36
     }
37
 
37