firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

firebase-perf is not compliant with market policies

Open yin-haoran opened this issue 3 years ago • 5 comments

Getting running processes before privacy agreement is not compliant with market policies

com.google.firebase.perf.session.gauges.GaugeMetadataManager.getCurrentProcessName() {
    // activityManager.getRunningAppProcesses()
}

yin-haoran avatar Aug 31 '22 10:08 yin-haoran

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Aug 31 '22 10:08 google-oss-bot

Hi @yin-haoran, thanks for reporting. Which market is it non-compliant with? Also can you share a screenshot of the error of the non compliance?

argzdev avatar Sep 01 '22 11:09 argzdev

Tencent Appstore.

stack information of the error of the non compliance as follow

android.app.ActivityManager.getRunningAppProcesses(ActivityManager.java:3564)<[---com.google.firebase.perf.session.gauges.GaugeMetadataManager.getCurrentProcessName(GaugeMetadataManager.java:3)<---com.google.firebase.perf.session.gauges.GaugeMetadataManager.<init](https://github.com/firebase/firebase-android-sdk/issues/---com.google.firebase.perf.session.gauges.GaugeMetadataManager.getCurrentProcessName(GaugeMetadataManager.java:3)%3C---com.google.firebase.perf.session.gauges.GaugeMetadataManager.%3Cinit)>(GaugeMetadataManager.java:8)<---com.google.firebase.perf.session.gauges.GaugeMetadataManager.<init>(GaugeMetadataManager.java:1)<---com.google.firebase.perf.session.gauges.GaugeManager.initializeGaugeMetadataManager(GaugeManager.java:1)<---com.google.firebase.perf.session.SessionManager.lambda$setApplicationContext$0(SessionManager.java:1)<---com.google.firebase.perf.session.SessionManager.a(Unknown Source:0)<---com.google.firebase.perf.session.a.run(Unknown Source:6)<---java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)<---java.util.concurrent.FutureTask.run(FutureTask.java:266)<---java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)<---java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)<---java.lang.Thread.run(Thread.java:764)

android.app.ActivityManager.getRunningAppProcesses(ActivityManager.java:3564)<---com.google.firebase.perf.session.gauges.GaugeMetadataManager.getCurrentProcessName(GaugeMetadataManager.java:3)<---com.google.firebase.perf.session.gauges.GaugeMetadataManager.(GaugeMetadataManager.java:8)<---com.google.firebase.perf.session.gauges.GaugeMetadataManager.(GaugeMetadataManager.java:1)<---com.google.firebase.perf.session.gauges.GaugeManager.initializeGaugeMetadataManager(GaugeManager.java:1)<---com.google.firebase.perf.session.SessionManager.lambda$setApplicationContext$0(SessionManager.java:1)<---com.google.firebase.perf.session.SessionManager.a(Unknown Source:0)<---com.google.firebase.perf.session.a.run(Unknown Source:6)<---java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)<---java.util.concurrent.FutureTask.run(FutureTask.java:266)<---java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)<---java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)<---java.lang.Thread.run(Thread.java:764)

yin-haoran avatar Sep 02 '22 02:09 yin-haoran

Got it, thanks for the details @yin-haoran. I'll let our engineers know about this.

argzdev avatar Sep 02 '22 09:09 argzdev

Thanks @yin-haoran for reporting this. I've discussed with the team and we will remove the call for getRunningAppProcesses to get the process name of the app since we don't use that data.

In the meantime, if you haven't already, you can enable opt-in into performance collection for your users by adding the following <meta-data> element to your app’s AndroidManifest.xml file:

  <application>
    <meta-data
      android:name="firebase_performance_collection_enabled"
      android:value="false" />
  </application>

After your user's have agreed to the privacy agreement, you can enable Firebase Performance collection with

FirebasePerformance.getInstance().setPerformanceCollectionEnabled(true);

raymondlam avatar Sep 02 '22 23:09 raymondlam

Closing as the call to getRunningAppProcesses should be removed in the latest release.

raymondlam avatar Oct 14 '22 21:10 raymondlam