Revision ac4c7a1d
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 |
|
|
14 | 12 |
import com.google.firebase.crashlytics.FirebaseCrashlytics; |
15 | 13 |
|
16 | 14 |
import org.distorted.objectlib.BuildConfig; |
17 | 15 |
import org.distorted.objectlib.helpers.ObjectLibInterface; |
18 | 16 |
|
19 |
import java.lang.ref.WeakReference; |
|
20 |
|
|
21 | 17 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
22 | 18 |
|
23 | 19 |
public class PurchaseObjectLibInterface implements ObjectLibInterface |
24 | 20 |
{ |
25 |
private final WeakReference<PurchaseActivity> mAct; |
|
26 |
|
|
27 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
28 |
|
|
29 |
PurchaseObjectLibInterface(PurchaseActivity act) |
|
30 |
{ |
|
31 |
mAct = new WeakReference<>(act); |
|
32 |
} |
|
33 |
|
|
34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
35 |
|
|
36 | 21 |
public void onWinEffectFinished(long startTime, long endTime, String debug, int scrambleNum) { } |
37 | 22 |
public void onScrambleEffectFinished() { } |
38 | 23 |
public void onBeginRotation() { } |
... | ... | |
69 | 54 |
} |
70 | 55 |
} |
71 | 56 |
} |
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 |
} |
|
81 | 57 |
} |
Also available in: Unified diff
Separate a OSInterface from LibInterface