Skip to content

Commit

Permalink
updated class names (6.20.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
ollide committed Apr 20, 2015
1 parent 9a552fc commit d6a4ffd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
16 changes: 10 additions & 6 deletions app/src/main/java/org/ollide/xposed/instagram/ClassNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public final class ClassNames {
private static final int VERSION_6_16_1 = 7369808;
private static final int VERSION_6_17_0 = 7483428;
private static final int VERSION_6_18_0 = 8031086;
// last reviewed version
private static final int VERSION_6_19_0 = 8582325;
// last reviewed version
private static final int VERSION_6_20_0 = 9204850;

/**
* The BaseActivity's obfuscated class name.
Expand All @@ -20,18 +21,21 @@ public final class ClassNames {
private static String sBaseActivityName = "com.instagram.base.activity.e";

/**
* Last changed with version 6.19.0, first checked with version 6.10.1.
* Last changed with version 6.20.0, first checked with version 6.10.1.
*/
private static String sDoubleTabListenerName = "com.instagram.android.feed.a.b.aw";
private static String sDoubleTabListenerName = "com.instagram.android.feed.a.b.bc";
/**
* Last changed with version 6.19.0, first checked with version 6.10.1.
*/
private static String sHeartIconTapListenerName = "com.instagram.android.feed.a.b.ah";
private static String sHeartIconTapListenerName = "com.instagram.android.feed.a.b.ai";

public static void initWithVersion(int versionCode) {
if (versionCode >= VERSION_6_19_0) {
if (versionCode >= VERSION_6_20_0) {
sDoubleTabListenerName = "com.instagram.android.feed.a.b.bc";
sHeartIconTapListenerName = "com.instagram.android.feed.a.b.ai";
} else if (versionCode >= VERSION_6_19_0) {
sDoubleTabListenerName = "com.instagram.android.feed.a.b.aw";
sHeartIconTapListenerName = "com.instagram.android.feed.a.b.ah";
sHeartIconTapListenerName = "com.instagram.android.feed.a.b.ai";
} else if (versionCode >= VERSION_6_18_0) {
sDoubleTabListenerName = "com.instagram.android.feed.a.b.at";
sHeartIconTapListenerName = "com.instagram.android.feed.a.b.af";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class ClassNamesTest {
private static final int VERSION_6_16_1 = 7369808;
private static final int VERSION_6_18_0 = 8031086;
private static final int VERSION_6_19_0 = 8582325;
private static final int VERSION_6_20_0 = 9204850;

private static final int VERSION_PAST_UNKNOWN = 100;

Expand All @@ -27,6 +28,9 @@ public void getBaseActivityNameTest() {

@Test
public void getDoubleTapListenerNameTest() {
ClassNames.initWithVersion(VERSION_6_20_0);
Assert.assertEquals("com.instagram.android.feed.a.b.bc", ClassNames.getDoubleTapListenerName());

ClassNames.initWithVersion(VERSION_6_19_0);
Assert.assertEquals("com.instagram.android.feed.a.b.aw", ClassNames.getDoubleTapListenerName());

Expand All @@ -48,8 +52,11 @@ public void getDoubleTapListenerNameTest() {

@Test
public void getHeartIconTapListenerNameTest() {
ClassNames.initWithVersion(VERSION_6_20_0);
Assert.assertEquals("com.instagram.android.feed.a.b.ai", ClassNames.getHeartIconTapListenerName());

ClassNames.initWithVersion(VERSION_6_19_0);
Assert.assertEquals("com.instagram.android.feed.a.b.ah", ClassNames.getHeartIconTapListenerName());
Assert.assertEquals("com.instagram.android.feed.a.b.ai", ClassNames.getHeartIconTapListenerName());

ClassNames.initWithVersion(VERSION_6_18_0);
Assert.assertEquals("com.instagram.android.feed.a.b.af", ClassNames.getHeartIconTapListenerName());
Expand Down

0 comments on commit d6a4ffd

Please sign in to comment.