File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed
src/main/java/org/flyve/inventory/categories Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change 1
- apply plugin : ' com.android.library'
1
+ plugins {
2
+ id ' com.android.library'
3
+ }
2
4
3
5
android {
4
6
compileSdk 34
Original file line number Diff line number Diff line change @@ -112,22 +112,7 @@ public User(Context xCtx) {
112
112
public String getUserName () {
113
113
String userName = "N/A" ;
114
114
try {
115
- if (Build .VERSION .SDK_INT >= 17 ) {
116
- UserManager userMgr = (UserManager ) context .getSystemService (Context .USER_SERVICE );
117
- if (userMgr != null ) {
118
- try {
119
- // validate permission exception
120
- userName = userMgr .getUserName ();
121
- } catch (Exception ex ) {
122
- InventoryLog .e (InventoryLog .getMessage (context , CommonErrorType .USER_NAME , ex .getMessage ()));
123
- userName = Build .USER ;
124
- }
125
- } else {
126
- userName = Build .USER ;
127
- }
128
- } else {
129
- userName = Build .USER ;
130
- }
115
+ userName = Build .USER ;
131
116
} catch (Exception ex ) {
132
117
InventoryLog .e (InventoryLog .getMessage (context , CommonErrorType .USER_NAME , ex .getMessage ()));
133
118
}
You can’t perform that action at this time.
0 commit comments