Revision ce31f774
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/purchase/PurchaseObjectLibInterface.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package org.distorted.purchase; |
11 | 11 |
|
12 |
import android.util.DisplayMetrics; |
|
13 |
|
|
12 | 14 |
import com.google.firebase.crashlytics.FirebaseCrashlytics; |
13 | 15 |
|
14 | 16 |
import org.distorted.objectlib.BuildConfig; |
15 | 17 |
import org.distorted.objectlib.helpers.ObjectLibInterface; |
16 | 18 |
|
19 |
import java.lang.ref.WeakReference; |
|
20 |
|
|
17 | 21 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
18 | 22 |
|
19 | 23 |
public class PurchaseObjectLibInterface implements ObjectLibInterface |
20 | 24 |
{ |
25 |
private final WeakReference<PurchaseActivity> mAct; |
|
26 |
|
|
27 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
28 |
|
|
29 |
PurchaseObjectLibInterface(PurchaseActivity act) |
|
30 |
{ |
|
31 |
mAct = new WeakReference<>(act); |
|
32 |
} |
|
33 |
|
|
34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
35 |
|
|
21 | 36 |
public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { } |
22 | 37 |
public void onScrambleEffectFinished() { } |
23 | 38 |
public void onBeginRotation() { } |
... | ... | |
54 | 69 |
} |
55 | 70 |
} |
56 | 71 |
} |
72 |
|
|
73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
74 |
|
|
75 |
public int getScreenDensity() |
|
76 |
{ |
|
77 |
DisplayMetrics dm = new DisplayMetrics(); |
|
78 |
mAct.get().getWindowManager().getDefaultDisplay().getMetrics(dm); |
|
79 |
return dm.densityDpi; |
|
80 |
} |
|
57 | 81 |
} |
Also available in: Unified diff
remove all references to android.Context and android.Activity from distorted-objectlib