Skip to content

Commit a47d315

Browse files
SONARKT-626 Rule S7435: Processing persistent unique identifiers is security-sensitive
1 parent a12d01f commit a47d315

File tree

19 files changed

+643
-1
lines changed

19 files changed

+643
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package android.bluetooth;
2+
3+
public final class BluetoothAdapter {
4+
public String getAddress() {
5+
throw new RuntimeException("Stub!");
6+
}
7+
public int getState() {
8+
throw new RuntimeException("Stub!");
9+
}
10+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package android.content;
2+
3+
public abstract class ContentResolver {
4+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package android.net.wifi;
2+
3+
public class WifiInfo {
4+
public String getMacAddress() {
5+
throw new RuntimeException("Stub!");
6+
}
7+
public double getLostTxPacketsPerSecond() {
8+
throw new RuntimeException("Stub!");
9+
}
10+
public void setLostTxPacketsPerSecond(double lostTxPacketsPerSecond) {
11+
throw new RuntimeException("Stub!");
12+
}
13+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package android.provider;
2+
3+
import android.content.ContentResolver;
4+
5+
public final class Settings {
6+
@Deprecated
7+
public static final String ANDROID_ID = Secure.ANDROID_ID;
8+
@Deprecated
9+
public static final String WIFI_WATCHDOG_PING_COUNT = Secure.WIFI_WATCHDOG_PING_COUNT;
10+
11+
public static final class Secure {
12+
public static final String ANDROID_ID = "android_id";
13+
@Deprecated
14+
public static final String WIFI_WATCHDOG_PING_COUNT = "wifi_watchdog_ping_count";
15+
16+
public static String getString(ContentResolver resolver, String name) {
17+
throw new RuntimeException("Stub!");
18+
}
19+
public static boolean putString(ContentResolver resolver, String name, String value) {
20+
throw new RuntimeException("Stub!");
21+
}
22+
}
23+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package android.telephony;
2+
3+
import android.annotation.NonNull;
4+
5+
public class SubscriptionManager {
6+
@NonNull
7+
public String getPhoneNumber(int subscriptionId, int source) {
8+
throw new RuntimeException("Stub!");
9+
}
10+
@NonNull
11+
public String getPhoneNumber(int subscriptionId) {
12+
throw new RuntimeException("Stub!");
13+
}
14+
public int getActiveSubscriptionInfoCount() {
15+
throw new RuntimeException("Stub!");
16+
}
17+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package android.telephony;
2+
3+
public class TelephonyManager {
4+
public String getSimSerialNumber() {
5+
throw new RuntimeException("Stub!");
6+
}
7+
@Deprecated
8+
public String getDeviceId() {
9+
throw new RuntimeException("Stub!");
10+
}
11+
@Deprecated
12+
public String getDeviceId(int slotIndex) {
13+
throw new RuntimeException("Stub!");
14+
}
15+
public String getImei() {
16+
throw new RuntimeException("Stub!");
17+
}
18+
public String getImei(int slotIndex) {
19+
throw new RuntimeException("Stub!");
20+
}
21+
@Deprecated
22+
public String getMeid() {
23+
throw new RuntimeException("Stub!");
24+
}
25+
@Deprecated
26+
public String getMeid(int slotIndex) {
27+
throw new RuntimeException("Stub!");
28+
}
29+
@Deprecated
30+
public String getLine1Number() {
31+
throw new RuntimeException("Stub!");
32+
}
33+
public String getLine1Number(int subId) {
34+
throw new RuntimeException("Stub!");
35+
}
36+
@Deprecated
37+
public int getPhoneCount() {
38+
throw new RuntimeException("Stub!");
39+
}
40+
public int getActiveModemCount() {
41+
throw new RuntimeException("Stub!");
42+
}
43+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package androidx.ads.identifier;
2+
3+
import android.annotation.NonNull;
4+
import androidx.ads.identifier.internal.HoldingConnectionClient;
5+
6+
public class AdvertisingIdClient {
7+
@SuppressWarnings("WeakerAccess") /* synthetic accessor */
8+
@NonNull
9+
public static AdvertisingIdInfo getIdInfo(HoldingConnectionClient connectionClient) {
10+
throw new RuntimeException("Stub!");
11+
}
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package androidx.ads.identifier;
2+
3+
import android.annotation.NonNull;
4+
5+
public abstract class AdvertisingIdInfo {
6+
@NonNull
7+
public abstract String getId();
8+
@NonNull
9+
public abstract String getProviderPackageName();
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package androidx.ads.identifier.internal;
2+
3+
public class HoldingConnectionClient {
4+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.google.android.gms.ads.identifier;
2+
3+
import android.content.Context;
4+
import javax.annotation.ParametersAreNonnullByDefault;
5+
6+
@ParametersAreNonnullByDefault
7+
public class AdvertisingIdClient {
8+
public static final class Info {
9+
public final String getId() {
10+
throw new RuntimeException("Stub!");
11+
}
12+
public boolean isLimitAdTrackingEnabled () {
13+
throw new RuntimeException("Stub!");
14+
}
15+
}
16+
17+
public static Info getAdvertisingIdInfo(Context context) {
18+
throw new RuntimeException("Stub!");
19+
}
20+
}

0 commit comments

Comments
 (0)