forked from GitHub-Mirror/riotX-android
Log
This commit is contained in:
@ -28,7 +28,7 @@ import timber.log.Timber
|
||||
class DebugReceiver : BroadcastReceiver() {
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
Timber.d("Received debug action: ${intent.action}")
|
||||
Timber.v("Received debug action: ${intent.action}")
|
||||
|
||||
intent.action?.let {
|
||||
when {
|
||||
@ -44,11 +44,11 @@ class DebugReceiver : BroadcastReceiver() {
|
||||
}
|
||||
|
||||
private fun logPrefs(name: String, sharedPreferences: SharedPreferences?) {
|
||||
Timber.d("SharedPreferences $name:")
|
||||
Timber.v("SharedPreferences $name:")
|
||||
|
||||
sharedPreferences?.let { prefs ->
|
||||
prefs.all.keys.forEach { key ->
|
||||
Timber.d("$key : ${prefs.all[key]}")
|
||||
Timber.v("$key : ${prefs.all[key]}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class OnApplicationUpgradeReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Timber.d("## onReceive() : Application has been upgraded, restart event stream service.");
|
||||
Timber.v("## onReceive() : Application has been upgraded, restart event stream service.");
|
||||
|
||||
// Start Event stream
|
||||
// TODO EventStreamServiceX.Companion.onApplicationUpgrade(context);
|
||||
|
@ -94,7 +94,7 @@ class VectorFirebaseMessagingService : FirebaseMessagingService() {
|
||||
}
|
||||
|
||||
override fun onDeletedMessages() {
|
||||
Timber.d("## onDeletedMessages()")
|
||||
Timber.v("## onDeletedMessages()")
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,7 +138,7 @@ abstract class VectorBaseActivity : BaseMvRxActivity() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
Timber.d("onResume Activity ${this.javaClass.simpleName}")
|
||||
Timber.v("onResume Activity ${this.javaClass.simpleName}")
|
||||
|
||||
if (this !is BugReportActivity) {
|
||||
rageShake?.start()
|
||||
|
@ -62,7 +62,7 @@ abstract class VectorBaseFragment : BaseMvRxFragment(), OnBackPressed {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
Timber.d("onResume Fragment ${this.javaClass.simpleName}")
|
||||
Timber.v("onResume Fragment ${this.javaClass.simpleName}")
|
||||
}
|
||||
|
||||
@CallSuper
|
||||
|
@ -36,7 +36,7 @@ abstract class VectorPreferenceFragment : PreferenceFragmentCompat() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
Timber.d("onResume Fragment ${this.javaClass.simpleName}")
|
||||
Timber.v("onResume Fragment ${this.javaClass.simpleName}")
|
||||
}
|
||||
|
||||
/* ==========================================================================================
|
||||
|
@ -70,20 +70,20 @@ class CallService : VectorService() {
|
||||
* @param callId the callId
|
||||
*/
|
||||
private fun displayIncomingCallNotification(intent: Intent) {
|
||||
Timber.d("displayIncomingCallNotification")
|
||||
Timber.v("displayIncomingCallNotification")
|
||||
|
||||
// TODO
|
||||
/*
|
||||
|
||||
// the incoming call in progress is already displayed
|
||||
if (!TextUtils.isEmpty(mIncomingCallId)) {
|
||||
Timber.d("displayIncomingCallNotification : the incoming call in progress is already displayed")
|
||||
Timber.v("displayIncomingCallNotification : the incoming call in progress is already displayed")
|
||||
} else if (!TextUtils.isEmpty(mCallIdInProgress)) {
|
||||
Timber.d("displayIncomingCallNotification : a 'call in progress' notification is displayed")
|
||||
Timber.v("displayIncomingCallNotification : a 'call in progress' notification is displayed")
|
||||
} else if (null == CallsManager.getSharedInstance().activeCall) {
|
||||
val callId = intent.getStringExtra(EXTRA_CALL_ID)
|
||||
|
||||
Timber.d("displayIncomingCallNotification : display the dedicated notification")
|
||||
Timber.v("displayIncomingCallNotification : display the dedicated notification")
|
||||
val notification = NotificationUtils.buildIncomingCallNotification(
|
||||
this,
|
||||
intent.getBooleanExtra(EXTRA_IS_VIDEO, false),
|
||||
|
@ -469,7 +469,7 @@ class EventStreamServiceX : VectorService() {
|
||||
// But it could be triggered because of multi accounts management.
|
||||
// The dedicated account is removing but some pushes are still received.
|
||||
if (null == session || !session.isAlive) {
|
||||
Timber.d("prepareCallNotification : don't bing - no session")
|
||||
Timber.v("prepareCallNotification : don't bing - no session")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -83,10 +83,10 @@ class KeysBackupBanner @JvmOverloads constructor(
|
||||
*/
|
||||
fun render(newState: State, force: Boolean = false) {
|
||||
if (newState == state && !force) {
|
||||
Timber.d("State unchanged")
|
||||
Timber.v("State unchanged")
|
||||
return
|
||||
}
|
||||
Timber.d("Rendering $newState")
|
||||
Timber.v("Rendering $newState")
|
||||
|
||||
state = newState
|
||||
|
||||
|
@ -164,9 +164,9 @@ fun openCamera(activity: Activity, titlePrefix: String, requestCode: Int): Strin
|
||||
|
||||
if (dummyUri != null) {
|
||||
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, dummyUri)
|
||||
Timber.d("trying to take a photo on " + dummyUri.toString())
|
||||
Timber.v("trying to take a photo on " + dummyUri.toString())
|
||||
} else {
|
||||
Timber.d("trying to take a photo with no predefined uri")
|
||||
Timber.v("trying to take a photo with no predefined uri")
|
||||
}
|
||||
|
||||
// Store the dummy URI which will be set to a placeholder location. When all is lost on Samsung devices,
|
||||
|
@ -59,9 +59,9 @@ fun lsFiles(context: Context) {
|
||||
|
||||
private fun logAction(file: File): Boolean {
|
||||
if (file.isDirectory) {
|
||||
Timber.d(file.toString())
|
||||
Timber.v(file.toString())
|
||||
} else {
|
||||
Timber.d(file.toString() + " " + file.length() + " bytes")
|
||||
Timber.v(file.toString() + " " + file.length() + " bytes")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -78,10 +78,10 @@ fun logPermissionStatuses(context: Context) {
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_CONTACTS)
|
||||
|
||||
Timber.d("## logPermissionStatuses() : log the permissions status used by the app")
|
||||
Timber.v("## logPermissionStatuses() : log the permissions status used by the app")
|
||||
|
||||
for (permission in permissions) {
|
||||
Timber.d(("Status of [$permission] : " +
|
||||
Timber.v(("Status of [$permission] : " +
|
||||
if (PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(context, permission))
|
||||
"PERMISSION_GRANTED"
|
||||
else
|
||||
@ -244,7 +244,7 @@ private fun checkPermissions(permissionsToBeGrantedBitMap: Int,
|
||||
}
|
||||
explanationMessage += activity.getString(R.string.permissions_rationale_msg_contacts)
|
||||
}
|
||||
else -> Timber.d("## checkPermissions(): already denied permission not supported")
|
||||
else -> Timber.v("## checkPermissions(): already denied permission not supported")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ object BadgeProxy {
|
||||
}
|
||||
|
||||
// update the badge counter
|
||||
Timber.d("## updateBadgeCount(): badge update count=$unreadRoomsCount")
|
||||
Timber.v("## updateBadgeCount(): badge update count=$unreadRoomsCount")
|
||||
updateBadgeCount(aContext, unreadRoomsCount)
|
||||
}
|
||||
*/
|
||||
|
@ -32,7 +32,7 @@ object CommandParser {
|
||||
if (!textMessage.startsWith("/")) {
|
||||
return ParsedCommand.ErrorNotACommand
|
||||
} else {
|
||||
Timber.d("parseSplashCommand")
|
||||
Timber.v("parseSplashCommand")
|
||||
|
||||
// "/" only
|
||||
if (textMessage.length == 1) {
|
||||
|
@ -105,7 +105,7 @@ class KeysBackupRestoreFromKeyViewModel : ViewModel() {
|
||||
object : MatrixCallback<Unit> {
|
||||
|
||||
override fun onSuccess(data: Unit) {
|
||||
Timber.d("##### trustKeysBackupVersion onSuccess")
|
||||
Timber.v("##### trustKeysBackupVersion onSuccess")
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -112,7 +112,7 @@ class KeysBackupRestoreFromPassphraseViewModel : ViewModel() {
|
||||
object : MatrixCallback<Unit> {
|
||||
|
||||
override fun onSuccess(data: Unit) {
|
||||
Timber.d("##### trustKeysBackupVersion onSuccess")
|
||||
Timber.v("##### trustKeysBackupVersion onSuccess")
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -36,7 +36,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
if (intent == null || context == null) return
|
||||
|
||||
Timber.d("ReplyNotificationBroadcastReceiver received : $intent")
|
||||
Timber.v("ReplyNotificationBroadcastReceiver received : $intent")
|
||||
|
||||
when (intent.action) {
|
||||
NotificationUtils.SMART_REPLY_ACTION ->
|
||||
@ -102,7 +102,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
|
||||
room.storeOutgoingEvent(event)
|
||||
room.sendEvent(event, object : MatrixCallback<Void?> {
|
||||
override fun onSuccess(info: Void?) {
|
||||
Timber.d("Send message : onSuccess ")
|
||||
Timber.v("Send message : onSuccess ")
|
||||
val notifiableMessageEvent = NotifiableMessageEvent(
|
||||
event.eventId,
|
||||
false,
|
||||
@ -120,12 +120,12 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
|
||||
}
|
||||
|
||||
override fun onNetworkError(e: Exception) {
|
||||
Timber.d("Send message : onNetworkError " + e.message, e)
|
||||
Timber.v("Send message : onNetworkError " + e.message, e)
|
||||
onSmartReplyFailed(e.localizedMessage)
|
||||
}
|
||||
|
||||
override fun onMatrixError(e: MatrixError) {
|
||||
Timber.d("Send message : onMatrixError " + e.message)
|
||||
Timber.v("Send message : onMatrixError " + e.message)
|
||||
if (e is MXCryptoError) {
|
||||
Toast.makeText(context, e.detailedErrorDescription, Toast.LENGTH_SHORT).show()
|
||||
onSmartReplyFailed(e.detailedErrorDescription)
|
||||
|
@ -89,7 +89,7 @@ class NotificationDrawerManager(val context: Context) {
|
||||
//If we support multi session, event list should be per userId
|
||||
//Currently only manage single session
|
||||
if (BuildConfig.LOW_PRIVACY_LOG_ENABLE) {
|
||||
Timber.d("%%%%%%%% onNotifiableEventReceived $notifiableEvent")
|
||||
Timber.v("%%%%%%%% onNotifiableEventReceived $notifiableEvent")
|
||||
}
|
||||
synchronized(eventList) {
|
||||
val existing = eventList.firstOrNull { it.eventId == notifiableEvent.eventId }
|
||||
@ -128,7 +128,7 @@ class NotificationDrawerManager(val context: Context) {
|
||||
|
||||
/** Clear all known message events for this room and refresh the notification drawer */
|
||||
fun clearMessageEventOfRoom(roomId: String?) {
|
||||
Timber.d("clearMessageEventOfRoom $roomId")
|
||||
Timber.v("clearMessageEventOfRoom $roomId")
|
||||
|
||||
if (roomId != null) {
|
||||
eventList.removeAll { e ->
|
||||
@ -190,7 +190,7 @@ class NotificationDrawerManager(val context: Context) {
|
||||
|
||||
synchronized(eventList) {
|
||||
|
||||
Timber.d("%%%%%%%% REFRESH NOTIFICATION DRAWER ")
|
||||
Timber.v("%%%%%%%% REFRESH NOTIFICATION DRAWER ")
|
||||
//TMP code
|
||||
var hasNewEvent = false
|
||||
var summaryIsNoisy = false
|
||||
@ -224,7 +224,7 @@ class NotificationDrawerManager(val context: Context) {
|
||||
}
|
||||
|
||||
|
||||
Timber.d("%%%%%%%% REFRESH NOTIFICATION DRAWER ${roomIdToEventMap.size} room groups")
|
||||
Timber.v("%%%%%%%% REFRESH NOTIFICATION DRAWER ${roomIdToEventMap.size} room groups")
|
||||
|
||||
var globalLastMessageTimestamp = 0L
|
||||
|
||||
@ -233,7 +233,7 @@ class NotificationDrawerManager(val context: Context) {
|
||||
|
||||
if (events.isEmpty()) {
|
||||
//Just clear this notification
|
||||
Timber.d("%%%%%%%% REFRESH NOTIFICATION DRAWER $roomId has no more events")
|
||||
Timber.v("%%%%%%%% REFRESH NOTIFICATION DRAWER $roomId has no more events")
|
||||
NotificationUtils.cancelNotificationMessage(context, roomId, ROOM_MESSAGES_NOTIFICATION_ID)
|
||||
continue
|
||||
}
|
||||
@ -292,13 +292,13 @@ class NotificationDrawerManager(val context: Context) {
|
||||
summaryInboxStyle.addLine(summaryLine)
|
||||
} catch (e: Throwable) {
|
||||
//String not found or bad format
|
||||
Timber.d("%%%%%%%% REFRESH NOTIFICATION DRAWER failed to resolve string")
|
||||
Timber.v("%%%%%%%% REFRESH NOTIFICATION DRAWER failed to resolve string")
|
||||
summaryInboxStyle.addLine(roomName)
|
||||
}
|
||||
|
||||
if (firstTime || roomGroup.hasNewEvent) {
|
||||
//Should update displayed notification
|
||||
Timber.d("%%%%%%%% REFRESH NOTIFICATION DRAWER $roomId need refresh")
|
||||
Timber.v("%%%%%%%% REFRESH NOTIFICATION DRAWER $roomId need refresh")
|
||||
val lastMessageTimestamp = events.last().timestamp
|
||||
|
||||
if (globalLastMessageTimestamp < lastMessageTimestamp) {
|
||||
@ -314,7 +314,7 @@ class NotificationDrawerManager(val context: Context) {
|
||||
hasNewEvent = true
|
||||
summaryIsNoisy = summaryIsNoisy || roomGroup.shouldBing
|
||||
} else {
|
||||
Timber.d("%%%%%%%% REFRESH NOTIFICATION DRAWER $roomId is up to date")
|
||||
Timber.v("%%%%%%%% REFRESH NOTIFICATION DRAWER $roomId is up to date")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ class OutdatedEventDetector(val context: Context) {
|
||||
if (session.isAlive) {
|
||||
session.dataHandler.getRoom(roomID)?.let { room ->
|
||||
if (room.isEventRead(eventID)) {
|
||||
Timber.d("Notifiable Event $eventID is read, and should be removed")
|
||||
Timber.v("Notifiable Event $eventID is read, and should be removed")
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ object BugReporter {
|
||||
mBugReportCall!!.cancel()
|
||||
}
|
||||
|
||||
Timber.d("## onWrite() : $percentage%")
|
||||
Timber.v("## onWrite() : $percentage%")
|
||||
publishProgress(percentage)
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ object BugReporter {
|
||||
* @return the gzipped file
|
||||
*/
|
||||
private fun compressFile(fin: File): File? {
|
||||
Timber.d("## compressFile() : compress " + fin.name)
|
||||
Timber.v("## compressFile() : compress " + fin.name)
|
||||
|
||||
val dstFile = File(fin.parent, fin.name + ".gz")
|
||||
|
||||
@ -665,7 +665,7 @@ object BugReporter {
|
||||
gos.close()
|
||||
inputStream.close()
|
||||
|
||||
Timber.d("## compressFile() : " + fin.length() + " compressed to " + dstFile.length() + " bytes")
|
||||
Timber.v("## compressFile() : " + fin.length() + " compressed to " + dstFile.length() + " bytes")
|
||||
return dstFile
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e, "## compressFile() failed " + e.message)
|
||||
|
@ -410,7 +410,7 @@ public class PreferencesManager {
|
||||
uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
||||
}
|
||||
|
||||
Timber.d("## getNotificationRingTone() returns " + uri);
|
||||
Timber.v("## getNotificationRingTone() returns " + uri);
|
||||
return uri;
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,7 @@ class VectorSettingsPreferencesFragment : VectorPreferenceFragment(), SharedPref
|
||||
val matrixInstance = Matrix.getInstance(context)
|
||||
val pushManager = matrixInstance.pushManager
|
||||
|
||||
Timber.d("onPushRuleClick $preferenceKey : set to $newValue")
|
||||
Timber.v("onPushRuleClick $preferenceKey : set to $newValue")
|
||||
|
||||
when (preferenceKey) {
|
||||
|
||||
|
Reference in New Issue
Block a user