public void onCreate() { super.onCreate(); mGcm = GoogleCloudMessaging.getInstance(this); mAppController = AppController.getInstance(this); mGcmRegistrationListener = new GCMRegistrationListener(); if (mGcmRegistrationListener != null) { mAppController.addListener(mGcmRegistrationListener); } mSenderId = BuildUtil.getSenderId(this); mStartIds = new ArrayList(); }
public class OAuthAuthorization implements Authorization, Serializable, OAuthSupport { private static final String HMAC_SHA1 = "HmacSHA1"; private static final boolean LOGGABLE = BuildUtil.isLogsOn(); private static final HttpParameter OAUTH_SIGNATURE_METHOD = new HttpParameter("oauth_signature_method", "HMAC-SHA1"); private static Random RAND = new Random(); private static final String TAG = "t4jOAuthAuth"; private static transient HttpClientWrapper http; private static final long serialVersionUID = 0xc3603b1500a84fe6L; private final Configuration conf; private String consumerKey; private String consumerSecret; private OAuthToken oauthToken; private String realm; public OAuthAuthorization(Configuration configuration) { consumerKey = ""; realm = null; oauthToken = null; conf = configuration; http = new HttpClientWrapper(configuration); setOAuthConsumer(configuration.getOAuthConsumerKey(), configuration.getOAuthConsumerSecret()); if (configuration.getOAuthAccessToken() != null && configuration.getOAuthAccessTokenSecret() != null) { setOAuthAccessToken(new AccessToken(configuration.getOAuthAccessToken(), configuration.getOAuthAccessTokenSecret())); } } static String constructRequestURL(String s) { String s1; String s2; int i; int j; i = s.indexOf("?"); s1 = s; if (-1 != i) { s1 = s.substring(0, i); } i = s1.indexOf("/", 8); s2 = s1.substring(0, i).toLowerCase(); j = s2.indexOf(":", 8); s = s2; if (-1 == j) goto _L2; else goto _L1 _L1: if (!s2.startsWith("http://") || !s2.endsWith(":80")) goto _L4; else goto _L3 _L3: s = s2.substring(0, j); _L2: return (new StringBuilder()).append(s).append(s1.substring(i)).toString(); _L4: s = s2; if (s2.startsWith("https://")) { s = s2; if (s2.endsWith(":443")) { s = s2.substring(0, j); } } if (true) goto _L2; else goto _L5 _L5: }
public void onGetTimeLineComplete(String paramString1, int paramInt1, String paramString2, int paramInt2, int paramInt3, boolean paramBoolean1, ArrayList<VinePost> paramArrayList, String paramString3, int paramInt4, int paramInt5, int paramInt6, long paramLong, boolean paramBoolean2, int paramInt7, String paramString4) { PendingRequest localPendingRequest = ProfileFragment.this.removeRequest(paramString1); int i; ArrayList localArrayList2; int j; label228: Object localObject; if (localPendingRequest != null) { if ((paramInt2 != 2) && (paramInt2 != 10)) break label401; i = 1; if ((i != 0) && (paramInt1 == 200)) { ProfileFragment.this.mProfileHeaderAdapter.updatePostsCount(paramInt7); ProfileFragment.this.mProfileHeaderAdapter.notifyDataSetChanged(); } if ((paramBoolean1) && (paramInt1 == 200)) { if (((paramInt2 == 3) && (ProfileFragment.this.mCurrentTab == 2)) || ((i != 0) && (ProfileFragment.this.mCurrentTab == 1))) { Cursor localCursor1 = ProfileFragment.this.mCursorAdapter.getCursor(); ArrayList localArrayList1 = null; if (localCursor1 != null) { int k = localCursor1.getCount(); localArrayList1 = null; if (k > 0) { Bundle localBundle = new Bundle(); localBundle.putBoolean("include_list", true); localCursor1.respond(localBundle); localArrayList1 = localCursor1.getExtras().getParcelableArrayList("extra_posts"); } } localArrayList2 = HybridPostCursor.mergePosts(localArrayList1, paramArrayList, VineComparatorFactory.get(paramInt2), false); if (localArrayList2 != null) { if (ProfileFragment.this.mCurrentTab != 1) break label407; j = ProfileFragment.this.mCursorQuerySizePosts; if (!BuildUtil.isOldDeviceOrLowEndDevice(ProfileFragment.this.getActivity())) break label419; localObject = new HybridPostCursorExplore(localArrayList2, j); label254: if (paramInt5 <= 0) ((HybridPostCursor)localObject).markLast(); if (ProfileFragment.this.mChangeObserver == null) break label435; Cursor localCursor2 = ProfileFragment.this.mCursorAdapter.swapCursor((Cursor)localObject); if (localCursor2 != null) localCursor2.unregisterContentObserver(ProfileFragment.this.mChangeObserver); ((HybridPostCursor)localObject).registerContentObserver(ProfileFragment.this.mChangeObserver); label319: ProfileFragment.this.mCursorAdapter.notifyDataSetChanged(); } } if (i == 0) break label451; ProfileFragment.this.mCursorQuerySizePosts = ProfileFragment.this.mCursorAdapter.getCount(); } } while (true) { ProfileFragment.this.mAppController.saveLoadedPosts(paramArrayList, paramInt2, paramString3, paramInt4, paramInt5, paramInt6, paramLong, false); if ((i != 0) || (paramInt2 == 3)) ProfileFragment.this.hideProgress(localPendingRequest.fetchType); return; label401: i = 0; break; label407: j = ProfileFragment.this.mCursorQuerySizeLikes; break label228; label419: localObject = new HybridPostCursor(localArrayList2, j); break label254; label435: CrashUtil.logException(new VineException("Invalid observer")); break label319; label451: if (paramInt2 == 3) ProfileFragment.this.mCursorQuerySizeLikes = ProfileFragment.this.mCursorAdapter.getCount(); } }