Skip to content

Commit 45d2e31

Browse files
author
lucas
committed
Merge branch 'dev_2.7.0' into dev_optimization
# Conflicts: # VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/utils/VenvyDeviceUtil.java
2 parents 3330ced + c50a485 commit 45d2e31

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/utils/VenvyDeviceUtil.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,15 @@ public static String getIMEI(Context context) {
116116
* @return
117117
*/
118118
public static String getIMSI(Context context) {
119-
// TelephonyManager tm = (TelephonyManager) context
120-
// .getSystemService(Context.TELEPHONY_SERVICE);//
121-
// return tm.getSubscriberId();
122-
return "";
119+
String imsi = "";
120+
try {
121+
TelephonyManager tm = (TelephonyManager) context
122+
.getSystemService(Context.TELEPHONY_SERVICE);//
123+
imsi = tm.getSubscriberId();
124+
} catch (Exception e) {
125+
e.printStackTrace();
126+
}
127+
return imsi;
123128
}
124129

125130
/**

0 commit comments

Comments
 (0)