Add SafetyNet logging am: 199528d460
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15206403 Change-Id: Ifd347b8712042479a22c3c21663c4e3f7a23298a
This commit is contained in:
@@ -33,6 +33,7 @@ import android.os.Process;
|
||||
import android.os.SimpleClock;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.EventLog;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
@@ -356,6 +357,7 @@ public class WifiDialogActivity extends ObservableActivity implements WifiDialog
|
||||
final String callingPackage = getCallingPackage();
|
||||
if (callingPackage == null) {
|
||||
Log.d(TAG, "Failed to get the calling package, don't return the result.");
|
||||
EventLog.writeEvent(0x534e4554, "185126813", -1 /* UID */, "no calling package");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -372,6 +374,14 @@ public class WifiDialogActivity extends ObservableActivity implements WifiDialog
|
||||
}
|
||||
|
||||
Log.d(TAG, "The calling package does not have the necessary permissions for result.");
|
||||
try {
|
||||
EventLog.writeEvent(0x534e4554, "185126813",
|
||||
getPackageManager().getPackageUid(callingPackage, 0 /* flags */),
|
||||
"no permission");
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
EventLog.writeEvent(0x534e4554, "185126813", -1 /* UID */, "no permission");
|
||||
Log.w(TAG, "Cannot find the UID, calling package: " + callingPackage, e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user