• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


コミットメタ情報

リビジョンc7882bb34474ad9e128b1f17ff9174d583c02d4f (tree)
日時2021-08-16 13:15:16
作者Weng Su <wengsu@goog...>
コミッターAndroid Build Coastguard Worker

ログメッセージ

[DO NOT MERGE] Add SafetyNet logging

- Add SafetyNet log if the calling package is no the permission for
result

Test: checked eventlog in the bugreport
Bug: 185126813

Merged-In: I1535f6f2ded2445702df0d723518b773cd094164
Change-Id: I1535f6f2ded2445702df0d723518b773cd094164
(cherry picked from commit 199528d46065ffe444e140023bd723786dbb5cdd)
(cherry picked from commit b9b493d39d609e14b8dda3bd863430fc393e4f14)

変更サマリ

差分

--- a/src/com/android/settings/wifi/WifiDialogActivity.java
+++ b/src/com/android/settings/wifi/WifiDialogActivity.java
@@ -28,6 +28,7 @@ import android.net.wifi.WifiConfiguration;
2828 import android.net.wifi.WifiManager;
2929 import android.net.wifi.WifiManager.ActionListener;
3030 import android.os.Bundle;
31+import android.util.EventLog;
3132 import android.util.Log;
3233
3334 import androidx.annotation.VisibleForTesting;
@@ -216,6 +217,7 @@ public class WifiDialogActivity extends Activity implements WifiDialog.WifiDialo
216217 final String callingPackage = getCallingPackage();
217218 if (callingPackage == null) {
218219 Log.d(TAG, "Failed to get the calling package, don't return the result.");
220+ EventLog.writeEvent(0x534e4554, "185126813", -1 /* UID */, "no calling package");
219221 return false;
220222 }
221223
@@ -232,6 +234,14 @@ public class WifiDialogActivity extends Activity implements WifiDialog.WifiDialo
232234 }
233235
234236 Log.d(TAG, "The calling package does not have the necessary permissions for result.");
237+ try {
238+ EventLog.writeEvent(0x534e4554, "185126813",
239+ getPackageManager().getPackageUid(callingPackage, 0 /* flags */),
240+ "no permission");
241+ } catch (PackageManager.NameNotFoundException e) {
242+ EventLog.writeEvent(0x534e4554, "185126813", -1 /* UID */, "no permission");
243+ Log.w(TAG, "Cannot find the UID, calling package: " + callingPackage, e);
244+ }
235245 return false;
236246 }
237247 }