Skip to content

Commit 652dd87

Browse files
committed
Revert default process name if not found to empty string
1 parent ba4e6d9 commit 652dd87

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

firebase-perf/src/main/java/com/google/firebase/perf/util/AppProcessesProvider.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ object AppProcessesProvider {
4242
/**
4343
* Gets this app's current process name.
4444
*
45-
* If the current process details are not found for whatever reason, returns app's package name.
45+
* If the current process details are not found for whatever reason, returns an empty string.
4646
*/
4747
@JvmStatic
4848
fun getProcessName(context: Context): String {
4949
val pid = Process.myPid()
50-
return getAppProcesses(context).find { it.pid == pid }?.processName
51-
?: getProcessName(default = context.packageName)
50+
return getAppProcesses(context).find { it.pid == pid }?.processName ?: getProcessName()
5251
}
5352

5453
/** Gets the app's current process name. If it could not be found, return the default. */

0 commit comments

Comments
 (0)