use UID instead of user ID for metrics according to design doc.

bug: 169537354
Test: atest -c MediaCasTest
Change-Id: I63e13eb20b1f16c6f28c6d0391bfcad836dc7a45
This commit is contained in:
Henry Fang
2020-11-11 18:50:46 -08:00
parent ed1098532d
commit 0077236f37

View File

@@ -20,7 +20,6 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
import android.app.ActivityManager;
import android.content.Context;
import android.hardware.cas.V1_0.HidlCasPluginDescriptor;
import android.hardware.cas.V1_0.ICas;
@@ -679,7 +678,7 @@ public final class MediaCas implements AutoCloseable {
private void createPlugin(int casSystemId) throws UnsupportedCasException {
try {
mCasSystemId = casSystemId;
mUserId = ActivityManager.getCurrentUser();
mUserId = Process.myUid();
IMediaCasService service = getService();
android.hardware.cas.V1_2.IMediaCasService serviceV12 =
android.hardware.cas.V1_2.IMediaCasService.castFrom(service);