forked from commons-app/apps-android-commons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated Feedback Data Class to Kotlin
- Loading branch information
1 parent
4b3c86a
commit 3c21f37
Showing
1 changed file
with
19 additions
and
160 deletions.
There are no files selected for viewing
179 changes: 19 additions & 160 deletions
179
app/src/main/java/fr/free/nrw/commons/feedback/model/Feedback.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,171 +1,30 @@ | ||
package fr.free.nrw.commons.feedback.model; | ||
package fr.free.nrw.commons.feedback.model | ||
|
||
/** | ||
* Pojo class for storing information that are required while uploading a feedback | ||
*/ | ||
public class Feedback { | ||
/** | ||
* Version of app | ||
*/ | ||
private String version; | ||
/** | ||
* API level of user's phone | ||
*/ | ||
private String apiLevel; | ||
/** | ||
* Title/Description entered by user | ||
*/ | ||
private String title; | ||
/** | ||
* Android version of user's device | ||
*/ | ||
private String androidVersion; | ||
/** | ||
* Device Model of user's device | ||
*/ | ||
private String deviceModel; | ||
/** | ||
* Device manufacturer name | ||
*/ | ||
private String deviceManufacturer; | ||
/** | ||
* Device name stored on user's device | ||
*/ | ||
private String device; | ||
/** | ||
* network type user is having (Ex: Wifi) | ||
*/ | ||
private String networkType; | ||
data class Feedback ( | ||
// Version of app | ||
val version : String? = null, | ||
|
||
public Feedback(final String version, final String apiLevel, final String title, final String androidVersion, | ||
final String deviceModel, final String deviceManufacturer, final String device, final String networkType | ||
) { | ||
this.version = version; | ||
this.apiLevel = apiLevel; | ||
this.title = title; | ||
this.androidVersion = androidVersion; | ||
this.deviceModel = deviceModel; | ||
this.deviceManufacturer = deviceManufacturer; | ||
this.device = device; | ||
this.networkType = networkType; | ||
} | ||
// API level of user's phone | ||
val apiLevel: String? = null, | ||
|
||
/** | ||
* Get the version from which this piece of feedback is being sent. | ||
* Ex: 3.0.1 | ||
*/ | ||
public String getVersion() { | ||
return version; | ||
} | ||
// Title/Description entered by user | ||
val title: String? = null, | ||
|
||
/** | ||
* Set the version of app to given version | ||
*/ | ||
public void setVersion(final String version) { | ||
this.version = version; | ||
} | ||
// Android version of user's device | ||
val androidVersion: String? = null, | ||
|
||
/** | ||
* gets api level of device | ||
* Ex: 28 | ||
*/ | ||
public String getApiLevel() { | ||
return apiLevel; | ||
} | ||
// Device Model of user's device | ||
val deviceModel: String? = null, | ||
|
||
/** | ||
* sets api level value to given value | ||
*/ | ||
public void setApiLevel(final String apiLevel) { | ||
this.apiLevel = apiLevel; | ||
} | ||
// Device manufacturer name | ||
val deviceManufacturer: String? = null, | ||
|
||
/** | ||
* gets feedback text entered by user | ||
*/ | ||
public String getTitle() { | ||
return title; | ||
} | ||
// Device name stored on user's device | ||
val device: String? = null, | ||
|
||
/** | ||
* sets feedback text | ||
*/ | ||
public void setTitle(final String title) { | ||
this.title = title; | ||
} | ||
|
||
/** | ||
* gets android version of device | ||
* Ex: 9 | ||
*/ | ||
public String getAndroidVersion() { | ||
return androidVersion; | ||
} | ||
|
||
/** | ||
* sets value of android version | ||
*/ | ||
public void setAndroidVersion(final String androidVersion) { | ||
this.androidVersion = androidVersion; | ||
} | ||
|
||
/** | ||
* get device model of current device | ||
* Ex: Redmi 6 Pro | ||
*/ | ||
public String getDeviceModel() { | ||
return deviceModel; | ||
} | ||
|
||
/** | ||
* sets value of device model to a given value | ||
*/ | ||
public void setDeviceModel(final String deviceModel) { | ||
this.deviceModel = deviceModel; | ||
} | ||
|
||
/** | ||
* get device manufacturer of user's device | ||
* Ex: Redmi | ||
*/ | ||
public String getDeviceManufacturer() { | ||
return deviceManufacturer; | ||
} | ||
|
||
/** | ||
* set device manufacturer value to a given value | ||
*/ | ||
public void setDeviceManufacturer(final String deviceManufacturer) { | ||
this.deviceManufacturer = deviceManufacturer; | ||
} | ||
|
||
/** | ||
* get device name of user's device | ||
*/ | ||
public String getDevice() { | ||
return device; | ||
} | ||
|
||
/** | ||
* sets device name value to a given value | ||
*/ | ||
public void setDevice(final String device) { | ||
this.device = device; | ||
} | ||
|
||
/** | ||
* get network type of user's network | ||
* Ex: wifi | ||
*/ | ||
public String getNetworkType() { | ||
return networkType; | ||
} | ||
|
||
/** | ||
* sets network type to a given value | ||
*/ | ||
public void setNetworkType(final String networkType) { | ||
this.networkType = networkType; | ||
} | ||
|
||
} | ||
// network type user is having (Ex: Wifi) | ||
val networkType: String? = null | ||
) |