Skip to content

Commit

Permalink
make project w0rk
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrulz committed Mar 19, 2021
1 parent fcda874 commit 64facc8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,12 @@ public void onSuccess(final String adIdentifier, final boolean adDonotTrack) {
case NetworkType.CELLULAR_3G:
deviceDataMap.put(this.getString(string.network_type), "Cellular 3G");
break;
case NetworkType.CELLULAR_4G:
deviceDataMap.put(this.getString(string.network_type), "Cellular 4G");
case NetworkType.CELLULAR_4G_OR_5G_NSA:
deviceDataMap.put(this.getString(string.network_type), "Cellular 4G/5G NSA");
break;
case NetworkType.CELLULAR_5G_SA:
deviceDataMap.put(this.getString(string.network_type), "Cellular 5G SA");
break;

case NetworkType.WIFI_WIFIMAX:
deviceDataMap.put(this.getString(string.network_type), "Wifi/WifiMax");
break;
Expand Down
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ allprojects {
repositories {
google()
mavenCentral()

jcenter() {
content {
// This is an AGP issue. Its been fixed in Canary version. Ideally it would be backported
// to stable version soon.
// https://github.com/signalapp/Signal-Android/issues/10906#issuecomment-774448564
includeModule("org.jetbrains.trove4j", "trove4j")
}
}
}
}

Expand Down
7 changes: 5 additions & 2 deletions configs/library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ apply plugin: 'com.android.library'

android {
defaultConfig {
versionCode Versions.libraryCode
versionName Versions.libraryName
versionCode
versionName

buildConfigField 'int', 'VERSION_CODE', "${Versions.libraryCode}"
buildConfigField 'String', 'VERSION_NAME', "\"${Versions.libraryName}\""
}

// Ignore Java 8 Doclint errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import androidx.ads.identifier.AdvertisingIdClient;
import androidx.ads.identifier.AdvertisingIdInfo;
import androidx.annotation.NonNull;

import com.google.common.util.concurrent.ListenableFuture;

Expand All @@ -46,7 +47,7 @@ public interface AdIdentifierCallback {
* @param adIdentifier the ad identifier
* @param adDonotTrack the ad donot track
*/
void onSuccess(String adIdentifier, boolean adDonotTrack);
void onSuccess(@NonNull String adIdentifier, boolean adDonotTrack);
}

private Context context;
Expand All @@ -57,7 +58,7 @@ public interface AdIdentifierCallback {
*
* @param context the context
*/
public EasyAdsMod(final Context context) {
public EasyAdsMod(@NonNull final Context context) {
this.context = context.getApplicationContext();
}

Expand All @@ -66,7 +67,7 @@ public EasyAdsMod(final Context context) {
*
* @param callback the callback
*/
public final void getAndroidAdId(final AdIdentifierCallback callback) {
public final void getAndroidAdId(@NonNull final AdIdentifierCallback callback) {
executor.execute(new Runnable() {
@Override
public void run() {
Expand Down
4 changes: 1 addition & 3 deletions easydeviceinfo-base/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
~ limitations under the License.
-->

<manifest package="github.nisrulz.easydeviceinfo.base">
<uses-permission name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
</manifest>
<manifest package="github.nisrulz.easydeviceinfo.base" />
3 changes: 0 additions & 3 deletions easydeviceinfo-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
apply from: "$rootProject.projectDir/configs/library.gradle"
apply from: "$rootProject.projectDir/configs/common.gradle"

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

ext.setupModuleNamesForPublishing(ModuleName.ktx, ModuleDesc.ktx)

dependencies {
Expand Down

0 comments on commit 64facc8

Please sign in to comment.