+5
−1
+14
−0
+14
−0
+19
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Sampling is done in cycles where length of single cycle is configurable server side. During one sampling cycle only one stack trace / message is reported. Two sampling strategies are used in this CL. 1. Sampling uniformly packages and appops, and waiting only for messages coming from sampled package (all other packages are silenced to presereve system resources). All appops are recorded, but sampled appop has preference and replaces any previous stack trace / message. This strategy is created to focus on all packages and all apps uniformly. 2. Creating list of rarely used packages - packages which were not using any dangerous permissions for more than a week. Any newly installed app is automatically added to this list, including apps which were updated. Whenever message is received for rarely used package, there is 50% probability that this message will replace whatever is being sampled in current sampling cycle. This strategy is created to focus on newly installed apps, on apps which are used infrequently and on apps which use dangerous permissions infrequently. Bug:136134050 Test: atest android.app.appops.cts.RuntimeMessageCollectionTest Change-Id: I3109b38bf0482481acf945d5441a26bfe704c9b5