From 446dea7c34b9f05d4b1085a7cf9dc81cc87641da Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Fri, 20 Mar 2015 09:19:31 -0400
Subject: [PATCH 001/561] Made Android Studio support unit testing.
---
app/build.gradle | 2 ++
.../github/mobile/ui/user/NewsListAdapterTest.java | 13 +++++++++++++
build.gradle | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java
diff --git a/app/build.gradle b/app/build.gradle
index 269879d64..a28df8a9e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -44,6 +44,8 @@ repositories {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
+ testCompile 'junit:junit:4.12'
+ testCompile "org.mockito:mockito-core:1.9.5"
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
diff --git a/app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java b/app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java
new file mode 100644
index 000000000..ea1ba7242
--- /dev/null
+++ b/app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java
@@ -0,0 +1,13 @@
+package com.github.mobile.ui.user;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class NewsListAdapterTest {
+
+ @Test
+ public void testUpdate() throws Exception {
+ assertEquals(1, 1);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 48838a51f..4b143715c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.0.0'
+ classpath 'com.android.tools.build:gradle:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
From e9a46d6fa4bac9b47f2ac38bc7a6510bf6cd4cd8 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sat, 21 Mar 2015 06:17:31 -0400
Subject: [PATCH 002/561] Moved the two testCompiles to the end of the
dependencies of app/build.gradle.
---
app/build.gradle | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index a28df8a9e..7f4a85ebe 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -44,8 +44,6 @@ repositories {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
- testCompile 'junit:junit:4.12'
- testCompile "org.mockito:mockito-core:1.9.5"
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
@@ -61,4 +59,6 @@ dependencies {
compile 'com.afollestad:material-dialogs:0.6.3.1'
//Self compiled .aar version of wishlist
compile (name:'lib', ext:'aar')
+ testCompile 'junit:junit:4.12'
+ testCompile "org.mockito:mockito-core:1.9.5"
}
From 2881e491cef7f98746838f5864ef1c5a29bb3678 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sat, 21 Mar 2015 18:34:55 -0400
Subject: [PATCH 003/561] Extracted method NewsListAdapter.update() into a
delegate class IconAndViewTextManager containing the multiple if-else
statements so that we could new an instance of IconAndViewTextManager easily
and have a test.
---
.../ui/user/IconAndViewTextManager.java | 97 ++++++++++++
.../mobile/ui/user/NewsListAdapter.java | 143 ++++--------------
2 files changed, 125 insertions(+), 115 deletions(-)
create mode 100644 app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
new file mode 100644
index 000000000..e06375ae9
--- /dev/null
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -0,0 +1,97 @@
+package com.github.mobile.ui.user;
+
+import com.github.mobile.ui.StyledText;
+import com.github.mobile.util.TypefaceUtils;
+
+import org.eclipse.egit.github.core.event.Event;
+import org.eclipse.egit.github.core.event.IssuesPayload;
+
+public class IconAndViewTextManager {
+ private final NewsListAdapter newsListAdapter;
+
+ public IconAndViewTextManager(NewsListAdapter newsListAdapter) {
+ this.newsListAdapter = newsListAdapter;
+ }
+
+ @Override
+ protected void update(int position, Event event) {
+ newsListAdapter.getAvatars().bind(newsListAdapter.imageView(0), event.getActor());
+
+ StyledText main = new StyledText();
+ StyledText details = new StyledText();
+ String icon = null;
+
+ String type = event.getType();
+ if (Event.TYPE_COMMIT_COMMENT.equals(type)) {
+ icon = TypefaceUtils.ICON_COMMENT;
+ NewsListAdapter.formatCommitComment(event, main, details);
+ } else if (Event.TYPE_CREATE.equals(type)) {
+ icon = TypefaceUtils.ICON_CREATE;
+ NewsListAdapter.formatCreate(event, main, details);
+ } else if (Event.TYPE_DELETE.equals(type)) {
+ icon = TypefaceUtils.ICON_DELETE;
+ NewsListAdapter.formatDelete(event, main, details);
+ } else if (Event.TYPE_DOWNLOAD.equals(type)) {
+ icon = TypefaceUtils.ICON_UPLOAD;
+ NewsListAdapter.formatDownload(event, main, details);
+ } else if (Event.TYPE_FOLLOW.equals(type)) {
+ icon = TypefaceUtils.ICON_FOLLOW;
+ NewsListAdapter.formatFollow(event, main, details);
+ } else if (Event.TYPE_FORK.equals(type)) {
+ icon = TypefaceUtils.ICON_FORK;
+ NewsListAdapter.formatFork(event, main, details);
+ } else if (Event.TYPE_GIST.equals(type)) {
+ icon = TypefaceUtils.ICON_GIST;
+ NewsListAdapter.formatGist(event, main, details);
+ } else if (Event.TYPE_GOLLUM.equals(type)) {
+ icon = TypefaceUtils.ICON_WIKI;
+ NewsListAdapter.formatWiki(event, main, details);
+ } else if (Event.TYPE_ISSUE_COMMENT.equals(type)) {
+ icon = TypefaceUtils.ICON_ISSUE_COMMENT;
+ NewsListAdapter.formatIssueComment(event, main, details);
+ } else if (Event.TYPE_ISSUES.equals(type)) {
+ String action = ((IssuesPayload) event.getPayload()).getAction();
+ if ("opened".equals(action))
+ icon = TypefaceUtils.ICON_ISSUE_OPEN;
+ else if ("reopened".equals(action))
+ icon = TypefaceUtils.ICON_ISSUE_REOPEN;
+ else if ("closed".equals(action))
+ icon = TypefaceUtils.ICON_ISSUE_CLOSE;
+ NewsListAdapter.formatIssues(event, main, details);
+ } else if (Event.TYPE_MEMBER.equals(type)) {
+ icon = TypefaceUtils.ICON_ADD_MEMBER;
+ NewsListAdapter.formatAddMember(event, main, details);
+ } else if (Event.TYPE_PUBLIC.equals(type))
+ NewsListAdapter.formatPublic(event, main, details);
+ else if (Event.TYPE_PULL_REQUEST.equals(type)) {
+ icon = TypefaceUtils.ICON_PULL_REQUEST;
+ NewsListAdapter.formatPullRequest(event, main, details);
+ } else if (Event.TYPE_PULL_REQUEST_REVIEW_COMMENT.equals(type)) {
+ icon = TypefaceUtils.ICON_COMMENT;
+ NewsListAdapter.formatReviewComment(event, main, details);
+ } else if (Event.TYPE_PUSH.equals(type)) {
+ icon = TypefaceUtils.ICON_PUSH;
+ NewsListAdapter.formatPush(event, main, details);
+ } else if (Event.TYPE_TEAM_ADD.equals(type)) {
+ icon = TypefaceUtils.ICON_ADD_MEMBER;
+ NewsListAdapter.formatTeamAdd(event, main, details);
+ } else if (Event.TYPE_WATCH.equals(type)) {
+ icon = TypefaceUtils.ICON_STAR;
+ NewsListAdapter.formatWatch(event, main, details);
+ }
+
+ if (icon != null)
+ ViewUtils.setGone(newsListAdapter.setText(3, icon), false);
+ else
+ newsListAdapter.setGone(3, true);
+
+ newsListAdapter.setText(1, main);
+
+ if (!TextUtils.isEmpty(details))
+ ViewUtils.setGone(newsListAdapter.setText(2, details), false);
+ else
+ newsListAdapter.setGone(2, true);
+
+ newsListAdapter.setText(4, TimeUtils.getRelativeTime(event.getCreatedAt()));
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
index d7e343ae4..bc85e184f 100644
--- a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
@@ -15,56 +15,17 @@
*/
package com.github.mobile.ui.user;
-import static com.github.kevinsawicki.wishlist.ViewUpdater.FORMAT_INT;
-import static com.github.mobile.util.TypefaceUtils.ICON_ADD_MEMBER;
-import static com.github.mobile.util.TypefaceUtils.ICON_COMMENT;
-import static com.github.mobile.util.TypefaceUtils.ICON_CREATE;
-import static com.github.mobile.util.TypefaceUtils.ICON_DELETE;
-import static com.github.mobile.util.TypefaceUtils.ICON_FOLLOW;
-import static com.github.mobile.util.TypefaceUtils.ICON_FORK;
-import static com.github.mobile.util.TypefaceUtils.ICON_GIST;
-import static com.github.mobile.util.TypefaceUtils.ICON_ISSUE_CLOSE;
-import static com.github.mobile.util.TypefaceUtils.ICON_ISSUE_COMMENT;
-import static com.github.mobile.util.TypefaceUtils.ICON_ISSUE_OPEN;
-import static com.github.mobile.util.TypefaceUtils.ICON_ISSUE_REOPEN;
-import static com.github.mobile.util.TypefaceUtils.ICON_PULL_REQUEST;
-import static com.github.mobile.util.TypefaceUtils.ICON_PUSH;
-import static com.github.mobile.util.TypefaceUtils.ICON_STAR;
-import static com.github.mobile.util.TypefaceUtils.ICON_UPLOAD;
-import static com.github.mobile.util.TypefaceUtils.ICON_WIKI;
-import static org.eclipse.egit.github.core.event.Event.TYPE_COMMIT_COMMENT;
-import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
-import static org.eclipse.egit.github.core.event.Event.TYPE_DELETE;
-import static org.eclipse.egit.github.core.event.Event.TYPE_DOWNLOAD;
-import static org.eclipse.egit.github.core.event.Event.TYPE_FOLLOW;
-import static org.eclipse.egit.github.core.event.Event.TYPE_FORK;
-import static org.eclipse.egit.github.core.event.Event.TYPE_FORK_APPLY;
-import static org.eclipse.egit.github.core.event.Event.TYPE_GIST;
-import static org.eclipse.egit.github.core.event.Event.TYPE_GOLLUM;
-import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUES;
-import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUE_COMMENT;
-import static org.eclipse.egit.github.core.event.Event.TYPE_MEMBER;
-import static org.eclipse.egit.github.core.event.Event.TYPE_PUBLIC;
-import static org.eclipse.egit.github.core.event.Event.TYPE_PULL_REQUEST;
-import static org.eclipse.egit.github.core.event.Event.TYPE_PULL_REQUEST_REVIEW_COMMENT;
-import static org.eclipse.egit.github.core.event.Event.TYPE_PUSH;
-import static org.eclipse.egit.github.core.event.Event.TYPE_TEAM_ADD;
-import static org.eclipse.egit.github.core.event.Event.TYPE_WATCH;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.mobile.R;
import com.github.mobile.core.issue.IssueUtils;
import com.github.mobile.ui.StyledText;
import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TimeUtils;
import com.github.mobile.util.TypefaceUtils;
-import java.util.List;
-
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Commit;
import org.eclipse.egit.github.core.CommitComment;
@@ -90,11 +51,35 @@
import org.eclipse.egit.github.core.event.PushPayload;
import org.eclipse.egit.github.core.event.TeamAddPayload;
+import java.util.List;
+
+import static com.github.kevinsawicki.wishlist.ViewUpdater.FORMAT_INT;
+import static org.eclipse.egit.github.core.event.Event.TYPE_COMMIT_COMMENT;
+import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
+import static org.eclipse.egit.github.core.event.Event.TYPE_DELETE;
+import static org.eclipse.egit.github.core.event.Event.TYPE_DOWNLOAD;
+import static org.eclipse.egit.github.core.event.Event.TYPE_FOLLOW;
+import static org.eclipse.egit.github.core.event.Event.TYPE_FORK;
+import static org.eclipse.egit.github.core.event.Event.TYPE_FORK_APPLY;
+import static org.eclipse.egit.github.core.event.Event.TYPE_GIST;
+import static org.eclipse.egit.github.core.event.Event.TYPE_GOLLUM;
+import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUES;
+import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUE_COMMENT;
+import static org.eclipse.egit.github.core.event.Event.TYPE_MEMBER;
+import static org.eclipse.egit.github.core.event.Event.TYPE_PUBLIC;
+import static org.eclipse.egit.github.core.event.Event.TYPE_PULL_REQUEST;
+import static org.eclipse.egit.github.core.event.Event.TYPE_PULL_REQUEST_REVIEW_COMMENT;
+import static org.eclipse.egit.github.core.event.Event.TYPE_PUSH;
+import static org.eclipse.egit.github.core.event.Event.TYPE_TEAM_ADD;
+import static org.eclipse.egit.github.core.event.Event.TYPE_WATCH;
+
/**
* Adapter for a list of news events
*/
public class NewsListAdapter extends SingleTypeAdapter {
+ private final IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(this);
+
/**
* Can the given event be rendered by this view holder?
*
@@ -525,83 +510,11 @@ protected View initialize(View view) {
@Override
protected void update(int position, Event event) {
- avatars.bind(imageView(0), event.getActor());
-
- StyledText main = new StyledText();
- StyledText details = new StyledText();
- String icon = null;
-
- String type = event.getType();
- if (TYPE_COMMIT_COMMENT.equals(type)) {
- icon = ICON_COMMENT;
- formatCommitComment(event, main, details);
- } else if (TYPE_CREATE.equals(type)) {
- icon = ICON_CREATE;
- formatCreate(event, main, details);
- } else if (TYPE_DELETE.equals(type)) {
- icon = ICON_DELETE;
- formatDelete(event, main, details);
- } else if (TYPE_DOWNLOAD.equals(type)) {
- icon = ICON_UPLOAD;
- formatDownload(event, main, details);
- } else if (TYPE_FOLLOW.equals(type)) {
- icon = ICON_FOLLOW;
- formatFollow(event, main, details);
- } else if (TYPE_FORK.equals(type)) {
- icon = ICON_FORK;
- formatFork(event, main, details);
- } else if (TYPE_GIST.equals(type)) {
- icon = ICON_GIST;
- formatGist(event, main, details);
- } else if (TYPE_GOLLUM.equals(type)) {
- icon = ICON_WIKI;
- formatWiki(event, main, details);
- } else if (TYPE_ISSUE_COMMENT.equals(type)) {
- icon = ICON_ISSUE_COMMENT;
- formatIssueComment(event, main, details);
- } else if (TYPE_ISSUES.equals(type)) {
- String action = ((IssuesPayload) event.getPayload()).getAction();
- if ("opened".equals(action))
- icon = ICON_ISSUE_OPEN;
- else if ("reopened".equals(action))
- icon = ICON_ISSUE_REOPEN;
- else if ("closed".equals(action))
- icon = ICON_ISSUE_CLOSE;
- formatIssues(event, main, details);
- } else if (TYPE_MEMBER.equals(type)) {
- icon = ICON_ADD_MEMBER;
- formatAddMember(event, main, details);
- } else if (TYPE_PUBLIC.equals(type))
- formatPublic(event, main, details);
- else if (TYPE_PULL_REQUEST.equals(type)) {
- icon = ICON_PULL_REQUEST;
- formatPullRequest(event, main, details);
- } else if (TYPE_PULL_REQUEST_REVIEW_COMMENT.equals(type)) {
- icon = ICON_COMMENT;
- formatReviewComment(event, main, details);
- } else if (TYPE_PUSH.equals(type)) {
- icon = ICON_PUSH;
- formatPush(event, main, details);
- } else if (TYPE_TEAM_ADD.equals(type)) {
- icon = ICON_ADD_MEMBER;
- formatTeamAdd(event, main, details);
- } else if (TYPE_WATCH.equals(type)) {
- icon = ICON_STAR;
- formatWatch(event, main, details);
- }
-
- if (icon != null)
- ViewUtils.setGone(setText(3, icon), false);
- else
- setGone(3, true);
- setText(1, main);
-
- if (!TextUtils.isEmpty(details))
- ViewUtils.setGone(setText(2, details), false);
- else
- setGone(2, true);
+ iconAndViewTextManager.update(position, event);
+ }
- setText(4, TimeUtils.getRelativeTime(event.getCreatedAt()));
+ public AvatarLoader getAvatars() {
+ return avatars;
}
}
From 05600157c4b8d65d79a1b460c24ec933a244a254 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sat, 21 Mar 2015 18:39:57 -0400
Subject: [PATCH 004/561] Added method NewsListAdapter.imageViewAgent() so that
the protected TypeAdapter.imageView() could be accessed in class
IconAndViewTextManager.
---
.../com/github/mobile/ui/user/IconAndViewTextManager.java | 2 +-
.../main/java/com/github/mobile/ui/user/NewsListAdapter.java | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index e06375ae9..c47cbb74d 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -15,7 +15,7 @@ public IconAndViewTextManager(NewsListAdapter newsListAdapter) {
@Override
protected void update(int position, Event event) {
- newsListAdapter.getAvatars().bind(newsListAdapter.imageView(0), event.getActor());
+ newsListAdapter.getAvatars().bind(newsListAdapter.imageViewAgent(0), event.getActor());
StyledText main = new StyledText();
StyledText details = new StyledText();
diff --git a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
index bc85e184f..f06cf73ed 100644
--- a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
@@ -18,6 +18,7 @@
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.ImageView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.mobile.R;
@@ -517,4 +518,8 @@ protected void update(int position, Event event) {
public AvatarLoader getAvatars() {
return avatars;
}
+
+ ImageView imageViewAgent(int childViewIndex) {
+ return this.imageView(childViewIndex);
+ }
}
From 9b96ab33cd013a82a5b339f3ead3f777c7448880 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sat, 21 Mar 2015 18:57:09 -0400
Subject: [PATCH 005/561] Made some NewsListAdapter.formatXxx() methods package
local so that they could be accessd in class IconAndViewTextManager.
---
.../ui/user/IconAndViewTextManager.java | 1 +
.../mobile/ui/user/NewsListAdapter.java | 68 +++++++++----------
2 files changed, 35 insertions(+), 34 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index c47cbb74d..154605860 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -1,5 +1,6 @@
package com.github.mobile.ui.user;
+import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.mobile.ui.StyledText;
import com.github.mobile.util.TypefaceUtils;
diff --git a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
index f06cf73ed..a2fcde021 100644
--- a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
@@ -187,8 +187,8 @@ private static StyledText boldRepoName(final StyledText text,
return text;
}
- private static void formatCommitComment(Event event, StyledText main,
- StyledText details) {
+ static void formatCommitComment(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" commented on ");
boldRepo(main, event);
@@ -198,8 +198,8 @@ private static void formatCommitComment(Event event, StyledText main,
appendCommitComment(details, payload.getComment());
}
- private static void formatDownload(Event event, StyledText main,
- StyledText details) {
+ static void formatDownload(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" uploaded a file to ");
boldRepo(main, event);
@@ -210,8 +210,8 @@ private static void formatDownload(Event event, StyledText main,
appendText(details, download.getName());
}
- private static void formatCreate(Event event, StyledText main,
- StyledText details) {
+ static void formatCreate(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" created ");
@@ -227,8 +227,8 @@ private static void formatCreate(Event event, StyledText main,
boldRepoName(main, event);
}
- private static void formatDelete(Event event, StyledText main,
- StyledText details) {
+ static void formatDelete(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
DeletePayload payload = (DeletePayload) event.getPayload();
@@ -241,22 +241,22 @@ private static void formatDelete(Event event, StyledText main,
boldRepo(main, event);
}
- private static void formatFollow(Event event, StyledText main,
- StyledText details) {
+ static void formatFollow(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" started following ");
boldUser(main, ((FollowPayload) event.getPayload()).getTarget());
}
- private static void formatFork(Event event, StyledText main,
- StyledText details) {
+ static void formatFork(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" forked repository ");
boldRepo(main, event);
}
- private static void formatGist(Event event, StyledText main,
- StyledText details) {
+ static void formatGist(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
GistPayload payload = (GistPayload) event.getPayload();
@@ -273,15 +273,15 @@ else if ("update".equals(action))
main.append(payload.getGist().getId());
}
- private static void formatWiki(Event event, StyledText main,
- StyledText details) {
+ static void formatWiki(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" updated the wiki in ");
boldRepo(main, event);
}
- private static void formatIssueComment(Event event, StyledText main,
- StyledText details) {
+ static void formatIssueComment(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" commented on ");
@@ -303,8 +303,8 @@ private static void formatIssueComment(Event event, StyledText main,
appendComment(details, payload.getComment());
}
- private static void formatIssues(Event event, StyledText main,
- StyledText details) {
+ static void formatIssues(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
IssuesPayload payload = (IssuesPayload) event.getPayload();
@@ -321,8 +321,8 @@ private static void formatIssues(Event event, StyledText main,
appendText(details, issue.getTitle());
}
- private static void formatAddMember(Event event, StyledText main,
- StyledText details) {
+ static void formatAddMember(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" added ");
User member = ((MemberPayload) event.getPayload()).getMember();
@@ -332,22 +332,22 @@ private static void formatAddMember(Event event, StyledText main,
boldRepo(main, event);
}
- private static void formatPublic(Event event, StyledText main,
- StyledText details) {
+ static void formatPublic(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" open sourced repository ");
boldRepo(main, event);
}
- private static void formatWatch(Event event, StyledText main,
- StyledText details) {
+ static void formatWatch(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" starred ");
boldRepo(main, event);
}
- private static void formatReviewComment(Event event, StyledText main,
- StyledText details) {
+ static void formatReviewComment(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" commented on ");
boldRepo(main, event);
@@ -357,8 +357,8 @@ private static void formatReviewComment(Event event, StyledText main,
appendCommitComment(details, payload.getComment());
}
- private static void formatPullRequest(Event event, StyledText main,
- StyledText details) {
+ static void formatPullRequest(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
PullRequestPayload payload = (PullRequestPayload) event.getPayload();
@@ -383,8 +383,8 @@ private static void formatPullRequest(Event event, StyledText main,
}
}
- private static void formatPush(Event event, StyledText main,
- StyledText details) {
+ static void formatPush(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
main.append(" pushed to ");
@@ -438,8 +438,8 @@ private static void formatPush(Event event, StyledText main,
}
}
- private static void formatTeamAdd(Event event, StyledText main,
- StyledText details) {
+ static void formatTeamAdd(Event event, StyledText main,
+ StyledText details) {
boldActor(main, event);
TeamAddPayload payload = (TeamAddPayload) event.getPayload();
From c0b13040a47b62132beec2e2b7aba367bafc2d7e Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sat, 21 Mar 2015 21:17:19 -0400
Subject: [PATCH 006/561] Added NewsListAdapter.setTextAgent() and
NewsListAdapter.setGoneAgent() to make the protected methods could be
accessed in class IconAndViewTextManager.
---
.../mobile/ui/user/IconAndViewTextManager.java | 16 +++++++++-------
.../github/mobile/ui/user/NewsListAdapter.java | 9 +++++++++
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index 154605860..b2cfae45f 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -1,7 +1,10 @@
package com.github.mobile.ui.user;
+import android.text.TextUtils;
+
import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.mobile.ui.StyledText;
+import com.github.mobile.util.TimeUtils;
import com.github.mobile.util.TypefaceUtils;
import org.eclipse.egit.github.core.event.Event;
@@ -14,7 +17,6 @@ public IconAndViewTextManager(NewsListAdapter newsListAdapter) {
this.newsListAdapter = newsListAdapter;
}
- @Override
protected void update(int position, Event event) {
newsListAdapter.getAvatars().bind(newsListAdapter.imageViewAgent(0), event.getActor());
@@ -82,17 +84,17 @@ else if (Event.TYPE_PULL_REQUEST.equals(type)) {
}
if (icon != null)
- ViewUtils.setGone(newsListAdapter.setText(3, icon), false);
+ ViewUtils.setGone(newsListAdapter.setTextAgent(3, icon), false);
else
- newsListAdapter.setGone(3, true);
+ newsListAdapter.setGoneAgent(3, true);
- newsListAdapter.setText(1, main);
+ newsListAdapter.setTextAgent(1, main);
if (!TextUtils.isEmpty(details))
- ViewUtils.setGone(newsListAdapter.setText(2, details), false);
+ ViewUtils.setGone(newsListAdapter.setTextAgent(2, details), false);
else
- newsListAdapter.setGone(2, true);
+ newsListAdapter.setGoneAgent(2, true);
- newsListAdapter.setText(4, TimeUtils.getRelativeTime(event.getCreatedAt()));
+ newsListAdapter.setTextAgent(4, TimeUtils.getRelativeTime(event.getCreatedAt()));
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
index a2fcde021..e71787c36 100644
--- a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
@@ -19,6 +19,7 @@
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
+import android.widget.TextView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.mobile.R;
@@ -522,4 +523,12 @@ public AvatarLoader getAvatars() {
ImageView imageViewAgent(int childViewIndex) {
return this.imageView(childViewIndex);
}
+
+ TextView setTextAgent(int childViewIndex, CharSequence text) {
+ return this.setText(childViewIndex, text);
+ }
+
+ View setGoneAgent(int childViewIndex, boolean gone) {
+ return this.setGone(childViewIndex, gone);
+ }
}
From 2cec505b1247dcef53405b727fe2ed10ee2160f6 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 06:12:32 -0400
Subject: [PATCH 007/561] Wrote Assert and Act of test
when_event_type_is_commit_comment_then_icon_should_be_comment() and extraced
method IconAndViewTextManager.setIconAndFormatStyledText() for testing.
---
.../ui/user/IconAndViewTextManager.java | 33 +++++++++++--------
.../ui/user/IconAndViewTextManagerTest.java | 21 ++++++++++++
2 files changed, 40 insertions(+), 14 deletions(-)
create mode 100644 app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index b2cfae45f..c717d0fba 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -22,6 +22,24 @@ protected void update(int position, Event event) {
StyledText main = new StyledText();
StyledText details = new StyledText();
+ String icon = setIconAndFormatStyledText(event, main, details);
+
+ if (icon != null)
+ ViewUtils.setGone(newsListAdapter.setTextAgent(3, icon), false);
+ else
+ newsListAdapter.setGoneAgent(3, true);
+
+ newsListAdapter.setTextAgent(1, main);
+
+ if (!TextUtils.isEmpty(details))
+ ViewUtils.setGone(newsListAdapter.setTextAgent(2, details), false);
+ else
+ newsListAdapter.setGoneAgent(2, true);
+
+ newsListAdapter.setTextAgent(4, TimeUtils.getRelativeTime(event.getCreatedAt()));
+ }
+
+ String setIconAndFormatStyledText(Event event, StyledText main, StyledText details) {
String icon = null;
String type = event.getType();
@@ -82,19 +100,6 @@ else if (Event.TYPE_PULL_REQUEST.equals(type)) {
icon = TypefaceUtils.ICON_STAR;
NewsListAdapter.formatWatch(event, main, details);
}
-
- if (icon != null)
- ViewUtils.setGone(newsListAdapter.setTextAgent(3, icon), false);
- else
- newsListAdapter.setGoneAgent(3, true);
-
- newsListAdapter.setTextAgent(1, main);
-
- if (!TextUtils.isEmpty(details))
- ViewUtils.setGone(newsListAdapter.setTextAgent(2, details), false);
- else
- newsListAdapter.setGoneAgent(2, true);
-
- newsListAdapter.setTextAgent(4, TimeUtils.getRelativeTime(event.getCreatedAt()));
+ return icon;
}
}
\ No newline at end of file
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
new file mode 100644
index 000000000..6d17d6baa
--- /dev/null
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -0,0 +1,21 @@
+package com.github.mobile.ui.user;
+
+import com.github.mobile.util.TypefaceUtils;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class IconAndViewTextManagerTest {
+
+ @Test
+ public void when_event_type_is_commit_comment_then_icon_should_be_comment() throws Exception {
+ // Arrange
+
+ // Act
+ String icon = iconAndViewTextManager.setIconAndFormatStyledText(event, main, details);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_COMMENT, icon);
+ }
+}
\ No newline at end of file
From 763efec2dbf2adf3df945ddcf072c5a8da6aee88 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 06:21:34 -0400
Subject: [PATCH 008/561] Wrote Arrange of the test. Need to eliminate static
method calls NewsListAdapter.formatXxx() in
IconAndViewTextManager.setIconAndFormatStyledText() and then mock it in
testing.
---
.../github/mobile/ui/user/IconAndViewTextManagerTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
index 6d17d6baa..fe0fb4cb3 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -2,6 +2,7 @@
import com.github.mobile.util.TypefaceUtils;
+import org.eclipse.egit.github.core.event.Event;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@@ -11,9 +12,12 @@ public class IconAndViewTextManagerTest {
@Test
public void when_event_type_is_commit_comment_then_icon_should_be_comment() throws Exception {
// Arrange
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ Event event = new Event();
+ event.setType(Event.TYPE_COMMIT_COMMENT);
// Act
- String icon = iconAndViewTextManager.setIconAndFormatStyledText(event, main, details);
+ String icon = iconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
// Assert
assertEquals(TypefaceUtils.ICON_COMMENT, icon);
From 9096311b9589b770b8cbe5bf86147cee75a923dd Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 06:53:59 -0400
Subject: [PATCH 009/561] Moved all appendXxx(), boldXxx() and formatXxx() from
NewsListAdapter to IconAndViewTextManager so that these methods need not to
be static anymore.
---
.../ui/user/IconAndViewTextManager.java | 397 +++++++++++++++++-
.../mobile/ui/user/NewsListAdapter.java | 360 ----------------
2 files changed, 380 insertions(+), 377 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index c717d0fba..be6698fc4 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -3,12 +3,38 @@
import android.text.TextUtils;
import com.github.kevinsawicki.wishlist.ViewUtils;
+import com.github.mobile.core.issue.IssueUtils;
import com.github.mobile.ui.StyledText;
import com.github.mobile.util.TimeUtils;
import com.github.mobile.util.TypefaceUtils;
+import org.eclipse.egit.github.core.Comment;
+import org.eclipse.egit.github.core.Commit;
+import org.eclipse.egit.github.core.CommitComment;
+import org.eclipse.egit.github.core.Download;
+import org.eclipse.egit.github.core.Issue;
+import org.eclipse.egit.github.core.PullRequest;
+import org.eclipse.egit.github.core.Team;
+import org.eclipse.egit.github.core.User;
+import org.eclipse.egit.github.core.event.CommitCommentPayload;
+import org.eclipse.egit.github.core.event.CreatePayload;
+import org.eclipse.egit.github.core.event.DeletePayload;
+import org.eclipse.egit.github.core.event.DownloadPayload;
import org.eclipse.egit.github.core.event.Event;
+import org.eclipse.egit.github.core.event.EventRepository;
+import org.eclipse.egit.github.core.event.FollowPayload;
+import org.eclipse.egit.github.core.event.GistPayload;
+import org.eclipse.egit.github.core.event.IssueCommentPayload;
import org.eclipse.egit.github.core.event.IssuesPayload;
+import org.eclipse.egit.github.core.event.MemberPayload;
+import org.eclipse.egit.github.core.event.PullRequestPayload;
+import org.eclipse.egit.github.core.event.PullRequestReviewCommentPayload;
+import org.eclipse.egit.github.core.event.PushPayload;
+import org.eclipse.egit.github.core.event.TeamAddPayload;
+
+import java.util.List;
+
+import static com.github.kevinsawicki.wishlist.ViewUpdater.FORMAT_INT;
public class IconAndViewTextManager {
private final NewsListAdapter newsListAdapter;
@@ -17,6 +43,343 @@ public IconAndViewTextManager(NewsListAdapter newsListAdapter) {
this.newsListAdapter = newsListAdapter;
}
+ private void appendComment(final StyledText details,
+ final Comment comment) {
+ if (comment != null)
+ appendText(details, comment.getBody());
+ }
+
+ private void appendCommitComment(final StyledText details,
+ final CommitComment comment) {
+ if (comment == null)
+ return;
+
+ String id = comment.getCommitId();
+ if (!TextUtils.isEmpty(id)) {
+ if (id.length() > 10)
+ id = id.substring(0, 10);
+ appendText(details, "Comment in");
+ details.append(' ');
+ details.monospace(id);
+ details.append(':').append('\n');
+ }
+ appendComment(details, comment);
+ }
+
+ private void appendText(final StyledText details, String text) {
+ if (text == null)
+ return;
+ text = text.trim();
+ if (text.length() == 0)
+ return;
+
+ details.append(text);
+ }
+
+ private StyledText boldActor(final StyledText text, final Event event) {
+ return boldUser(text, event.getActor());
+ }
+
+ private StyledText boldUser(final StyledText text, final User user) {
+ if (user != null)
+ text.bold(user.getLogin());
+ return text;
+ }
+
+ private StyledText boldRepo(final StyledText text, final Event event) {
+ EventRepository repo = event.getRepo();
+ if (repo != null)
+ text.bold(repo.getName());
+ return text;
+ }
+
+ private StyledText boldRepoName(final StyledText text,
+ final Event event) {
+ EventRepository repo = event.getRepo();
+ if (repo != null) {
+ String name = repo.getName();
+ if (!TextUtils.isEmpty(name)) {
+ int slash = name.indexOf('/');
+ if (slash != -1 && slash + 1 < name.length())
+ text.bold(name.substring(slash + 1));
+ }
+ }
+ return text;
+ }
+
+ void formatCommitComment(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" commented on ");
+ boldRepo(main, event);
+
+ CommitCommentPayload payload = (CommitCommentPayload) event
+ .getPayload();
+ appendCommitComment(details, payload.getComment());
+ }
+
+ void formatDownload(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" uploaded a file to ");
+ boldRepo(main, event);
+
+ DownloadPayload payload = (DownloadPayload) event.getPayload();
+ Download download = payload.getDownload();
+ if (download != null)
+ appendText(details, download.getName());
+ }
+
+ void formatCreate(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ main.append(" created ");
+ CreatePayload payload = (CreatePayload) event.getPayload();
+ String refType = payload.getRefType();
+ main.append(refType);
+ main.append(' ');
+ if (!"repository".equals(refType)) {
+ main.append(payload.getRef());
+ main.append(" at ");
+ boldRepo(main, event);
+ } else
+ boldRepoName(main, event);
+ }
+
+ void formatDelete(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ DeletePayload payload = (DeletePayload) event.getPayload();
+ main.append(" deleted ");
+ main.append(payload.getRefType());
+ main.append(' ');
+ main.append(payload.getRef());
+ main.append(" at ");
+
+ boldRepo(main, event);
+ }
+
+ void formatFollow(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" started following ");
+ boldUser(main, ((FollowPayload) event.getPayload()).getTarget());
+ }
+
+ void formatFork(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" forked repository ");
+ boldRepo(main, event);
+ }
+
+ void formatGist(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ GistPayload payload = (GistPayload) event.getPayload();
+
+ main.append(' ');
+ String action = payload.getAction();
+ if ("create".equals(action))
+ main.append("created");
+ else if ("update".equals(action))
+ main.append("updated");
+ else
+ main.append(action);
+ main.append(" Gist ");
+ main.append(payload.getGist().getId());
+ }
+
+ void formatWiki(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" updated the wiki in ");
+ boldRepo(main, event);
+ }
+
+ void formatIssueComment(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ main.append(" commented on ");
+
+ IssueCommentPayload payload = (IssueCommentPayload) event.getPayload();
+
+ Issue issue = payload.getIssue();
+ String number;
+ if (IssueUtils.isPullRequest(issue))
+ number = "pull request " + issue.getNumber();
+ else
+ number = "issue " + issue.getNumber();
+ main.bold(number);
+
+ main.append(" on ");
+
+ boldRepo(main, event);
+
+ appendComment(details, payload.getComment());
+ }
+
+ void formatIssues(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ IssuesPayload payload = (IssuesPayload) event.getPayload();
+ String action = payload.getAction();
+ Issue issue = payload.getIssue();
+ main.append(' ');
+ main.append(action);
+ main.append(' ');
+ main.bold("issue " + issue.getNumber());
+ main.append(" on ");
+
+ boldRepo(main, event);
+
+ appendText(details, issue.getTitle());
+ }
+
+ void formatAddMember(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" added ");
+ User member = ((MemberPayload) event.getPayload()).getMember();
+ if (member != null)
+ main.bold(member.getLogin());
+ main.append(" as a collaborator to ");
+ boldRepo(main, event);
+ }
+
+ void formatPublic(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" open sourced repository ");
+ boldRepo(main, event);
+ }
+
+ void formatWatch(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" starred ");
+ boldRepo(main, event);
+ }
+
+ void formatReviewComment(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+ main.append(" commented on ");
+ boldRepo(main, event);
+
+ PullRequestReviewCommentPayload payload = (PullRequestReviewCommentPayload) event
+ .getPayload();
+ appendCommitComment(details, payload.getComment());
+ }
+
+ void formatPullRequest(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ PullRequestPayload payload = (PullRequestPayload) event.getPayload();
+ String action = payload.getAction();
+ if ("synchronize".equals(action))
+ action = "updated";
+ main.append(' ');
+ main.append(action);
+ main.append(' ');
+ main.bold("pull request " + payload.getNumber());
+ main.append(" on ");
+
+ boldRepo(main, event);
+
+ if ("opened".equals(action) || "closed".equals(action)) {
+ PullRequest request = payload.getPullRequest();
+ if (request != null) {
+ String title = request.getTitle();
+ if (!TextUtils.isEmpty(title))
+ details.append(title);
+ }
+ }
+ }
+
+ void formatPush(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ main.append(" pushed to ");
+ PushPayload payload = (PushPayload) event.getPayload();
+ String ref = payload.getRef();
+ if (ref.startsWith("refs/heads/"))
+ ref = ref.substring(11);
+ main.bold(ref);
+ main.append(" at ");
+
+ boldRepo(main, event);
+
+ final List commits = payload.getCommits();
+ int size = commits != null ? commits.size() : -1;
+ if (size > 0) {
+ if (size != 1)
+ details.append(FORMAT_INT.format(size)).append(" new commits");
+ else
+ details.append("1 new commit");
+
+ int max = 3;
+ int appended = 0;
+ for (Commit commit : commits) {
+ if (commit == null)
+ continue;
+
+ String sha = commit.getSha();
+ if (TextUtils.isEmpty(sha))
+ continue;
+
+ details.append('\n');
+ if (sha.length() > 7)
+ details.monospace(sha.substring(0, 7));
+ else
+ details.monospace(sha);
+
+ String message = commit.getMessage();
+ if (!TextUtils.isEmpty(message)) {
+ details.append(' ');
+ int newline = message.indexOf('\n');
+ if (newline > 0)
+ details.append(message.subSequence(0, newline));
+ else
+ details.append(message);
+ }
+
+ appended++;
+ if (appended == max)
+ break;
+ }
+ }
+ }
+
+ void formatTeamAdd(Event event, StyledText main,
+ StyledText details) {
+ boldActor(main, event);
+
+ TeamAddPayload payload = (TeamAddPayload) event.getPayload();
+
+ main.append(" added ");
+
+ User user = payload.getUser();
+ if (user != null)
+ boldUser(main, user);
+ else
+ boldRepoName(main, event);
+
+ main.append(" to team");
+
+ Team team = payload.getTeam();
+ String teamName = team != null ? team.getName() : null;
+ if (teamName != null)
+ main.append(' ').bold(teamName);
+ }
+
protected void update(int position, Event event) {
newsListAdapter.getAvatars().bind(newsListAdapter.imageViewAgent(0), event.getActor());
@@ -45,31 +408,31 @@ String setIconAndFormatStyledText(Event event, StyledText main, StyledText detai
String type = event.getType();
if (Event.TYPE_COMMIT_COMMENT.equals(type)) {
icon = TypefaceUtils.ICON_COMMENT;
- NewsListAdapter.formatCommitComment(event, main, details);
+ formatCommitComment(event, main, details);
} else if (Event.TYPE_CREATE.equals(type)) {
icon = TypefaceUtils.ICON_CREATE;
- NewsListAdapter.formatCreate(event, main, details);
+ formatCreate(event, main, details);
} else if (Event.TYPE_DELETE.equals(type)) {
icon = TypefaceUtils.ICON_DELETE;
- NewsListAdapter.formatDelete(event, main, details);
+ formatDelete(event, main, details);
} else if (Event.TYPE_DOWNLOAD.equals(type)) {
icon = TypefaceUtils.ICON_UPLOAD;
- NewsListAdapter.formatDownload(event, main, details);
+ formatDownload(event, main, details);
} else if (Event.TYPE_FOLLOW.equals(type)) {
icon = TypefaceUtils.ICON_FOLLOW;
- NewsListAdapter.formatFollow(event, main, details);
+ formatFollow(event, main, details);
} else if (Event.TYPE_FORK.equals(type)) {
icon = TypefaceUtils.ICON_FORK;
- NewsListAdapter.formatFork(event, main, details);
+ formatFork(event, main, details);
} else if (Event.TYPE_GIST.equals(type)) {
icon = TypefaceUtils.ICON_GIST;
- NewsListAdapter.formatGist(event, main, details);
+ formatGist(event, main, details);
} else if (Event.TYPE_GOLLUM.equals(type)) {
icon = TypefaceUtils.ICON_WIKI;
- NewsListAdapter.formatWiki(event, main, details);
+ formatWiki(event, main, details);
} else if (Event.TYPE_ISSUE_COMMENT.equals(type)) {
icon = TypefaceUtils.ICON_ISSUE_COMMENT;
- NewsListAdapter.formatIssueComment(event, main, details);
+ formatIssueComment(event, main, details);
} else if (Event.TYPE_ISSUES.equals(type)) {
String action = ((IssuesPayload) event.getPayload()).getAction();
if ("opened".equals(action))
@@ -78,27 +441,27 @@ else if ("reopened".equals(action))
icon = TypefaceUtils.ICON_ISSUE_REOPEN;
else if ("closed".equals(action))
icon = TypefaceUtils.ICON_ISSUE_CLOSE;
- NewsListAdapter.formatIssues(event, main, details);
+ formatIssues(event, main, details);
} else if (Event.TYPE_MEMBER.equals(type)) {
icon = TypefaceUtils.ICON_ADD_MEMBER;
- NewsListAdapter.formatAddMember(event, main, details);
+ formatAddMember(event, main, details);
} else if (Event.TYPE_PUBLIC.equals(type))
- NewsListAdapter.formatPublic(event, main, details);
+ formatPublic(event, main, details);
else if (Event.TYPE_PULL_REQUEST.equals(type)) {
icon = TypefaceUtils.ICON_PULL_REQUEST;
- NewsListAdapter.formatPullRequest(event, main, details);
+ formatPullRequest(event, main, details);
} else if (Event.TYPE_PULL_REQUEST_REVIEW_COMMENT.equals(type)) {
icon = TypefaceUtils.ICON_COMMENT;
- NewsListAdapter.formatReviewComment(event, main, details);
+ formatReviewComment(event, main, details);
} else if (Event.TYPE_PUSH.equals(type)) {
icon = TypefaceUtils.ICON_PUSH;
- NewsListAdapter.formatPush(event, main, details);
+ formatPush(event, main, details);
} else if (Event.TYPE_TEAM_ADD.equals(type)) {
icon = TypefaceUtils.ICON_ADD_MEMBER;
- NewsListAdapter.formatTeamAdd(event, main, details);
+ formatTeamAdd(event, main, details);
} else if (Event.TYPE_WATCH.equals(type)) {
icon = TypefaceUtils.ICON_STAR;
- NewsListAdapter.formatWatch(event, main, details);
+ formatWatch(event, main, details);
}
return icon;
}
diff --git a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
index e71787c36..fb5bb4787 100644
--- a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
@@ -23,39 +23,16 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.ui.StyledText;
import com.github.mobile.util.AvatarLoader;
import com.github.mobile.util.TypefaceUtils;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Commit;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.Download;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.Team;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.event.CommitCommentPayload;
import org.eclipse.egit.github.core.event.CreatePayload;
-import org.eclipse.egit.github.core.event.DeletePayload;
-import org.eclipse.egit.github.core.event.DownloadPayload;
import org.eclipse.egit.github.core.event.Event;
import org.eclipse.egit.github.core.event.EventPayload;
-import org.eclipse.egit.github.core.event.EventRepository;
-import org.eclipse.egit.github.core.event.FollowPayload;
import org.eclipse.egit.github.core.event.GistPayload;
import org.eclipse.egit.github.core.event.IssueCommentPayload;
import org.eclipse.egit.github.core.event.IssuesPayload;
-import org.eclipse.egit.github.core.event.MemberPayload;
-import org.eclipse.egit.github.core.event.PullRequestPayload;
-import org.eclipse.egit.github.core.event.PullRequestReviewCommentPayload;
-import org.eclipse.egit.github.core.event.PushPayload;
-import org.eclipse.egit.github.core.event.TeamAddPayload;
-import java.util.List;
-
-import static com.github.kevinsawicki.wishlist.ViewUpdater.FORMAT_INT;
import static org.eclipse.egit.github.core.event.Event.TYPE_COMMIT_COMMENT;
import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
import static org.eclipse.egit.github.core.event.Event.TYPE_DELETE;
@@ -124,343 +101,6 @@ public static boolean isValid(final Event event) {
|| TYPE_WATCH.equals(type);
}
- private static void appendComment(final StyledText details,
- final Comment comment) {
- if (comment != null)
- appendText(details, comment.getBody());
- }
-
- private static void appendCommitComment(final StyledText details,
- final CommitComment comment) {
- if (comment == null)
- return;
-
- String id = comment.getCommitId();
- if (!TextUtils.isEmpty(id)) {
- if (id.length() > 10)
- id = id.substring(0, 10);
- appendText(details, "Comment in");
- details.append(' ');
- details.monospace(id);
- details.append(':').append('\n');
- }
- appendComment(details, comment);
- }
-
- private static void appendText(final StyledText details, String text) {
- if (text == null)
- return;
- text = text.trim();
- if (text.length() == 0)
- return;
-
- details.append(text);
- }
-
- private static StyledText boldActor(final StyledText text, final Event event) {
- return boldUser(text, event.getActor());
- }
-
- private static StyledText boldUser(final StyledText text, final User user) {
- if (user != null)
- text.bold(user.getLogin());
- return text;
- }
-
- private static StyledText boldRepo(final StyledText text, final Event event) {
- EventRepository repo = event.getRepo();
- if (repo != null)
- text.bold(repo.getName());
- return text;
- }
-
- private static StyledText boldRepoName(final StyledText text,
- final Event event) {
- EventRepository repo = event.getRepo();
- if (repo != null) {
- String name = repo.getName();
- if (!TextUtils.isEmpty(name)) {
- int slash = name.indexOf('/');
- if (slash != -1 && slash + 1 < name.length())
- text.bold(name.substring(slash + 1));
- }
- }
- return text;
- }
-
- static void formatCommitComment(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" commented on ");
- boldRepo(main, event);
-
- CommitCommentPayload payload = (CommitCommentPayload) event
- .getPayload();
- appendCommitComment(details, payload.getComment());
- }
-
- static void formatDownload(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" uploaded a file to ");
- boldRepo(main, event);
-
- DownloadPayload payload = (DownloadPayload) event.getPayload();
- Download download = payload.getDownload();
- if (download != null)
- appendText(details, download.getName());
- }
-
- static void formatCreate(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- main.append(" created ");
- CreatePayload payload = (CreatePayload) event.getPayload();
- String refType = payload.getRefType();
- main.append(refType);
- main.append(' ');
- if (!"repository".equals(refType)) {
- main.append(payload.getRef());
- main.append(" at ");
- boldRepo(main, event);
- } else
- boldRepoName(main, event);
- }
-
- static void formatDelete(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- DeletePayload payload = (DeletePayload) event.getPayload();
- main.append(" deleted ");
- main.append(payload.getRefType());
- main.append(' ');
- main.append(payload.getRef());
- main.append(" at ");
-
- boldRepo(main, event);
- }
-
- static void formatFollow(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" started following ");
- boldUser(main, ((FollowPayload) event.getPayload()).getTarget());
- }
-
- static void formatFork(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" forked repository ");
- boldRepo(main, event);
- }
-
- static void formatGist(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- GistPayload payload = (GistPayload) event.getPayload();
-
- main.append(' ');
- String action = payload.getAction();
- if ("create".equals(action))
- main.append("created");
- else if ("update".equals(action))
- main.append("updated");
- else
- main.append(action);
- main.append(" Gist ");
- main.append(payload.getGist().getId());
- }
-
- static void formatWiki(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" updated the wiki in ");
- boldRepo(main, event);
- }
-
- static void formatIssueComment(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- main.append(" commented on ");
-
- IssueCommentPayload payload = (IssueCommentPayload) event.getPayload();
-
- Issue issue = payload.getIssue();
- String number;
- if (IssueUtils.isPullRequest(issue))
- number = "pull request " + issue.getNumber();
- else
- number = "issue " + issue.getNumber();
- main.bold(number);
-
- main.append(" on ");
-
- boldRepo(main, event);
-
- appendComment(details, payload.getComment());
- }
-
- static void formatIssues(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- IssuesPayload payload = (IssuesPayload) event.getPayload();
- String action = payload.getAction();
- Issue issue = payload.getIssue();
- main.append(' ');
- main.append(action);
- main.append(' ');
- main.bold("issue " + issue.getNumber());
- main.append(" on ");
-
- boldRepo(main, event);
-
- appendText(details, issue.getTitle());
- }
-
- static void formatAddMember(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" added ");
- User member = ((MemberPayload) event.getPayload()).getMember();
- if (member != null)
- main.bold(member.getLogin());
- main.append(" as a collaborator to ");
- boldRepo(main, event);
- }
-
- static void formatPublic(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" open sourced repository ");
- boldRepo(main, event);
- }
-
- static void formatWatch(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" starred ");
- boldRepo(main, event);
- }
-
- static void formatReviewComment(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
- main.append(" commented on ");
- boldRepo(main, event);
-
- PullRequestReviewCommentPayload payload = (PullRequestReviewCommentPayload) event
- .getPayload();
- appendCommitComment(details, payload.getComment());
- }
-
- static void formatPullRequest(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- PullRequestPayload payload = (PullRequestPayload) event.getPayload();
- String action = payload.getAction();
- if ("synchronize".equals(action))
- action = "updated";
- main.append(' ');
- main.append(action);
- main.append(' ');
- main.bold("pull request " + payload.getNumber());
- main.append(" on ");
-
- boldRepo(main, event);
-
- if ("opened".equals(action) || "closed".equals(action)) {
- PullRequest request = payload.getPullRequest();
- if (request != null) {
- String title = request.getTitle();
- if (!TextUtils.isEmpty(title))
- details.append(title);
- }
- }
- }
-
- static void formatPush(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- main.append(" pushed to ");
- PushPayload payload = (PushPayload) event.getPayload();
- String ref = payload.getRef();
- if (ref.startsWith("refs/heads/"))
- ref = ref.substring(11);
- main.bold(ref);
- main.append(" at ");
-
- boldRepo(main, event);
-
- final List commits = payload.getCommits();
- int size = commits != null ? commits.size() : -1;
- if (size > 0) {
- if (size != 1)
- details.append(FORMAT_INT.format(size)).append(" new commits");
- else
- details.append("1 new commit");
-
- int max = 3;
- int appended = 0;
- for (Commit commit : commits) {
- if (commit == null)
- continue;
-
- String sha = commit.getSha();
- if (TextUtils.isEmpty(sha))
- continue;
-
- details.append('\n');
- if (sha.length() > 7)
- details.monospace(sha.substring(0, 7));
- else
- details.monospace(sha);
-
- String message = commit.getMessage();
- if (!TextUtils.isEmpty(message)) {
- details.append(' ');
- int newline = message.indexOf('\n');
- if (newline > 0)
- details.append(message.subSequence(0, newline));
- else
- details.append(message);
- }
-
- appended++;
- if (appended == max)
- break;
- }
- }
- }
-
- static void formatTeamAdd(Event event, StyledText main,
- StyledText details) {
- boldActor(main, event);
-
- TeamAddPayload payload = (TeamAddPayload) event.getPayload();
-
- main.append(" added ");
-
- User user = payload.getUser();
- if (user != null)
- boldUser(main, user);
- else
- boldRepoName(main, event);
-
- main.append(" to team");
-
- Team team = payload.getTeam();
- String teamName = team != null ? team.getName() : null;
- if (teamName != null)
- main.append(' ').bold(teamName);
- }
-
private final AvatarLoader avatars;
/**
From 6e9a49630dcc53786fa63e9402da2bc63ed3adcf Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 07:36:27 -0400
Subject: [PATCH 010/561] Used 'subclass and override' for
IconAndViewTextManager.formatCommitComment() so that it would not get in the
way of unit testing.
---
.../ui/user/IconAndViewTextManagerTest.java | 2 +-
.../user/TestingIconAndViewTextManager.java | 21 +++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
index fe0fb4cb3..bd9ed8864 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -12,7 +12,7 @@ public class IconAndViewTextManagerTest {
@Test
public void when_event_type_is_commit_comment_then_icon_should_be_comment() throws Exception {
// Arrange
- IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager iconAndViewTextManager = new TestingIconAndViewTextManager(null);
Event event = new Event();
event.setType(Event.TYPE_COMMIT_COMMENT);
diff --git a/app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java b/app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java
new file mode 100644
index 000000000..10e4fd7fb
--- /dev/null
+++ b/app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java
@@ -0,0 +1,21 @@
+package com.github.mobile.ui.user;
+
+import com.github.mobile.ui.StyledText;
+
+import org.eclipse.egit.github.core.event.Event;
+
+/**
+ * Created by twer on 3/22/15.
+ */
+public class TestingIconAndViewTextManager extends IconAndViewTextManager {
+ public TestingIconAndViewTextManager(NewsListAdapter newsListAdapter) {
+ super(newsListAdapter);
+ }
+
+ @Override
+ void formatCommitComment(Event event, StyledText main,
+ StyledText details) {
+
+ }
+
+}
From 140f890ece25dfd87e11c22479b0be8f7b96995c Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 13:53:03 -0400
Subject: [PATCH 011/561] Replaced subclass-and-override testing class with
mockito spy.
---
.../ui/user/IconAndViewTextManagerTest.java | 9 ++++++--
.../user/TestingIconAndViewTextManager.java | 21 -------------------
2 files changed, 7 insertions(+), 23 deletions(-)
delete mode 100644 app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
index bd9ed8864..00382e011 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -6,18 +6,23 @@
import org.junit.Test;
import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.spy;
public class IconAndViewTextManagerTest {
@Test
public void when_event_type_is_commit_comment_then_icon_should_be_comment() throws Exception {
// Arrange
- IconAndViewTextManager iconAndViewTextManager = new TestingIconAndViewTextManager(null);
Event event = new Event();
event.setType(Event.TYPE_COMMIT_COMMENT);
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatCommitComment(event, null, null);
+
// Act
- String icon = iconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
// Assert
assertEquals(TypefaceUtils.ICON_COMMENT, icon);
diff --git a/app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java b/app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java
deleted file mode 100644
index 10e4fd7fb..000000000
--- a/app/src/test/java/com/github/mobile/ui/user/TestingIconAndViewTextManager.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.github.mobile.ui.user;
-
-import com.github.mobile.ui.StyledText;
-
-import org.eclipse.egit.github.core.event.Event;
-
-/**
- * Created by twer on 3/22/15.
- */
-public class TestingIconAndViewTextManager extends IconAndViewTextManager {
- public TestingIconAndViewTextManager(NewsListAdapter newsListAdapter) {
- super(newsListAdapter);
- }
-
- @Override
- void formatCommitComment(Event event, StyledText main,
- StyledText details) {
-
- }
-
-}
From 018033d04faad7fcbcd19bc81077514076b49097 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 14:02:37 -0400
Subject: [PATCH 012/561] Verified the method
spyIconAndViewTextManager.formatCommitComment() got called and renamed the
test name.
---
.../mobile/ui/user/IconAndViewTextManagerTest.java | 4 +++-
.../github/mobile/ui/user/NewsListAdapterTest.java | 13 -------------
2 files changed, 3 insertions(+), 14 deletions(-)
delete mode 100644 app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
index 00382e011..13b7993a5 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -8,11 +8,12 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
public class IconAndViewTextManagerTest {
@Test
- public void when_event_type_is_commit_comment_then_icon_should_be_comment() throws Exception {
+ public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_commit_comment_should_be_formatted() throws Exception {
// Arrange
Event event = new Event();
event.setType(Event.TYPE_COMMIT_COMMENT);
@@ -26,5 +27,6 @@ public void when_event_type_is_commit_comment_then_icon_should_be_comment() thro
// Assert
assertEquals(TypefaceUtils.ICON_COMMENT, icon);
+ verify(spyIconAndViewTextManager).formatCommitComment(event, null, null);
}
}
\ No newline at end of file
diff --git a/app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java b/app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java
deleted file mode 100644
index ea1ba7242..000000000
--- a/app/src/test/java/com/github/mobile/ui/user/NewsListAdapterTest.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.github.mobile.ui.user;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-
-public class NewsListAdapterTest {
-
- @Test
- public void testUpdate() throws Exception {
- assertEquals(1, 1);
- }
-}
\ No newline at end of file
From a2459b96419fc2adcbdbffffd39869eb99b27f44 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 14:21:28 -0400
Subject: [PATCH 013/561] Added test for event type 'create'.
---
.../ui/user/IconAndViewTextManager.java | 4 ++--
.../ui/user/IconAndViewTextManagerTest.java | 20 ++++++++++++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index be6698fc4..30502a86d 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -445,9 +445,9 @@ else if ("closed".equals(action))
} else if (Event.TYPE_MEMBER.equals(type)) {
icon = TypefaceUtils.ICON_ADD_MEMBER;
formatAddMember(event, main, details);
- } else if (Event.TYPE_PUBLIC.equals(type))
+ } else if (Event.TYPE_PUBLIC.equals(type)) {
formatPublic(event, main, details);
- else if (Event.TYPE_PULL_REQUEST.equals(type)) {
+ } else if (Event.TYPE_PULL_REQUEST.equals(type)) {
icon = TypefaceUtils.ICON_PULL_REQUEST;
formatPullRequest(event, main, details);
} else if (Event.TYPE_PULL_REQUEST_REVIEW_COMMENT.equals(type)) {
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
index 13b7993a5..746ad12bb 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -13,7 +13,7 @@
public class IconAndViewTextManagerTest {
@Test
- public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_commit_comment_should_be_formatted() throws Exception {
+ public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_commit_comment_text_should_be_formatted() throws Exception {
// Arrange
Event event = new Event();
event.setType(Event.TYPE_COMMIT_COMMENT);
@@ -29,4 +29,22 @@ public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_co
assertEquals(TypefaceUtils.ICON_COMMENT, icon);
verify(spyIconAndViewTextManager).formatCommitComment(event, null, null);
}
+
+ @Test
+ public void when_event_type_is_create_then_icon_should_be_create_and_create_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_CREATE);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatCreate(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_CREATE, icon);
+ verify(spyIconAndViewTextManager).formatCreate(event, null, null);
+ }
}
\ No newline at end of file
From ba94b6c4b10fd49637a802910579ac4a80014b62 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 15:42:30 -0400
Subject: [PATCH 014/561] Added tests for all other event types.
---
.../ui/user/IconAndViewTextManager.java | 11 +-
.../ui/user/IconAndViewTextManagerTest.java | 302 +++++++++++++++++-
2 files changed, 307 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index 30502a86d..f008edc7c 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -37,6 +37,9 @@
import static com.github.kevinsawicki.wishlist.ViewUpdater.FORMAT_INT;
public class IconAndViewTextManager {
+ public static final String ISSUES_PAYLOAD_ACTION_OPENED = "opened";
+ public static final String ISSUES_PAYLOAD_ACTION_REOPENED = "reopened";
+ public static final String ISSUES_PAYLOAD_ACTION_CLOSED = "closed";
private final NewsListAdapter newsListAdapter;
public IconAndViewTextManager(NewsListAdapter newsListAdapter) {
@@ -293,7 +296,7 @@ void formatPullRequest(Event event, StyledText main,
boldRepo(main, event);
- if ("opened".equals(action) || "closed".equals(action)) {
+ if (ISSUES_PAYLOAD_ACTION_OPENED.equals(action) || "closed".equals(action)) {
PullRequest request = payload.getPullRequest();
if (request != null) {
String title = request.getTitle();
@@ -435,11 +438,11 @@ String setIconAndFormatStyledText(Event event, StyledText main, StyledText detai
formatIssueComment(event, main, details);
} else if (Event.TYPE_ISSUES.equals(type)) {
String action = ((IssuesPayload) event.getPayload()).getAction();
- if ("opened".equals(action))
+ if (ISSUES_PAYLOAD_ACTION_OPENED.equals(action))
icon = TypefaceUtils.ICON_ISSUE_OPEN;
- else if ("reopened".equals(action))
+ else if (ISSUES_PAYLOAD_ACTION_REOPENED.equals(action))
icon = TypefaceUtils.ICON_ISSUE_REOPEN;
- else if ("closed".equals(action))
+ else if (ISSUES_PAYLOAD_ACTION_CLOSED.equals(action))
icon = TypefaceUtils.ICON_ISSUE_CLOSE;
formatIssues(event, main, details);
} else if (Event.TYPE_MEMBER.equals(type)) {
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
index 746ad12bb..7cb98b938 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
@@ -3,6 +3,7 @@
import com.github.mobile.util.TypefaceUtils;
import org.eclipse.egit.github.core.event.Event;
+import org.eclipse.egit.github.core.event.IssuesPayload;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@@ -13,7 +14,7 @@
public class IconAndViewTextManagerTest {
@Test
- public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_commit_comment_text_should_be_formatted() throws Exception {
+ public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_its_text_should_be_formatted() throws Exception {
// Arrange
Event event = new Event();
event.setType(Event.TYPE_COMMIT_COMMENT);
@@ -31,7 +32,7 @@ public void when_event_type_is_commit_comment_then_icon_should_be_comment_and_co
}
@Test
- public void when_event_type_is_create_then_icon_should_be_create_and_create_text_should_be_formatted() throws Exception {
+ public void when_event_type_is_create_then_icon_should_be_create_and_its_text_should_be_formatted() throws Exception {
// Arrange
Event event = new Event();
event.setType(Event.TYPE_CREATE);
@@ -47,4 +48,301 @@ public void when_event_type_is_create_then_icon_should_be_create_and_create_text
assertEquals(TypefaceUtils.ICON_CREATE, icon);
verify(spyIconAndViewTextManager).formatCreate(event, null, null);
}
+
+ @Test
+ public void when_event_type_is_delete_then_icon_should_be_delete_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_DELETE);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatDelete(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_DELETE, icon);
+ verify(spyIconAndViewTextManager).formatDelete(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_download_then_icon_should_be_upload_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_DOWNLOAD);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatDownload(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_UPLOAD, icon);
+ verify(spyIconAndViewTextManager).formatDownload(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_follow_then_icon_should_be_follow_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_FOLLOW);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatFollow(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_FOLLOW, icon);
+ verify(spyIconAndViewTextManager).formatFollow(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_fork_then_icon_should_be_fork_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_FORK);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatFork(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_FORK, icon);
+ verify(spyIconAndViewTextManager).formatFork(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_gist_then_icon_should_be_gist_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_GIST);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatGist(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_GIST, icon);
+ verify(spyIconAndViewTextManager).formatGist(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_gollum_then_icon_should_be_gollum_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_GOLLUM);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatWiki(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_WIKI, icon);
+ verify(spyIconAndViewTextManager).formatWiki(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_issue_comment_then_icon_should_be_issue_comment_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_ISSUE_COMMENT);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatIssueComment(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_ISSUE_COMMENT, icon);
+ verify(spyIconAndViewTextManager).formatIssueComment(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_issues_and_action_is_opened_then_icon_should_be_issue_open_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_ISSUES);
+ IssuesPayload payload = new IssuesPayload();
+ payload.setAction(IconAndViewTextManager.ISSUES_PAYLOAD_ACTION_OPENED);
+ event.setPayload(payload);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatIssues(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_ISSUE_OPEN, icon);
+ verify(spyIconAndViewTextManager).formatIssues(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_issues_and_action_is_reopened_then_icon_should_be_issue_reopen_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_ISSUES);
+ IssuesPayload payload = new IssuesPayload();
+ payload.setAction(IconAndViewTextManager.ISSUES_PAYLOAD_ACTION_REOPENED);
+ event.setPayload(payload);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatIssues(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_ISSUE_REOPEN, icon);
+ verify(spyIconAndViewTextManager).formatIssues(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_issues_and_action_is_closed_then_icon_should_be_issue_close_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_ISSUES);
+ IssuesPayload payload = new IssuesPayload();
+ payload.setAction(IconAndViewTextManager.ISSUES_PAYLOAD_ACTION_CLOSED);
+ event.setPayload(payload);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatIssues(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_ISSUE_CLOSE, icon);
+ verify(spyIconAndViewTextManager).formatIssues(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_member_then_icon_should_be_add_member_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_MEMBER);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatAddMember(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_ADD_MEMBER, icon);
+ verify(spyIconAndViewTextManager).formatAddMember(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_public_then_icon_should_be_null_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_PUBLIC);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatPublic(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(null, icon);
+ verify(spyIconAndViewTextManager).formatPublic(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_pull_request_then_icon_should_be_pull_request_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_PULL_REQUEST);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatPullRequest(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_PULL_REQUEST, icon);
+ verify(spyIconAndViewTextManager).formatPullRequest(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_pull_request_review_comment_then_icon_should_be_comment_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_PULL_REQUEST_REVIEW_COMMENT);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatReviewComment(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_COMMENT, icon);
+ verify(spyIconAndViewTextManager).formatReviewComment(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_push_then_icon_should_be_push_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_PUSH);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatPush(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_PUSH, icon);
+ verify(spyIconAndViewTextManager).formatPush(event, null, null);
+ }
+
+ @Test
+ public void when_event_type_is_watch_then_icon_should_be_star_and_its_text_should_be_formatted() throws Exception {
+ // Arrange
+ Event event = new Event();
+ event.setType(Event.TYPE_WATCH);
+
+ IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(null);
+ IconAndViewTextManager spyIconAndViewTextManager = spy(iconAndViewTextManager);
+ doNothing().when(spyIconAndViewTextManager).formatWatch(event, null, null);
+
+ // Act
+ String icon = spyIconAndViewTextManager.setIconAndFormatStyledText(event, null, null);
+
+ // Assert
+ assertEquals(TypefaceUtils.ICON_STAR, icon);
+ verify(spyIconAndViewTextManager).formatWatch(event, null, null);
+ }
}
\ No newline at end of file
From 31f1a34c47988eda0ea2e0855b51c467014aa539 Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 21:16:12 -0400
Subject: [PATCH 015/561] Refactored 17 if-else-if statements into enum
constant-specific classes so that the complex class issue was fixed.
---
.../com/github/mobile/ui/user/EventType.java | 143 ++++++++++++++++++
.../ui/user/IconAndViewTextManager.java | 64 +-------
2 files changed, 145 insertions(+), 62 deletions(-)
create mode 100644 app/src/main/java/com/github/mobile/ui/user/EventType.java
diff --git a/app/src/main/java/com/github/mobile/ui/user/EventType.java b/app/src/main/java/com/github/mobile/ui/user/EventType.java
new file mode 100644
index 000000000..aca6623ea
--- /dev/null
+++ b/app/src/main/java/com/github/mobile/ui/user/EventType.java
@@ -0,0 +1,143 @@
+package com.github.mobile.ui.user;
+
+import com.github.mobile.ui.StyledText;
+import com.github.mobile.util.TypefaceUtils;
+
+import org.eclipse.egit.github.core.event.Event;
+import org.eclipse.egit.github.core.event.IssuesPayload;
+
+/**
+ * Created by twer on 3/22/15.
+ */
+public enum EventType {
+ CommitCommentEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatCommitComment(event, main, details);
+ return TypefaceUtils.ICON_COMMENT;
+ }
+ },
+ CreateEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatCreate(event, main, details);
+ return TypefaceUtils.ICON_CREATE;
+ }
+ },
+ DeleteEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatDelete(event, main, details);
+ return TypefaceUtils.ICON_DELETE;
+ }
+ },
+ DownloadEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatDownload(event, main, details);
+ return TypefaceUtils.ICON_UPLOAD;
+ }
+ },
+ FollowEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatFollow(event, main, details);
+ return TypefaceUtils.ICON_FOLLOW;
+ }
+ },
+ ForkEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatFork(event, main, details);
+ return TypefaceUtils.ICON_FORK;
+ }
+ },
+ GistEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatGist(event, main, details);
+ return TypefaceUtils.ICON_GIST;
+ }
+ },
+ GollumEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatWiki(event, main, details);
+ return TypefaceUtils.ICON_WIKI;
+ }
+ },
+ IssueCommentEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatIssueComment(event, main, details);
+ return TypefaceUtils.ICON_ISSUE_COMMENT;
+ }
+ },
+ IssuesEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatIssues(event, main, details);
+ String action = ((IssuesPayload) event.getPayload()).getAction();
+ String icon = null;
+ if (IconAndViewTextManager.ISSUES_PAYLOAD_ACTION_OPENED.equals(action))
+ icon = TypefaceUtils.ICON_ISSUE_OPEN;
+ else if (IconAndViewTextManager.ISSUES_PAYLOAD_ACTION_REOPENED.equals(action))
+ icon = TypefaceUtils.ICON_ISSUE_REOPEN;
+ else if (IconAndViewTextManager.ISSUES_PAYLOAD_ACTION_CLOSED.equals(action))
+ icon = TypefaceUtils.ICON_ISSUE_CLOSE;
+ return icon;
+ }
+ },
+ MemberEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatAddMember(event, main, details);
+ return TypefaceUtils.ICON_ADD_MEMBER;
+ }
+ },
+ PublicEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatPublic(event, main, details);
+ return null;
+ }
+ },
+ PullRequestEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatPullRequest(event, main, details);
+ return TypefaceUtils.ICON_PULL_REQUEST;
+ }
+ },
+ PullRequestReviewCommentEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatReviewComment(event, main, details);
+ return TypefaceUtils.ICON_COMMENT;
+ }
+ },
+ PushEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatPush(event, main, details);
+ return TypefaceUtils.ICON_PUSH;
+ }
+ },
+ TeamAddEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatTeamAdd(event, main, details);
+ return TypefaceUtils.ICON_ADD_MEMBER;
+ }
+ },
+ WatchEvent {
+ @Override
+ public String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details) {
+ iconAndViewTextManager.formatWatch(event, main, details);
+ return TypefaceUtils.ICON_STAR;
+ }
+ },
+ ;
+
+ public abstract String generateIconAndFormatStyledText(IconAndViewTextManager iconAndViewTextManager, Event event, StyledText main, StyledText details);
+}
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
index f008edc7c..4e80e3752 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
@@ -6,7 +6,6 @@
import com.github.mobile.core.issue.IssueUtils;
import com.github.mobile.ui.StyledText;
import com.github.mobile.util.TimeUtils;
-import com.github.mobile.util.TypefaceUtils;
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Commit;
@@ -406,66 +405,7 @@ protected void update(int position, Event event) {
}
String setIconAndFormatStyledText(Event event, StyledText main, StyledText details) {
- String icon = null;
-
- String type = event.getType();
- if (Event.TYPE_COMMIT_COMMENT.equals(type)) {
- icon = TypefaceUtils.ICON_COMMENT;
- formatCommitComment(event, main, details);
- } else if (Event.TYPE_CREATE.equals(type)) {
- icon = TypefaceUtils.ICON_CREATE;
- formatCreate(event, main, details);
- } else if (Event.TYPE_DELETE.equals(type)) {
- icon = TypefaceUtils.ICON_DELETE;
- formatDelete(event, main, details);
- } else if (Event.TYPE_DOWNLOAD.equals(type)) {
- icon = TypefaceUtils.ICON_UPLOAD;
- formatDownload(event, main, details);
- } else if (Event.TYPE_FOLLOW.equals(type)) {
- icon = TypefaceUtils.ICON_FOLLOW;
- formatFollow(event, main, details);
- } else if (Event.TYPE_FORK.equals(type)) {
- icon = TypefaceUtils.ICON_FORK;
- formatFork(event, main, details);
- } else if (Event.TYPE_GIST.equals(type)) {
- icon = TypefaceUtils.ICON_GIST;
- formatGist(event, main, details);
- } else if (Event.TYPE_GOLLUM.equals(type)) {
- icon = TypefaceUtils.ICON_WIKI;
- formatWiki(event, main, details);
- } else if (Event.TYPE_ISSUE_COMMENT.equals(type)) {
- icon = TypefaceUtils.ICON_ISSUE_COMMENT;
- formatIssueComment(event, main, details);
- } else if (Event.TYPE_ISSUES.equals(type)) {
- String action = ((IssuesPayload) event.getPayload()).getAction();
- if (ISSUES_PAYLOAD_ACTION_OPENED.equals(action))
- icon = TypefaceUtils.ICON_ISSUE_OPEN;
- else if (ISSUES_PAYLOAD_ACTION_REOPENED.equals(action))
- icon = TypefaceUtils.ICON_ISSUE_REOPEN;
- else if (ISSUES_PAYLOAD_ACTION_CLOSED.equals(action))
- icon = TypefaceUtils.ICON_ISSUE_CLOSE;
- formatIssues(event, main, details);
- } else if (Event.TYPE_MEMBER.equals(type)) {
- icon = TypefaceUtils.ICON_ADD_MEMBER;
- formatAddMember(event, main, details);
- } else if (Event.TYPE_PUBLIC.equals(type)) {
- formatPublic(event, main, details);
- } else if (Event.TYPE_PULL_REQUEST.equals(type)) {
- icon = TypefaceUtils.ICON_PULL_REQUEST;
- formatPullRequest(event, main, details);
- } else if (Event.TYPE_PULL_REQUEST_REVIEW_COMMENT.equals(type)) {
- icon = TypefaceUtils.ICON_COMMENT;
- formatReviewComment(event, main, details);
- } else if (Event.TYPE_PUSH.equals(type)) {
- icon = TypefaceUtils.ICON_PUSH;
- formatPush(event, main, details);
- } else if (Event.TYPE_TEAM_ADD.equals(type)) {
- icon = TypefaceUtils.ICON_ADD_MEMBER;
- formatTeamAdd(event, main, details);
- } else if (Event.TYPE_WATCH.equals(type)) {
- icon = TypefaceUtils.ICON_STAR;
- formatWatch(event, main, details);
- }
- return icon;
+
+ return EventType.valueOf(event.getType()).generateIconAndFormatStyledText(this, event, main, details);
}
}
\ No newline at end of file
From 70148582242a020d8789dc5339114affcb855aed Mon Sep 17 00:00:00 2001
From: Ben Wu
Date: Sun, 22 Mar 2015 21:39:07 -0400
Subject: [PATCH 016/561] Upgraded android gradle plugin to 1.1.3.
---
build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 4b143715c..3ab7a44fb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.1.0'
+ classpath 'com.android.tools.build:gradle:1.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
From 69330464e250620c2e24ace3d2fed9d18a61f03c Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Fri, 3 Apr 2015 19:43:03 +0200
Subject: [PATCH 017/561] marking icons as untranslateable
---
app/res/values/typeface.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/res/values/typeface.xml b/app/res/values/typeface.xml
index 35ec1d5c5..f84d3491a 100644
--- a/app/res/values/typeface.xml
+++ b/app/res/values/typeface.xml
@@ -16,14 +16,14 @@
-->
- \uf20E
- \uf04f
- \uf011
- \uf215
- \uf216
- \uf217
- \uf02a
- \uf020
+ \uf20E
+ \uf04f
+ \uf011
+ \uf215
+ \uf216
+ \uf217
+ \uf02a
+ \uf020
- \uf08d
From 8e9b10df5e04c0d55b72b414b9540da01b209cb4 Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Fri, 3 Apr 2015 19:43:20 +0200
Subject: [PATCH 018/561] adding a missing default translation
---
app/res/values/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/res/values/strings.xml b/app/res/values/strings.xml
index c9e66c401..afb0b9dbf 100644
--- a/app/res/values/strings.xml
+++ b/app/res/values/strings.xml
@@ -300,6 +300,6 @@
This will permanently delete the repository, wiki, issues,
and comments, and remove all collaborator associations.
Repository is deleted
-
+ Login or Email
From 1b07b4afe118ae2785878d08d27ec94f464cc739 Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Wed, 22 Apr 2015 10:38:40 +0200
Subject: [PATCH 019/561] Update README.md
It's not necessary to manually install gradle
The gradle wrapper scripts will download and use the required gradle version
---
README.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c4f549119..72e0eed94 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,7 @@ report any bugs or feature requests and to see the list of known issues.
### With Gradle
-The easiest way to build is to install [Android Studio](https://developer.android.com/sdk/index.html) v1.+
-with [Gradle](https://www.gradle.org/) v2.2.1.
+The easiest way to build is to install [Android Studio](https://developer.android.com/sdk/index.html) v1.+.
Once installed, then you can import the project into Android Studio:
1. Open `File`
From 31b1f95a347525fcaad455afc70338058c5e048d Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Mon, 27 Apr 2015 18:13:17 +0200
Subject: [PATCH 020/561] fixing lint: LongLogTag
---
.../java/com/github/mobile/accounts/AccountAuthenticator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java b/app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java
index 6ee517076..b0b1ccc03 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java
+++ b/app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java
@@ -48,7 +48,7 @@
public class AccountAuthenticator extends AbstractAccountAuthenticator {
- private static final String TAG = "GitHubAccountAuthenticator";
+ private static final String TAG = "GHAccountAuthenticator";
private static final List SCOPES = Arrays.asList("repo", "user", "gist");
From 7f7bffc4269c08d57fe770ffba37f1ec92660e14 Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Mon, 27 Apr 2015 18:48:01 +0200
Subject: [PATCH 021/561] set the severity of lints 'MissingTranslation' check
to warning (instead of error)
---
app/build.gradle | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/build.gradle b/app/build.gradle
index b02324681..7eb525f63 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -18,6 +18,7 @@ android {
}
lintOptions {
+ warning 'MissingTranslation'
abortOnError false
}
From 014a028042f3ca23a642adc8254aaf505a4ece86 Mon Sep 17 00:00:00 2001
From: StefMa
Date: Tue, 28 Apr 2015 13:28:53 +0200
Subject: [PATCH 022/561] replaced german translation from 'Hervorheben' to
'Favorit'
replaced better german translation. See https://github.com/forkhubs/android/pull/801#discussion_r29236828
replaced better german translation. See https://github.com/forkhubs/android/pull/801#discussion_r29237038
replaced (again) star translate in german. See https://github.com/forkhubs/android/pull/801 too
translated 'Hervorheben' to 'Favorisieren' in german language
---
app/res/values-de/strings.xml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/app/res/values-de/strings.xml b/app/res/values-de/strings.xml
index f182af321..71183d80d 100644
--- a/app/res/values-de/strings.xml
+++ b/app/res/values-de/strings.xml
@@ -42,11 +42,11 @@
Folgen fehlgeschlagen
Entfolgen fehlgeschlagen
Prüfen des Folgestatus fehlgeschlagen
- Hervorheben fehlgeschlagen
- Entfernen der Hervorhebung fehlgeschlagen
+ Favorisieren fehlgeschlagen
+ Defavorisieren fehlgeschlagen
Forking fehlgeschlagen
Löschen fehlgeschlagen
- Prüfen des Hervorhebungsstatus fehlgeschlagen
+ Prüfen des Favoritenstatus fehlgeschlagen
Rendern der Markdown-Vorschau fehlgeschlagen
Suche nach Usern fehlgeschlagen
@@ -148,8 +148,8 @@
erstellt mit Android
Titel
Bearbeiten
- Füge Gist als Hervorhebung hinzu…
- Entferne hervorgehobenen Gist…
+ Favorisiere Gist…
+ Defavorisiere Gist…
Konten
Verantwortlichen wählen
Meilenstein wählen
@@ -201,8 +201,8 @@
Ich folge
Folgen
Entfolgen
- Hervorheben
- Hervorhebung entfernen
+ Favorisieren
+ Defavorisieren
Fork
Mitglieder
Schließe Ticket…
@@ -252,8 +252,8 @@
Code
Folgen…
Entfolgen…
- Hervorheben…
- Hervorhebung entfernen…
+ Favorisiere Repository…
+ Defavorisiere Repository…
Forking…
Löschen…
Navigiere zu…
From f4cf22ad7d816f74585f6761ceae716f2e16cdb3 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Sun, 3 May 2015 05:33:19 +0700
Subject: [PATCH 023/561] [Fix #701] Improve zoom-out capability
---
.../mobile/ui/ref/BranchFileViewActivity.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java b/app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java
index 0d46774cb..b442a509e 100644
--- a/app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java
+++ b/app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java
@@ -15,12 +15,6 @@
*/
package com.github.mobile.ui.ref;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_HEAD;
-import static com.github.mobile.Intents.EXTRA_PATH;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.util.PreferenceUtils.RENDER_MARKDOWN;
-import static com.github.mobile.util.PreferenceUtils.WRAP;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
@@ -54,6 +48,13 @@
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.util.EncodingUtils;
+import static com.github.mobile.Intents.EXTRA_BASE;
+import static com.github.mobile.Intents.EXTRA_HEAD;
+import static com.github.mobile.Intents.EXTRA_PATH;
+import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.mobile.util.PreferenceUtils.RENDER_MARKDOWN;
+import static com.github.mobile.util.PreferenceUtils.WRAP;
+
/**
* Activity to view a file on a branch
*/
@@ -130,6 +131,7 @@ protected void onCreate(Bundle savedInstanceState) {
codeView = finder.find(R.id.wv_code);
codeView.getSettings().setBuiltInZoomControls(true);
+ codeView.getSettings().setUseWideViewPort(true);
file = CommitUtils.getName(path);
isMarkdownFile = MarkdownUtils.isMarkdown(file);
From e9ad5661cd9bcd21617415e4013a8e2ac00802de Mon Sep 17 00:00:00 2001
From: Munoz Adam
Date: Thu, 7 May 2015 20:22:44 +0900
Subject: [PATCH 024/561] Maven artifact for Material Dialogs has changed
version, the version referenced in build.grade was not available anymore and
because of it the build was broken. I have updated the version to be in sync
with the one in the repository
---
app/build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle b/app/build.gradle
index 7eb525f63..57c9a0fb0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -59,7 +59,7 @@ dependencies {
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
- compile 'com.afollestad:material-dialogs:0.7.2.7'
+ compile 'com.afollestad:material-dialogs:0.7.3.2'
//Self compiled .aar version of wishlist
compile (name:'lib', ext:'aar')
testCompile 'junit:junit:4.12'
From 5afbd295de5d764aa6472b97bf6823409a9dc76a Mon Sep 17 00:00:00 2001
From: Morton Fox
Date: Thu, 7 May 2015 16:02:14 -0400
Subject: [PATCH 025/561] Update pull requests link.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 72e0eed94..7dbcceda4 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ is listed in the [app's build.gradle file](https://github.com/forkhubs/android/b
## Contributing
Please fork this repository and contribute back using
-[pull requests](https://github.com/github/forkhubs/pulls).
+[pull requests](https://github.com/forkhubs/android/pulls).
Any contributions, large or small, major features, bug fixes, additional
language translations, unit/integration tests are welcomed and appreciated
From 4ac4bf3da06c8bb1770d8d7a7c07ccecefed0b21 Mon Sep 17 00:00:00 2001
From: StefMa
Date: Thu, 14 May 2015 16:25:52 +0200
Subject: [PATCH 026/561] removed all if(SDK_INT >= API 14) because we are
always bigger than API 14 (see build.gradle)
---
.../java/com/github/mobile/DefaultClient.java | 13 +--
.../github/mobile/ui/LightAlertDialog.java | 14 +--
.../github/mobile/ui/LightProgressDialog.java | 33 ++-----
.../github/mobile/ui/SlidingTabLayout.java | 28 ++----
.../java/com/github/mobile/ui/ViewPager.java | 15 +--
.../java/com/github/mobile/ui/WebView.java | 11 +--
.../com/github/mobile/util/HtmlUtils.java | 91 ++++++++-----------
.../github/mobile/util/PreferenceUtils.java | 14 +--
.../mobile/tests/util/HtmlUtilsTest.java | 12 +--
9 files changed, 72 insertions(+), 159 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/DefaultClient.java b/app/src/main/java/com/github/mobile/DefaultClient.java
index 04540e93e..7b0c9e9c3 100644
--- a/app/src/main/java/com/github/mobile/DefaultClient.java
+++ b/app/src/main/java/com/github/mobile/DefaultClient.java
@@ -15,15 +15,10 @@
*/
package com.github.mobile;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.FROYO;
-
-import com.github.kevinsawicki.http.HttpRequest;
+import org.eclipse.egit.github.core.client.GitHubClient;
import java.net.HttpURLConnection;
-import org.eclipse.egit.github.core.client.GitHubClient;
-
/**
* Default client used to communicate with GitHub API
*/
@@ -31,12 +26,6 @@ public class DefaultClient extends GitHubClient {
private static final String USER_AGENT = "GitHubAndroid/1.6";
- static {
- // Disable http.keepAlive on Froyo and below
- if (SDK_INT <= FROYO)
- HttpRequest.keepAlive(false);
- }
-
/**
* Create client
*/
diff --git a/app/src/main/java/com/github/mobile/ui/LightAlertDialog.java b/app/src/main/java/com/github/mobile/ui/LightAlertDialog.java
index 1ffe0434f..db627a637 100644
--- a/app/src/main/java/com/github/mobile/ui/LightAlertDialog.java
+++ b/app/src/main/java/com/github/mobile/ui/LightAlertDialog.java
@@ -15,8 +15,6 @@
*/
package com.github.mobile.ui;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import android.app.AlertDialog;
import android.content.Context;
@@ -32,10 +30,7 @@ public class LightAlertDialog extends AlertDialog {
* @return dialog
*/
public static AlertDialog create(final Context context) {
- if (SDK_INT >= ICE_CREAM_SANDWICH)
- return new LightAlertDialog(context, THEME_HOLO_LIGHT);
- else
- return new LightAlertDialog(context);
+ return new LightAlertDialog(context, THEME_HOLO_LIGHT);
}
private LightAlertDialog(final Context context, final int theme) {
@@ -58,10 +53,7 @@ public static class Builder extends AlertDialog.Builder {
* @return dialog builder
*/
public static LightAlertDialog.Builder create(final Context context) {
- if (SDK_INT >= ICE_CREAM_SANDWICH)
- return new LightAlertDialog.Builder(context, THEME_HOLO_LIGHT);
- else
- return new LightAlertDialog.Builder(context);
+ return new LightAlertDialog.Builder(context, THEME_HOLO_LIGHT);
}
private Builder(Context context) {
@@ -69,7 +61,7 @@ private Builder(Context context) {
}
private Builder(Context context, int theme) {
- super(context, theme);
+ super(context, theme);
}
}
}
diff --git a/app/src/main/java/com/github/mobile/ui/LightProgressDialog.java b/app/src/main/java/com/github/mobile/ui/LightProgressDialog.java
index 560da34c1..799338087 100644
--- a/app/src/main/java/com/github/mobile/ui/LightProgressDialog.java
+++ b/app/src/main/java/com/github/mobile/ui/LightProgressDialog.java
@@ -15,15 +15,9 @@
*/
package com.github.mobile.ui;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.FROYO;
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.TextView;
import com.github.mobile.R;
@@ -52,27 +46,12 @@ public static AlertDialog create(Context context, int resId) {
* @return dialog
*/
public static AlertDialog create(Context context, CharSequence message) {
- if (SDK_INT > FROYO) {
- ProgressDialog dialog;
- if (SDK_INT >= ICE_CREAM_SANDWICH)
- dialog = new LightProgressDialog(context, message);
- else {
- dialog = new ProgressDialog(context);
- dialog.setInverseBackgroundForced(true);
- }
- dialog.setMessage(message);
- dialog.setIndeterminate(true);
- dialog.setProgressStyle(STYLE_SPINNER);
- dialog.setIndeterminateDrawable(context.getResources().getDrawable(R.drawable.spinner));
- return dialog;
- } else {
- AlertDialog dialog = LightAlertDialog.create(context);
- dialog.setInverseBackgroundForced(true);
- View view = LayoutInflater.from(context).inflate(R.layout.progress_dialog, null);
- ((TextView) view.findViewById(R.id.tv_loading)).setText(message);
- dialog.setView(view);
- return dialog;
- }
+ ProgressDialog dialog = new LightProgressDialog(context, message);
+ dialog.setMessage(message);
+ dialog.setIndeterminate(true);
+ dialog.setProgressStyle(STYLE_SPINNER);
+ dialog.setIndeterminateDrawable(context.getResources().getDrawable(R.drawable.spinner));
+ return dialog;
}
private LightProgressDialog(Context context, CharSequence message) {
diff --git a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java b/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
index 59ec6fa6c..423b4c25c 100644
--- a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
+++ b/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
@@ -32,16 +32,16 @@
/**
* To be used with ViewPager to provide a tab indicator component which give constant feedback as to
* the user's scroll progress.
- *
+ *
* To use the component, simply add it to your view hierarchy. Then in your
* {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call
* {@link #setViewPager(android.support.v4.view.ViewPager)} providing it the ViewPager this layout is being used for.
- *
+ *
* The colors can be customized in two ways. The first and simplest is to provide an array of colors
* via {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)}. The
* alternative is via the {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} interface which provides you complete control over
* which color is used for any individual position.
- *
+ *
* The views used as tabs can be customized by calling {@link #setCustomTabView(int, int)},
* providing the layout ID of your custom layout.
*/
@@ -103,7 +103,7 @@ public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) {
/**
* Set the custom {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} to be used.
- *
+ *
* If you only require simple custmisation then you can use
* {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)} to achieve
* similar effects.
@@ -143,7 +143,7 @@ public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
* Set the custom layout to be inflated for the tab views.
*
* @param layoutResId Layout id to be inflated
- * @param textViewId id of the {@link android.widget.TextView} in the inflated view
+ * @param textViewId id of the {@link android.widget.TextView} in the inflated view
*/
public void setCustomTabView(int layoutResId, int textViewId) {
mTabViewLayoutId = layoutResId;
@@ -174,19 +174,11 @@ protected TextView createDefaultTabView(Context context) {
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);
textView.setTypeface(Typeface.DEFAULT_BOLD);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
- // If we're running on Honeycomb or newer, then we can use the Theme's
- // selectableItemBackground to ensure that the View has a pressed state
- TypedValue outValue = new TypedValue();
- getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground,
- outValue, true);
- textView.setBackgroundResource(outValue.resourceId);
- }
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- // If we're running on ICS or newer, enable all-caps to match the Action Bar tab style
- textView.setAllCaps(true);
- }
+ TypedValue outValue = new TypedValue();
+ getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground,
+ outValue, true);
+ textView.setBackgroundResource(outValue.resourceId);
+ textView.setAllCaps(true);
int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);
textView.setPadding(padding, padding, padding, padding);
diff --git a/app/src/main/java/com/github/mobile/ui/ViewPager.java b/app/src/main/java/com/github/mobile/ui/ViewPager.java
index 59b18ef93..d54ef15e8 100644
--- a/app/src/main/java/com/github/mobile/ui/ViewPager.java
+++ b/app/src/main/java/com/github/mobile/ui/ViewPager.java
@@ -15,8 +15,6 @@
*/
package com.github.mobile.ui;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
@@ -44,7 +42,7 @@ public ViewPager(final Context context, final AttributeSet attrs) {
/**
* Set current item and return whether the item changed
- *
+ *
* This method does not call {@link #setCurrentItem(int)} unless the item
* parameter differs from the current item
*
@@ -61,7 +59,7 @@ public boolean setItem(final int item) {
/**
* Set current item, invoke the listener if changes, and return whether the
* item changed
- *
+ *
* This method does not call {@link #setCurrentItem(int)} unless the item
* parameter differs from the current item
*
@@ -83,7 +81,7 @@ public boolean setItem(final int item, final OnPageChangeListener listener) {
* @param listener
*/
public void scheduleSetItem(final int item,
- final OnPageChangeListener listener) {
+ final OnPageChangeListener listener) {
post(new Runnable() {
@Override
@@ -110,10 +108,7 @@ public void run() {
@Override
protected boolean canScroll(final View v, final boolean checkV,
- final int dx, final int x, final int y) {
- if (SDK_INT < ICE_CREAM_SANDWICH && v instanceof WebView)
- return v.canScrollHorizontally(-dx);
- else
- return super.canScroll(v, checkV, dx, x, y);
+ final int dx, final int x, final int y) {
+ return super.canScroll(v, checkV, dx, x, y);
}
}
diff --git a/app/src/main/java/com/github/mobile/ui/WebView.java b/app/src/main/java/com/github/mobile/ui/WebView.java
index 5f5743d33..5d085428f 100644
--- a/app/src/main/java/com/github/mobile/ui/WebView.java
+++ b/app/src/main/java/com/github/mobile/ui/WebView.java
@@ -15,8 +15,6 @@
*/
package com.github.mobile.ui;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import android.content.Context;
import android.util.AttributeSet;
@@ -32,7 +30,7 @@ public class WebView extends android.webkit.WebView {
* @param privateBrowsing
*/
public WebView(final Context context, final AttributeSet attrs,
- final int defStyle, final boolean privateBrowsing) {
+ final int defStyle, final boolean privateBrowsing) {
super(context, attrs, defStyle, privateBrowsing);
}
@@ -42,7 +40,7 @@ public WebView(final Context context, final AttributeSet attrs,
* @param defStyle
*/
public WebView(final Context context, final AttributeSet attrs,
- final int defStyle) {
+ final int defStyle) {
super(context, attrs, defStyle);
}
@@ -75,9 +73,6 @@ private boolean canScrollCodeHorizontally(final int direction) {
@Override
public boolean canScrollHorizontally(final int direction) {
- if (SDK_INT >= ICE_CREAM_SANDWICH)
- return super.canScrollHorizontally(direction);
- else
- return canScrollCodeHorizontally(direction);
+ return super.canScrollHorizontally(direction);
}
}
diff --git a/app/src/main/java/com/github/mobile/util/HtmlUtils.java b/app/src/main/java/com/github/mobile/util/HtmlUtils.java
index ebc37ff4a..a3d5d009f 100644
--- a/app/src/main/java/com/github/mobile/util/HtmlUtils.java
+++ b/app/src/main/java/com/github/mobile/util/HtmlUtils.java
@@ -15,11 +15,6 @@
*/
package com.github.mobile.util;
-import static android.graphics.Paint.Style.FILL;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
-import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
-import static android.text.Spanned.SPAN_MARK_MARK;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
@@ -34,9 +29,13 @@
import android.text.style.StrikethroughSpan;
import android.text.style.TypefaceSpan;
+import org.xml.sax.XMLReader;
+
import java.util.LinkedList;
-import org.xml.sax.XMLReader;
+import static android.graphics.Paint.Style.FILL;
+import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
+import static android.text.Spanned.SPAN_MARK_MARK;
/**
* HTML Utilities
@@ -54,8 +53,8 @@ public int getLeadingMargin(boolean first) {
@Override
public void drawLeadingMargin(Canvas c, Paint p, int x, int dir,
- int top, int baseline, int bottom, CharSequence text,
- int start, int end, boolean first, Layout layout) {
+ int top, int baseline, int bottom, CharSequence text,
+ int start, int end, boolean first, Layout layout) {
final Style style = p.getStyle();
final int color = p.getColor();
@@ -157,7 +156,7 @@ public ListSeparator append(Editable output, int indentLevel) {
@Override
public void handleTag(final boolean opening, final String tag,
- final Editable output, final XMLReader xmlReader) {
+ final Editable output, final XMLReader xmlReader) {
if (TAG_DEL.equalsIgnoreCase(tag)) {
if (opening)
startSpan(new StrikethroughSpan(), output);
@@ -277,7 +276,7 @@ public static CharSequence encode(final String html) {
* @return html
*/
public static CharSequence encode(final String html,
- final ImageGetter imageGetter) {
+ final ImageGetter imageGetter) {
if (TextUtils.isEmpty(html))
return "";
@@ -319,8 +318,6 @@ public static final CharSequence format(final String html) {
formatEmailFragments(formatted);
- formatIncorrectStyles(formatted);
-
trim(formatted);
formatted.insert(0, ROOT_START);
@@ -329,18 +326,8 @@ public static final CharSequence format(final String html) {
return formatted;
}
- private static void formatIncorrectStyles(final StringBuilder input) {
- // em and strong tag styles are swapped on pre-4.0 so swap them back
- // using alternate tags that don't exhibit the incorrect styling.
- // http://code.google.com/p/android/issues/detail?id=3473
- if (SDK_INT < ICE_CREAM_SANDWICH) {
- replaceTag(input, "em", "i");
- replaceTag(input, "strong", "b");
- }
- }
-
private static StringBuilder strip(final StringBuilder input,
- final String prefix, final String suffix) {
+ final String prefix, final String suffix) {
int start = input.indexOf(prefix);
while (start != -1) {
int end = input.indexOf(suffix, start + prefix.length());
@@ -353,7 +340,7 @@ private static StringBuilder strip(final StringBuilder input,
}
private static boolean replace(final StringBuilder input,
- final String from, final String to) {
+ final String from, final String to) {
int start = input.indexOf(from);
if (start == -1)
return false;
@@ -368,14 +355,14 @@ private static boolean replace(final StringBuilder input,
}
private static void replaceTag(final StringBuilder input,
- final String from, final String to) {
+ final String from, final String to) {
if (replace(input, '<' + from + '>', '<' + to + '>'))
replace(input, "" + from + '>', "" + to + '>');
}
private static StringBuilder replace(final StringBuilder input,
- final String fromStart, final String fromEnd, final String toStart,
- final String toEnd) {
+ final String fromStart, final String fromEnd, final String toStart,
+ final String toEnd) {
int start = input.indexOf(fromStart);
if (start == -1)
return input;
@@ -411,32 +398,32 @@ private static StringBuilder formatPres(final StringBuilder input) {
for (int i = start; i < end; i++) {
switch (input.charAt(i)) {
- case ' ':
- input.deleteCharAt(i);
- input.insert(i, SPACE);
- start += spaceAdvance;
- end += spaceAdvance;
- break;
- case '\t':
- input.deleteCharAt(i);
- input.insert(i, SPACE);
- start += spaceAdvance;
- end += spaceAdvance;
- for (int j = 0; j < 3; j++) {
+ case ' ':
+ input.deleteCharAt(i);
input.insert(i, SPACE);
- start += spaceAdvance + 1;
- end += spaceAdvance + 1;
- }
- break;
- case '\n':
- input.deleteCharAt(i);
- // Ignore if last character is a newline
- if (i + 1 < end) {
- input.insert(i, BREAK);
- start += breakAdvance;
- end += breakAdvance;
- }
- break;
+ start += spaceAdvance;
+ end += spaceAdvance;
+ break;
+ case '\t':
+ input.deleteCharAt(i);
+ input.insert(i, SPACE);
+ start += spaceAdvance;
+ end += spaceAdvance;
+ for (int j = 0; j < 3; j++) {
+ input.insert(i, SPACE);
+ start += spaceAdvance + 1;
+ end += spaceAdvance + 1;
+ }
+ break;
+ case '\n':
+ input.deleteCharAt(i);
+ // Ignore if last character is a newline
+ if (i + 1 < end) {
+ input.insert(i, BREAK);
+ start += breakAdvance;
+ end += breakAdvance;
+ }
+ break;
}
}
start = input.indexOf(PRE_START, end + PRE_END.length());
diff --git a/app/src/main/java/com/github/mobile/util/PreferenceUtils.java b/app/src/main/java/com/github/mobile/util/PreferenceUtils.java
index 36dcf0f07..ed9d29fe7 100644
--- a/app/src/main/java/com/github/mobile/util/PreferenceUtils.java
+++ b/app/src/main/java/com/github/mobile/util/PreferenceUtils.java
@@ -15,13 +15,12 @@
*/
package com.github.mobile.util;
-import static android.content.Context.MODE_PRIVATE;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.GINGERBREAD;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
+import static android.content.Context.MODE_PRIVATE;
+
/**
* Utility class for working with {@link SharedPreferences}
*/
@@ -47,19 +46,12 @@ public static SharedPreferences getCodePreferences(final Context context) {
return context.getSharedPreferences("code", MODE_PRIVATE);
}
- private static boolean isEditorApplyAvailable() {
- return SDK_INT >= GINGERBREAD;
- }
-
/**
* Save preferences in given editor
*
* @param editor
*/
public static void save(final Editor editor) {
- if (isEditorApplyAvailable())
- editor.apply();
- else
- editor.commit();
+ editor.apply();
}
}
diff --git a/integration-tests/src/main/java/com/github/mobile/tests/util/HtmlUtilsTest.java b/integration-tests/src/main/java/com/github/mobile/tests/util/HtmlUtilsTest.java
index eabda3f3c..48638c1df 100644
--- a/integration-tests/src/main/java/com/github/mobile/tests/util/HtmlUtilsTest.java
+++ b/integration-tests/src/main/java/com/github/mobile/tests/util/HtmlUtilsTest.java
@@ -15,8 +15,6 @@
*/
package com.github.mobile.tests.util;
-import static android.os.Build.VERSION.SDK_INT;
-import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import android.test.AndroidTestCase;
import com.github.mobile.util.HtmlUtils;
@@ -127,10 +125,7 @@ public void testParagraphReplacedWithBreak() {
*/
public void testEmReplacedWithI() {
String html = "ab c";
- if (SDK_INT < ICE_CREAM_SANDWICH)
- assertEquals("ab c", format(html));
- else
- assertEquals(html, format(html));
+ assertEquals(html, format(html));
}
/**
@@ -138,10 +133,7 @@ public void testEmReplacedWithI() {
*/
public void testStrongReplacedWithB() {
String html = "a ";
- if (SDK_INT < ICE_CREAM_SANDWICH)
- assertEquals("a ", format(html));
- else
- assertEquals(html, format(html));
+ assertEquals(html, format(html));
}
/**
From 88d1eaaf9e6384efed2cc34ad745655dbd6b9812 Mon Sep 17 00:00:00 2001
From: StefMa
Date: Sun, 17 May 2015 09:07:51 +0200
Subject: [PATCH 027/561] replaced
with in Javadoc. See
https://github.com/forkhubs/android/pull/809/files#r30438936 for more details
---
.../main/java/com/github/mobile/ui/SlidingTabLayout.java | 8 ++++----
app/src/main/java/com/github/mobile/ui/ViewPager.java | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java b/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
index 423b4c25c..903f15358 100644
--- a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
+++ b/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
@@ -32,16 +32,16 @@
/**
* To be used with ViewPager to provide a tab indicator component which give constant feedback as to
* the user's scroll progress.
- *
+ *
* To use the component, simply add it to your view hierarchy. Then in your
* {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call
* {@link #setViewPager(android.support.v4.view.ViewPager)} providing it the ViewPager this layout is being used for.
- *
+ *
* The colors can be customized in two ways. The first and simplest is to provide an array of colors
* via {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)}. The
* alternative is via the {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} interface which provides you complete control over
* which color is used for any individual position.
- *
+ *
* The views used as tabs can be customized by calling {@link #setCustomTabView(int, int)},
* providing the layout ID of your custom layout.
*/
@@ -103,7 +103,7 @@ public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) {
/**
* Set the custom {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} to be used.
- *
+ *
* If you only require simple custmisation then you can use
* {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)} to achieve
* similar effects.
diff --git a/app/src/main/java/com/github/mobile/ui/ViewPager.java b/app/src/main/java/com/github/mobile/ui/ViewPager.java
index d54ef15e8..6cfdf599f 100644
--- a/app/src/main/java/com/github/mobile/ui/ViewPager.java
+++ b/app/src/main/java/com/github/mobile/ui/ViewPager.java
@@ -42,7 +42,7 @@ public ViewPager(final Context context, final AttributeSet attrs) {
/**
* Set current item and return whether the item changed
- *
+ *
* This method does not call {@link #setCurrentItem(int)} unless the item
* parameter differs from the current item
*
@@ -59,7 +59,7 @@ public boolean setItem(final int item) {
/**
* Set current item, invoke the listener if changes, and return whether the
* item changed
- *
+ *
* This method does not call {@link #setCurrentItem(int)} unless the item
* parameter differs from the current item
*
From 144a588d7bdf2e6adcba3edf74a9fd21acde3e0e Mon Sep 17 00:00:00 2001
From: StefMa
Date: Sun, 17 May 2015 10:50:50 +0200
Subject: [PATCH 028/561] make checkboxes visible on white background
---
.idea/codeStyleSettings.xml | 180 ---------------------------------
.idea/vcs.xml | 9 --
app/res/layout/gist_create.xml | 10 +-
app/res/layout/login.xml | 10 +-
app/res/values/styles.xml | 14 +--
app/res/values/theme.xml | 9 +-
6 files changed, 27 insertions(+), 205 deletions(-)
delete mode 100644 .idea/codeStyleSettings.xml
delete mode 100644 .idea/vcs.xml
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 313b8fb3d..000000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- xmlns:android
- Namespace:
-
-
-
-
-
-
- xmlns:.*
- Namespace:
-
-
- BY_NAME
-
-
-
-
- .*:id
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
- .*:name
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
- name
- ^$
-
-
-
-
-
-
- style
- ^$
-
-
-
-
-
-
- .*
- ^$
-
-
- BY_NAME
-
-
-
-
- .*:layout_width
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
- .*:layout_height
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
- .*:layout_.*
- http://schemas.android.com/apk/res/android
-
-
- BY_NAME
-
-
-
-
- .*:width
- http://schemas.android.com/apk/res/android
-
-
- BY_NAME
-
-
-
-
- .*:height
- http://schemas.android.com/apk/res/android
-
-
- BY_NAME
-
-
-
-
- .*
- http://schemas.android.com/apk/res/android
-
-
- BY_NAME
-
-
-
-
- .*
- .*
-
-
- BY_NAME
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 1ef6aeab2..000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/app/res/layout/gist_create.xml b/app/res/layout/gist_create.xml
index f12291aba..4fe973d68 100644
--- a/app/res/layout/gist_create.xml
+++ b/app/res/layout/gist_create.xml
@@ -19,13 +19,13 @@
android:layout_height="match_parent">
+ android:minHeight="?attr/actionBarSize"
+ app:theme="@style/ToolbarStyle" />
+ android:textColor="@color/text"
+ android:theme="@style/Theme.GitHub.CheckBoxLight" />
diff --git a/app/res/layout/login.xml b/app/res/layout/login.xml
index 1ddcc1763..200e87897 100644
--- a/app/res/layout/login.xml
+++ b/app/res/layout/login.xml
@@ -20,12 +20,12 @@
android:orientation="vertical">
+ android:minHeight="?attr/actionBarSize"
+ app:theme="@style/ToolbarStyle" />
+ android:textColor="@color/text"
+ android:theme="@style/Theme.GitHub.CheckBoxLight" />
diff --git a/app/res/values/styles.xml b/app/res/values/styles.xml
index f968b8099..60366af65 100644
--- a/app/res/values/styles.xml
+++ b/app/res/values/styles.xml
@@ -1,5 +1,4 @@
-
-
-
-
-
-
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
+
+
+
+
+
+
@@ -52,5 +64,4 @@
style="@style/ListSpinner"
android:layout_centerInParent="true"
android:visibility="gone" />
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java b/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
deleted file mode 100644
index 903f15358..000000000
--- a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.github.mobile.ui;
-
-import android.content.Context;
-import android.graphics.Typeface;
-import android.os.Build;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.HorizontalScrollView;
-import android.widget.TextView;
-
-/**
- * To be used with ViewPager to provide a tab indicator component which give constant feedback as to
- * the user's scroll progress.
- *
- * To use the component, simply add it to your view hierarchy. Then in your
- * {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call
- * {@link #setViewPager(android.support.v4.view.ViewPager)} providing it the ViewPager this layout is being used for.
- *
- * The colors can be customized in two ways. The first and simplest is to provide an array of colors
- * via {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)}. The
- * alternative is via the {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} interface which provides you complete control over
- * which color is used for any individual position.
- *
- * The views used as tabs can be customized by calling {@link #setCustomTabView(int, int)},
- * providing the layout ID of your custom layout.
- */
-public class SlidingTabLayout extends HorizontalScrollView {
-
- /**
- * Allows complete control over the colors drawn in the tab layout. Set with
- * {@link #setCustomTabColorizer(com.github.mobile.ui.SlidingTabLayout.TabColorizer)}.
- */
- public interface TabColorizer {
-
- /**
- * @return return the color of the indicator used when {@code position} is selected.
- */
- int getIndicatorColor(int position);
-
- /**
- * @return return the color of the divider drawn to the right of {@code position}.
- */
- int getDividerColor(int position);
-
- }
-
- private static final int TITLE_OFFSET_DIPS = 24;
- private static final int TAB_VIEW_PADDING_DIPS = 16;
- private static final int TAB_VIEW_TEXT_SIZE_SP = 12;
-
- private int mTitleOffset;
-
- private int mTabViewLayoutId;
- private int mTabViewTextViewId;
-
- private ViewPager mViewPager;
- private ViewPager.OnPageChangeListener mViewPagerPageChangeListener;
-
- private final SlidingTabStrip mTabStrip;
-
- public SlidingTabLayout(Context context) {
- this(context, null);
- }
-
- public SlidingTabLayout(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- // Disable the Scroll Bar
- setHorizontalScrollBarEnabled(false);
- // Make sure that the Tab Strips fills this View
- setFillViewport(true);
-
- mTitleOffset = (int) (TITLE_OFFSET_DIPS * getResources().getDisplayMetrics().density);
-
- mTabStrip = new SlidingTabStrip(context);
- addView(mTabStrip, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
- }
-
- /**
- * Set the custom {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} to be used.
- *
- * If you only require simple custmisation then you can use
- * {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)} to achieve
- * similar effects.
- */
- public void setCustomTabColorizer(TabColorizer tabColorizer) {
- mTabStrip.setCustomTabColorizer(tabColorizer);
- }
-
- /**
- * Sets the colors to be used for indicating the selected tab. These colors are treated as a
- * circular array. Providing one color will mean that all tabs are indicated with the same color.
- */
- public void setSelectedIndicatorColors(int... colors) {
- mTabStrip.setSelectedIndicatorColors(colors);
- }
-
- /**
- * Sets the colors to be used for tab dividers. These colors are treated as a circular array.
- * Providing one color will mean that all tabs are indicated with the same color.
- */
- public void setDividerColors(int... colors) {
- mTabStrip.setDividerColors(colors);
- }
-
- /**
- * Set the {@link android.support.v4.view.ViewPager.OnPageChangeListener}. When using {@link com.github.mobile.ui.SlidingTabLayout} you are
- * required to set any {@link android.support.v4.view.ViewPager.OnPageChangeListener} through this method. This is so
- * that the layout can update it's scroll position correctly.
- *
- * @see android.support.v4.view.ViewPager#setOnPageChangeListener(android.support.v4.view.ViewPager.OnPageChangeListener)
- */
- public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
- mViewPagerPageChangeListener = listener;
- }
-
- /**
- * Set the custom layout to be inflated for the tab views.
- *
- * @param layoutResId Layout id to be inflated
- * @param textViewId id of the {@link android.widget.TextView} in the inflated view
- */
- public void setCustomTabView(int layoutResId, int textViewId) {
- mTabViewLayoutId = layoutResId;
- mTabViewTextViewId = textViewId;
- }
-
- /**
- * Sets the associated view pager. Note that the assumption here is that the pager content
- * (number of tabs and tab titles) does not change after this call has been made.
- */
- public void setViewPager(ViewPager viewPager) {
- mTabStrip.removeAllViews();
-
- mViewPager = viewPager;
- if (viewPager != null) {
- viewPager.setOnPageChangeListener(new InternalViewPagerListener());
- populateTabStrip();
- }
- }
-
- /**
- * Create a default view to be used for tabs. This is called if a custom tab view is not set via
- * {@link #setCustomTabView(int, int)}.
- */
- protected TextView createDefaultTabView(Context context) {
- TextView textView = new TextView(context);
- textView.setGravity(Gravity.CENTER);
- textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);
- textView.setTypeface(Typeface.DEFAULT_BOLD);
-
- TypedValue outValue = new TypedValue();
- getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground,
- outValue, true);
- textView.setBackgroundResource(outValue.resourceId);
- textView.setAllCaps(true);
-
- int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);
- textView.setPadding(padding, padding, padding, padding);
-
- return textView;
- }
-
- private void populateTabStrip() {
- final PagerAdapter adapter = mViewPager.getAdapter();
- final OnClickListener tabClickListener = new TabClickListener();
-
- for (int i = 0; i < adapter.getCount(); i++) {
- View tabView = null;
- TextView tabTitleView = null;
-
- if (mTabViewLayoutId != 0) {
- // If there is a custom tab view layout id set, try and inflate it
- tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip,
- false);
- tabTitleView = (TextView) tabView.findViewById(mTabViewTextViewId);
- }
-
- if (tabView == null) {
- tabView = createDefaultTabView(getContext());
- }
-
- if (tabTitleView == null && TextView.class.isInstance(tabView)) {
- tabTitleView = (TextView) tabView;
- }
-
- tabTitleView.setText(adapter.getPageTitle(i));
- tabView.setOnClickListener(tabClickListener);
-
- mTabStrip.addView(tabView);
-
- if (i == mViewPager.getCurrentItem()) {
- tabView.setSelected(true);
- }
- }
-
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
-
- if (mViewPager != null) {
- scrollToTab(mViewPager.getCurrentItem(), 0);
- }
- }
-
- private void scrollToTab(int tabIndex, int positionOffset) {
- final int tabStripChildCount = mTabStrip.getChildCount();
- if (tabStripChildCount == 0 || tabIndex < 0 || tabIndex >= tabStripChildCount) {
- return;
- }
-
- View selectedChild = mTabStrip.getChildAt(tabIndex);
- if (selectedChild != null) {
- int targetScrollX = selectedChild.getLeft() + positionOffset;
-
- if (tabIndex > 0 || positionOffset > 0) {
- // If we're not at the first child and are mid-scroll, make sure we obey the offset
- targetScrollX -= mTitleOffset;
- }
-
- scrollTo(targetScrollX, 0);
- }
- }
-
- private class InternalViewPagerListener implements ViewPager.OnPageChangeListener {
- private int mScrollState;
-
- @Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
- int tabStripChildCount = mTabStrip.getChildCount();
- if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) {
- return;
- }
-
- mTabStrip.onViewPagerPageChanged(position, positionOffset);
-
- View selectedTitle = mTabStrip.getChildAt(position);
- int extraOffset = (selectedTitle != null)
- ? (int) (positionOffset * selectedTitle.getWidth())
- : 0;
- scrollToTab(position, extraOffset);
-
- if (mViewPagerPageChangeListener != null) {
- mViewPagerPageChangeListener.onPageScrolled(position, positionOffset,
- positionOffsetPixels);
- }
- }
-
- @Override
- public void onPageScrollStateChanged(int state) {
- mScrollState = state;
-
- if (mViewPagerPageChangeListener != null) {
- mViewPagerPageChangeListener.onPageScrollStateChanged(state);
- }
- }
-
- @Override
- public void onPageSelected(int position) {
- if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {
- mTabStrip.onViewPagerPageChanged(position, 0f);
- scrollToTab(position, 0);
- }
- for (int i = 0; i < mTabStrip.getChildCount(); i++) {
- mTabStrip.getChildAt(i).setSelected(position == i);
- }
- if (mViewPagerPageChangeListener != null) {
- mViewPagerPageChangeListener.onPageSelected(position);
- }
- }
-
- }
-
- private class TabClickListener implements OnClickListener {
- @Override
- public void onClick(View v) {
- for (int i = 0; i < mTabStrip.getChildCount(); i++) {
- if (v == mTabStrip.getChildAt(i)) {
- mViewPager.setCurrentItem(i);
- return;
- }
- }
- }
- }
-
-}
diff --git a/app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java b/app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java
deleted file mode 100644
index ed1aeac18..000000000
--- a/app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.github.mobile.ui;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.View;
-import android.widget.LinearLayout;
-
-class SlidingTabStrip extends LinearLayout {
-
- private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 0;
- private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26;
- private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 6;
- private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5;
-
- private static final int DEFAULT_DIVIDER_THICKNESS_DIPS = 1;
- private static final byte DEFAULT_DIVIDER_COLOR_ALPHA = 0x20;
- private static final float DEFAULT_DIVIDER_HEIGHT = 0.5f;
-
- private final int mBottomBorderThickness;
- private final Paint mBottomBorderPaint;
-
- private final int mSelectedIndicatorThickness;
- private final Paint mSelectedIndicatorPaint;
-
- private final int mDefaultBottomBorderColor;
-
- private final Paint mDividerPaint;
- private final float mDividerHeight;
-
- private int mSelectedPosition;
- private float mSelectionOffset;
-
- private SlidingTabLayout.TabColorizer mCustomTabColorizer;
- private final SimpleTabColorizer mDefaultTabColorizer;
-
- SlidingTabStrip(Context context) {
- this(context, null);
- }
-
- SlidingTabStrip(Context context, AttributeSet attrs) {
- super(context, attrs);
- setWillNotDraw(false);
-
- final float density = getResources().getDisplayMetrics().density;
-
- TypedValue outValue = new TypedValue();
- context.getTheme().resolveAttribute(android.R.attr.colorForeground, outValue, true);
- final int themeForegroundColor = outValue.data;
-
- mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor,
- DEFAULT_BOTTOM_BORDER_COLOR_ALPHA);
-
- mDefaultTabColorizer = new SimpleTabColorizer();
- mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR);
- mDefaultTabColorizer.setDividerColors(setColorAlpha(themeForegroundColor,
- DEFAULT_DIVIDER_COLOR_ALPHA));
-
- mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density);
- mBottomBorderPaint = new Paint();
- mBottomBorderPaint.setColor(mDefaultBottomBorderColor);
-
- mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density);
- mSelectedIndicatorPaint = new Paint();
-
- mDividerHeight = DEFAULT_DIVIDER_HEIGHT;
- mDividerPaint = new Paint();
- mDividerPaint.setStrokeWidth((int) (DEFAULT_DIVIDER_THICKNESS_DIPS * density));
- }
-
- void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) {
- mCustomTabColorizer = customTabColorizer;
- invalidate();
- }
-
- void setSelectedIndicatorColors(int... colors) {
- // Make sure that the custom colorizer is removed
- mCustomTabColorizer = null;
- mDefaultTabColorizer.setIndicatorColors(colors);
- invalidate();
- }
-
- void setDividerColors(int... colors) {
- // Make sure that the custom colorizer is removed
- mCustomTabColorizer = null;
- mDefaultTabColorizer.setDividerColors(colors);
- invalidate();
- }
-
- void onViewPagerPageChanged(int position, float positionOffset) {
- mSelectedPosition = position;
- mSelectionOffset = positionOffset;
- invalidate();
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- final int height = getHeight();
- final int childCount = getChildCount();
- final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height);
- final SlidingTabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null
- ? mCustomTabColorizer
- : mDefaultTabColorizer;
-
- // Thick colored underline below the current selection
- if (childCount > 0) {
- View selectedTitle = getChildAt(mSelectedPosition);
- int left = selectedTitle.getLeft();
- int right = selectedTitle.getRight();
- int color = tabColorizer.getIndicatorColor(mSelectedPosition);
-
- if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) {
- int nextColor = tabColorizer.getIndicatorColor(mSelectedPosition + 1);
- if (color != nextColor) {
- color = blendColors(nextColor, color, mSelectionOffset);
- }
-
- // Draw the selection partway between the tabs
- View nextTitle = getChildAt(mSelectedPosition + 1);
- left = (int) (mSelectionOffset * nextTitle.getLeft() +
- (1.0f - mSelectionOffset) * left);
- right = (int) (mSelectionOffset * nextTitle.getRight() +
- (1.0f - mSelectionOffset) * right);
- }
-
- mSelectedIndicatorPaint.setColor(color);
-
- canvas.drawRect(left, height - mSelectedIndicatorThickness, right,
- height, mSelectedIndicatorPaint);
- }
-
- // Thin underline along the entire bottom edge
- canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint);
-
- // Vertical separators between the titles
- int separatorTop = (height - dividerHeightPx) / 2;
- for (int i = 0; i < childCount - 1; i++) {
- View child = getChildAt(i);
- mDividerPaint.setColor(tabColorizer.getDividerColor(i));
- canvas.drawLine(child.getRight(), separatorTop, child.getRight(),
- separatorTop + dividerHeightPx, mDividerPaint);
- }
- }
-
- /**
- * Set the alpha value of the {@code color} to be the given {@code alpha} value.
- */
- private static int setColorAlpha(int color, byte alpha) {
- return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
- }
-
- /**
- * Blend {@code color1} and {@code color2} using the given ratio.
- *
- * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend,
- * 0.0 will return {@code color2}.
- */
- private static int blendColors(int color1, int color2, float ratio) {
- final float inverseRation = 1f - ratio;
- float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation);
- float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation);
- float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation);
- return Color.rgb((int) r, (int) g, (int) b);
- }
-
- private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer {
- private int[] mIndicatorColors;
- private int[] mDividerColors;
-
- @Override
- public final int getIndicatorColor(int position) {
- return mIndicatorColors[position % mIndicatorColors.length];
- }
-
- @Override
- public final int getDividerColor(int position) {
- return mDividerColors[position % mDividerColors.length];
- }
-
- void setIndicatorColors(int... colors) {
- mIndicatorColors = colors;
- }
-
- void setDividerColors(int... colors) {
- mDividerColors = colors;
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java b/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
index 9ca4624ec..8f7ae7321 100644
--- a/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
+++ b/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
@@ -16,6 +16,7 @@
package com.github.mobile.ui;
import android.os.Bundle;
+import android.support.design.widget.TabLayout;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.widget.TabHost.OnTabChangeListener;
@@ -40,7 +41,7 @@ public abstract class TabPagerActivity
extends PagerFragment implements OnTabChangeListener, TabContentFactory {
@@ -25,7 +27,7 @@ public abstract class TabPagerFragment
Date: Thu, 25 Jun 2015 17:21:58 +0800
Subject: [PATCH 034/561] use CoordinatorLayout and TabLayout from Appcompat's
design library
---
app/build.gradle | 2 +
.../github/mobile/ui/SlidingTabLayout.java | 313 ------------------
.../com/github/mobile/ui/SlidingTabStrip.java | 207 ------------
.../github/mobile/ui/TabPagerActivity.java | 10 +-
.../github/mobile/ui/TabPagerFragment.java | 15 +-
.../ui/comment/CreateCommentActivity.java | 28 +-
app/src/main/res/layout/pager_with_tabs.xml | 43 ++-
7 files changed, 50 insertions(+), 568 deletions(-)
delete mode 100644 app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
delete mode 100644 app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java
diff --git a/app/build.gradle b/app/build.gradle
index 26a0aa212..f3c9762f6 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -53,4 +53,6 @@ dependencies {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
+
+ compile 'com.android.support:design:22.2.0'
}
diff --git a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java b/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
deleted file mode 100644
index 903f15358..000000000
--- a/app/src/main/java/com/github/mobile/ui/SlidingTabLayout.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.github.mobile.ui;
-
-import android.content.Context;
-import android.graphics.Typeface;
-import android.os.Build;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.HorizontalScrollView;
-import android.widget.TextView;
-
-/**
- * To be used with ViewPager to provide a tab indicator component which give constant feedback as to
- * the user's scroll progress.
- *
- * To use the component, simply add it to your view hierarchy. Then in your
- * {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call
- * {@link #setViewPager(android.support.v4.view.ViewPager)} providing it the ViewPager this layout is being used for.
- *
- * The colors can be customized in two ways. The first and simplest is to provide an array of colors
- * via {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)}. The
- * alternative is via the {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} interface which provides you complete control over
- * which color is used for any individual position.
- *
- * The views used as tabs can be customized by calling {@link #setCustomTabView(int, int)},
- * providing the layout ID of your custom layout.
- */
-public class SlidingTabLayout extends HorizontalScrollView {
-
- /**
- * Allows complete control over the colors drawn in the tab layout. Set with
- * {@link #setCustomTabColorizer(com.github.mobile.ui.SlidingTabLayout.TabColorizer)}.
- */
- public interface TabColorizer {
-
- /**
- * @return return the color of the indicator used when {@code position} is selected.
- */
- int getIndicatorColor(int position);
-
- /**
- * @return return the color of the divider drawn to the right of {@code position}.
- */
- int getDividerColor(int position);
-
- }
-
- private static final int TITLE_OFFSET_DIPS = 24;
- private static final int TAB_VIEW_PADDING_DIPS = 16;
- private static final int TAB_VIEW_TEXT_SIZE_SP = 12;
-
- private int mTitleOffset;
-
- private int mTabViewLayoutId;
- private int mTabViewTextViewId;
-
- private ViewPager mViewPager;
- private ViewPager.OnPageChangeListener mViewPagerPageChangeListener;
-
- private final SlidingTabStrip mTabStrip;
-
- public SlidingTabLayout(Context context) {
- this(context, null);
- }
-
- public SlidingTabLayout(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- // Disable the Scroll Bar
- setHorizontalScrollBarEnabled(false);
- // Make sure that the Tab Strips fills this View
- setFillViewport(true);
-
- mTitleOffset = (int) (TITLE_OFFSET_DIPS * getResources().getDisplayMetrics().density);
-
- mTabStrip = new SlidingTabStrip(context);
- addView(mTabStrip, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
- }
-
- /**
- * Set the custom {@link com.github.mobile.ui.SlidingTabLayout.TabColorizer} to be used.
- *
- * If you only require simple custmisation then you can use
- * {@link #setSelectedIndicatorColors(int...)} and {@link #setDividerColors(int...)} to achieve
- * similar effects.
- */
- public void setCustomTabColorizer(TabColorizer tabColorizer) {
- mTabStrip.setCustomTabColorizer(tabColorizer);
- }
-
- /**
- * Sets the colors to be used for indicating the selected tab. These colors are treated as a
- * circular array. Providing one color will mean that all tabs are indicated with the same color.
- */
- public void setSelectedIndicatorColors(int... colors) {
- mTabStrip.setSelectedIndicatorColors(colors);
- }
-
- /**
- * Sets the colors to be used for tab dividers. These colors are treated as a circular array.
- * Providing one color will mean that all tabs are indicated with the same color.
- */
- public void setDividerColors(int... colors) {
- mTabStrip.setDividerColors(colors);
- }
-
- /**
- * Set the {@link android.support.v4.view.ViewPager.OnPageChangeListener}. When using {@link com.github.mobile.ui.SlidingTabLayout} you are
- * required to set any {@link android.support.v4.view.ViewPager.OnPageChangeListener} through this method. This is so
- * that the layout can update it's scroll position correctly.
- *
- * @see android.support.v4.view.ViewPager#setOnPageChangeListener(android.support.v4.view.ViewPager.OnPageChangeListener)
- */
- public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
- mViewPagerPageChangeListener = listener;
- }
-
- /**
- * Set the custom layout to be inflated for the tab views.
- *
- * @param layoutResId Layout id to be inflated
- * @param textViewId id of the {@link android.widget.TextView} in the inflated view
- */
- public void setCustomTabView(int layoutResId, int textViewId) {
- mTabViewLayoutId = layoutResId;
- mTabViewTextViewId = textViewId;
- }
-
- /**
- * Sets the associated view pager. Note that the assumption here is that the pager content
- * (number of tabs and tab titles) does not change after this call has been made.
- */
- public void setViewPager(ViewPager viewPager) {
- mTabStrip.removeAllViews();
-
- mViewPager = viewPager;
- if (viewPager != null) {
- viewPager.setOnPageChangeListener(new InternalViewPagerListener());
- populateTabStrip();
- }
- }
-
- /**
- * Create a default view to be used for tabs. This is called if a custom tab view is not set via
- * {@link #setCustomTabView(int, int)}.
- */
- protected TextView createDefaultTabView(Context context) {
- TextView textView = new TextView(context);
- textView.setGravity(Gravity.CENTER);
- textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP);
- textView.setTypeface(Typeface.DEFAULT_BOLD);
-
- TypedValue outValue = new TypedValue();
- getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground,
- outValue, true);
- textView.setBackgroundResource(outValue.resourceId);
- textView.setAllCaps(true);
-
- int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density);
- textView.setPadding(padding, padding, padding, padding);
-
- return textView;
- }
-
- private void populateTabStrip() {
- final PagerAdapter adapter = mViewPager.getAdapter();
- final OnClickListener tabClickListener = new TabClickListener();
-
- for (int i = 0; i < adapter.getCount(); i++) {
- View tabView = null;
- TextView tabTitleView = null;
-
- if (mTabViewLayoutId != 0) {
- // If there is a custom tab view layout id set, try and inflate it
- tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip,
- false);
- tabTitleView = (TextView) tabView.findViewById(mTabViewTextViewId);
- }
-
- if (tabView == null) {
- tabView = createDefaultTabView(getContext());
- }
-
- if (tabTitleView == null && TextView.class.isInstance(tabView)) {
- tabTitleView = (TextView) tabView;
- }
-
- tabTitleView.setText(adapter.getPageTitle(i));
- tabView.setOnClickListener(tabClickListener);
-
- mTabStrip.addView(tabView);
-
- if (i == mViewPager.getCurrentItem()) {
- tabView.setSelected(true);
- }
- }
-
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
-
- if (mViewPager != null) {
- scrollToTab(mViewPager.getCurrentItem(), 0);
- }
- }
-
- private void scrollToTab(int tabIndex, int positionOffset) {
- final int tabStripChildCount = mTabStrip.getChildCount();
- if (tabStripChildCount == 0 || tabIndex < 0 || tabIndex >= tabStripChildCount) {
- return;
- }
-
- View selectedChild = mTabStrip.getChildAt(tabIndex);
- if (selectedChild != null) {
- int targetScrollX = selectedChild.getLeft() + positionOffset;
-
- if (tabIndex > 0 || positionOffset > 0) {
- // If we're not at the first child and are mid-scroll, make sure we obey the offset
- targetScrollX -= mTitleOffset;
- }
-
- scrollTo(targetScrollX, 0);
- }
- }
-
- private class InternalViewPagerListener implements ViewPager.OnPageChangeListener {
- private int mScrollState;
-
- @Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
- int tabStripChildCount = mTabStrip.getChildCount();
- if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) {
- return;
- }
-
- mTabStrip.onViewPagerPageChanged(position, positionOffset);
-
- View selectedTitle = mTabStrip.getChildAt(position);
- int extraOffset = (selectedTitle != null)
- ? (int) (positionOffset * selectedTitle.getWidth())
- : 0;
- scrollToTab(position, extraOffset);
-
- if (mViewPagerPageChangeListener != null) {
- mViewPagerPageChangeListener.onPageScrolled(position, positionOffset,
- positionOffsetPixels);
- }
- }
-
- @Override
- public void onPageScrollStateChanged(int state) {
- mScrollState = state;
-
- if (mViewPagerPageChangeListener != null) {
- mViewPagerPageChangeListener.onPageScrollStateChanged(state);
- }
- }
-
- @Override
- public void onPageSelected(int position) {
- if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {
- mTabStrip.onViewPagerPageChanged(position, 0f);
- scrollToTab(position, 0);
- }
- for (int i = 0; i < mTabStrip.getChildCount(); i++) {
- mTabStrip.getChildAt(i).setSelected(position == i);
- }
- if (mViewPagerPageChangeListener != null) {
- mViewPagerPageChangeListener.onPageSelected(position);
- }
- }
-
- }
-
- private class TabClickListener implements OnClickListener {
- @Override
- public void onClick(View v) {
- for (int i = 0; i < mTabStrip.getChildCount(); i++) {
- if (v == mTabStrip.getChildAt(i)) {
- mViewPager.setCurrentItem(i);
- return;
- }
- }
- }
- }
-
-}
diff --git a/app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java b/app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java
deleted file mode 100644
index ed1aeac18..000000000
--- a/app/src/main/java/com/github/mobile/ui/SlidingTabStrip.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.github.mobile.ui;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.View;
-import android.widget.LinearLayout;
-
-class SlidingTabStrip extends LinearLayout {
-
- private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 0;
- private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26;
- private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 6;
- private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5;
-
- private static final int DEFAULT_DIVIDER_THICKNESS_DIPS = 1;
- private static final byte DEFAULT_DIVIDER_COLOR_ALPHA = 0x20;
- private static final float DEFAULT_DIVIDER_HEIGHT = 0.5f;
-
- private final int mBottomBorderThickness;
- private final Paint mBottomBorderPaint;
-
- private final int mSelectedIndicatorThickness;
- private final Paint mSelectedIndicatorPaint;
-
- private final int mDefaultBottomBorderColor;
-
- private final Paint mDividerPaint;
- private final float mDividerHeight;
-
- private int mSelectedPosition;
- private float mSelectionOffset;
-
- private SlidingTabLayout.TabColorizer mCustomTabColorizer;
- private final SimpleTabColorizer mDefaultTabColorizer;
-
- SlidingTabStrip(Context context) {
- this(context, null);
- }
-
- SlidingTabStrip(Context context, AttributeSet attrs) {
- super(context, attrs);
- setWillNotDraw(false);
-
- final float density = getResources().getDisplayMetrics().density;
-
- TypedValue outValue = new TypedValue();
- context.getTheme().resolveAttribute(android.R.attr.colorForeground, outValue, true);
- final int themeForegroundColor = outValue.data;
-
- mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor,
- DEFAULT_BOTTOM_BORDER_COLOR_ALPHA);
-
- mDefaultTabColorizer = new SimpleTabColorizer();
- mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR);
- mDefaultTabColorizer.setDividerColors(setColorAlpha(themeForegroundColor,
- DEFAULT_DIVIDER_COLOR_ALPHA));
-
- mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density);
- mBottomBorderPaint = new Paint();
- mBottomBorderPaint.setColor(mDefaultBottomBorderColor);
-
- mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density);
- mSelectedIndicatorPaint = new Paint();
-
- mDividerHeight = DEFAULT_DIVIDER_HEIGHT;
- mDividerPaint = new Paint();
- mDividerPaint.setStrokeWidth((int) (DEFAULT_DIVIDER_THICKNESS_DIPS * density));
- }
-
- void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) {
- mCustomTabColorizer = customTabColorizer;
- invalidate();
- }
-
- void setSelectedIndicatorColors(int... colors) {
- // Make sure that the custom colorizer is removed
- mCustomTabColorizer = null;
- mDefaultTabColorizer.setIndicatorColors(colors);
- invalidate();
- }
-
- void setDividerColors(int... colors) {
- // Make sure that the custom colorizer is removed
- mCustomTabColorizer = null;
- mDefaultTabColorizer.setDividerColors(colors);
- invalidate();
- }
-
- void onViewPagerPageChanged(int position, float positionOffset) {
- mSelectedPosition = position;
- mSelectionOffset = positionOffset;
- invalidate();
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- final int height = getHeight();
- final int childCount = getChildCount();
- final int dividerHeightPx = (int) (Math.min(Math.max(0f, mDividerHeight), 1f) * height);
- final SlidingTabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null
- ? mCustomTabColorizer
- : mDefaultTabColorizer;
-
- // Thick colored underline below the current selection
- if (childCount > 0) {
- View selectedTitle = getChildAt(mSelectedPosition);
- int left = selectedTitle.getLeft();
- int right = selectedTitle.getRight();
- int color = tabColorizer.getIndicatorColor(mSelectedPosition);
-
- if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) {
- int nextColor = tabColorizer.getIndicatorColor(mSelectedPosition + 1);
- if (color != nextColor) {
- color = blendColors(nextColor, color, mSelectionOffset);
- }
-
- // Draw the selection partway between the tabs
- View nextTitle = getChildAt(mSelectedPosition + 1);
- left = (int) (mSelectionOffset * nextTitle.getLeft() +
- (1.0f - mSelectionOffset) * left);
- right = (int) (mSelectionOffset * nextTitle.getRight() +
- (1.0f - mSelectionOffset) * right);
- }
-
- mSelectedIndicatorPaint.setColor(color);
-
- canvas.drawRect(left, height - mSelectedIndicatorThickness, right,
- height, mSelectedIndicatorPaint);
- }
-
- // Thin underline along the entire bottom edge
- canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint);
-
- // Vertical separators between the titles
- int separatorTop = (height - dividerHeightPx) / 2;
- for (int i = 0; i < childCount - 1; i++) {
- View child = getChildAt(i);
- mDividerPaint.setColor(tabColorizer.getDividerColor(i));
- canvas.drawLine(child.getRight(), separatorTop, child.getRight(),
- separatorTop + dividerHeightPx, mDividerPaint);
- }
- }
-
- /**
- * Set the alpha value of the {@code color} to be the given {@code alpha} value.
- */
- private static int setColorAlpha(int color, byte alpha) {
- return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
- }
-
- /**
- * Blend {@code color1} and {@code color2} using the given ratio.
- *
- * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend,
- * 0.0 will return {@code color2}.
- */
- private static int blendColors(int color1, int color2, float ratio) {
- final float inverseRation = 1f - ratio;
- float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation);
- float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation);
- float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation);
- return Color.rgb((int) r, (int) g, (int) b);
- }
-
- private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer {
- private int[] mIndicatorColors;
- private int[] mDividerColors;
-
- @Override
- public final int getIndicatorColor(int position) {
- return mIndicatorColors[position % mIndicatorColors.length];
- }
-
- @Override
- public final int getDividerColor(int position) {
- return mDividerColors[position % mDividerColors.length];
- }
-
- void setIndicatorColors(int... colors) {
- mIndicatorColors = colors;
- }
-
- void setDividerColors(int... colors) {
- mDividerColors = colors;
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java b/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
index 9ca4624ec..8f7ae7321 100644
--- a/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
+++ b/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
@@ -16,6 +16,7 @@
package com.github.mobile.ui;
import android.os.Bundle;
+import android.support.design.widget.TabLayout;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.widget.TabHost.OnTabChangeListener;
@@ -40,7 +41,7 @@ public abstract class TabPagerActivity
extends PagerFragment implements OnTabChangeListener, TabContentFactory {
@@ -25,7 +27,7 @@ public abstract class TabPagerFragment
-
-
-
-
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
+
+
+
+
+
+
@@ -52,5 +64,4 @@
style="@style/ListSpinner"
android:layout_centerInParent="true"
android:visibility="gone" />
-
-
\ No newline at end of file
+
\ No newline at end of file
From 25ce35719633430287046bbf5aa890ab97b5a772 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sat, 27 Jun 2015 21:28:25 +0200
Subject: [PATCH 035/561] Added the GitHub SDK by @alorma Updated the
authentication to the new system
---
app/build.gradle | 2 +
app/src/main/AndroidManifest.xml | 47 +-
.../github/mobile/accounts/LoginActivity.java | 445 +++++-------------
app/src/main/res/layout/login.xml | 74 +--
app/src/main/res/menu/login.xml | 1 -
app/src/main/res/values/config.xml | 14 +
app/src/main/res/values/strings.xml | 2 +
app/src/main/res/xml/authenticator.xml | 2 +-
build.gradle | 1 +
9 files changed, 185 insertions(+), 403 deletions(-)
create mode 100644 app/src/main/res/values/config.xml
diff --git a/app/build.gradle b/app/build.gradle
index 26a0aa212..f3a090f3e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -42,6 +42,8 @@ dependencies {
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
+
+ compile 'com.github.alorma:github-sdk:1.0.1@aar'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f89d56f60..332e14507 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,11 +24,13 @@
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@style/Theme.GitHub">
+
+
@@ -229,12 +231,17 @@
+ android:launchMode="singleInstance">
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
index cff4b0bcb..893382d92 100644
--- a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
@@ -15,76 +15,54 @@
*/
package com.github.mobile.accounts;
-import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
-import static android.accounts.AccountManager.KEY_ACCOUNT_TYPE;
-import static android.accounts.AccountManager.KEY_AUTHTOKEN;
-import static android.accounts.AccountManager.KEY_BOOLEAN_RESULT;
import static android.content.Intent.ACTION_VIEW;
import static android.content.Intent.CATEGORY_BROWSABLE;
-import static android.text.InputType.TYPE_CLASS_TEXT;
-import static android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD;
-import static android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
-import static android.view.KeyEvent.ACTION_DOWN;
-import static android.view.KeyEvent.KEYCODE_ENTER;
-import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
-import static com.github.mobile.RequestCodes.OTP_CODE_ENTER;
-import static com.github.mobile.accounts.AccountConstants.ACCOUNT_TYPE;
import static com.github.mobile.accounts.AccountConstants.PROVIDER_AUTHORITY;
-import static com.github.mobile.accounts.TwoFactorAuthActivity.PARAM_EXCEPTION;
-import static com.github.mobile.accounts.TwoFactorAuthClient.TWO_FACTOR_AUTH_TYPE_SMS;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
+import android.app.Application;
+import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnCancelListener;
import android.content.Intent;
+import android.content.pm.LabeledIntent;
+import android.content.pm.ResolveInfo;
+import android.net.Uri;
import android.os.Bundle;
-import android.text.Editable;
-import android.text.Html;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.text.method.LinkMovementMethod;
+import android.support.v7.widget.Toolbar;
import android.util.Log;
-import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnKeyListener;
-import android.widget.ArrayAdapter;
-import android.widget.AutoCompleteTextView;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-import android.widget.TextView;
-import android.widget.TextView.OnEditorActionListener;
-
-import com.github.kevinsawicki.wishlist.ViewFinder;
+import android.widget.Toast;
+
+import com.alorma.github.basesdk.ApiClient;
+import com.alorma.github.basesdk.client.BaseClient;
+import com.alorma.github.sdk.bean.dto.response.Token;
+import com.alorma.github.sdk.login.AccountsHelper;
+import com.alorma.github.sdk.security.GitHub;
+import com.alorma.github.sdk.services.login.RequestTokenClient;
+import com.alorma.github.sdk.services.user.GetAuthUserClient;
import com.github.mobile.R;
import com.github.mobile.persistence.AccountDataManager;
import com.github.mobile.ui.LightProgressDialog;
-import com.github.mobile.ui.TextWatcherAdapter;
+import com.github.mobile.ui.MainActivity;
import com.github.mobile.ui.roboactivities.RoboActionBarAccountAuthenticatorActivity;
-import com.github.mobile.util.ToastUtils;
import com.google.inject.Inject;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.client.GitHubClient;
-import org.eclipse.egit.github.core.service.OAuthService;
-import org.eclipse.egit.github.core.service.UserService;
-import roboguice.util.RoboAsyncTask;
+import retrofit.ErrorHandler;
+import retrofit.RetrofitError;
+import retrofit.client.Response;
/**
* Activity to login
*/
-public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity {
+public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity implements BaseClient.OnResultCallback {
/**
* Auth token type parameter
@@ -96,7 +74,7 @@ public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity {
*/
public static final String PARAM_USERNAME = "username";
- private static final String PARAM_CONFIRMCREDENTIALS = "confirmCredentials";
+ public static final String OAUTH_URL = "https://github.com/login/oauth/authorize";
private static final String TAG = "LoginActivity";
@@ -132,30 +110,15 @@ protected List run(Account account) throws Exception {
private AccountManager accountManager;
- private AutoCompleteTextView loginText;
+ private Account[] accounts;
- private EditText passwordText;
+ private String accessToken;
- private RoboAsyncTask authenticationTask;
+ private String scope;
- private String authTokenType;
+ private RequestTokenClient requestTokenClient;
- private MenuItem loginItem;
-
- /**
- * If set we are just checking that the user knows their credentials; this
- * doesn't cause the user's password to be changed on the device.
- */
- private Boolean confirmCredentials = false;
-
- private String password;
-
- /**
- * Was the original caller asking for an entirely new account?
- */
- protected boolean requestNewAccount = false;
-
- private String username;
+ private AlertDialog progressDialog;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -163,117 +126,59 @@ public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.login);
- setSupportActionBar((android.support.v7.widget.Toolbar) findViewById(R.id.toolbar));
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
accountManager = AccountManager.get(this);
- ViewFinder finder = new ViewFinder(this);
- loginText = finder.find(R.id.et_login);
- passwordText = finder.find(R.id.et_password);
-
- final Intent intent = getIntent();
- username = intent.getStringExtra(PARAM_USERNAME);
- authTokenType = intent.getStringExtra(PARAM_AUTHTOKEN_TYPE);
- requestNewAccount = username == null;
- confirmCredentials = intent.getBooleanExtra(PARAM_CONFIRMCREDENTIALS,
- false);
-
- TextView signupText = finder.find(R.id.tv_signup);
- signupText.setMovementMethod(LinkMovementMethod.getInstance());
- signupText.setText(Html.fromHtml(getString(R.string.signup_link)));
-
- if (!TextUtils.isEmpty(username)) {
- loginText.setText(username);
- loginText.setEnabled(false);
- loginText.setFocusable(false);
- }
-
- TextWatcher watcher = new TextWatcherAdapter() {
-
- @Override
- public void afterTextChanged(Editable gitDirEditText) {
- updateEnablement();
- }
- };
- loginText.addTextChangedListener(watcher);
- passwordText.addTextChangedListener(watcher);
-
- passwordText.setOnKeyListener(new OnKeyListener() {
-
- @Override
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- if (event != null && ACTION_DOWN == event.getAction()
- && keyCode == KEYCODE_ENTER && loginEnabled()) {
- handleLogin();
- return true;
- } else
- return false;
- }
- });
-
- passwordText.setOnEditorActionListener(new OnEditorActionListener() {
-
- @Override
- public boolean onEditorAction(TextView v, int actionId,
- KeyEvent event) {
- if (actionId == IME_ACTION_DONE && loginEnabled()) {
- handleLogin();
- return true;
- }
- return false;
- }
- });
-
- CheckBox showPassword = finder.find(R.id.cb_show_password);
- showPassword.setOnCheckedChangeListener(new OnCheckedChangeListener() {
-
- @Override
- public void onCheckedChanged(CompoundButton buttonView,
- boolean isChecked) {
- int type = TYPE_CLASS_TEXT;
- if (isChecked)
- type |= TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
- else
- type |= TYPE_TEXT_VARIATION_PASSWORD;
- int selection = passwordText.getSelectionStart();
- passwordText.setInputType(type);
- if (selection > 0)
- passwordText.setSelection(selection);
- }
- });
+ accounts = accountManager.getAccountsByType(getString(R.string.account_type));
- loginText.setAdapter(new ArrayAdapter<>(this,
- android.R.layout.simple_dropdown_item_1line,
- getEmailAddresses()));
+ if (accounts != null && accounts.length > 0)
+ openMain();
}
@Override
- protected void onResume() {
- super.onResume();
-
- // Finish task if valid account exists
- if (requestNewAccount) {
- Account existing = AccountUtils.getPasswordAccessibleAccount(this);
- if (existing != null && !TextUtils.isEmpty(existing.name)) {
- String password = AccountManager.get(this)
- .getPassword(existing);
- if (!TextUtils.isEmpty(password))
- finishLogin(existing.name, password);
+ protected void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ Uri uri = intent.getData();
+ if(uri != null && uri.getScheme().equals(getString(R.string.github_oauth_scheme))){
+ openLoadingDialog();
+ String code = uri.getQueryParameter("code");
+
+ if (requestTokenClient == null) {
+ requestTokenClient = new RequestTokenClient(LoginActivity.this, code);
+ requestTokenClient.setOnResultCallback(new BaseClient.OnResultCallback() {
+ @Override
+ public void onResponseOk(Token token, Response r) {
+ if (token.access_token != null) {
+ endAccess(token.access_token, token.scope);
+ } else if (token.error != null) {
+ Toast.makeText(LoginActivity.this, token.error, Toast.LENGTH_LONG).show();
+ progressDialog.dismiss();
+ }
+ }
+
+ @Override
+ public void onFail(RetrofitError error) {
+ error.printStackTrace();
+ }
+ });
+ requestTokenClient.execute();
}
- return;
}
-
- updateEnablement();
}
- private boolean loginEnabled() {
- return !TextUtils.isEmpty(loginText.getText())
- && !TextUtils.isEmpty(passwordText.getText());
+ private void openMain() {
+ progressDialog.dismiss();
+ Intent intent = new Intent(this, MainActivity.class);
+ startActivity(intent);
+ finish();
}
- private void updateEnablement() {
- if (loginItem != null)
- loginItem.setEnabled(loginEnabled());
+ private void openLoadingDialog() {
+ progressDialog = LightProgressDialog.create(this,
+ R.string.login_activity_authenticating);
+ progressDialog.show();
}
@Override
@@ -284,153 +189,41 @@ public void startActivity(Intent intent) {
super.startActivity(intent);
}
- /**
- * Authenticate login & password
- */
public void handleLogin() {
- if (requestNewAccount)
- username = loginText.getText().toString();
- password = passwordText.getText().toString();
-
- final AlertDialog dialog = LightProgressDialog.create(this,
- R.string.login_activity_authenticating);
- dialog.setCancelable(true);
- dialog.setOnCancelListener(new OnCancelListener() {
-
- @Override
- public void onCancel(DialogInterface dialog) {
- if (authenticationTask != null)
- authenticationTask.cancel(true);
- }
- });
- dialog.show();
-
- authenticationTask = new RoboAsyncTask(this) {
-
- @Override
- public User call() throws Exception {
- GitHubClient client = new TwoFactorAuthClient();
- client.setCredentials(username, password);
-
- User user;
- try {
- user = new UserService(client).getUser();
- } catch (TwoFactorAuthException e) {
- if (e.twoFactorAuthType == TWO_FACTOR_AUTH_TYPE_SMS)
- sendSmsOtpCode(new OAuthService(client));
- openTwoFactorAuthActivity();
-
- return null;
- }
-
- Account account = new Account(user.getLogin(), ACCOUNT_TYPE);
- if (requestNewAccount) {
- accountManager
- .addAccountExplicitly(account, password, null);
- configureSyncFor(account);
- try {
- new AccountLoader(LoginActivity.this).call();
- } catch (IOException e) {
- Log.d(TAG, "Exception loading organizations", e);
- }
- } else
- accountManager.setPassword(account, password);
+ openLoginInBrowser(new GitHub(this));
+ }
- return user;
- }
+ private void openLoginInBrowser(ApiClient client) {
+ String initialScope = "user,public_repo,repo,delete_repo,notifications,gist";
+ final String url = String.format("%s?client_id=%s&scope=%s",
+ OAUTH_URL, client.getApiClient(), initialScope);
- @Override
- protected void onException(Exception e) throws RuntimeException {
- dialog.dismiss();
+ final List browserList = getBrowserList();
- Log.d(TAG, "Exception requesting authenticated user", e);
- handleLoginException(e);
- }
+ final List intentList = new ArrayList<>();
- @Override
- public void onSuccess(User user) {
- dialog.dismiss();
-
- if (user != null)
- onAuthenticationResult(true);
- }
- };
- authenticationTask.execute();
- }
+ for (final ResolveInfo resolveInfo : browserList) {
+ final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ newIntent.setComponent(new ComponentName(resolveInfo.activityInfo.packageName,
+ resolveInfo.activityInfo.name));
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
-
- if (requestCode == OTP_CODE_ENTER) {
- switch (resultCode) {
- case RESULT_OK:
- onAuthenticationResult(true);
- break;
- case RESULT_CANCELED:
- Exception e = (Exception) data.getExtras().getSerializable(PARAM_EXCEPTION);
- handleLoginException(e);
- break;
- }
+ intentList.add(new LabeledIntent(newIntent,
+ resolveInfo.resolvePackageName,
+ resolveInfo.labelRes,
+ resolveInfo.icon));
}
- }
- /**
- * Called when response is received from the server for confirm credentials
- * request. See onAuthenticationResult(). Sets the
- * AccountAuthenticatorResult which is sent back to the caller.
- *
- * @param result
- */
- protected void finishConfirmCredentials(boolean result) {
- final Account account = new Account(username, ACCOUNT_TYPE);
- accountManager.setPassword(account, password);
-
- final Intent intent = new Intent();
- intent.putExtra(KEY_BOOLEAN_RESULT, result);
- setAccountAuthenticatorResult(intent.getExtras());
- setResult(RESULT_OK, intent);
- finish();
- }
+ final Intent chooser = Intent.createChooser(intentList.remove(0), "Choose your favorite browser");
+ LabeledIntent[] extraIntents = intentList.toArray( new LabeledIntent[ intentList.size() ]);
+ chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
- /**
- * Called when response is received from the server for authentication
- * request. See onAuthenticationResult(). Sets the
- * AccountAuthenticatorResult which is sent back to the caller. Also sets
- * the authToken in AccountManager for this account.
- *
- * @param username
- * @param password
- */
-
- protected void finishLogin(final String username, final String password) {
- final Intent intent = new Intent();
- intent.putExtra(KEY_ACCOUNT_NAME, username);
- intent.putExtra(KEY_ACCOUNT_TYPE, ACCOUNT_TYPE);
- if (ACCOUNT_TYPE.equals(authTokenType))
- intent.putExtra(KEY_AUTHTOKEN, password);
- setAccountAuthenticatorResult(intent.getExtras());
- setResult(RESULT_OK, intent);
- finish();
+ startActivity(chooser);
}
- /**
- * Called when the authentication process completes (see attemptLogin()).
- *
- * @param result
- */
- public void onAuthenticationResult(boolean result) {
- if (result) {
- if (!confirmCredentials)
- finishLogin(username, password);
- else
- finishConfirmCredentials(true);
- } else {
- if (requestNewAccount)
- ToastUtils.show(this, R.string.invalid_login_or_password);
- else
- ToastUtils.show(this, R.string.invalid_password);
- }
+ private List getBrowserList() {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://sometesturl.com"));
+
+ return getPackageManager().queryIntentActivities(intent, 0);
}
@Override
@@ -446,37 +239,43 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
@Override
- public boolean onCreateOptionsMenu(Menu optionMenu) {
- getMenuInflater().inflate(R.menu.login, optionMenu);
- loginItem = optionMenu.findItem(R.id.m_login);
- return true;
- }
+ public void onResponseOk(com.alorma.github.sdk.bean.dto.response.User user, Response r) {
+ Account account = new Account(user.login, getString(R.string.account_type));
+ Bundle userData = AccountsHelper.buildBundle(user.name, user.email, user.avatar_url, scope);
+ userData.putString(AccountManager.KEY_AUTHTOKEN, accessToken);
- private List getEmailAddresses() {
- final Account[] accounts = accountManager
- .getAccountsByType("com.google");
- final List addresses = new ArrayList<>(accounts.length);
- for (Account account : accounts)
- addresses.add(account.name);
- return addresses;
+ accountManager.addAccountExplicitly(account, null, userData);
+ accountManager.setAuthToken(account, getString(R.string.account_type), accessToken);
+
+ Bundle result = new Bundle();
+ result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
+ result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
+ result.putString(AccountManager.KEY_AUTHTOKEN, accessToken);
+
+ setAccountAuthenticatorResult(result);
+
+ openMain();
}
- private void sendSmsOtpCode(final OAuthService service) throws IOException {
- try {
- AccountAuthenticator.createAuthorization(service);
- } catch (TwoFactorAuthException ignored) {
- }
+ @Override
+ public void onFail(RetrofitError error) {
+ error.printStackTrace();
}
- private void openTwoFactorAuthActivity() {
- Intent intent = TwoFactorAuthActivity.createIntent(this, username, password);
- startActivityForResult(intent, OTP_CODE_ENTER);
+ private void endAccess(String accessToken, String scope) {
+ this.accessToken = accessToken;
+ this.scope = scope;
+
+ progressDialog.setMessage(getString(R.string.loading_user));
+
+ GetAuthUserClient userClient = new GetAuthUserClient(this, accessToken);
+ userClient.setOnResultCallback(this);
+ userClient.execute();
}
- private void handleLoginException(final Exception e) {
- if (AccountUtils.isUnauthorized(e))
- onAuthenticationResult(false);
- else
- ToastUtils.show(LoginActivity.this, e, R.string.code_authentication_failed);
+ @Override
+ public boolean onCreateOptionsMenu(Menu optionMenu) {
+ getMenuInflater().inflate(R.menu.login, optionMenu);
+ return true;
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/login.xml b/app/src/main/res/layout/login.xml
index 200e87897..34ed6b4d8 100644
--- a/app/src/main/res/layout/login.xml
+++ b/app/src/main/res/layout/login.xml
@@ -20,73 +20,19 @@
android:orientation="vertical">
+ android:background="?attr/colorPrimary"
+ android:id="@+id/toolbar" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:gravity="center_horizontal"
+ android:textColor="@color/primary_dark"
+ style="@style/TextAppearance.AppCompat.Subhead"
+ android:text="@string/temporary_login_message"/>
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/login.xml b/app/src/main/res/menu/login.xml
index 8eaf258cf..10431cadc 100644
--- a/app/src/main/res/menu/login.xml
+++ b/app/src/main/res/menu/login.xml
@@ -19,7 +19,6 @@
diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml
new file mode 100644
index 000000000..ba697a0c3
--- /dev/null
+++ b/app/src/main/res/values/config.xml
@@ -0,0 +1,14 @@
+
+
+ com.github
+
+
+
+
+
+
+
+
+ //The thing before the "://..." in github_oauth, used for identifying the intent call
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index afb0b9dbf..58bbbdc1b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -107,6 +107,7 @@
Clear History
Search history cleared
Logging in…
+ Loading user profile…
Creating Gist…
Create
Create Gist
@@ -301,5 +302,6 @@
and comments, and remove all collaborator associations.
Repository is deleted
Login or Email
+ Authenticating is now done through the website, press the log in button to continue.
diff --git a/app/src/main/res/xml/authenticator.xml b/app/src/main/res/xml/authenticator.xml
index 5d240a3c9..b88f3ed45 100644
--- a/app/src/main/res/xml/authenticator.xml
+++ b/app/src/main/res/xml/authenticator.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
diff --git a/build.gradle b/build.gradle
index 3ab7a44fb..1acd9436d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,6 +16,7 @@ allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://repo.eclipse.org/content/groups/releases" }
+ maven { url "http://dl.bintray.com/alorma/maven"}
jcenter()
}
}
From 498bc2dfd7d151fdfbbd527c91f5db4b50482191 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sun, 28 Jun 2015 08:40:21 +0200
Subject: [PATCH 036/561] Changed from string resource to BuildConfig (Add
values to github.properties)
---
.gitignore | 3 +++
app/build.gradle | 18 ++++++++++++++++--
.../github/mobile/accounts/LoginActivity.java | 15 +++++++++++----
app/src/main/res/values/config.xml | 10 ----------
4 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/.gitignore b/.gitignore
index eca7ba438..9ec56cba4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -127,3 +127,6 @@ tmp/
# TeXlipse plugin
.texlipse
+
+#GitHub application codes (local and personal)
+github.properties
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index f3a090f3e..00adf24a8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,6 +9,20 @@ android {
targetSdkVersion 22
versionCode 1900
versionName '1.9.0'
+
+ def Properties githubProps = new Properties()
+ githubProps.load(new FileInputStream(file('../github.properties')))
+
+ assert githubProps["GITHUB_SECRET"]
+ resValue "string", "github_secret", githubProps["GITHUB_SECRET"]
+
+ assert githubProps["GITHUB_CLIENT"]
+ resValue "string", "github_client", githubProps["GITHUB_CLIENT"]
+
+ assert githubProps["GITHUB_CALLBACK"]
+ def oauth = githubProps["GITHUB_CALLBACK"]
+ resValue "string", "github_oauth", oauth
+ resValue "string", "github_oauth_scheme", oauth.split("://")[0]
}
packagingOptions {
@@ -33,7 +47,7 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
- compile 'com.squareup.okhttp:okhttp:2.3.0'
+ compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
@@ -55,4 +69,4 @@ dependencies {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
index 893382d92..a6aedf0e7 100644
--- a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
@@ -49,6 +49,7 @@
import com.github.mobile.ui.MainActivity;
import com.github.mobile.ui.roboactivities.RoboActionBarAccountAuthenticatorActivity;
import com.google.inject.Inject;
+import com.squareup.okhttp.HttpUrl;
import java.util.ArrayList;
import java.util.List;
@@ -74,7 +75,7 @@ public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity imp
*/
public static final String PARAM_USERNAME = "username";
- public static final String OAUTH_URL = "https://github.com/login/oauth/authorize";
+ public static final String OAUTH_HOST = "www.github.com";
private static final String TAG = "LoginActivity";
@@ -195,15 +196,21 @@ public void handleLogin() {
private void openLoginInBrowser(ApiClient client) {
String initialScope = "user,public_repo,repo,delete_repo,notifications,gist";
- final String url = String.format("%s?client_id=%s&scope=%s",
- OAUTH_URL, client.getApiClient(), initialScope);
+ HttpUrl.Builder url = new HttpUrl.Builder()
+ .scheme("https")
+ .host(OAUTH_HOST)
+ .addPathSegment("login")
+ .addPathSegment("oauth")
+ .addPathSegment("authorize")
+ .addQueryParameter("client_id", client.getApiClient())
+ .addQueryParameter("scope", initialScope);
final List browserList = getBrowserList();
final List intentList = new ArrayList<>();
for (final ResolveInfo resolveInfo : browserList) {
- final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url.build().toString()));
newIntent.setComponent(new ComponentName(resolveInfo.activityInfo.packageName,
resolveInfo.activityInfo.name));
diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml
index ba697a0c3..9254e5569 100644
--- a/app/src/main/res/values/config.xml
+++ b/app/src/main/res/values/config.xml
@@ -1,14 +1,4 @@
com.github
-
-
-
-
-
-
-
-
- //The thing before the "://..." in github_oauth, used for identifying the intent call
-
\ No newline at end of file
From 7f9c5e23c7da6ca57e48095c4c4b8ca7f6dfc325 Mon Sep 17 00:00:00 2001
From: Yuliya-Kaleda
Date: Sun, 28 Jun 2015 19:59:23 -0400
Subject: [PATCH 037/561] log out in the navigation drawer
---
app/src/main/AndroidManifest.xml | 3 ++-
.../com/github/mobile/ui/MainActivity.java | 27 +++++++++++++++++++
.../mobile/ui/NavigationDrawerAdapter.java | 2 +-
.../mobile/ui/NavigationDrawerObject.java | 1 +
app/src/main/res/values/strings.xml | 1 +
app/src/main/res/values/typeface.xml | 1 +
6 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f89d56f60..b4d628c9f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -229,7 +229,8 @@
+ android:excludeFromRecents="true"
+ android:noHistory="true">
- Hesap & Kurumları Yükleme Başarısız Oldu
- Sorunları Yükleme Başarısız Oldu
- Depoları Yükleme Başarısız Oldu
- Depo Yükleme Başarısız Oldu
- Gist Yükleme Başarısız Oldu
- Haberleri Yükleme Başarısız Oldu
- Takipçileri Yükleme Başarısız Oldu
- Kişileri Yükleme Başarısız Oldu
- Kişiyi Yükleme Başarısız Oldu
- Gist İçeriği Yükleme Başarısız Oldu
- Gist\'leri Yükleme Başarısız Oldu
- Sorun Yükleme Başarısız Oldu
- Ortak Çalışanları Yükleme Başarısız Oldu
- Dönüm Noktalarını Yükleme Başarısız Oldu
- Etiketleri Yükleme Başarısız Oldu
- Yer İmlerini Yükleme Başarısız Oldu
- Üyeleri Yükleme Başarısız Oldu
- Onaylamaları Yükleme Başarısız Oldu
- Onaylamayı Yükleme Başarısız Oldu
- Dosya Yükleme Başarısız Oldu
- Kod Yükleme Başarısız Oldu
- Dalları & Etiketleri Yükleme Başarısız Oldu
- Takip Etme Başarısız Oldu
- Takip Etmeyi Bırakma Başarısız Oldu
- Takip Etme Kontrolü Başarısız Oldu
- Yıldız Koyma Başarısız Oldu
- Yıldızı Kaldırma Başarısız Oldu
- Yıldız Durumunu Kontrol Etme Başarısız Oldu
- Markdown dosyası render edilemdi
+ Hesap ve organizasyonlar yüklenemedi
+ Sorunlar yüklenemedi
+ Projeler yüklenemedi
+ Proje yüklenemedi
+ Destekçiler yüklenemedi
+ Gist yüklenemedi
+ Haberler yüklenemedi
+ Takipçiler yüklenemedi
+ Kişiler yüklenemedi
+ Kişi yüklenemedi
+ Gist dosya içeriği yüklenemedi
+ Gist\'ler yüklenemedi
+ Sorun yüklenemedi
+ Birlikte çalışılanlar yüklenemedi
+ Dönüm noktaları yüklenemedi
+ Etiketler yüklenemedi
+ Yer imleri yüklenemedi
+ Üyeler yüklenemedi
+ Gönderimler yüklenemedi
+ Gönderim yüklenemedi
+ Dosya yüklenemedi
+ Kod yüklenemedi
+ Etiket ve ayrımlar yüklenemedi
+ Takip etme başarısız
+ Takibi bırakma başarısız
+ Takip durumunu kontrolü başarısız
+ Favorilere ekleme başarısız
+ Favorilerden kaldırma başarısız
+ Kopyalama başarısız
+ Silme başarısız
+ Favorileme durumunu kontrol etme başarısız
+ Markdown görüntüleme başarısız
+ Kullanıcı arama başarısız
- Gist Yükleniyor…
- Rastgele Gist Yükleniyor…
- Daha Fazla Sorun Yükleniyor…
- Sorunlar Yükleniyor…
- Yorumlar Yükleniyor…
- Depolar Yükleniyor…
- Sorun Yükleniyor…
- Haberler Yükleniyor…
- Takipçiler Yükleniyor…
- Kişiler Yükleniyor…
- Gist\'ler Yükleniyor…
- Ortak Çalışanlar Yükleniyor…
- Dönüm Noktaları Yükleniyor…
- Etiketler Yükleniyor…
- Onaylamalar Yükleniyor…
- Dosya & Yorumlar Yükleniyor…
- Dallar & Etiketler Yükleniyor…
+ Gist yükleniyor…
+ Rastgele Gist yükleniyor…
+ Daha fazla sorun yükleniyor…
+ Sorunlar yükleniyor…
+ Yorumlar yükleniyor…
+ Projeler yükleniyor…
+ Sorun yükleniyor…
+ Haberler yükleniyor…
+ Takipçiler yükleniyor…
+ Kişiler yükleniyor…
+ Gist\'ler yükleniyor…
+ Birlikte çalışılanlar yükleniyor…
+ Dönüm noktaları yükleniyor…
+ Etiketler yükleniyor…
+ Gönderimler yükleniyor…
+ Dosyalar ve yorumlar yükleniyor…
+ Ayrımlar ve etiketler yükleniyor…
-
- Yer İmi Yok
- Depo Yok
- Sorun Yok
- Gist Yok
- KiÅŸi Yok
- Takipçi Yok
- Üye Yok
- Haber
- Onaylama Yok
+
+ Yer imi yok
+ Proje yok
+ Sorun yok
+ Gist yok
+ KiÅŸi yok
+ Takipçi yok
+ Üye yok
+ Haber yok
+ Gönderim yok
+
- Atanan Güncelleniyor…
- Sorun Güncelleniyor…
- Etiketler Güncelleniyor…
- Dönüm Noktası Güncelleniyor…
+ Atanan güncelleniyor…
+ Sorun güncelleniyor…
+ Etiketler güncelleniyor…
+ Dönüm noktası güncelleniyor…
GitHub
+ Ana sayfa
Haberler
Sorunlar
Gist\'ler
- Onaylamalar
- Depo Bul
+ Gönderimler
+ GitHub arama
+ Proje Bul
Sorun Bul
Ara…
Geçmişi Sil
Arama geçmişi silindi
- Giriş yapılıyor…
- Gist Oluşturuluyor…
+ Giriş yapılıyor …
+ Gist oluşturuluyor…
OluÅŸtur
Gist OluÅŸtur
- puts \'Merhaba Dünya!\'
+ \'Hello World!\' yazar
Bu Gist\'i herkese açık yap
- dosya.rb
+ file.rb
Gist
Yorumlar
Dosyalar
@@ -115,75 +121,89 @@
Dosya Adı
Dosya İçeriği
Yeni Gist
- Filtre
- Yer İmi
- Yorum
+ Filtrele
+ Yer imlerine ekle
+ Yorum yaz
Sil
+ SİL
Yenile
- Sorun Kontrol Paneli
- Yer İmleri
- Gist\'ler
+ Sorun Paneli
+ Yer imleri
+ Gist\’ler
Sorun #
Çekme Talebi #
Gist\u0020
Sorunları Filtrele
- Yorum OluÅŸtur
- Bir yorum gir
- Daha Fazla Göster…
- Depolar
+ Yorum yaz
+ Bir yorum yazın
+ Daha fazla…
+ Projeler
+ Katkı verenler
Sorunlar
- Etiketleri Düzenle
- Dönüm Noktası
+ Etiketleri düzenle
+ Dönüm Noktası:
Dönüm Noktası Düzenle
Atanan Düzenle
Tanım
Android Gist oluÅŸturdu
Başlık
Düzenle
- Gist Yıldızlanıyor…
- Gist\'in Yıldızı Kaldırılıyor…
+ Gist Favorilere Ekleniyor…
+ Gist Favorilerden Kaldırılıyor…
Hesaplar
- Atanmış Seç
+ Atanan Seç
Dönüm Noktası Seç
- Etiket Seç
- Bir Dal Veya Etiket Seç
- Dönüm Noktası Yok
- Kimse Atanmamış
- atanmış
- Hiç Gist bulunamadı
- Silmeyi Onayla
+ Etiketleri Seç
+ Etiket ya da Ayrım Seç
+ Onay kodu
+ Hesabınız için iki aşamalı onay etkinleştirildi. Kimliğinizi doğrulamak için onay kodunuzu giriniz.
+ Dönüm noktası yok
+ Kimse atanmadı
+ atandı
+ Gist bulunamadı
+ Silmeyi onayla
Bu Gist\'i silmek istediÄŸinizden emin misiniz?
Gist Siliniyor…
- Yorum Oluşturuluyor…
- Bu yer imini kaldırmak istediğinizden emin misiniz?
- Sorun Kontrol Paneli
+ Yorum oluşturuluyor…
+ Yorum düzenleniyor…
+ Yorum siliniyor…
+ Yorumu kaldır
+ ABu yorumu silmek istediÄŸinizden emin misiniz?
+ Bu yer imini silmek istediÄŸinizden emin misiniz?
+ Sorun Paneli
Yeni Sorun
Anonim
- Sorun filtresi yer imlerine kaydedildi
- Yakın Zamanda
+ Sorun filtresi yer imlerine eklendi
+ SON GÖRÜNTÜLENENLER
+ En Son
+ En Sonu Kaldır
+ Son görüntülenlerden kaldır
Durum:
Açık
- Kapanmış
- Şu Kişiye Atanmış :
- Herhangi Biri
+ Kapalı
+ Atandı:
+ Herhangi biri
Dönüm Noktası:
Hiç
Etiketler:
GiriÅŸ yap
- GitHub\'ın yenisi misin? <a href=\"https://github.com/join\">Buraya tıkla</a> kayıt olmak için
- GitHub\'a bağlanılamadı
+ GitHub\'a yeni misin? <a href=\"https://github.com/join\">Buraya tıkla</a> kayıt olmak için
+ Emin değil misin? <a href=\"https://help.github.com/articles/about-two-factor-authentication\">Yardım al.</a>
+ GitHub\’a bağlanılamadı
+ Onay başarısız. Hatalı kod
Lütfen geçerli bir kullanıcı adı & şifre girin
Lütfen geçerli bir şifre girin.
Åžifre
- Kullanıcı Adı veya Email
+ Kullanıcı adı veya eposta
Takipçiler
Takip Ettikleri
Takipçilerim
Takip Ettiklerim
Takip Et
Takip Etmeyi Bırak
- Yıldızla
- Yıldızı Kaldır
+ Favorilere ekle
+ Favorilerden çıkar
+ Kopyala
Üyeler
Sorun Kapatılıyor…
Sorun Tekrar Açılıyor…
@@ -193,6 +213,7 @@
güncellendi\u0020
açıldı\u0020
Temizle
+ Gönderimler: %d
Açık Sorunlar
Kapanmış Sorunlar
Yer İmini Kaldır
@@ -212,8 +233,8 @@
Tekrar Aç
Geçersiz GitHub URL\'i
Belirtilen URL bu uygulama ile açılamadı:\n{0}
- YAKIN ZAMANDA GÖRÜNTÜLENENLER
İptal
+ EMİN DEĞİLİM
Uygulama Çakışması
Kurulu olan başka bir uygulama GitHub kimlik doğrulaması için ayarlanmış.\n\nGitHub uygulamasının tekrar kullanılabilmesi için diğer uygulamayı Hesaplardan & eş zamanlama ayarlarından kaldırmanız gerekmekte.
Açılıyor {0}…
@@ -229,36 +250,56 @@
Sözcük Kaydır
Sözcük Kaydırmayı Kapat
Kod
- Takip Edilme İşlemi Devam Ediyor…
- Takip Edilme Kaldırılıyor…
- Yıldız Konuyor…
- Yıldız Kaldırılıyor…
- Yönlendiriliyor…
+ Takip ediliyor…
+ Takiptek çıkartılıyor…
+ Favorilere ekleniyor…
+ Favorilerden çıkartılıyor…
+ Kopyalanıyor…
+ Siliniyor…
+ Navigate to…
+ Ziyaret et %s
+ %d gönderim
- Depolar
- Haberler
- Takip Ettiklerim
- Takip Edenler
- Takip Ettikleri
- Takip Edenler
- Üyeler
- Kod
- Onaylamalar
- Durumlar
- İzlediklerim
- Atandıklarım
- Yaratılanlar
- Bahsedilenler
- Benim
- Yıldızladıklarım
- Hepsi
+ projeler
+ kullanıcılar
+ haberler
+ takip edilenler
+ takipçiler
+ takip edilenler
+ takipçiler
+ üyeler
+ kod
+ gönderim
+ sorunlar
+ izlenenler
+ atananlar
+ oluÅŸturuldu
+ bahsedildi
+ benim
+ favoriler
+ hepsi
PaylaÅŸ
- Şifre Göster
+ Şifreyi göster
Yaz
- Önizleme
- Ham markdown dosyasını göster
- Markdown dosyasını renderla
+ Önizle
+ Orjinal markdown göster
+ Markdown görüntüle
+ Hash\’i kopyala
+ Hafızaya kopyala
+
+
+ Navigasyon çekmecesini aç
+ Navigasyon çekmecesini kapat
+ Alt başlık
+
+
+ Kesinlikle emin misiniz?
+ Bu hareket geri ALINAMAZ.
+ Bu projeniz, wiki, sorunlar,
+ and yorumlar, ve tüm katkı sağlayanlar ile bağınızı silecek.
+ Proje silindi
+ GiriÅŸ ya da Eposta
From 84a3fd47eabe030fcf4d8fe788c83f216ea41f9b Mon Sep 17 00:00:00 2001
From: Daniel
Date: Wed, 1 Jul 2015 12:47:24 +0200
Subject: [PATCH 039/561] Renamed "item" to "position".
The naturalize tool detected that using "position" is more consistent
with the current codebase state:
* "position" in CommitPagerAdapter is 85,81% probable ("identitiy"
4,08%)
---
.../java/com/github/mobile/ui/commit/CommitPagerAdapter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java b/app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java
index 381655bf7..37d402b8d 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java
+++ b/app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java
@@ -48,9 +48,9 @@ public CommitPagerAdapter(ActionBarActivity activity,
}
@Override
- public Fragment getItem(final int item) {
+ public Fragment getItem(final int position) {
Bundle arguments = new Bundle();
- arguments.putString(EXTRA_BASE, ids[item].toString());
+ arguments.putString(EXTRA_BASE, ids[position].toString());
arguments.putSerializable(EXTRA_REPOSITORY, repository);
CommitDiffListFragment fragment = new CommitDiffListFragment();
fragment.setArguments(arguments);
From 2f4e15053e59fe81553071280b9c2e8c5df6cb2a Mon Sep 17 00:00:00 2001
From: Sigee
Date: Fri, 10 Jul 2015 13:11:40 +0200
Subject: [PATCH 040/561] Some hungarian translates.
---
app/src/main/res/values-hu/strings.xml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 0d369a9e4..c0c4dc785 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -215,5 +215,20 @@
{0} commit összehasonlÃtása
Sortörés engedélyezése
Sortörés tiltása
+ Főoldal
+ Felhasynálónév vagy E-mail cÃm
+ HÃrek
+ Tárolók
+ Felhasználók
+ Követők
+ Kód
+ Minden
+ Csillagozottak
+ Tagok
+ Követés
+ Követett felhasználók
+ Teljesen biztos vagy benne?
+ Kód
+ Hash másolása
From a7401e5091c06c68fae499ea1972b40143c66fa9 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sat, 11 Jul 2015 14:20:36 +0200
Subject: [PATCH 041/561] Added log message if build value is not found Moved
from browser to WebView for authentication Added disclaimer for third-party
restrictions Updated two libs (It changes nothing)
---
app/build.gradle | 35 ++++++----
app/src/main/AndroidManifest.xml | 2 +
.../github/mobile/accounts/LoginActivity.java | 67 ++++++-------------
.../mobile/accounts/LoginWebViewActivity.java | 36 ++++++++++
app/src/main/res/layout/login.xml | 4 +-
app/src/main/res/values/strings.xml | 7 +-
6 files changed, 91 insertions(+), 60 deletions(-)
create mode 100644 app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
diff --git a/app/build.gradle b/app/build.gradle
index 00adf24a8..0ac8207b0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
+
defaultConfig {
applicationId 'com.github.mobile'
minSdkVersion 15
@@ -11,18 +12,17 @@ android {
versionName '1.9.0'
def Properties githubProps = new Properties()
- githubProps.load(new FileInputStream(file('../github.properties')))
-
- assert githubProps["GITHUB_SECRET"]
- resValue "string", "github_secret", githubProps["GITHUB_SECRET"]
+ if(file('../github.properties').exists()) {
+ githubProps.load(new FileInputStream(file('../github.properties')))
- assert githubProps["GITHUB_CLIENT"]
- resValue "string", "github_client", githubProps["GITHUB_CLIENT"]
+ resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
+ resValue "string", "github_client", getValue(githubProps, "GITHUB_CLIENT")
- assert githubProps["GITHUB_CALLBACK"]
- def oauth = githubProps["GITHUB_CALLBACK"]
- resValue "string", "github_oauth", oauth
- resValue "string", "github_oauth_scheme", oauth.split("://")[0]
+ def oauth = getValue(githubProps, "GITHUB_CALLBACK")
+ resValue "string", "github_oauth", oauth
+ resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : oauth
+ } else
+ logger.log(LogLevel.ERROR, "github.properties can not be found, please add it to the project root")
}
packagingOptions {
@@ -43,16 +43,27 @@ repositories {
}
}
+def getValue(def props, def name){
+ if(props[name])
+ return props[name]
+ else if(System.getenv(name))
+ return System.getenv(name)
+ else {
+ logger.log(LogLevel.ERROR, name + " has not been provided, add it to your github.properties file")
+ return "DEFAULT"
+ }
+}
+
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:22.0.0'
+ compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:3.7.0.201502260915-r'
- compile 'com.android.support:support-v4:22.0.0'
+ compile 'com.android.support:support-v4:22.2.0'
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 332e14507..1c344f94f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -346,6 +346,8 @@
+
+
() {
@Override
public void onResponseOk(Token token, Response r) {
if (token.access_token != null) {
- endAccess(token.access_token, token.scope);
+ endAuth(token.access_token, token.scope);
} else if (token.error != null) {
Toast.makeText(LoginActivity.this, token.error, Toast.LENGTH_LONG).show();
progressDialog.dismiss();
@@ -170,7 +169,8 @@ public void onFail(RetrofitError error) {
}
private void openMain() {
- progressDialog.dismiss();
+ if(progressDialog != null)
+ progressDialog.dismiss();
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
@@ -182,14 +182,6 @@ private void openLoadingDialog() {
progressDialog.show();
}
- @Override
- public void startActivity(Intent intent) {
- if (intent != null && ACTION_VIEW.equals(intent.getAction()))
- intent.addCategory(CATEGORY_BROWSABLE);
-
- super.startActivity(intent);
- }
-
public void handleLogin() {
openLoginInBrowser(new GitHub(this));
}
@@ -205,32 +197,16 @@ private void openLoginInBrowser(ApiClient client) {
.addQueryParameter("client_id", client.getApiClient())
.addQueryParameter("scope", initialScope);
- final List browserList = getBrowserList();
-
- final List intentList = new ArrayList<>();
-
- for (final ResolveInfo resolveInfo : browserList) {
- final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url.build().toString()));
- newIntent.setComponent(new ComponentName(resolveInfo.activityInfo.packageName,
- resolveInfo.activityInfo.name));
-
- intentList.add(new LabeledIntent(newIntent,
- resolveInfo.resolvePackageName,
- resolveInfo.labelRes,
- resolveInfo.icon));
- }
-
- final Intent chooser = Intent.createChooser(intentList.remove(0), "Choose your favorite browser");
- LabeledIntent[] extraIntents = intentList.toArray( new LabeledIntent[ intentList.size() ]);
- chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
-
- startActivity(chooser);
+ Intent intent = new Intent(this, LoginWebViewActivity.class);
+ intent.putExtra(INTENT_EXTRA_URL, url.toString());
+ startActivityForResult(intent, WEBVIEW_REQUEST_CODE);
}
- private List getBrowserList() {
- Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://sometesturl.com"));
-
- return getPackageManager().queryIntentActivities(intent, 0);
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if(requestCode == WEBVIEW_REQUEST_CODE && resultCode == RESULT_OK)
+ onUserLoggedIn(data.getData());
}
@Override
@@ -242,7 +218,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
default:
return super.onOptionsItemSelected(item);
}
-
}
@Override
@@ -269,7 +244,7 @@ public void onFail(RetrofitError error) {
error.printStackTrace();
}
- private void endAccess(String accessToken, String scope) {
+ private void endAuth(String accessToken, String scope) {
this.accessToken = accessToken;
this.scope = scope;
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java b/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
new file mode 100644
index 000000000..ec37c98f1
--- /dev/null
+++ b/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
@@ -0,0 +1,36 @@
+package com.github.mobile.accounts;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.webkit.WebViewClient;
+
+import com.github.mobile.R;
+import com.github.mobile.ui.WebView;
+
+public class LoginWebViewActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ WebView webView = new WebView(this);
+ webView.loadUrl(getIntent().getStringExtra(LoginActivity.INTENT_EXTRA_URL));
+ webView.setWebViewClient(new WebViewClient() {
+ @Override
+ public boolean shouldOverrideUrlLoading(android.webkit.WebView view, String url) {
+ Uri uri = Uri.parse(url);
+ if (uri.getScheme().equals(getString(R.string.github_oauth_scheme))) {
+ Intent data = new Intent();
+ data.setData(uri);
+ setResult(RESULT_OK, data);
+ finish();
+ return true;
+ }
+ return super.shouldOverrideUrlLoading(view, url);
+ }
+ });
+
+ setContentView(webView);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/login.xml b/app/src/main/res/layout/login.xml
index 34ed6b4d8..f92600280 100644
--- a/app/src/main/res/layout/login.xml
+++ b/app/src/main/res/layout/login.xml
@@ -34,5 +34,7 @@
android:gravity="center_horizontal"
android:textColor="@color/primary_dark"
style="@style/TextAppearance.AppCompat.Subhead"
- android:text="@string/temporary_login_message"/>
+ android:text="@string/temporary_login_message"
+ android:linksClickable="true"
+ android:autoLink="web"/>
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 58bbbdc1b..4afe9492b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -302,6 +302,11 @@
and comments, and remove all collaborator associations.
Repository is deleted
Login or Email
- Authenticating is now done through the website, press the log in button to continue.
+
+ Authenticating is now done through the website,
+ press the log in button to continue.
+ \n\n Since GitHub has added third-party restrictions we are unable to write
+ to certain organizations. You can read more here:\n
+ https://help.github.com/articles/about-third-party-application-restrictions/
From 275e563360d1f22d76c66eecd8aeab697a130fae Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sat, 27 Jun 2015 21:28:25 +0200
Subject: [PATCH 042/561] Added the GitHub SDK by @alorma Updated the
authentication to the new system
---
app/build.gradle | 2 +
app/src/main/AndroidManifest.xml | 47 +-
.../github/mobile/accounts/LoginActivity.java | 445 +++++-------------
app/src/main/res/layout/login.xml | 74 +--
app/src/main/res/menu/login.xml | 1 -
app/src/main/res/values/config.xml | 14 +
app/src/main/res/values/strings.xml | 2 +
app/src/main/res/xml/authenticator.xml | 2 +-
build.gradle | 1 +
9 files changed, 185 insertions(+), 403 deletions(-)
create mode 100644 app/src/main/res/values/config.xml
diff --git a/app/build.gradle b/app/build.gradle
index f3c9762f6..f2313ffa5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -42,6 +42,8 @@ dependencies {
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
+
+ compile 'com.github.alorma:github-sdk:1.0.1@aar'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f89d56f60..332e14507 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,11 +24,13 @@
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@style/Theme.GitHub">
+
+
@@ -229,12 +231,17 @@
+ android:launchMode="singleInstance">
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
index cff4b0bcb..893382d92 100644
--- a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
@@ -15,76 +15,54 @@
*/
package com.github.mobile.accounts;
-import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
-import static android.accounts.AccountManager.KEY_ACCOUNT_TYPE;
-import static android.accounts.AccountManager.KEY_AUTHTOKEN;
-import static android.accounts.AccountManager.KEY_BOOLEAN_RESULT;
import static android.content.Intent.ACTION_VIEW;
import static android.content.Intent.CATEGORY_BROWSABLE;
-import static android.text.InputType.TYPE_CLASS_TEXT;
-import static android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD;
-import static android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
-import static android.view.KeyEvent.ACTION_DOWN;
-import static android.view.KeyEvent.KEYCODE_ENTER;
-import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
-import static com.github.mobile.RequestCodes.OTP_CODE_ENTER;
-import static com.github.mobile.accounts.AccountConstants.ACCOUNT_TYPE;
import static com.github.mobile.accounts.AccountConstants.PROVIDER_AUTHORITY;
-import static com.github.mobile.accounts.TwoFactorAuthActivity.PARAM_EXCEPTION;
-import static com.github.mobile.accounts.TwoFactorAuthClient.TWO_FACTOR_AUTH_TYPE_SMS;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
+import android.app.Application;
+import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnCancelListener;
import android.content.Intent;
+import android.content.pm.LabeledIntent;
+import android.content.pm.ResolveInfo;
+import android.net.Uri;
import android.os.Bundle;
-import android.text.Editable;
-import android.text.Html;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.text.method.LinkMovementMethod;
+import android.support.v7.widget.Toolbar;
import android.util.Log;
-import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnKeyListener;
-import android.widget.ArrayAdapter;
-import android.widget.AutoCompleteTextView;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
-import android.widget.EditText;
-import android.widget.TextView;
-import android.widget.TextView.OnEditorActionListener;
-
-import com.github.kevinsawicki.wishlist.ViewFinder;
+import android.widget.Toast;
+
+import com.alorma.github.basesdk.ApiClient;
+import com.alorma.github.basesdk.client.BaseClient;
+import com.alorma.github.sdk.bean.dto.response.Token;
+import com.alorma.github.sdk.login.AccountsHelper;
+import com.alorma.github.sdk.security.GitHub;
+import com.alorma.github.sdk.services.login.RequestTokenClient;
+import com.alorma.github.sdk.services.user.GetAuthUserClient;
import com.github.mobile.R;
import com.github.mobile.persistence.AccountDataManager;
import com.github.mobile.ui.LightProgressDialog;
-import com.github.mobile.ui.TextWatcherAdapter;
+import com.github.mobile.ui.MainActivity;
import com.github.mobile.ui.roboactivities.RoboActionBarAccountAuthenticatorActivity;
-import com.github.mobile.util.ToastUtils;
import com.google.inject.Inject;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.client.GitHubClient;
-import org.eclipse.egit.github.core.service.OAuthService;
-import org.eclipse.egit.github.core.service.UserService;
-import roboguice.util.RoboAsyncTask;
+import retrofit.ErrorHandler;
+import retrofit.RetrofitError;
+import retrofit.client.Response;
/**
* Activity to login
*/
-public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity {
+public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity implements BaseClient.OnResultCallback {
/**
* Auth token type parameter
@@ -96,7 +74,7 @@ public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity {
*/
public static final String PARAM_USERNAME = "username";
- private static final String PARAM_CONFIRMCREDENTIALS = "confirmCredentials";
+ public static final String OAUTH_URL = "https://github.com/login/oauth/authorize";
private static final String TAG = "LoginActivity";
@@ -132,30 +110,15 @@ protected List run(Account account) throws Exception {
private AccountManager accountManager;
- private AutoCompleteTextView loginText;
+ private Account[] accounts;
- private EditText passwordText;
+ private String accessToken;
- private RoboAsyncTask authenticationTask;
+ private String scope;
- private String authTokenType;
+ private RequestTokenClient requestTokenClient;
- private MenuItem loginItem;
-
- /**
- * If set we are just checking that the user knows their credentials; this
- * doesn't cause the user's password to be changed on the device.
- */
- private Boolean confirmCredentials = false;
-
- private String password;
-
- /**
- * Was the original caller asking for an entirely new account?
- */
- protected boolean requestNewAccount = false;
-
- private String username;
+ private AlertDialog progressDialog;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -163,117 +126,59 @@ public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.login);
- setSupportActionBar((android.support.v7.widget.Toolbar) findViewById(R.id.toolbar));
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
accountManager = AccountManager.get(this);
- ViewFinder finder = new ViewFinder(this);
- loginText = finder.find(R.id.et_login);
- passwordText = finder.find(R.id.et_password);
-
- final Intent intent = getIntent();
- username = intent.getStringExtra(PARAM_USERNAME);
- authTokenType = intent.getStringExtra(PARAM_AUTHTOKEN_TYPE);
- requestNewAccount = username == null;
- confirmCredentials = intent.getBooleanExtra(PARAM_CONFIRMCREDENTIALS,
- false);
-
- TextView signupText = finder.find(R.id.tv_signup);
- signupText.setMovementMethod(LinkMovementMethod.getInstance());
- signupText.setText(Html.fromHtml(getString(R.string.signup_link)));
-
- if (!TextUtils.isEmpty(username)) {
- loginText.setText(username);
- loginText.setEnabled(false);
- loginText.setFocusable(false);
- }
-
- TextWatcher watcher = new TextWatcherAdapter() {
-
- @Override
- public void afterTextChanged(Editable gitDirEditText) {
- updateEnablement();
- }
- };
- loginText.addTextChangedListener(watcher);
- passwordText.addTextChangedListener(watcher);
-
- passwordText.setOnKeyListener(new OnKeyListener() {
-
- @Override
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- if (event != null && ACTION_DOWN == event.getAction()
- && keyCode == KEYCODE_ENTER && loginEnabled()) {
- handleLogin();
- return true;
- } else
- return false;
- }
- });
-
- passwordText.setOnEditorActionListener(new OnEditorActionListener() {
-
- @Override
- public boolean onEditorAction(TextView v, int actionId,
- KeyEvent event) {
- if (actionId == IME_ACTION_DONE && loginEnabled()) {
- handleLogin();
- return true;
- }
- return false;
- }
- });
-
- CheckBox showPassword = finder.find(R.id.cb_show_password);
- showPassword.setOnCheckedChangeListener(new OnCheckedChangeListener() {
-
- @Override
- public void onCheckedChanged(CompoundButton buttonView,
- boolean isChecked) {
- int type = TYPE_CLASS_TEXT;
- if (isChecked)
- type |= TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
- else
- type |= TYPE_TEXT_VARIATION_PASSWORD;
- int selection = passwordText.getSelectionStart();
- passwordText.setInputType(type);
- if (selection > 0)
- passwordText.setSelection(selection);
- }
- });
+ accounts = accountManager.getAccountsByType(getString(R.string.account_type));
- loginText.setAdapter(new ArrayAdapter<>(this,
- android.R.layout.simple_dropdown_item_1line,
- getEmailAddresses()));
+ if (accounts != null && accounts.length > 0)
+ openMain();
}
@Override
- protected void onResume() {
- super.onResume();
-
- // Finish task if valid account exists
- if (requestNewAccount) {
- Account existing = AccountUtils.getPasswordAccessibleAccount(this);
- if (existing != null && !TextUtils.isEmpty(existing.name)) {
- String password = AccountManager.get(this)
- .getPassword(existing);
- if (!TextUtils.isEmpty(password))
- finishLogin(existing.name, password);
+ protected void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ Uri uri = intent.getData();
+ if(uri != null && uri.getScheme().equals(getString(R.string.github_oauth_scheme))){
+ openLoadingDialog();
+ String code = uri.getQueryParameter("code");
+
+ if (requestTokenClient == null) {
+ requestTokenClient = new RequestTokenClient(LoginActivity.this, code);
+ requestTokenClient.setOnResultCallback(new BaseClient.OnResultCallback() {
+ @Override
+ public void onResponseOk(Token token, Response r) {
+ if (token.access_token != null) {
+ endAccess(token.access_token, token.scope);
+ } else if (token.error != null) {
+ Toast.makeText(LoginActivity.this, token.error, Toast.LENGTH_LONG).show();
+ progressDialog.dismiss();
+ }
+ }
+
+ @Override
+ public void onFail(RetrofitError error) {
+ error.printStackTrace();
+ }
+ });
+ requestTokenClient.execute();
}
- return;
}
-
- updateEnablement();
}
- private boolean loginEnabled() {
- return !TextUtils.isEmpty(loginText.getText())
- && !TextUtils.isEmpty(passwordText.getText());
+ private void openMain() {
+ progressDialog.dismiss();
+ Intent intent = new Intent(this, MainActivity.class);
+ startActivity(intent);
+ finish();
}
- private void updateEnablement() {
- if (loginItem != null)
- loginItem.setEnabled(loginEnabled());
+ private void openLoadingDialog() {
+ progressDialog = LightProgressDialog.create(this,
+ R.string.login_activity_authenticating);
+ progressDialog.show();
}
@Override
@@ -284,153 +189,41 @@ public void startActivity(Intent intent) {
super.startActivity(intent);
}
- /**
- * Authenticate login & password
- */
public void handleLogin() {
- if (requestNewAccount)
- username = loginText.getText().toString();
- password = passwordText.getText().toString();
-
- final AlertDialog dialog = LightProgressDialog.create(this,
- R.string.login_activity_authenticating);
- dialog.setCancelable(true);
- dialog.setOnCancelListener(new OnCancelListener() {
-
- @Override
- public void onCancel(DialogInterface dialog) {
- if (authenticationTask != null)
- authenticationTask.cancel(true);
- }
- });
- dialog.show();
-
- authenticationTask = new RoboAsyncTask(this) {
-
- @Override
- public User call() throws Exception {
- GitHubClient client = new TwoFactorAuthClient();
- client.setCredentials(username, password);
-
- User user;
- try {
- user = new UserService(client).getUser();
- } catch (TwoFactorAuthException e) {
- if (e.twoFactorAuthType == TWO_FACTOR_AUTH_TYPE_SMS)
- sendSmsOtpCode(new OAuthService(client));
- openTwoFactorAuthActivity();
-
- return null;
- }
-
- Account account = new Account(user.getLogin(), ACCOUNT_TYPE);
- if (requestNewAccount) {
- accountManager
- .addAccountExplicitly(account, password, null);
- configureSyncFor(account);
- try {
- new AccountLoader(LoginActivity.this).call();
- } catch (IOException e) {
- Log.d(TAG, "Exception loading organizations", e);
- }
- } else
- accountManager.setPassword(account, password);
+ openLoginInBrowser(new GitHub(this));
+ }
- return user;
- }
+ private void openLoginInBrowser(ApiClient client) {
+ String initialScope = "user,public_repo,repo,delete_repo,notifications,gist";
+ final String url = String.format("%s?client_id=%s&scope=%s",
+ OAUTH_URL, client.getApiClient(), initialScope);
- @Override
- protected void onException(Exception e) throws RuntimeException {
- dialog.dismiss();
+ final List browserList = getBrowserList();
- Log.d(TAG, "Exception requesting authenticated user", e);
- handleLoginException(e);
- }
+ final List intentList = new ArrayList<>();
- @Override
- public void onSuccess(User user) {
- dialog.dismiss();
-
- if (user != null)
- onAuthenticationResult(true);
- }
- };
- authenticationTask.execute();
- }
+ for (final ResolveInfo resolveInfo : browserList) {
+ final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ newIntent.setComponent(new ComponentName(resolveInfo.activityInfo.packageName,
+ resolveInfo.activityInfo.name));
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
-
- if (requestCode == OTP_CODE_ENTER) {
- switch (resultCode) {
- case RESULT_OK:
- onAuthenticationResult(true);
- break;
- case RESULT_CANCELED:
- Exception e = (Exception) data.getExtras().getSerializable(PARAM_EXCEPTION);
- handleLoginException(e);
- break;
- }
+ intentList.add(new LabeledIntent(newIntent,
+ resolveInfo.resolvePackageName,
+ resolveInfo.labelRes,
+ resolveInfo.icon));
}
- }
- /**
- * Called when response is received from the server for confirm credentials
- * request. See onAuthenticationResult(). Sets the
- * AccountAuthenticatorResult which is sent back to the caller.
- *
- * @param result
- */
- protected void finishConfirmCredentials(boolean result) {
- final Account account = new Account(username, ACCOUNT_TYPE);
- accountManager.setPassword(account, password);
-
- final Intent intent = new Intent();
- intent.putExtra(KEY_BOOLEAN_RESULT, result);
- setAccountAuthenticatorResult(intent.getExtras());
- setResult(RESULT_OK, intent);
- finish();
- }
+ final Intent chooser = Intent.createChooser(intentList.remove(0), "Choose your favorite browser");
+ LabeledIntent[] extraIntents = intentList.toArray( new LabeledIntent[ intentList.size() ]);
+ chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
- /**
- * Called when response is received from the server for authentication
- * request. See onAuthenticationResult(). Sets the
- * AccountAuthenticatorResult which is sent back to the caller. Also sets
- * the authToken in AccountManager for this account.
- *
- * @param username
- * @param password
- */
-
- protected void finishLogin(final String username, final String password) {
- final Intent intent = new Intent();
- intent.putExtra(KEY_ACCOUNT_NAME, username);
- intent.putExtra(KEY_ACCOUNT_TYPE, ACCOUNT_TYPE);
- if (ACCOUNT_TYPE.equals(authTokenType))
- intent.putExtra(KEY_AUTHTOKEN, password);
- setAccountAuthenticatorResult(intent.getExtras());
- setResult(RESULT_OK, intent);
- finish();
+ startActivity(chooser);
}
- /**
- * Called when the authentication process completes (see attemptLogin()).
- *
- * @param result
- */
- public void onAuthenticationResult(boolean result) {
- if (result) {
- if (!confirmCredentials)
- finishLogin(username, password);
- else
- finishConfirmCredentials(true);
- } else {
- if (requestNewAccount)
- ToastUtils.show(this, R.string.invalid_login_or_password);
- else
- ToastUtils.show(this, R.string.invalid_password);
- }
+ private List getBrowserList() {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://sometesturl.com"));
+
+ return getPackageManager().queryIntentActivities(intent, 0);
}
@Override
@@ -446,37 +239,43 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
@Override
- public boolean onCreateOptionsMenu(Menu optionMenu) {
- getMenuInflater().inflate(R.menu.login, optionMenu);
- loginItem = optionMenu.findItem(R.id.m_login);
- return true;
- }
+ public void onResponseOk(com.alorma.github.sdk.bean.dto.response.User user, Response r) {
+ Account account = new Account(user.login, getString(R.string.account_type));
+ Bundle userData = AccountsHelper.buildBundle(user.name, user.email, user.avatar_url, scope);
+ userData.putString(AccountManager.KEY_AUTHTOKEN, accessToken);
- private List getEmailAddresses() {
- final Account[] accounts = accountManager
- .getAccountsByType("com.google");
- final List addresses = new ArrayList<>(accounts.length);
- for (Account account : accounts)
- addresses.add(account.name);
- return addresses;
+ accountManager.addAccountExplicitly(account, null, userData);
+ accountManager.setAuthToken(account, getString(R.string.account_type), accessToken);
+
+ Bundle result = new Bundle();
+ result.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
+ result.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
+ result.putString(AccountManager.KEY_AUTHTOKEN, accessToken);
+
+ setAccountAuthenticatorResult(result);
+
+ openMain();
}
- private void sendSmsOtpCode(final OAuthService service) throws IOException {
- try {
- AccountAuthenticator.createAuthorization(service);
- } catch (TwoFactorAuthException ignored) {
- }
+ @Override
+ public void onFail(RetrofitError error) {
+ error.printStackTrace();
}
- private void openTwoFactorAuthActivity() {
- Intent intent = TwoFactorAuthActivity.createIntent(this, username, password);
- startActivityForResult(intent, OTP_CODE_ENTER);
+ private void endAccess(String accessToken, String scope) {
+ this.accessToken = accessToken;
+ this.scope = scope;
+
+ progressDialog.setMessage(getString(R.string.loading_user));
+
+ GetAuthUserClient userClient = new GetAuthUserClient(this, accessToken);
+ userClient.setOnResultCallback(this);
+ userClient.execute();
}
- private void handleLoginException(final Exception e) {
- if (AccountUtils.isUnauthorized(e))
- onAuthenticationResult(false);
- else
- ToastUtils.show(LoginActivity.this, e, R.string.code_authentication_failed);
+ @Override
+ public boolean onCreateOptionsMenu(Menu optionMenu) {
+ getMenuInflater().inflate(R.menu.login, optionMenu);
+ return true;
}
-}
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/login.xml b/app/src/main/res/layout/login.xml
index 200e87897..34ed6b4d8 100644
--- a/app/src/main/res/layout/login.xml
+++ b/app/src/main/res/layout/login.xml
@@ -20,73 +20,19 @@
android:orientation="vertical">
+ android:background="?attr/colorPrimary"
+ android:id="@+id/toolbar" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:gravity="center_horizontal"
+ android:textColor="@color/primary_dark"
+ style="@style/TextAppearance.AppCompat.Subhead"
+ android:text="@string/temporary_login_message"/>
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/login.xml b/app/src/main/res/menu/login.xml
index 8eaf258cf..10431cadc 100644
--- a/app/src/main/res/menu/login.xml
+++ b/app/src/main/res/menu/login.xml
@@ -19,7 +19,6 @@
diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml
new file mode 100644
index 000000000..ba697a0c3
--- /dev/null
+++ b/app/src/main/res/values/config.xml
@@ -0,0 +1,14 @@
+
+
+ com.github
+
+
+
+
+
+
+
+
+ //The thing before the "://..." in github_oauth, used for identifying the intent call
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index afb0b9dbf..58bbbdc1b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -107,6 +107,7 @@
Clear History
Search history cleared
Logging in…
+ Loading user profile…
Creating Gist…
Create
Create Gist
@@ -301,5 +302,6 @@
and comments, and remove all collaborator associations.
Repository is deleted
Login or Email
+ Authenticating is now done through the website, press the log in button to continue.
diff --git a/app/src/main/res/xml/authenticator.xml b/app/src/main/res/xml/authenticator.xml
index 5d240a3c9..b88f3ed45 100644
--- a/app/src/main/res/xml/authenticator.xml
+++ b/app/src/main/res/xml/authenticator.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
diff --git a/build.gradle b/build.gradle
index 3ab7a44fb..1acd9436d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,6 +16,7 @@ allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://repo.eclipse.org/content/groups/releases" }
+ maven { url "http://dl.bintray.com/alorma/maven"}
jcenter()
}
}
From 17f19f4971207f2872895ffde63080c55e93bd47 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sun, 28 Jun 2015 08:40:21 +0200
Subject: [PATCH 043/561] Changed from string resource to BuildConfig (Add
values to github.properties)
---
.gitignore | 3 +++
app/build.gradle | 16 +++++++++++++++-
.../github/mobile/accounts/LoginActivity.java | 15 +++++++++++----
app/src/main/res/values/config.xml | 10 ----------
4 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/.gitignore b/.gitignore
index eca7ba438..9ec56cba4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -127,3 +127,6 @@ tmp/
# TeXlipse plugin
.texlipse
+
+#GitHub application codes (local and personal)
+github.properties
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index f2313ffa5..b6ab33596 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,6 +9,20 @@ android {
targetSdkVersion 22
versionCode 1900
versionName '1.9.0'
+
+ def Properties githubProps = new Properties()
+ githubProps.load(new FileInputStream(file('../github.properties')))
+
+ assert githubProps["GITHUB_SECRET"]
+ resValue "string", "github_secret", githubProps["GITHUB_SECRET"]
+
+ assert githubProps["GITHUB_CLIENT"]
+ resValue "string", "github_client", githubProps["GITHUB_CLIENT"]
+
+ assert githubProps["GITHUB_CALLBACK"]
+ def oauth = githubProps["GITHUB_CALLBACK"]
+ resValue "string", "github_oauth", oauth
+ resValue "string", "github_oauth_scheme", oauth.split("://")[0]
}
packagingOptions {
@@ -33,7 +47,7 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
- compile 'com.squareup.okhttp:okhttp:2.3.0'
+ compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
index 893382d92..a6aedf0e7 100644
--- a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
@@ -49,6 +49,7 @@
import com.github.mobile.ui.MainActivity;
import com.github.mobile.ui.roboactivities.RoboActionBarAccountAuthenticatorActivity;
import com.google.inject.Inject;
+import com.squareup.okhttp.HttpUrl;
import java.util.ArrayList;
import java.util.List;
@@ -74,7 +75,7 @@ public class LoginActivity extends RoboActionBarAccountAuthenticatorActivity imp
*/
public static final String PARAM_USERNAME = "username";
- public static final String OAUTH_URL = "https://github.com/login/oauth/authorize";
+ public static final String OAUTH_HOST = "www.github.com";
private static final String TAG = "LoginActivity";
@@ -195,15 +196,21 @@ public void handleLogin() {
private void openLoginInBrowser(ApiClient client) {
String initialScope = "user,public_repo,repo,delete_repo,notifications,gist";
- final String url = String.format("%s?client_id=%s&scope=%s",
- OAUTH_URL, client.getApiClient(), initialScope);
+ HttpUrl.Builder url = new HttpUrl.Builder()
+ .scheme("https")
+ .host(OAUTH_HOST)
+ .addPathSegment("login")
+ .addPathSegment("oauth")
+ .addPathSegment("authorize")
+ .addQueryParameter("client_id", client.getApiClient())
+ .addQueryParameter("scope", initialScope);
final List browserList = getBrowserList();
final List intentList = new ArrayList<>();
for (final ResolveInfo resolveInfo : browserList) {
- final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url.build().toString()));
newIntent.setComponent(new ComponentName(resolveInfo.activityInfo.packageName,
resolveInfo.activityInfo.name));
diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml
index ba697a0c3..9254e5569 100644
--- a/app/src/main/res/values/config.xml
+++ b/app/src/main/res/values/config.xml
@@ -1,14 +1,4 @@
com.github
-
-
-
-
-
-
-
-
- //The thing before the "://..." in github_oauth, used for identifying the intent call
-
\ No newline at end of file
From 6fee9008ab913f27b3da77b02c69e68b7a6bf61b Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sat, 11 Jul 2015 14:20:36 +0200
Subject: [PATCH 044/561] Added log message if build value is not found Moved
from browser to WebView for authentication Added disclaimer for third-party
restrictions Updated two libs (It changes nothing)
---
app/build.gradle | 35 ++++++----
app/src/main/AndroidManifest.xml | 2 +
.../github/mobile/accounts/LoginActivity.java | 67 ++++++-------------
.../mobile/accounts/LoginWebViewActivity.java | 36 ++++++++++
app/src/main/res/layout/login.xml | 4 +-
app/src/main/res/values/strings.xml | 7 +-
6 files changed, 91 insertions(+), 60 deletions(-)
create mode 100644 app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
diff --git a/app/build.gradle b/app/build.gradle
index b6ab33596..03dd65a4a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
+
defaultConfig {
applicationId 'com.github.mobile'
minSdkVersion 15
@@ -11,18 +12,17 @@ android {
versionName '1.9.0'
def Properties githubProps = new Properties()
- githubProps.load(new FileInputStream(file('../github.properties')))
-
- assert githubProps["GITHUB_SECRET"]
- resValue "string", "github_secret", githubProps["GITHUB_SECRET"]
+ if(file('../github.properties').exists()) {
+ githubProps.load(new FileInputStream(file('../github.properties')))
- assert githubProps["GITHUB_CLIENT"]
- resValue "string", "github_client", githubProps["GITHUB_CLIENT"]
+ resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
+ resValue "string", "github_client", getValue(githubProps, "GITHUB_CLIENT")
- assert githubProps["GITHUB_CALLBACK"]
- def oauth = githubProps["GITHUB_CALLBACK"]
- resValue "string", "github_oauth", oauth
- resValue "string", "github_oauth_scheme", oauth.split("://")[0]
+ def oauth = getValue(githubProps, "GITHUB_CALLBACK")
+ resValue "string", "github_oauth", oauth
+ resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : oauth
+ } else
+ logger.log(LogLevel.ERROR, "github.properties can not be found, please add it to the project root")
}
packagingOptions {
@@ -43,16 +43,27 @@ repositories {
}
}
+def getValue(def props, def name){
+ if(props[name])
+ return props[name]
+ else if(System.getenv(name))
+ return System.getenv(name)
+ else {
+ logger.log(LogLevel.ERROR, name + " has not been provided, add it to your github.properties file")
+ return "DEFAULT"
+ }
+}
+
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:22.0.0'
+ compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:3.7.0.201502260915-r'
- compile 'com.android.support:support-v4:22.0.0'
+ compile 'com.android.support:support-v4:22.2.0'
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 332e14507..1c344f94f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -346,6 +346,8 @@
+
+
() {
@Override
public void onResponseOk(Token token, Response r) {
if (token.access_token != null) {
- endAccess(token.access_token, token.scope);
+ endAuth(token.access_token, token.scope);
} else if (token.error != null) {
Toast.makeText(LoginActivity.this, token.error, Toast.LENGTH_LONG).show();
progressDialog.dismiss();
@@ -170,7 +169,8 @@ public void onFail(RetrofitError error) {
}
private void openMain() {
- progressDialog.dismiss();
+ if(progressDialog != null)
+ progressDialog.dismiss();
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
@@ -182,14 +182,6 @@ private void openLoadingDialog() {
progressDialog.show();
}
- @Override
- public void startActivity(Intent intent) {
- if (intent != null && ACTION_VIEW.equals(intent.getAction()))
- intent.addCategory(CATEGORY_BROWSABLE);
-
- super.startActivity(intent);
- }
-
public void handleLogin() {
openLoginInBrowser(new GitHub(this));
}
@@ -205,32 +197,16 @@ private void openLoginInBrowser(ApiClient client) {
.addQueryParameter("client_id", client.getApiClient())
.addQueryParameter("scope", initialScope);
- final List browserList = getBrowserList();
-
- final List intentList = new ArrayList<>();
-
- for (final ResolveInfo resolveInfo : browserList) {
- final Intent newIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url.build().toString()));
- newIntent.setComponent(new ComponentName(resolveInfo.activityInfo.packageName,
- resolveInfo.activityInfo.name));
-
- intentList.add(new LabeledIntent(newIntent,
- resolveInfo.resolvePackageName,
- resolveInfo.labelRes,
- resolveInfo.icon));
- }
-
- final Intent chooser = Intent.createChooser(intentList.remove(0), "Choose your favorite browser");
- LabeledIntent[] extraIntents = intentList.toArray( new LabeledIntent[ intentList.size() ]);
- chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
-
- startActivity(chooser);
+ Intent intent = new Intent(this, LoginWebViewActivity.class);
+ intent.putExtra(INTENT_EXTRA_URL, url.toString());
+ startActivityForResult(intent, WEBVIEW_REQUEST_CODE);
}
- private List getBrowserList() {
- Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://sometesturl.com"));
-
- return getPackageManager().queryIntentActivities(intent, 0);
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if(requestCode == WEBVIEW_REQUEST_CODE && resultCode == RESULT_OK)
+ onUserLoggedIn(data.getData());
}
@Override
@@ -242,7 +218,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
default:
return super.onOptionsItemSelected(item);
}
-
}
@Override
@@ -269,7 +244,7 @@ public void onFail(RetrofitError error) {
error.printStackTrace();
}
- private void endAccess(String accessToken, String scope) {
+ private void endAuth(String accessToken, String scope) {
this.accessToken = accessToken;
this.scope = scope;
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java b/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
new file mode 100644
index 000000000..ec37c98f1
--- /dev/null
+++ b/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
@@ -0,0 +1,36 @@
+package com.github.mobile.accounts;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.webkit.WebViewClient;
+
+import com.github.mobile.R;
+import com.github.mobile.ui.WebView;
+
+public class LoginWebViewActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ WebView webView = new WebView(this);
+ webView.loadUrl(getIntent().getStringExtra(LoginActivity.INTENT_EXTRA_URL));
+ webView.setWebViewClient(new WebViewClient() {
+ @Override
+ public boolean shouldOverrideUrlLoading(android.webkit.WebView view, String url) {
+ Uri uri = Uri.parse(url);
+ if (uri.getScheme().equals(getString(R.string.github_oauth_scheme))) {
+ Intent data = new Intent();
+ data.setData(uri);
+ setResult(RESULT_OK, data);
+ finish();
+ return true;
+ }
+ return super.shouldOverrideUrlLoading(view, url);
+ }
+ });
+
+ setContentView(webView);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/login.xml b/app/src/main/res/layout/login.xml
index 34ed6b4d8..f92600280 100644
--- a/app/src/main/res/layout/login.xml
+++ b/app/src/main/res/layout/login.xml
@@ -34,5 +34,7 @@
android:gravity="center_horizontal"
android:textColor="@color/primary_dark"
style="@style/TextAppearance.AppCompat.Subhead"
- android:text="@string/temporary_login_message"/>
+ android:text="@string/temporary_login_message"
+ android:linksClickable="true"
+ android:autoLink="web"/>
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 58bbbdc1b..4afe9492b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -302,6 +302,11 @@
and comments, and remove all collaborator associations.
Repository is deleted
Login or Email
- Authenticating is now done through the website, press the log in button to continue.
+
+ Authenticating is now done through the website,
+ press the log in button to continue.
+ \n\n Since GitHub has added third-party restrictions we are unable to write
+ to certain organizations. You can read more here:\n
+ https://help.github.com/articles/about-third-party-application-restrictions/
From 9caf6b5913db7c45d2b1efbf169f98aeae05a150 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sat, 11 Jul 2015 15:43:59 +0200
Subject: [PATCH 045/561] Fixed merge fail...
---
app/build.gradle | 5 ++---
build.gradle | 1 -
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index aec3820af..e83304840 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -68,7 +68,7 @@ dependencies {
exclude group: 'com.google.inject'
}
- compile 'com.github.alorma:github-sdk:1.0.1@aar'
+ compile 'com.github.alorma:github-sdk:1.0.1'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
@@ -82,5 +82,4 @@ dependencies {
}
compile 'com.android.support:design:22.2.0'
-}
-}}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 1acd9436d..3ab7a44fb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,7 +16,6 @@ allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://repo.eclipse.org/content/groups/releases" }
- maven { url "http://dl.bintray.com/alorma/maven"}
jcenter()
}
}
From e5b509aa8fbd006f38e0ca0ed401db20b609099b Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sat, 11 Jul 2015 16:23:55 +0200
Subject: [PATCH 046/561] Value were not added if github.properties was missing
---
app/build.gradle | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index e83304840..5c06f90a8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,17 +12,17 @@ android {
versionName '1.9.0'
def Properties githubProps = new Properties()
- if(file('../github.properties').exists()) {
+ if(file('../github.properties').exists())
githubProps.load(new FileInputStream(file('../github.properties')))
+ else
+ logger.log(LogLevel.ERROR, "github.properties can not be found, please add it to the project root")
resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
resValue "string", "github_client", getValue(githubProps, "GITHUB_CLIENT")
def oauth = getValue(githubProps, "GITHUB_CALLBACK")
resValue "string", "github_oauth", oauth
- resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : oauth
- } else
- logger.log(LogLevel.ERROR, "github.properties can not be found, please add it to the project root")
+ resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : "DEFAULT"
}
packagingOptions {
@@ -44,7 +44,7 @@ repositories {
}
def getValue(def props, def name){
- if(props[name])
+ if(props && props[name])
return props[name]
else if(System.getenv(name))
return System.getenv(name)
From be28e75ec0fa15da22f538421663fd9bf329af37 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Sun, 12 Jul 2015 01:51:18 -0700
Subject: [PATCH 047/561] Fix tabs being fixed size
---
app/src/main/res/layout/pager_with_tabs.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/layout/pager_with_tabs.xml b/app/src/main/res/layout/pager_with_tabs.xml
index 146317c75..4821b9f92 100644
--- a/app/src/main/res/layout/pager_with_tabs.xml
+++ b/app/src/main/res/layout/pager_with_tabs.xml
@@ -40,6 +40,7 @@
android:layout_below="@id/toolbar"
android:id="@+id/sliding_tabs_layout"
app:tabIndicatorColor="@android:color/white"
+ app:tabMode="scrollable"
android:background="@color/primary"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
From ab1a627c974d687eb5ba5a9b5baae2486d744343 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Sun, 12 Jul 2015 02:16:51 -0700
Subject: [PATCH 048/561] Update README, remove CHANGELOG, and add CONTRIBUTING
Changelog is tedious to keep up to date, easier to just use the releases tab of the repo and point people to that
---
CHANGELOG.md | 31 ------------------------
CONTRIBUTING.md | 29 +++++++++++++++++++++++
README.md | 63 +++++++++++++++++++------------------------------
3 files changed, 53 insertions(+), 70 deletions(-)
delete mode 100644 CHANGELOG.md
create mode 100644 CONTRIBUTING.md
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 96d754b14..000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Change Log
-All notable changes to this project will be documented in this file.
-This project is meant to be a continuation of now discontinued GitHub Android v1.9.0 by GitHub
-
-## [Unreleased][unreleased]
-
-### Added
-- Implement Material Design
-- Fork a repo
-- Delete a repo
-- Copy commit's hash
-- Fast-scroll during code view
-- Include detail information in issues
-- Base for API migration from Egit (using Retrofit)
-
-### Updated
-- Use Gradle as the main build tool instead of Maven
-- GitHub's link handling
-- Translations
-- Code highlighting (C/C++ header, Scala/Sbt)
-
-### Fixed
-- Issue dashboard can't be seen by project maintainer
-- Frequent crashes due to memory leak in image loading
-- Duplicated issues when searching
-- Garbled Chinese characters in markdown
-
-## [1.9.0] - 2014-02-21
-
-[unreleased]: https://github.com/forkhubs/android/compare/1.9.0...HEAD
-[1.9.0]: https://github.com/forkhubs/android/releases/tag/1.9.0
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..d5703fd86
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,29 @@
+Contributing
+============
+
+## ALL pull requests
+
+Please include a descriptive title and description. If you changed anything with the UI, please include screenshots of how
+it looks. Use descriptive messages for your commits, and be sure to explain the *why* for commits where appropriate.
+
+Please **don't** squash all your commits into one before opening the PR. Commits are easier to review when they're split up and in the
+order they happened. Of course, do squash smaller commits together as needed to ensure a clean history.
+
+If you open a pull request, you are responsible for engaging with us in the review and discussion afterward. If you don't respond
+to comments after opening, we will probably just close it.
+
+## Translations
+
+Always welcome, but please be prepared to have someone else that speaks if available to review it. Chances are that we cannot
+review it ourselves, for obvious reasons.
+
+## Bugfixes for existing issues
+
+Always welcome. Please reference the issue number you're addressing in the PR, and let us know in the issue tracker if
+you're working on it.
+
+## New features, UI changes, and infrastructure changes
+
+Please make sure you discuss these with us in the issue tracker before opening a pull request. It's good to get a conversation
+going first to make sure that everyone is on the same page, and this way you don't accidentally invest a lot of time into
+something we don't want to merge. That said, we're always open to these, so please don't hesitate to start the discussion!
\ No newline at end of file
diff --git a/README.md b/README.md
index 7dbcceda4..90651842b 100644
--- a/README.md
+++ b/README.md
@@ -2,55 +2,40 @@
This repository contains the source code for the GitHub Android app.
-[](https://play.google.com/store/apps/details?id=com.github.mobile)
+## What's going on here?
+> What happened to the old app?
-Please see the [issues](https://github.com/forkhubs/android/issues) section to
-report any bugs or feature requests and to see the list of known issues.
+GitHub didn't want to maintain the app anymore, so it's been released to the community and maintained as a public project.
+We are actively working towards a re-release to the Play Store, and this app will be the spiritual successor to the original
+GitHub app.
-## License
-
-* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
-
-## Building
-
-### With Gradle
-
-The easiest way to build is to install [Android Studio](https://developer.android.com/sdk/index.html) v1.+.
-Once installed, then you can import the project into Android Studio:
+> What about the other forks out there?
-1. Open `File`
-2. Import Project
-3. Select `build.gradle` under the project directory
-4. Click `OK`
+They'll remain forks. Obviously we'd prefer them to focus on improving this project, but otherwise we're not in coordinating
+anything with them.
-Then, Gradle will do everything for you.
+> What's the immediate plan?
-You might find that your device doesn't let you install your build if you
-already have the version from Google Play installed. This is standard
-Android security as it it won't let you directly replace an app that's been
-signed with a different key. Manually uninstall GitHub from your device and
-you will then be able to install your own built version.
+We're shooting for an initial re-release just to get the app out there. There have been a significant number of changes
+since the app was last updated, with many functional and design changes that we need to make sure are good to go.
-## Acknowledgements
+> What's the less-immediate plan?
-This project uses the [GitHub Java API](https://github.com/eclipse/egit-github/tree/master/org.eclipse.egit.github.core)
-built on top of [API v3](http://developer.github.com/).
+After the initial release, we'll start working on giving this app a proper refresh. Much of the UI has already been touched
+up with elements of Material Design, but we have a long ways to go. Android has changed a lot since this was actively developed,
+and it's time we take advantage of those changes.
-It also uses many other open source libraries such as:
+> How can I help?
-* [CodeMirror](https://github.com/codemirror/CodeMirror)
-* [RoboGuice](https://github.com/roboguice/roboguice)
-* [ViewPagerIndicator](https://github.com/JakeWharton/Android-ViewPagerIndicator)
-
-These are just a few of the major dependencies, the entire list of dependencies
-is listed in the [app's build.gradle file](https://github.com/forkhubs/android/blob/master/app/build.gradle).
+Please see the [issues](https://github.com/forkhubs/android/issues) section to report any bugs or feature requests and
+to see the list of known issues. We can't promise fast response times since we all have full time jobs of our own, but we
+will do our best to respond in a timely fashion. If you'd like to contribute, please fork this repository and contribute back using
+[pull requests](https://github.com/forkhubs/android/pulls).
-## Contributing
+Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests
+are welcomed and appreciated but will be thoroughly reviewed and discussed. **Please read `CONTRIBUTING.md` first!**
-Please fork this repository and contribute back using
-[pull requests](https://github.com/forkhubs/android/pulls).
+## License
-Any contributions, large or small, major features, bug fixes, additional
-language translations, unit/integration tests are welcomed and appreciated
-but will be thoroughly reviewed and discussed.
+* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
\ No newline at end of file
From c53eeabd2d3f5e7e6482afd55eca04f883c87033 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sun, 12 Jul 2015 19:56:54 +0200
Subject: [PATCH 049/561] Temp fix for weird AppLayout bug
---
.../ui/PatchedScrollingViewBehavior.java | 59 +++++++++++++++++++
app/src/main/res/layout/pager_with_tabs.xml | 3 +-
2 files changed, 60 insertions(+), 2 deletions(-)
create mode 100644 app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java
diff --git a/app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java b/app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java
new file mode 100644
index 000000000..25e8e0588
--- /dev/null
+++ b/app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java
@@ -0,0 +1,59 @@
+package com.github.mobile.ui;
+
+import android.content.Context;
+import android.support.design.widget.AppBarLayout;
+import android.support.design.widget.CoordinatorLayout;
+import android.support.v4.view.ViewCompat;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+
+import java.util.List;
+
+public class PatchedScrollingViewBehavior extends AppBarLayout.ScrollingViewBehavior {
+
+ public PatchedScrollingViewBehavior() {
+ super();
+ }
+
+ public PatchedScrollingViewBehavior(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public boolean onMeasureChild(CoordinatorLayout parent, View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed) {
+ if(child.getLayoutParams().height == -1) {
+ List dependencies = parent.getDependencies(child);
+ if(dependencies.isEmpty())
+ return false;
+
+ AppBarLayout appBar = findFirstAppBarLayout(dependencies);
+ if(appBar != null && ViewCompat.isLaidOut(appBar)) {
+ if(ViewCompat.getFitsSystemWindows(appBar))
+ ViewCompat.setFitsSystemWindows(child, true);
+
+ int parentHeight = View.MeasureSpec.getSize(parentHeightMeasureSpec);
+ int height = parentHeight - appBar.getMeasuredHeight();
+ int heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY);
+ parent.onMeasureChild(child, parentWidthMeasureSpec, widthUsed, heightMeasureSpec, heightUsed);
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+
+ private static AppBarLayout findFirstAppBarLayout(List views) {
+ int i = 0;
+
+ for(int z = views.size(); i < z; ++i) {
+ View view = views.get(i);
+ if(view instanceof AppBarLayout) {
+ return (AppBarLayout)view;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/app/src/main/res/layout/pager_with_tabs.xml b/app/src/main/res/layout/pager_with_tabs.xml
index 4821b9f92..90f1e9f3a 100644
--- a/app/src/main/res/layout/pager_with_tabs.xml
+++ b/app/src/main/res/layout/pager_with_tabs.xml
@@ -49,8 +49,7 @@
From 6e92590c5b6c837b29148423d7254b9e00443282 Mon Sep 17 00:00:00 2001
From: Sigee
Date: Mon, 13 Jul 2015 09:41:25 +0200
Subject: [PATCH 050/561] FIX a typo.
---
app/src/main/res/values-hu/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index c0c4dc785..6011e30c1 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -216,7 +216,7 @@
Sortörés engedélyezése
Sortörés tiltása
Főoldal
- Felhasynálónév vagy E-mail cÃm
+ Felhasználónév vagy e-mail cÃm
HÃrek
Tárolók
Felhasználók
From 51a2a67e47fac0ef196cac49982086d157b77e94 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Sat, 25 Jul 2015 15:23:51 -0700
Subject: [PATCH 051/561] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d5703fd86..1565f5238 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,12 @@
Contributing
============
+## Reporting issues
+
+* Make sure there's not already an issue (open or closed) regarding your issue.
+* Include detailed information and steps to reproduce. Any issues opened with no description will be ignored.
+* Include a screenshot(s) of the issue. Brownie points for a screen recording of the issue.
+
## ALL pull requests
Please include a descriptive title and description. If you changed anything with the UI, please include screenshots of how
From 735ac8c79e08eb6d336ef49ca8fad5f7e8f6b728 Mon Sep 17 00:00:00 2001
From: <>
Date: Mon, 27 Jul 2015 09:00:59 +0200
Subject: [PATCH 052/561] Added installation to README
---
README.md | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/README.md b/README.md
index 90651842b..0ec1000d0 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,19 @@ will do our best to respond in a timely fashion. If you'd like to contribute, p
Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests
are welcomed and appreciated but will be thoroughly reviewed and discussed. **Please read `CONTRIBUTING.md` first!**
+## Install
+
+1. Create a github application (https://github.com/settings/applications/new)
+2. Create a github.properties in the root folder of the repo
+3. Add these three value too the github.properties
+
+```
+GITHUB_CLIENT=your_application_client_id
+GITHUB_SECRET=your_application_client_secret
+GITHUB_CALLBACK=your_callback_url
+```
+(The callback url needs to be in the format "your_schema://whatever_you_want")
+
## License
* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
\ No newline at end of file
From 1dd5fa5d55770c8de44e5de28c26a47023715077 Mon Sep 17 00:00:00 2001
From: fadils
Date: Mon, 27 Jul 2015 15:17:13 +0700
Subject: [PATCH 053/561] Update Travis badge
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 90651842b..01028c81c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# GitHub Android App [](https://travis-ci.org/forkhubs/android)
+# GitHub Android App [](https://travis-ci.org/pockethub/PocketHub)
This repository contains the source code for the GitHub Android app.
From da406be69faff6ddfb9ad346694eeedd13d2f307 Mon Sep 17 00:00:00 2001
From: Henrik Olsson
Date: Mon, 27 Jul 2015 14:29:37 +0200
Subject: [PATCH 054/561] Changed title
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 0ec1000d0..2db847620 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ will do our best to respond in a timely fashion. If you'd like to contribute, p
Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests
are welcomed and appreciated but will be thoroughly reviewed and discussed. **Please read `CONTRIBUTING.md` first!**
-## Install
+## Setup Environment
1. Create a github application (https://github.com/settings/applications/new)
2. Create a github.properties in the root folder of the repo
@@ -51,4 +51,4 @@ GITHUB_CALLBACK=your_callback_url
## License
-* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
\ No newline at end of file
+* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
From a58ff8c559a316eed3cf5df45cc304dab3986d97 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Mon, 27 Jul 2015 21:59:32 -0700
Subject: [PATCH 055/561] README updates
---
README.md | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index d13e89096..6e8b70268 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
-# GitHub Android App [](https://travis-ci.org/pockethub/PocketHub)
+# PocketHub [](https://travis-ci.org/pockethub/PocketHub)
-This repository contains the source code for the GitHub Android app.
+This repository contains the source code for the PocketHub Android app.
+
+This is the *same* repository as the now-defunct official GitHub Android app.
## What's going on here?
@@ -28,10 +30,10 @@ and it's time we take advantage of those changes.
> How can I help?
-Please see the [issues](https://github.com/forkhubs/android/issues) section to report any bugs or feature requests and
+Please see the [issues](https://github.com/pockethub/PocketHub/issues) section to report any bugs or feature requests and
to see the list of known issues. We can't promise fast response times since we all have full time jobs of our own, but we
will do our best to respond in a timely fashion. If you'd like to contribute, please fork this repository and contribute back using
-[pull requests](https://github.com/forkhubs/android/pulls).
+[pull requests](https://github.com/pockethub/PocketHub/pulls).
Any contributions, large or small, major features, bug fixes, additional language translations, unit/integration tests
are welcomed and appreciated but will be thoroughly reviewed and discussed. **Please read `CONTRIBUTING.md` first!**
From 0623791fbcace1cef6c0d8be429e261732b5ebfc Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Mon, 27 Jul 2015 22:07:28 -0700
Subject: [PATCH 056/561] Update to gradle 2.5 and android gradle plugin 1.2.3
---
build.gradle | 2 +-
gradle/wrapper/gradle-wrapper.properties | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build.gradle b/build.gradle
index 3ab7a44fb..3ffd7bc36 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.1.3'
+ classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 6ec673bc6..bb7087e18 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
From 441ba0ad1662777ef1b707ccae0baf586f2f2383 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Mon, 27 Jul 2015 22:07:46 -0700
Subject: [PATCH 057/561] Remove old test
We no longer have a normal login activity anymore
---
.../mobile/tests/user/LoginActivityTest.java | 22 -------------------
1 file changed, 22 deletions(-)
diff --git a/app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java b/app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java
index 8df1fbdcc..9a87cdcc3 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java
+++ b/app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java
@@ -16,10 +16,7 @@
package com.github.mobile.tests.user;
import android.accounts.AccountManager;
-import android.view.View;
-import android.widget.EditText;
-import com.github.mobile.R.id;
import com.github.mobile.accounts.AccountUtils;
import com.github.mobile.accounts.LoginActivity;
import com.github.mobile.tests.ActivityTest;
@@ -44,23 +41,4 @@ public void testHasAuthenticator() {
.get(getActivity())));
}
- /**
- * Verify activity was created successfully
- *
- * @throws Throwable
- */
- public void testSignInIsDisabled() throws Throwable {
- View loginMenu = view(id.m_login);
- assertFalse(loginMenu.isEnabled());
- final EditText login = editText(id.et_login);
- final EditText password = editText(id.et_password);
- focus(login);
- send("loginname");
- assertEquals("loginname", login.getText().toString());
- assertFalse(loginMenu.isEnabled());
- focus(password);
- send("password");
- assertEquals("password", password.getText().toString());
- assertTrue(loginMenu.isEnabled());
- }
}
From 890ad5236848e6801833457503bd46841d7d9e27 Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Wed, 29 Jul 2015 05:05:38 +0200
Subject: [PATCH 058/561] update .travis.yml
---
.travis.yml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index b46a83e8a..edc8385d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,9 +11,7 @@ jdk: oraclejdk7
notifications:
email: false
-before_install:
- - sudo apt-get update -qq
- - if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
+sudo: false
script:
- ./gradlew clean build
From 82058be38399c271cf011a4a3c9a3fd5041beba9 Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Wed, 5 Aug 2015 00:51:59 +0200
Subject: [PATCH 059/561] Set the App name to PocketHub
---
app/src/main/res/values-bg/strings.xml | 1 -
app/src/main/res/values-cs/strings.xml | 1 -
app/src/main/res/values-de/strings.xml | 1 -
app/src/main/res/values-el/strings.xml | 1 -
app/src/main/res/values-es/strings.xml | 1 -
app/src/main/res/values-fr/strings.xml | 1 -
app/src/main/res/values-hu/strings.xml | 1 -
app/src/main/res/values-is/strings.xml | 1 -
app/src/main/res/values-it/strings.xml | 1 -
app/src/main/res/values-ja/strings.xml | 1 -
app/src/main/res/values-ko/strings.xml | 1 -
app/src/main/res/values-no/strings.xml | 1 -
app/src/main/res/values-pl/strings.xml | 1 -
app/src/main/res/values-pt/strings.xml | 1 -
app/src/main/res/values-ro/strings.xml | 1 -
app/src/main/res/values-ru/strings.xml | 1 -
app/src/main/res/values-sk/strings.xml | 1 -
app/src/main/res/values-sv/strings.xml | 1 -
app/src/main/res/values-tr/strings.xml | 1 -
app/src/main/res/values-uk/strings.xml | 1 -
app/src/main/res/values-zh-rCN/strings.xml | 1 -
app/src/main/res/values-zh-rTW/strings.xml | 1 -
app/src/main/res/values/strings.xml | 2 +-
23 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml
index f222fa30d..57da0e328 100644
--- a/app/src/main/res/values-bg/strings.xml
+++ b/app/src/main/res/values-bg/strings.xml
@@ -83,7 +83,6 @@
ОбновÑване на етапа…
- GitHub
Ðовини
ЗаданиÑ
Gists
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index 9ba334519..3316a1018 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -93,7 +93,6 @@ limitations under the License.
Aktualizace milnÃku…
- GitHub
Novinky
Návrhy
Gisty
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 71183d80d..148db749b 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -94,7 +94,6 @@
Aktualisiere Meilensteine…
- GitHub
Home
Neuigkeiten
Tickets
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index e94a557ce..772e752dd 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -93,7 +93,6 @@
ΕνημÎÏωση ΟÏοσήμου…
- GitHub
ÎÎα
Ζητήματα
Gists
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 49ee1e5a7..a8ab03fd7 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -92,7 +92,6 @@
Actualizando hitos…
- GitHub
Noticias
Incidencias
Gists
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index fb8f70d6c..98100a546 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -93,7 +93,6 @@
Mise à jour du jalon…
- GitHub
Nouvelles
Tickets
Gists
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 6011e30c1..5b8f6bd1b 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -80,7 +80,6 @@
MérföldkÅ‘ frissÃtése…
- GitHub
Újdonságok
Hibajegyek
Gist-ek
diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml
index 92d529f83..d2d4e5092 100644
--- a/app/src/main/res/values-is/strings.xml
+++ b/app/src/main/res/values-is/strings.xml
@@ -93,7 +93,6 @@
Uppfærir útgáfur…
- GitHub
Fréttir
Vandamál
Gists
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 8ba9b6766..b7fcbb6d5 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -96,7 +96,6 @@
Aggiornamento Milestone…
- GitHub
News
Segnalazioni
Gists
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 273d383cc..e7fbff7a1 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -93,7 +93,6 @@
マイルストーンを更新ã—ã¦ã„ã¾ã™â€¦
- GitHub
ニュース
課題
Gists
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index 5ed9eea3b..e9d1ec0bb 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -74,7 +74,6 @@
마ì¼ìŠ¤í†¤ ê°±ì‹ ì¤‘â€¦
- GitHub
소ì‹
ì´ìŠˆ
Gists
diff --git a/app/src/main/res/values-no/strings.xml b/app/src/main/res/values-no/strings.xml
index 6fbe4b301..28ea0d45d 100644
--- a/app/src/main/res/values-no/strings.xml
+++ b/app/src/main/res/values-no/strings.xml
@@ -93,7 +93,6 @@
Oppdaterer milepæl…
- GitHub
Nyheter
Saker
Gister
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 89c78c4bc..8f5c2abcd 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -93,7 +93,6 @@
Aktualizowanie kamieni milowych…
- GitHub
Aktualności
Uwagi
Gisty
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 5bba2ea7a..8b1b2e450 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -92,7 +92,6 @@
Atualizando Milestone…
- GitHub
NotÃcias
Incidentes
Gists
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index 9674277cf..4156a1fb5 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -94,7 +94,6 @@
Actualizare bornă…
- GitHub
Acasă
Noutăți
Probleme
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 564340791..ffcddbb83 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -93,7 +93,6 @@
ОбновлÑем цель…
- GitHub
ÐовоÑти
Задачи
Gists
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 1dbf47956..a7f4202fb 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -94,7 +94,6 @@
Aktualizujem mÃľnik…
- GitHub
Novinky
Issues
Gisty
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 0ee5b12d0..252c994c6 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -93,7 +93,6 @@
Uppdaterar milstolpar…
- GitHub
Nyheter
Frågor
Gists
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 759eb1dac..da03cd155 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -94,7 +94,6 @@
Dönüm noktası güncelleniyor…
- GitHub
Ana sayfa
Haberler
Sorunlar
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 3e7f3fa3c..f987b62ec 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -90,7 +90,6 @@
ÐžÐ½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ ÐµÑ‚Ð°Ð¿Ñƒâ€¦
- GitHub
Ðовини
Задачі
Gists
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index fe020a00b..9dcf621dc 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -93,7 +93,6 @@
é‡Œç¨‹ç¢‘ä¿¡æ¯æ›´æ–°ä¸â€¦
- GitHub
新鲜事
Issues
Gists
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 2a214af3f..a35b172d5 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -75,7 +75,6 @@
æ£åœ¨æ›´æ–°æ¨™ç±¤â€¦
æ£åœ¨æ›´æ–°é‡Œç¨‹ç¢‘…
- GitHub
æ–°èž
Issues
Gists
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4afe9492b..204b0798b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -94,7 +94,7 @@
Updating Milestone…
- GitHub
+ PocketHub
Home
News
Issues
From afda541e3e4b2e086662066d48628c0ac86f2f58 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Wed, 5 Aug 2015 00:30:14 -0700
Subject: [PATCH 060/561] Update support libraries and android gradle plugin to
latest
---
app/build.gradle | 6 +++---
build.gradle | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index a89ec9805..f7e9378c6 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -56,14 +56,14 @@ def getValue(def props, def name){
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:22.2.0'
+ compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:3.7.0.201502260915-r'
- compile 'com.android.support:support-v4:22.2.0'
+ compile 'com.android.support:support-v4:22.2.1'
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
@@ -82,5 +82,5 @@ dependencies {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
- compile 'com.android.support:design:22.2.0'
+ compile 'com.android.support:design:22.2.1'
}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 3ffd7bc36..3c22d3d2e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
From c97659888126e43e95f0d52d22188bfe194a8439 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Wed, 5 Aug 2015 00:34:39 -0700
Subject: [PATCH 061/561] Switch to new package name and applicationId
---
app/build.gradle | 2 +-
app/src/androidTest/AndroidManifest.xml | 2 +-
.../tests/ActivityTest.java | 2 +-
.../tests/FiltersViewActivityTest.java | 4 +-
.../tests/NewsEventTextTest.java | 8 +-
.../tests/commit/CommitUriMatcherTest.java | 6 +-
.../tests/commit/CommitUtilsTest.java | 4 +-
.../commit/CreateCommentActivityTest.java | 8 +-
.../tests/commit/DiffStylerTest.java | 4 +-
.../tests/commit/FullCommitTest.java | 4 +-
.../tests/gist/CreateCommentActivityTest.java | 8 +-
.../tests/gist/CreateGistActivityTest.java | 8 +-
.../tests/gist/GistFilesViewActivityTest.java | 10 +--
.../tests/gist/GistStoreTest.java | 4 +-
.../tests/gist/GistUriMatcherTest.java | 4 +-
.../issue/CreateCommentActivityTest.java | 8 +-
.../tests/issue/EditIssueActivityTest.java | 8 +-
.../issue/EditIssuesFilterActivityTest.java | 8 +-
.../tests/issue/IssueFilterTest.java | 4 +-
.../tests/issue/IssueStoreTest.java | 4 +-
.../tests/issue/IssueUriMatcherTest.java | 4 +-
.../tests/ref/RefUtilsTest.java | 4 +-
.../tests/repo/RecentRepositoriesTest.java | 6 +-
.../repo/RepositoryEventMatcherTest.java | 4 +-
.../tests/repo/RepositoryUriMatcherTest.java | 4 +-
.../tests/repo/SearchActivityTest.java | 6 +-
.../tests/user/LoginActivityTest.java | 8 +-
.../tests/user/UserComparatorTest.java | 6 +-
.../tests/user/UserUriMatcherTest.java | 4 +-
.../tests/util/HtmlUtilsTest.java | 4 +-
app/src/main/AndroidManifest.xml | 66 +++++++--------
.../{mobile => pockethub}/DefaultClient.java | 2 +-
.../{mobile => pockethub}/GitHubModule.java | 18 ++---
.../github/{mobile => pockethub}/Intents.java | 2 +-
.../{mobile => pockethub}/RequestCodes.java | 2 +-
.../{mobile => pockethub}/RequestFuture.java | 2 +-
.../{mobile => pockethub}/RequestReader.java | 2 +-
.../{mobile => pockethub}/RequestWriter.java | 2 +-
.../{mobile => pockethub}/ResultCodes.java | 2 +-
.../{mobile => pockethub}/ServicesModule.java | 4 +-
.../ThrowableLoader.java | 6 +-
.../accounts/AccountAuthenticator.java | 14 ++--
.../accounts/AccountAuthenticatorService.java | 2 +-
.../accounts/AccountClient.java | 4 +-
.../accounts/AccountConstants.java | 2 +-
.../accounts/AccountScope.java | 2 +-
.../accounts/AccountUtils.java | 8 +-
.../accounts/AuthenticatedUserLoader.java | 2 +-
.../accounts/AuthenticatedUserTask.java | 2 +-
.../accounts/GitHubAccount.java | 4 +-
.../accounts/LoginActivity.java | 14 ++--
.../accounts/LoginWebViewActivity.java | 6 +-
.../accounts/ScopeBase.java | 2 +-
.../accounts/TwoFactorAuthActivity.java | 14 ++--
.../accounts/TwoFactorAuthClient.java | 4 +-
.../accounts/TwoFactorAuthException.java | 2 +-
.../api/GitHubClientV2.java | 4 +-
.../{mobile => pockethub}/core/ItemStore.java | 2 +-
.../core/OnLoadListener.java | 2 +-
.../core/ResourcePager.java | 2 +-
.../core/UrlMatcher.java | 2 +-
.../core/code/FullTree.java | 6 +-
.../core/code/RefreshBlobTask.java | 4 +-
.../core/code/RefreshTreeTask.java | 6 +-
.../core/commit/CommitCompareTask.java | 4 +-
.../core/commit/CommitMatch.java | 2 +-
.../core/commit/CommitPager.java | 4 +-
.../core/commit/CommitStore.java | 4 +-
.../core/commit/CommitUriMatcher.java | 4 +-
.../core/commit/CommitUtils.java | 6 +-
.../core/commit/FullCommit.java | 2 +-
.../core/commit/FullCommitFile.java | 2 +-
.../core/commit/RefreshCommitTask.java | 8 +-
.../core/gist/FullGist.java | 2 +-
.../core/gist/GistEventMatcher.java | 2 +-
.../core/gist/GistPager.java | 4 +-
.../core/gist/GistStore.java | 4 +-
.../core/gist/GistUriMatcher.java | 2 +-
.../core/gist/RefreshGistTask.java | 8 +-
.../core/gist/StarGistTask.java | 4 +-
.../core/gist/UnstarGistTask.java | 4 +-
.../core/issue/FullIssue.java | 2 +-
.../core/issue/IssueEventMatcher.java | 2 +-
.../core/issue/IssueFilter.java | 2 +-
.../core/issue/IssuePager.java | 4 +-
.../core/issue/IssueStore.java | 6 +-
.../core/issue/IssueUriMatcher.java | 4 +-
.../core/issue/IssueUtils.java | 2 +-
.../core/issue/RefreshIssueTask.java | 8 +-
.../core/ref/RefUtils.java | 2 +-
.../core/repo/DeleteRepositoryTask.java | 13 ++-
.../core/repo/ForkRepositoryTask.java | 6 +-
.../core/repo/RefreshRepositoryTask.java | 4 +-
.../core/repo/RepositoryEventMatcher.java | 2 +-
.../core/repo/RepositoryUriMatcher.java | 2 +-
.../core/repo/RepositoryUtils.java | 2 +-
.../core/repo/StarRepositoryTask.java | 6 +-
.../core/repo/StarredRepositoryTask.java | 4 +-
.../core/repo/UnstarRepositoryTask.java | 6 +-
.../core/search/SearchUser.java | 2 +-
.../core/search/SearchUserService.java | 2 +-
.../core/user/FollowUserTask.java | 6 +-
.../core/user/FollowingUserTask.java | 4 +-
.../core/user/RefreshUserTask.java | 4 +-
.../core/user/UnfollowUserTask.java | 6 +-
.../core/user/UserComparator.java | 4 +-
.../core/user/UserEventMatcher.java | 2 +-
.../core/user/UserPager.java | 4 +-
.../core/user/UserUriMatcher.java | 4 +-
.../{mobile => pockethub}/model/App.java | 2 +-
.../model/Authorization.java | 2 +-
.../persistence/AccountDataManager.java | 14 ++--
.../persistence/CacheHelper.java | 2 +-
.../persistence/DatabaseCache.java | 2 +-
.../persistence/OrganizationRepositories.java | 4 +-
.../persistence/Organizations.java | 2 +-
.../persistence/PersistableResource.java | 2 +-
.../sync/ContentProviderAdapter.java | 2 +-
.../sync/SyncAdapter.java | 6 +-
.../sync/SyncAdapterService.java | 2 +-
.../sync/SyncCampaign.java | 8 +-
.../ui/BaseActivity.java | 4 +-
.../ui/CheckableRelativeLayout.java | 2 +-
.../ui/ConfirmDialogFragment.java | 2 +-
.../ui/DialogFragment.java | 4 +-
.../ui/DialogFragmentActivity.java | 4 +-
.../ui/DialogFragmentHelper.java | 2 +-
.../ui/DialogResultListener.java | 2 +-
.../ui/FragmentPagerAdapter.java | 2 +-
.../ui/FragmentProvider.java | 2 +-
.../ui/FragmentStatePagerAdapter.java | 2 +-
.../ui/HeaderFooterListAdapter.java | 2 +-
.../ui/ItemListFragment.java | 8 +-
.../ui/LightAlertDialog.java | 2 +-
.../ui/LightProgressDialog.java | 4 +-
.../ui/MainActivity.java | 24 +++---
.../ui/MarkdownLoader.java | 6 +-
.../ui/NavigationDrawerAdapter.java | 14 ++--
.../ui/NavigationDrawerFragment.java | 6 +-
.../ui/NavigationDrawerObject.java | 2 +-
.../ui/NewsFragment.java | 28 +++----
.../ui/PagedItemFragment.java | 6 +-
.../ui/PagerActivity.java | 2 +-
.../ui/PagerFragment.java | 2 +-
.../ui/PatchedScrollingViewBehavior.java | 3 +-
.../ui/ProgressDialogTask.java | 4 +-
.../ui/ResourceLoadingIndicator.java | 4 +-
.../ui/SelectableLinkMovementMethod.java | 2 +-
.../ui/SingleChoiceDialogFragment.java | 2 +-
.../{mobile => pockethub}/ui/StyledText.java | 4 +-
.../ui/TabPagerActivity.java | 4 +-
.../ui/TabPagerFragment.java | 4 +-
.../ui/TextWatcherAdapter.java | 2 +-
.../{mobile => pockethub}/ui/ViewPager.java | 2 +-
.../{mobile => pockethub}/ui/WebView.java | 2 +-
.../ui/code/RepositoryCodeFragment.java | 38 ++++-----
.../ui/comment/CommentListAdapter.java | 12 +--
.../comment/CommentPreviewPagerAdapter.java | 6 +-
.../ui/comment/CreateCommentActivity.java | 14 ++--
.../ui/comment/DeleteCommentListener.java | 2 +-
.../ui/comment/EditCommentListener.java | 2 +-
.../ui/comment/RawCommentFragment.java | 8 +-
.../ui/comment/RenderedCommentFragment.java | 12 +--
.../ui/commit/CommitCompareListFragment.java | 22 ++---
.../ui/commit/CommitCompareViewActivity.java | 18 ++---
.../ui/commit/CommitDiffListFragment.java | 38 ++++-----
.../ui/commit/CommitFileComparator.java | 2 +-
.../ui/commit/CommitFileListAdapter.java | 14 ++--
.../ui/commit/CommitFileViewActivity.java | 42 +++++-----
.../ui/commit/CommitListAdapter.java | 12 +--
.../ui/commit/CommitListFragment.java | 36 ++++-----
.../ui/commit/CommitPagerAdapter.java | 8 +-
.../ui/commit/CommitViewActivity.java | 24 +++---
.../ui/commit/CreateCommentActivity.java | 20 ++---
.../ui/commit/CreateCommentTask.java | 10 +--
.../ui/commit/DiffStyler.java | 4 +-
.../ui/gist/CreateCommentActivity.java | 10 +--
.../ui/gist/CreateCommentTask.java | 10 +--
.../ui/gist/CreateGistActivity.java | 12 +--
.../ui/gist/CreateGistTask.java | 8 +-
.../ui/gist/DeleteCommentTask.java | 8 +-
.../ui/gist/DeleteGistTask.java | 8 +-
.../ui/gist/EditCommentActivity.java | 14 ++--
.../ui/gist/EditCommentTask.java | 10 +--
.../ui/gist/GistFileFragment.java | 22 ++---
.../ui/gist/GistFilesPagerAdapter.java | 6 +-
.../ui/gist/GistFilesViewActivity.java | 26 +++---
.../ui/gist/GistFragment.java | 53 ++++++------
.../ui/gist/GistListAdapter.java | 10 +--
.../ui/gist/GistQueriesPagerAdapter.java | 6 +-
.../ui/gist/GistsFragment.java | 14 ++--
.../ui/gist/GistsPagerAdapter.java | 6 +-
.../ui/gist/GistsPagerFragment.java | 12 +--
.../ui/gist/GistsViewActivity.java | 32 ++++----
.../ui/gist/MyGistsFragment.java | 12 +--
.../ui/gist/PublicGistsFragment.java | 6 +-
.../ui/gist/RandomGistTask.java | 12 +--
.../ui/gist/StarredGistsFragment.java | 6 +-
.../ui/issue/AssigneeDialog.java | 10 +--
.../ui/issue/AssigneeDialogFragment.java | 10 +--
.../ui/issue/CreateCommentActivity.java | 18 ++---
.../ui/issue/CreateCommentTask.java | 10 +--
.../ui/issue/CreateIssueTask.java | 10 +--
.../ui/issue/DashboardIssueFragment.java | 14 ++--
.../ui/issue/DashboardIssueListAdapter.java | 10 +--
.../ui/issue/DeleteCommentTask.java | 8 +-
.../ui/issue/EditAssigneeTask.java | 12 +--
.../ui/issue/EditCommentActivity.java | 20 ++---
.../ui/issue/EditCommentTask.java | 10 +--
.../ui/issue/EditIssueActivity.java | 34 ++++----
.../ui/issue/EditIssueTask.java | 10 +--
.../ui/issue/EditIssuesFilterActivity.java | 14 ++--
.../ui/issue/EditLabelsTask.java | 12 +--
.../ui/issue/EditMilestoneTask.java | 12 +--
.../ui/issue/EditStateTask.java | 16 ++--
.../ui/issue/FilterListAdapter.java | 8 +-
.../ui/issue/FilterListFragment.java | 12 +--
.../ui/issue/FiltersViewActivity.java | 19 +++--
.../ui/issue/FiltersViewFragment.java | 20 ++---
.../ui/issue/IssueBrowseActivity.java | 16 ++--
.../ui/issue/IssueDashboardPagerAdapter.java | 8 +-
.../ui/issue/IssueDashboardPagerFragment.java | 14 ++--
.../ui/issue/IssueFragment.java | 81 +++++++++----------
.../ui/issue/IssueListAdapter.java | 10 +--
.../ui/issue/IssueSearchActivity.java | 14 ++--
.../issue/IssueSearchSuggestionsProvider.java | 2 +-
.../ui/issue/IssuesFragment.java | 34 ++++----
.../ui/issue/IssuesPagerAdapter.java | 20 ++---
.../ui/issue/IssuesViewActivity.java | 36 ++++-----
.../ui/issue/LabelDrawableSpan.java | 8 +-
.../ui/issue/LabelsDialog.java | 10 +--
.../ui/issue/LabelsDialogFragment.java | 10 +--
.../ui/issue/MilestoneDialog.java | 10 +--
.../ui/issue/MilestoneDialogFragment.java | 8 +-
.../ui/issue/RepositoryIssueListAdapter.java | 10 +--
.../ui/issue/SearchIssueListAdapter.java | 8 +-
.../ui/issue/SearchIssueListFragment.java | 12 +--
.../ui/ref/BranchFileViewActivity.java | 40 ++++-----
.../ui/ref/CodeTreeAdapter.java | 14 ++--
.../ui/ref/RefDialog.java | 12 +--
.../ui/ref/RefDialogFragment.java | 12 +--
.../ui/repo/ContributorListAdapter.java | 6 +-
.../ui/repo/DefaultRepositoryListAdapter.java | 8 +-
.../ui/repo/OrganizationLoader.java | 12 +--
.../ui/repo/RecentRepositories.java | 6 +-
.../repo/RepositoryContributorsActivity.java | 12 +--
.../repo/RepositoryContributorsFragment.java | 18 ++---
.../ui/repo/RepositoryListAdapter.java | 12 +--
.../ui/repo/RepositoryListFragment.java | 28 +++----
.../ui/repo/RepositoryNewsFragment.java | 16 ++--
.../ui/repo/RepositoryPagerAdapter.java | 12 +--
.../ui/repo/RepositoryViewActivity.java | 46 +++++------
.../ui/repo/UserRepositoryListAdapter.java | 8 +-
.../ui/repo/UserRepositoryListFragment.java | 14 ++--
...ActionBarAccountAuthenticatorActivity.java | 2 +-
...ActionBarAccountAuthenticatorActivity.java | 2 +-
.../roboactivities/RoboActionBarActivity.java | 2 +-
.../roboactivities/RoboSupportFragment.java | 2 +-
.../RepositorySearchSuggestionsProvider.java | 2 +-
.../ui/search/SearchActivity.java | 14 ++--
.../ui/search/SearchPagerAdapter.java | 6 +-
.../search/SearchRepositoryListAdapter.java | 10 +--
.../search/SearchRepositoryListFragment.java | 12 +--
.../ui/search/SearchUserListAdapter.java | 8 +-
.../ui/search/SearchUserListFragment.java | 20 ++---
.../ui/user/EventPager.java | 4 +-
.../ui/user/EventType.java | 6 +-
.../ui/user/FollowersFragment.java | 4 +-
.../ui/user/FollowingFragment.java | 4 +-
.../ui/user/HomePagerAdapter.java | 8 +-
.../ui/user/HomePagerFragment.java | 8 +-
.../ui/user/IconAndViewTextManager.java | 8 +-
.../ui/user/MembersFragment.java | 14 ++--
.../ui/user/MyFollowersFragment.java | 6 +-
.../ui/user/MyFollowingFragment.java | 6 +-
.../ui/user/NewsListAdapter.java | 8 +-
.../ui/user/OrganizationNewsFragment.java | 6 +-
.../user/OrganizationSelectionListener.java | 2 +-
.../user/OrganizationSelectionProvider.java | 2 +-
.../ui/user/PagedUserFragment.java | 8 +-
.../ui/user/UriLauncherActivity.java | 26 +++---
.../ui/user/UserCreatedNewsFragment.java | 4 +-
.../ui/user/UserFollowersFragment.java | 8 +-
.../ui/user/UserFollowingFragment.java | 8 +-
.../ui/user/UserListAdapter.java | 6 +-
.../ui/user/UserNewsFragment.java | 8 +-
.../ui/user/UserPagerAdapter.java | 8 +-
.../ui/user/UserReceivedNewsFragment.java | 4 +-
.../ui/user/UserViewActivity.java | 32 ++++----
.../util/AvatarLoader.java | 4 +-
.../util/GravatarUtils.java | 2 +-
.../{mobile => pockethub}/util/HtmlUtils.java | 2 +-
.../util/HttpImageGetter.java | 6 +-
.../util/ImageUtils.java | 2 +-
.../util/MarkdownUtils.java | 2 +-
.../util/PreferenceUtils.java | 2 +-
.../util/ServiceUtils.java | 2 +-
.../util/ShareUtils.java | 2 +-
.../util/SourceEditor.java | 4 +-
.../{mobile => pockethub}/util/TimeUtils.java | 2 +-
.../util/ToastUtils.java | 2 +-
.../util/TypefaceUtils.java | 2 +-
app/src/main/res/layout/activity_main.xml | 2 +-
app/src/main/res/layout/commit_compare.xml | 2 +-
app/src/main/res/layout/gist_file_view.xml | 2 +-
app/src/main/res/layout/issue_search.xml | 2 +-
.../main/res/layout/issues_filter_list.xml | 2 +-
.../navigation_drawer_list_item_image.xml | 4 +-
.../navigation_drawer_list_item_text.xml | 4 +-
app/src/main/res/layout/pager.xml | 2 +-
app/src/main/res/layout/pager_with_tabs.xml | 2 +-
app/src/main/res/layout/pager_with_title.xml | 2 +-
app/src/main/res/layout/repo_contributors.xml | 2 +-
app/src/main/res/layout/repo_issue_list.xml | 2 +-
.../ui/user/IconAndViewTextManagerTest.java | 4 +-
315 files changed, 1317 insertions(+), 1322 deletions(-)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/ActivityTest.java (98%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/FiltersViewActivityTest.java (90%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/NewsEventTextTest.java (98%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/commit/CommitUriMatcherTest.java (94%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/commit/CommitUtilsTest.java (98%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/commit/CreateCommentActivityTest.java (90%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/commit/DiffStylerTest.java (97%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/commit/FullCommitTest.java (97%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/gist/CreateCommentActivityTest.java (90%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/gist/CreateGistActivityTest.java (91%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/gist/GistFilesViewActivityTest.java (91%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/gist/GistStoreTest.java (94%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/gist/GistUriMatcherTest.java (95%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/issue/CreateCommentActivityTest.java (90%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/issue/EditIssueActivityTest.java (91%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/issue/EditIssuesFilterActivityTest.java (86%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/issue/IssueFilterTest.java (95%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/issue/IssueStoreTest.java (95%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/issue/IssueUriMatcherTest.java (97%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/ref/RefUtilsTest.java (97%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/repo/RecentRepositoriesTest.java (94%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/repo/RepositoryEventMatcherTest.java (94%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/repo/RepositoryUriMatcherTest.java (96%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/repo/SearchActivityTest.java (89%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/user/LoginActivityTest.java (85%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/user/UserComparatorTest.java (93%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/user/UserUriMatcherTest.java (96%)
rename app/src/androidTest/java/com/github/{mobile => pockethub}/tests/util/HtmlUtilsTest.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/DefaultClient.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/GitHubModule.java (86%)
rename app/src/main/java/com/github/{mobile => pockethub}/Intents.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/RequestCodes.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/RequestFuture.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/RequestReader.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/RequestWriter.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ResultCodes.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ServicesModule.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ThrowableLoader.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AccountAuthenticator.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AccountAuthenticatorService.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AccountClient.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AccountConstants.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AccountScope.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AccountUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AuthenticatedUserLoader.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/AuthenticatedUserTask.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/GitHubAccount.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/LoginActivity.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/LoginWebViewActivity.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/ScopeBase.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/TwoFactorAuthActivity.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/TwoFactorAuthClient.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/accounts/TwoFactorAuthException.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/api/GitHubClientV2.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/ItemStore.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/OnLoadListener.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/ResourcePager.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/UrlMatcher.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/code/FullTree.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/code/RefreshBlobTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/code/RefreshTreeTask.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/CommitCompareTask.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/CommitMatch.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/CommitPager.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/CommitStore.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/CommitUriMatcher.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/CommitUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/FullCommit.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/FullCommitFile.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/commit/RefreshCommitTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/FullGist.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/GistEventMatcher.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/GistPager.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/GistStore.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/GistUriMatcher.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/RefreshGistTask.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/StarGistTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/gist/UnstarGistTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/FullIssue.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/IssueEventMatcher.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/IssueFilter.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/IssuePager.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/IssueStore.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/IssueUriMatcher.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/IssueUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/issue/RefreshIssueTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/ref/RefUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/DeleteRepositoryTask.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/ForkRepositoryTask.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/RefreshRepositoryTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/RepositoryEventMatcher.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/RepositoryUriMatcher.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/RepositoryUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/StarRepositoryTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/StarredRepositoryTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/repo/UnstarRepositoryTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/search/SearchUser.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/search/SearchUserService.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/FollowUserTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/FollowingUserTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/RefreshUserTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/UnfollowUserTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/UserComparator.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/UserEventMatcher.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/UserPager.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/core/user/UserUriMatcher.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/model/App.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/model/Authorization.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/persistence/AccountDataManager.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/persistence/CacheHelper.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/persistence/DatabaseCache.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/persistence/OrganizationRepositories.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/persistence/Organizations.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/persistence/PersistableResource.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/sync/ContentProviderAdapter.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/sync/SyncAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/sync/SyncAdapterService.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/sync/SyncCampaign.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/BaseActivity.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/CheckableRelativeLayout.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ConfirmDialogFragment.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/DialogFragment.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/DialogFragmentActivity.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/DialogFragmentHelper.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/DialogResultListener.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/FragmentPagerAdapter.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/FragmentProvider.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/FragmentStatePagerAdapter.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/HeaderFooterListAdapter.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ItemListFragment.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/LightAlertDialog.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/LightProgressDialog.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/MainActivity.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/MarkdownLoader.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/NavigationDrawerAdapter.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/NavigationDrawerFragment.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/NavigationDrawerObject.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/NewsFragment.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/PagedItemFragment.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/PagerActivity.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/PagerFragment.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/PatchedScrollingViewBehavior.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ProgressDialogTask.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ResourceLoadingIndicator.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/SelectableLinkMovementMethod.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/SingleChoiceDialogFragment.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/StyledText.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/TabPagerActivity.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/TabPagerFragment.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/TextWatcherAdapter.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ViewPager.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/WebView.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/code/RepositoryCodeFragment.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/CommentListAdapter.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/CommentPreviewPagerAdapter.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/CreateCommentActivity.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/DeleteCommentListener.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/EditCommentListener.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/RawCommentFragment.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/comment/RenderedCommentFragment.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitCompareListFragment.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitCompareViewActivity.java (87%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitDiffListFragment.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitFileComparator.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitFileListAdapter.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitFileViewActivity.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitListAdapter.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitListFragment.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitPagerAdapter.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CommitViewActivity.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CreateCommentActivity.java (86%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/CreateCommentTask.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/commit/DiffStyler.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/CreateCommentActivity.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/CreateCommentTask.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/CreateGistActivity.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/CreateGistTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/DeleteCommentTask.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/DeleteGistTask.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/EditCommentActivity.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/EditCommentTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistFileFragment.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistFilesPagerAdapter.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistFilesViewActivity.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistFragment.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistListAdapter.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistQueriesPagerAdapter.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistsFragment.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistsPagerAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistsPagerFragment.java (82%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/GistsViewActivity.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/MyGistsFragment.java (84%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/PublicGistsFragment.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/RandomGistTask.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/gist/StarredGistsFragment.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/AssigneeDialog.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/AssigneeDialogFragment.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/CreateCommentActivity.java (83%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/CreateCommentTask.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/CreateIssueTask.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/DashboardIssueFragment.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/DashboardIssueListAdapter.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/DeleteCommentTask.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditAssigneeTask.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditCommentActivity.java (85%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditCommentTask.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditIssueActivity.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditIssueTask.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditIssuesFilterActivity.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditLabelsTask.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditMilestoneTask.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/EditStateTask.java (87%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/FilterListAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/FilterListFragment.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/FiltersViewActivity.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/FiltersViewFragment.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueBrowseActivity.java (86%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueDashboardPagerAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueDashboardPagerFragment.java (84%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueFragment.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueListAdapter.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueSearchActivity.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssueSearchSuggestionsProvider.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssuesFragment.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssuesPagerAdapter.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/IssuesViewActivity.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/LabelDrawableSpan.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/LabelsDialog.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/LabelsDialogFragment.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/MilestoneDialog.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/MilestoneDialogFragment.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/RepositoryIssueListAdapter.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/SearchIssueListAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/issue/SearchIssueListFragment.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ref/BranchFileViewActivity.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ref/CodeTreeAdapter.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ref/RefDialog.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/ref/RefDialogFragment.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/ContributorListAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/DefaultRepositoryListAdapter.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/OrganizationLoader.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RecentRepositories.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryContributorsActivity.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryContributorsFragment.java (87%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryListAdapter.java (86%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryListFragment.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryNewsFragment.java (84%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryPagerAdapter.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/RepositoryViewActivity.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/UserRepositoryListAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/repo/UserRepositoryListFragment.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/roboactivities/RoboActionBarActivity.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/roboactivities/RoboSupportFragment.java (92%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/RepositorySearchSuggestionsProvider.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/SearchActivity.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/SearchPagerAdapter.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/SearchRepositoryListAdapter.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/SearchRepositoryListFragment.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/SearchUserListAdapter.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/search/SearchUserListFragment.java (85%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/EventPager.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/EventType.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/FollowersFragment.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/FollowingFragment.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/HomePagerAdapter.java (94%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/HomePagerFragment.java (86%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/IconAndViewTextManager.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/MembersFragment.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/MyFollowersFragment.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/MyFollowingFragment.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/NewsListAdapter.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/OrganizationNewsFragment.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/OrganizationSelectionListener.java (95%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/OrganizationSelectionProvider.java (96%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/PagedUserFragment.java (90%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UriLauncherActivity.java (89%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserCreatedNewsFragment.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserFollowersFragment.java (87%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserFollowingFragment.java (87%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserListAdapter.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserNewsFragment.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserPagerAdapter.java (91%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserReceivedNewsFragment.java (93%)
rename app/src/main/java/com/github/{mobile => pockethub}/ui/user/UserViewActivity.java (88%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/AvatarLoader.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/GravatarUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/HtmlUtils.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/HttpImageGetter.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/ImageUtils.java (99%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/MarkdownUtils.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/PreferenceUtils.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/ServiceUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/ShareUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/SourceEditor.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/TimeUtils.java (97%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/ToastUtils.java (98%)
rename app/src/main/java/com/github/{mobile => pockethub}/util/TypefaceUtils.java (99%)
rename app/src/test/java/com/github/{mobile => pockethub}/ui/user/IconAndViewTextManagerTest.java (99%)
diff --git a/app/build.gradle b/app/build.gradle
index f7e9378c6..c457e0a89 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -5,7 +5,7 @@ android {
buildToolsVersion '22.0.1'
defaultConfig {
- applicationId 'com.github.mobile'
+ applicationId 'com.github.pockethub'
minSdkVersion 15
targetSdkVersion 22
versionCode 1900
diff --git a/app/src/androidTest/AndroidManifest.xml b/app/src/androidTest/AndroidManifest.xml
index 3fe4feadd..c4a3b5888 100644
--- a/app/src/androidTest/AndroidManifest.xml
+++ b/app/src/androidTest/AndroidManifest.xml
@@ -1,6 +1,6 @@
diff --git a/app/src/androidTest/java/com/github/mobile/tests/ActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/ActivityTest.java
similarity index 98%
rename from app/src/androidTest/java/com/github/mobile/tests/ActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/ActivityTest.java
index f3babb1e3..c8cb934a2 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/ActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/ActivityTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests;
+package com.github.pockethub.tests;
import android.app.Activity;
import android.test.ActivityInstrumentationTestCase2;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/FiltersViewActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/FiltersViewActivityTest.java
similarity index 90%
rename from app/src/androidTest/java/com/github/mobile/tests/FiltersViewActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/FiltersViewActivityTest.java
index 28d82c59c..124da5cd9 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/FiltersViewActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/FiltersViewActivityTest.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests;
+package com.github.pockethub.tests;
-import com.github.mobile.ui.issue.FiltersViewActivity;
+import com.github.pockethub.ui.issue.FiltersViewActivity;
/**
* Test of {@link FiltersViewActivity}
diff --git a/app/src/androidTest/java/com/github/mobile/tests/NewsEventTextTest.java b/app/src/androidTest/java/com/github/pockethub/tests/NewsEventTextTest.java
similarity index 98%
rename from app/src/androidTest/java/com/github/mobile/tests/NewsEventTextTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/NewsEventTextTest.java
index 65f704821..166ee2b4c 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/NewsEventTextTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/NewsEventTextTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests;
+package com.github.pockethub.tests;
import static org.eclipse.egit.github.core.event.Event.TYPE_COMMIT_COMMENT;
import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
@@ -36,9 +36,9 @@
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R.id;
-import com.github.mobile.ui.user.NewsListAdapter;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R.id;
+import com.github.pockethub.ui.user.NewsListAdapter;
+import com.github.pockethub.util.AvatarLoader;
import java.util.Date;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/commit/CommitUriMatcherTest.java b/app/src/androidTest/java/com/github/pockethub/tests/commit/CommitUriMatcherTest.java
similarity index 94%
rename from app/src/androidTest/java/com/github/mobile/tests/commit/CommitUriMatcherTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/commit/CommitUriMatcherTest.java
index 676c74252..94d446af3 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/commit/CommitUriMatcherTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/commit/CommitUriMatcherTest.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.commit;
+package com.github.pockethub.tests.commit;
import android.net.Uri;
import android.test.AndroidTestCase;
-import com.github.mobile.core.commit.CommitMatch;
-import com.github.mobile.core.commit.CommitUriMatcher;
+import com.github.pockethub.core.commit.CommitMatch;
+import com.github.pockethub.core.commit.CommitUriMatcher;
/**
* Tests of {@link CommitUriMatcher}
diff --git a/app/src/androidTest/java/com/github/mobile/tests/commit/CommitUtilsTest.java b/app/src/androidTest/java/com/github/pockethub/tests/commit/CommitUtilsTest.java
similarity index 98%
rename from app/src/androidTest/java/com/github/mobile/tests/commit/CommitUtilsTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/commit/CommitUtilsTest.java
index 6735984e3..5a6f7d541 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/commit/CommitUtilsTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/commit/CommitUtilsTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.commit;
+package com.github.pockethub.tests.commit;
import android.test.AndroidTestCase;
-import com.github.mobile.core.commit.CommitUtils;
+import com.github.pockethub.core.commit.CommitUtils;
import java.util.Date;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/commit/CreateCommentActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/commit/CreateCommentActivityTest.java
similarity index 90%
rename from app/src/androidTest/java/com/github/mobile/tests/commit/CreateCommentActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/commit/CreateCommentActivityTest.java
index 3337c5f07..028edbb8a 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/commit/CreateCommentActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/commit/CreateCommentActivityTest.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.commit;
+package com.github.pockethub.tests.commit;
import static android.view.KeyEvent.KEYCODE_DEL;
import android.view.View;
import android.widget.EditText;
-import com.github.mobile.R.id;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.commit.CreateCommentActivity;
+import com.github.pockethub.R.id;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.commit.CreateCommentActivity;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/commit/DiffStylerTest.java b/app/src/androidTest/java/com/github/pockethub/tests/commit/DiffStylerTest.java
similarity index 97%
rename from app/src/androidTest/java/com/github/mobile/tests/commit/DiffStylerTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/commit/DiffStylerTest.java
index b222d5db0..f741789b5 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/commit/DiffStylerTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/commit/DiffStylerTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.commit;
+package com.github.pockethub.tests.commit;
import android.test.AndroidTestCase;
-import com.github.mobile.ui.commit.DiffStyler;
+import com.github.pockethub.ui.commit.DiffStyler;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/commit/FullCommitTest.java b/app/src/androidTest/java/com/github/pockethub/tests/commit/FullCommitTest.java
similarity index 97%
rename from app/src/androidTest/java/com/github/mobile/tests/commit/FullCommitTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/commit/FullCommitTest.java
index eedb6a5dd..232f5a627 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/commit/FullCommitTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/commit/FullCommitTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.commit;
+package com.github.pockethub.tests.commit;
import android.test.AndroidTestCase;
-import com.github.mobile.core.commit.FullCommit;
+import com.github.pockethub.core.commit.FullCommit;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/gist/CreateCommentActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/gist/CreateCommentActivityTest.java
similarity index 90%
rename from app/src/androidTest/java/com/github/mobile/tests/gist/CreateCommentActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/gist/CreateCommentActivityTest.java
index 2ae49dfb5..545e25841 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/gist/CreateCommentActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/gist/CreateCommentActivityTest.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.gist;
+package com.github.pockethub.tests.gist;
import static android.view.KeyEvent.KEYCODE_DEL;
import android.view.View;
import android.widget.EditText;
-import com.github.mobile.R.id;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.gist.CreateCommentActivity;
+import com.github.pockethub.R.id;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.gist.CreateCommentActivity;
import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/gist/CreateGistActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/gist/CreateGistActivityTest.java
similarity index 91%
rename from app/src/androidTest/java/com/github/mobile/tests/gist/CreateGistActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/gist/CreateGistActivityTest.java
index d3a764722..b1347b526 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/gist/CreateGistActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/gist/CreateGistActivityTest.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.gist;
+package com.github.pockethub.tests.gist;
import static android.content.Intent.EXTRA_TEXT;
import android.content.Intent;
import android.view.View;
import android.widget.EditText;
-import com.github.mobile.R.id;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.gist.CreateGistActivity;
+import com.github.pockethub.R.id;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.gist.CreateGistActivity;
/**
* Tests of {@link CreateGistActivity}
diff --git a/app/src/androidTest/java/com/github/mobile/tests/gist/GistFilesViewActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/gist/GistFilesViewActivityTest.java
similarity index 91%
rename from app/src/androidTest/java/com/github/mobile/tests/gist/GistFilesViewActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/gist/GistFilesViewActivityTest.java
index 10ca670da..4464cb4c6 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/gist/GistFilesViewActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/gist/GistFilesViewActivityTest.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.gist;
+package com.github.pockethub.tests.gist;
import android.support.v4.view.ViewPager;
-import com.github.mobile.R.id;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.gist.GistFilesViewActivity;
+import com.github.pockethub.R.id;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.gist.GistFilesViewActivity;
import com.google.inject.Inject;
import java.util.LinkedHashMap;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/gist/GistStoreTest.java b/app/src/androidTest/java/com/github/pockethub/tests/gist/GistStoreTest.java
similarity index 94%
rename from app/src/androidTest/java/com/github/mobile/tests/gist/GistStoreTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/gist/GistStoreTest.java
index 16712b8db..abfdaedef 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/gist/GistStoreTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/gist/GistStoreTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.gist;
+package com.github.pockethub.tests.gist;
import android.test.AndroidTestCase;
-import com.github.mobile.core.gist.GistStore;
+import com.github.pockethub.core.gist.GistStore;
import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.service.GistService;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/gist/GistUriMatcherTest.java b/app/src/androidTest/java/com/github/pockethub/tests/gist/GistUriMatcherTest.java
similarity index 95%
rename from app/src/androidTest/java/com/github/mobile/tests/gist/GistUriMatcherTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/gist/GistUriMatcherTest.java
index 19b48c213..ee008e8e9 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/gist/GistUriMatcherTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/gist/GistUriMatcherTest.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.gist;
+package com.github.pockethub.tests.gist;
import android.net.Uri;
import android.test.AndroidTestCase;
-import com.github.mobile.core.gist.GistUriMatcher;
+import com.github.pockethub.core.gist.GistUriMatcher;
import org.eclipse.egit.github.core.Gist;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/CreateCommentActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/issue/CreateCommentActivityTest.java
similarity index 90%
rename from app/src/androidTest/java/com/github/mobile/tests/issue/CreateCommentActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/issue/CreateCommentActivityTest.java
index d62149222..68cbc308e 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/issue/CreateCommentActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/issue/CreateCommentActivityTest.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.issue;
+package com.github.pockethub.tests.issue;
import static android.view.KeyEvent.KEYCODE_DEL;
import android.view.View;
import android.widget.EditText;
-import com.github.mobile.R.id;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.issue.CreateCommentActivity;
+import com.github.pockethub.R.id;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.issue.CreateCommentActivity;
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/EditIssueActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/issue/EditIssueActivityTest.java
similarity index 91%
rename from app/src/androidTest/java/com/github/mobile/tests/issue/EditIssueActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/issue/EditIssueActivityTest.java
index 38c262b29..a2bc71f88 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/issue/EditIssueActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/issue/EditIssueActivityTest.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.issue;
+package com.github.pockethub.tests.issue;
import static android.view.KeyEvent.KEYCODE_DEL;
import android.view.View;
import android.widget.EditText;
-import com.github.mobile.R.id;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.issue.EditIssueActivity;
+import com.github.pockethub.R.id;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.issue.EditIssueActivity;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/EditIssuesFilterActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/issue/EditIssuesFilterActivityTest.java
similarity index 86%
rename from app/src/androidTest/java/com/github/mobile/tests/issue/EditIssuesFilterActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/issue/EditIssuesFilterActivityTest.java
index 18ca96e02..84b90cdfd 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/issue/EditIssuesFilterActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/issue/EditIssuesFilterActivityTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.issue;
+package com.github.pockethub.tests.issue;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.issue.EditIssuesFilterActivity;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.issue.EditIssuesFilterActivity;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java b/app/src/androidTest/java/com/github/pockethub/tests/issue/IssueFilterTest.java
similarity index 95%
rename from app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/issue/IssueFilterTest.java
index f131a79b8..4826dd0d4 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueFilterTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/issue/IssueFilterTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.issue;
+package com.github.pockethub.tests.issue;
import android.test.AndroidTestCase;
-import com.github.mobile.core.issue.IssueFilter;
+import com.github.pockethub.core.issue.IssueFilter;
import org.eclipse.egit.github.core.Milestone;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueStoreTest.java b/app/src/androidTest/java/com/github/pockethub/tests/issue/IssueStoreTest.java
similarity index 95%
rename from app/src/androidTest/java/com/github/mobile/tests/issue/IssueStoreTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/issue/IssueStoreTest.java
index 5045d7f22..d524acdd4 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueStoreTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/issue/IssueStoreTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.issue;
+package com.github.pockethub.tests.issue;
import android.test.AndroidTestCase;
-import com.github.mobile.core.issue.IssueStore;
+import com.github.pockethub.core.issue.IssueStore;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.RepositoryIssue;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueUriMatcherTest.java b/app/src/androidTest/java/com/github/pockethub/tests/issue/IssueUriMatcherTest.java
similarity index 97%
rename from app/src/androidTest/java/com/github/mobile/tests/issue/IssueUriMatcherTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/issue/IssueUriMatcherTest.java
index 5ad924c73..bc7dc0b97 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/issue/IssueUriMatcherTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/issue/IssueUriMatcherTest.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.issue;
+package com.github.pockethub.tests.issue;
import android.net.Uri;
import android.test.AndroidTestCase;
-import com.github.mobile.core.issue.IssueUriMatcher;
+import com.github.pockethub.core.issue.IssueUriMatcher;
import org.eclipse.egit.github.core.RepositoryIssue;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/ref/RefUtilsTest.java b/app/src/androidTest/java/com/github/pockethub/tests/ref/RefUtilsTest.java
similarity index 97%
rename from app/src/androidTest/java/com/github/mobile/tests/ref/RefUtilsTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/ref/RefUtilsTest.java
index 115c2a485..856a1dcad 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/ref/RefUtilsTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/ref/RefUtilsTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.ref;
+package com.github.pockethub.tests.ref;
import android.test.AndroidTestCase;
-import com.github.mobile.core.ref.RefUtils;
+import com.github.pockethub.core.ref.RefUtils;
import org.eclipse.egit.github.core.Reference;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/repo/RecentRepositoriesTest.java b/app/src/androidTest/java/com/github/pockethub/tests/repo/RecentRepositoriesTest.java
similarity index 94%
rename from app/src/androidTest/java/com/github/mobile/tests/repo/RecentRepositoriesTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/repo/RecentRepositoriesTest.java
index bc6e4feb8..1c0deed61 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/repo/RecentRepositoriesTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/repo/RecentRepositoriesTest.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.repo;
+package com.github.pockethub.tests.repo;
-import static com.github.mobile.ui.repo.RecentRepositories.MAX_SIZE;
+import static com.github.pockethub.ui.repo.RecentRepositories.MAX_SIZE;
import android.test.AndroidTestCase;
-import com.github.mobile.ui.repo.RecentRepositories;
+import com.github.pockethub.ui.repo.RecentRepositories;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/repo/RepositoryEventMatcherTest.java b/app/src/androidTest/java/com/github/pockethub/tests/repo/RepositoryEventMatcherTest.java
similarity index 94%
rename from app/src/androidTest/java/com/github/mobile/tests/repo/RepositoryEventMatcherTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/repo/RepositoryEventMatcherTest.java
index c1c4ccb60..1512c5520 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/repo/RepositoryEventMatcherTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/repo/RepositoryEventMatcherTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.repo;
+package com.github.pockethub.tests.repo;
import android.test.AndroidTestCase;
-import com.github.mobile.core.repo.RepositoryEventMatcher;
+import com.github.pockethub.core.repo.RepositoryEventMatcher;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/repo/RepositoryUriMatcherTest.java b/app/src/androidTest/java/com/github/pockethub/tests/repo/RepositoryUriMatcherTest.java
similarity index 96%
rename from app/src/androidTest/java/com/github/mobile/tests/repo/RepositoryUriMatcherTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/repo/RepositoryUriMatcherTest.java
index ebbac6481..96a3d63a6 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/repo/RepositoryUriMatcherTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/repo/RepositoryUriMatcherTest.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.repo;
+package com.github.pockethub.tests.repo;
import android.net.Uri;
import android.test.AndroidTestCase;
-import com.github.mobile.core.repo.RepositoryUriMatcher;
+import com.github.pockethub.core.repo.RepositoryUriMatcher;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/repo/SearchActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/repo/SearchActivityTest.java
similarity index 89%
rename from app/src/androidTest/java/com/github/mobile/tests/repo/SearchActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/repo/SearchActivityTest.java
index b3ea7062b..9d045b747 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/repo/SearchActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/repo/SearchActivityTest.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.repo;
+package com.github.pockethub.tests.repo;
import static android.app.SearchManager.QUERY;
import static android.content.Intent.ACTION_SEARCH;
import android.content.Intent;
-import com.github.mobile.tests.ActivityTest;
-import com.github.mobile.ui.search.SearchActivity;
+import com.github.pockethub.tests.ActivityTest;
+import com.github.pockethub.ui.search.SearchActivity;
/**
* Tests of {@link SearchActivity}
diff --git a/app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java b/app/src/androidTest/java/com/github/pockethub/tests/user/LoginActivityTest.java
similarity index 85%
rename from app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/user/LoginActivityTest.java
index 9a87cdcc3..13fe2fb12 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/user/LoginActivityTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/user/LoginActivityTest.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.user;
+package com.github.pockethub.tests.user;
import android.accounts.AccountManager;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.accounts.LoginActivity;
-import com.github.mobile.tests.ActivityTest;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.accounts.LoginActivity;
+import com.github.pockethub.tests.ActivityTest;
/**
* Tests of {@link LoginActivity}
diff --git a/app/src/androidTest/java/com/github/mobile/tests/user/UserComparatorTest.java b/app/src/androidTest/java/com/github/pockethub/tests/user/UserComparatorTest.java
similarity index 93%
rename from app/src/androidTest/java/com/github/mobile/tests/user/UserComparatorTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/user/UserComparatorTest.java
index 66f903bdd..1c5457308 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/user/UserComparatorTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/user/UserComparatorTest.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.user;
+package com.github.pockethub.tests.user;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.test.AndroidTestCase;
-import com.github.mobile.accounts.GitHubAccount;
-import com.github.mobile.core.user.UserComparator;
+import com.github.pockethub.accounts.GitHubAccount;
+import com.github.pockethub.core.user.UserComparator;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/user/UserUriMatcherTest.java b/app/src/androidTest/java/com/github/pockethub/tests/user/UserUriMatcherTest.java
similarity index 96%
rename from app/src/androidTest/java/com/github/mobile/tests/user/UserUriMatcherTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/user/UserUriMatcherTest.java
index b1a04ff10..f1070d100 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/user/UserUriMatcherTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/user/UserUriMatcherTest.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.user;
+package com.github.pockethub.tests.user;
import android.net.Uri;
import android.test.AndroidTestCase;
-import com.github.mobile.core.user.UserUriMatcher;
+import com.github.pockethub.core.user.UserUriMatcher;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/androidTest/java/com/github/mobile/tests/util/HtmlUtilsTest.java b/app/src/androidTest/java/com/github/pockethub/tests/util/HtmlUtilsTest.java
similarity index 98%
rename from app/src/androidTest/java/com/github/mobile/tests/util/HtmlUtilsTest.java
rename to app/src/androidTest/java/com/github/pockethub/tests/util/HtmlUtilsTest.java
index 48638c1df..457481303 100644
--- a/app/src/androidTest/java/com/github/mobile/tests/util/HtmlUtilsTest.java
+++ b/app/src/androidTest/java/com/github/pockethub/tests/util/HtmlUtilsTest.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.tests.util;
+package com.github.pockethub.tests.util;
import android.test.AndroidTestCase;
-import com.github.mobile.util.HtmlUtils;
+import com.github.pockethub.util.HtmlUtils;
/**
* Unit tests of HTML conversions done when rendering markdown
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1c344f94f..74902a676 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,6 +1,6 @@
+ package="com.github.pockethub">
@@ -26,7 +26,7 @@
android:theme="@style/Theme.GitHub">
@@ -42,7 +42,7 @@
android:value=".ui.search.SearchActivity" />
@@ -53,7 +53,7 @@
@@ -67,7 +67,7 @@
android:value=".ui.issue.IssueSearchActivity" />
@@ -76,7 +76,7 @@
@@ -85,7 +85,7 @@
@@ -109,7 +109,7 @@
@@ -118,7 +118,7 @@
@@ -127,7 +127,7 @@
@@ -136,7 +136,7 @@
@@ -145,7 +145,7 @@
@@ -154,7 +154,7 @@
@@ -163,7 +163,7 @@
@@ -172,7 +172,7 @@
@@ -186,7 +186,7 @@
android:value=".ui.issue.IssueSearchActivity" />
@@ -196,7 +196,7 @@
@@ -206,7 +206,7 @@
@@ -216,7 +216,7 @@
@@ -229,7 +229,7 @@
@@ -244,7 +244,7 @@
@@ -254,7 +254,7 @@
-->
@@ -295,7 +295,7 @@
@@ -319,7 +319,7 @@
@@ -328,7 +328,7 @@
@@ -337,7 +337,7 @@
@@ -346,10 +346,10 @@
-
+
@@ -362,17 +362,17 @@
diff --git a/app/src/main/java/com/github/mobile/DefaultClient.java b/app/src/main/java/com/github/pockethub/DefaultClient.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/DefaultClient.java
rename to app/src/main/java/com/github/pockethub/DefaultClient.java
index 7b0c9e9c3..51ada63e3 100644
--- a/app/src/main/java/com/github/mobile/DefaultClient.java
+++ b/app/src/main/java/com/github/pockethub/DefaultClient.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import org.eclipse.egit.github.core.client.GitHubClient;
diff --git a/app/src/main/java/com/github/mobile/GitHubModule.java b/app/src/main/java/com/github/pockethub/GitHubModule.java
similarity index 86%
rename from app/src/main/java/com/github/mobile/GitHubModule.java
rename to app/src/main/java/com/github/pockethub/GitHubModule.java
index f6a23aa9d..331a07116 100644
--- a/app/src/main/java/com/github/mobile/GitHubModule.java
+++ b/app/src/main/java/com/github/pockethub/GitHubModule.java
@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import android.content.Context;
-import com.github.mobile.accounts.AccountClient;
-import com.github.mobile.accounts.AccountScope;
-import com.github.mobile.accounts.GitHubAccount;
-import com.github.mobile.core.commit.CommitStore;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.persistence.OrganizationRepositories;
-import com.github.mobile.sync.SyncCampaign;
+import com.github.pockethub.accounts.AccountClient;
+import com.github.pockethub.accounts.AccountScope;
+import com.github.pockethub.accounts.GitHubAccount;
+import com.github.pockethub.core.commit.CommitStore;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.persistence.OrganizationRepositories;
+import com.github.pockethub.sync.SyncCampaign;
import com.google.inject.AbstractModule;
import com.google.inject.Provider;
import com.google.inject.Provides;
diff --git a/app/src/main/java/com/github/mobile/Intents.java b/app/src/main/java/com/github/pockethub/Intents.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/Intents.java
rename to app/src/main/java/com/github/pockethub/Intents.java
index 9482b4a04..86ffd46c1 100644
--- a/app/src/main/java/com/github/mobile/Intents.java
+++ b/app/src/main/java/com/github/pockethub/Intents.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import static org.eclipse.egit.github.core.RepositoryId.createFromUrl;
import android.content.Intent;
diff --git a/app/src/main/java/com/github/mobile/RequestCodes.java b/app/src/main/java/com/github/pockethub/RequestCodes.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/RequestCodes.java
rename to app/src/main/java/com/github/pockethub/RequestCodes.java
index fbeb07153..6f8ef3d9d 100644
--- a/app/src/main/java/com/github/mobile/RequestCodes.java
+++ b/app/src/main/java/com/github/pockethub/RequestCodes.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
/**
* Request codes
diff --git a/app/src/main/java/com/github/mobile/RequestFuture.java b/app/src/main/java/com/github/pockethub/RequestFuture.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/RequestFuture.java
rename to app/src/main/java/com/github/pockethub/RequestFuture.java
index d5158d4e9..c3db7b4b6 100644
--- a/app/src/main/java/com/github/mobile/RequestFuture.java
+++ b/app/src/main/java/com/github/pockethub/RequestFuture.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
/**
* Request future delivering a response
diff --git a/app/src/main/java/com/github/mobile/RequestReader.java b/app/src/main/java/com/github/pockethub/RequestReader.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/RequestReader.java
rename to app/src/main/java/com/github/pockethub/RequestReader.java
index b113bddba..d403ceb3e 100644
--- a/app/src/main/java/com/github/mobile/RequestReader.java
+++ b/app/src/main/java/com/github/pockethub/RequestReader.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import android.util.Log;
diff --git a/app/src/main/java/com/github/mobile/RequestWriter.java b/app/src/main/java/com/github/pockethub/RequestWriter.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/RequestWriter.java
rename to app/src/main/java/com/github/pockethub/RequestWriter.java
index f216fd61d..1bbcca632 100644
--- a/app/src/main/java/com/github/mobile/RequestWriter.java
+++ b/app/src/main/java/com/github/pockethub/RequestWriter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import android.util.Log;
diff --git a/app/src/main/java/com/github/mobile/ResultCodes.java b/app/src/main/java/com/github/pockethub/ResultCodes.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ResultCodes.java
rename to app/src/main/java/com/github/pockethub/ResultCodes.java
index 427dc2f8c..6bbe5117a 100644
--- a/app/src/main/java/com/github/mobile/ResultCodes.java
+++ b/app/src/main/java/com/github/pockethub/ResultCodes.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import static android.app.Activity.RESULT_FIRST_USER;
diff --git a/app/src/main/java/com/github/mobile/ServicesModule.java b/app/src/main/java/com/github/pockethub/ServicesModule.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ServicesModule.java
rename to app/src/main/java/com/github/pockethub/ServicesModule.java
index 1800c10e4..9b754d498 100644
--- a/app/src/main/java/com/github/mobile/ServicesModule.java
+++ b/app/src/main/java/com/github/pockethub/ServicesModule.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
-import com.github.mobile.core.search.SearchUserService;
+import com.github.pockethub.core.search.SearchUserService;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
diff --git a/app/src/main/java/com/github/mobile/ThrowableLoader.java b/app/src/main/java/com/github/pockethub/ThrowableLoader.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ThrowableLoader.java
rename to app/src/main/java/com/github/pockethub/ThrowableLoader.java
index a14044161..4867aab27 100644
--- a/app/src/main/java/com/github/mobile/ThrowableLoader.java
+++ b/app/src/main/java/com/github/pockethub/ThrowableLoader.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile;
+package com.github.pockethub;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.accounts.AuthenticatedUserLoader;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.accounts.AuthenticatedUserLoader;
/**
* Loader that support throwing an exception when loading in the background
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java b/app/src/main/java/com/github/pockethub/accounts/AccountAuthenticator.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java
rename to app/src/main/java/com/github/pockethub/accounts/AccountAuthenticator.java
index b0b1ccc03..d7823789e 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountAuthenticator.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import static android.accounts.AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE;
import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
@@ -21,11 +21,11 @@
import static android.accounts.AccountManager.KEY_AUTHTOKEN;
import static android.accounts.AccountManager.KEY_BOOLEAN_RESULT;
import static android.accounts.AccountManager.KEY_INTENT;
-import static com.github.mobile.accounts.AccountConstants.ACCOUNT_TYPE;
-import static com.github.mobile.accounts.AccountConstants.APP_NOTE;
-import static com.github.mobile.accounts.AccountConstants.APP_NOTE_URL;
-import static com.github.mobile.accounts.LoginActivity.PARAM_AUTHTOKEN_TYPE;
-import static com.github.mobile.accounts.LoginActivity.PARAM_USERNAME;
+import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
+import static com.github.pockethub.accounts.AccountConstants.APP_NOTE;
+import static com.github.pockethub.accounts.AccountConstants.APP_NOTE_URL;
+import static com.github.pockethub.accounts.LoginActivity.PARAM_AUTHTOKEN_TYPE;
+import static com.github.pockethub.accounts.LoginActivity.PARAM_USERNAME;
import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
@@ -37,7 +37,7 @@
import android.text.TextUtils;
import android.util.Log;
-import com.github.mobile.DefaultClient;
+import com.github.pockethub.DefaultClient;
import java.io.IOException;
import java.util.Arrays;
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountAuthenticatorService.java b/app/src/main/java/com/github/pockethub/accounts/AccountAuthenticatorService.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/accounts/AccountAuthenticatorService.java
rename to app/src/main/java/com/github/pockethub/accounts/AccountAuthenticatorService.java
index 569aa62b9..978472b8a 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountAuthenticatorService.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountAuthenticatorService.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import static android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT;
import android.app.Service;
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountClient.java b/app/src/main/java/com/github/pockethub/accounts/AccountClient.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/accounts/AccountClient.java
rename to app/src/main/java/com/github/pockethub/accounts/AccountClient.java
index fa8d5fade..4e7b06b46 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountClient.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountClient.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import static android.util.Log.DEBUG;
import android.text.TextUtils;
import android.util.Log;
-import com.github.mobile.DefaultClient;
+import com.github.pockethub.DefaultClient;
import com.google.inject.Provider;
import java.net.HttpURLConnection;
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountConstants.java b/app/src/main/java/com/github/pockethub/accounts/AccountConstants.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/accounts/AccountConstants.java
rename to app/src/main/java/com/github/pockethub/accounts/AccountConstants.java
index 9d514da37..9a061fa37 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountConstants.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountConstants.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
/**
* Authentication constants
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountScope.java b/app/src/main/java/com/github/pockethub/accounts/AccountScope.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/accounts/AccountScope.java
rename to app/src/main/java/com/github/pockethub/accounts/AccountScope.java
index 1c52aca97..954a3a3a2 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountScope.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountScope.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import android.accounts.Account;
import android.accounts.AccountManager;
diff --git a/app/src/main/java/com/github/mobile/accounts/AccountUtils.java b/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/accounts/AccountUtils.java
rename to app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
index 7e4426ccb..c67b2e11e 100644
--- a/app/src/main/java/com/github/mobile/accounts/AccountUtils.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
import static android.content.DialogInterface.BUTTON_POSITIVE;
import static android.util.Log.DEBUG;
-import static com.github.mobile.accounts.AccountConstants.ACCOUNT_TYPE;
+import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
import android.accounts.Account;
import android.accounts.AccountManager;
@@ -37,8 +37,8 @@
import android.text.TextUtils;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.LightAlertDialog;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.LightAlertDialog;
import java.io.IOException;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/accounts/AuthenticatedUserLoader.java b/app/src/main/java/com/github/pockethub/accounts/AuthenticatedUserLoader.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/accounts/AuthenticatedUserLoader.java
rename to app/src/main/java/com/github/pockethub/accounts/AuthenticatedUserLoader.java
index 38224274f..fd3cb1976 100644
--- a/app/src/main/java/com/github/mobile/accounts/AuthenticatedUserLoader.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AuthenticatedUserLoader.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import android.accounts.Account;
import android.accounts.AccountManager;
diff --git a/app/src/main/java/com/github/mobile/accounts/AuthenticatedUserTask.java b/app/src/main/java/com/github/pockethub/accounts/AuthenticatedUserTask.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/accounts/AuthenticatedUserTask.java
rename to app/src/main/java/com/github/pockethub/accounts/AuthenticatedUserTask.java
index 93b5ca0ae..cc2a5a86f 100644
--- a/app/src/main/java/com/github/mobile/accounts/AuthenticatedUserTask.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AuthenticatedUserTask.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import android.accounts.Account;
import android.accounts.AccountManager;
diff --git a/app/src/main/java/com/github/mobile/accounts/GitHubAccount.java b/app/src/main/java/com/github/pockethub/accounts/GitHubAccount.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/accounts/GitHubAccount.java
rename to app/src/main/java/com/github/pockethub/accounts/GitHubAccount.java
index 03ebbef61..aaa7cbe73 100644
--- a/app/src/main/java/com/github/mobile/accounts/GitHubAccount.java
+++ b/app/src/main/java/com/github/pockethub/accounts/GitHubAccount.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import static android.accounts.AccountManager.KEY_AUTHTOKEN;
-import static com.github.mobile.accounts.AccountConstants.ACCOUNT_TYPE;
+import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountManagerFuture;
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java b/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/accounts/LoginActivity.java
rename to app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
index 1b79f8763..42955ef23 100644
--- a/app/src/main/java/com/github/mobile/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
-import static com.github.mobile.accounts.AccountConstants.PROVIDER_AUTHORITY;
+import static com.github.pockethub.accounts.AccountConstants.PROVIDER_AUTHORITY;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
@@ -37,11 +37,11 @@
import com.alorma.github.sdk.security.GitHub;
import com.alorma.github.sdk.services.login.RequestTokenClient;
import com.alorma.github.sdk.services.user.GetAuthUserClient;
-import com.github.mobile.R;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.LightProgressDialog;
-import com.github.mobile.ui.MainActivity;
-import com.github.mobile.ui.roboactivities.RoboActionBarAccountAuthenticatorActivity;
+import com.github.pockethub.R;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.LightProgressDialog;
+import com.github.pockethub.ui.MainActivity;
+import com.github.pockethub.ui.roboactivities.RoboActionBarAccountAuthenticatorActivity;
import com.google.inject.Inject;
import com.squareup.okhttp.HttpUrl;
diff --git a/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java b/app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
rename to app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java
index ec37c98f1..a4c446e12 100644
--- a/app/src/main/java/com/github/mobile/accounts/LoginWebViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java
@@ -1,4 +1,4 @@
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import android.content.Intent;
import android.net.Uri;
@@ -6,8 +6,8 @@
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebViewClient;
-import com.github.mobile.R;
-import com.github.mobile.ui.WebView;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.WebView;
public class LoginWebViewActivity extends AppCompatActivity {
diff --git a/app/src/main/java/com/github/mobile/accounts/ScopeBase.java b/app/src/main/java/com/github/pockethub/accounts/ScopeBase.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/accounts/ScopeBase.java
rename to app/src/main/java/com/github/pockethub/accounts/ScopeBase.java
index c678185aa..e78de6f81 100644
--- a/app/src/main/java/com/github/mobile/accounts/ScopeBase.java
+++ b/app/src/main/java/com/github/pockethub/accounts/ScopeBase.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import com.google.inject.Key;
import com.google.inject.Provider;
diff --git a/app/src/main/java/com/github/mobile/accounts/TwoFactorAuthActivity.java b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/accounts/TwoFactorAuthActivity.java
rename to app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java
index 2c3e4623d..dc9becb97 100644
--- a/app/src/main/java/com/github/mobile/accounts/TwoFactorAuthActivity.java
+++ b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import static android.content.DialogInterface.OnCancelListener;
import static android.view.KeyEvent.ACTION_DOWN;
import static android.view.KeyEvent.KEYCODE_ENTER;
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
-import static com.github.mobile.accounts.AccountConstants.ACCOUNT_TYPE;
-import static com.github.mobile.accounts.LoginActivity.configureSyncFor;
+import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
+import static com.github.pockethub.accounts.LoginActivity.configureSyncFor;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
@@ -42,10 +42,10 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.mobile.R;
-import com.github.mobile.ui.LightProgressDialog;
-import com.github.mobile.ui.TextWatcherAdapter;
-import com.github.mobile.ui.roboactivities.RoboActionBarActivity;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.LightProgressDialog;
+import com.github.pockethub.ui.TextWatcherAdapter;
+import com.github.pockethub.ui.roboactivities.RoboActionBarActivity;
import java.io.IOException;
diff --git a/app/src/main/java/com/github/mobile/accounts/TwoFactorAuthClient.java b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/accounts/TwoFactorAuthClient.java
rename to app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java
index 11884a4e3..31aa7a2c6 100644
--- a/app/src/main/java/com/github/mobile/accounts/TwoFactorAuthClient.java
+++ b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import android.text.TextUtils;
-import com.github.mobile.DefaultClient;
+import com.github.pockethub.DefaultClient;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.client.GitHubRequest;
import org.eclipse.egit.github.core.client.GitHubResponse;
diff --git a/app/src/main/java/com/github/mobile/accounts/TwoFactorAuthException.java b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/accounts/TwoFactorAuthException.java
rename to app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java
index 580e9f031..237525cd7 100644
--- a/app/src/main/java/com/github/mobile/accounts/TwoFactorAuthException.java
+++ b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.accounts;
+package com.github.pockethub.accounts;
import java.io.IOException;
diff --git a/app/src/main/java/com/github/mobile/api/GitHubClientV2.java b/app/src/main/java/com/github/pockethub/api/GitHubClientV2.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/api/GitHubClientV2.java
rename to app/src/main/java/com/github/pockethub/api/GitHubClientV2.java
index 161fc55c3..5e0dbefc9 100644
--- a/app/src/main/java/com/github/mobile/api/GitHubClientV2.java
+++ b/app/src/main/java/com/github/pockethub/api/GitHubClientV2.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package com.github.mobile.api;
+package com.github.pockethub.api;
-import com.github.mobile.model.Authorization;
+import com.github.pockethub.model.Authorization;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/core/ItemStore.java b/app/src/main/java/com/github/pockethub/core/ItemStore.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/ItemStore.java
rename to app/src/main/java/com/github/pockethub/core/ItemStore.java
index 74139d6d0..99bdd009d 100644
--- a/app/src/main/java/com/github/mobile/core/ItemStore.java
+++ b/app/src/main/java/com/github/pockethub/core/ItemStore.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core;
+package com.github.pockethub.core;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
diff --git a/app/src/main/java/com/github/mobile/core/OnLoadListener.java b/app/src/main/java/com/github/pockethub/core/OnLoadListener.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/core/OnLoadListener.java
rename to app/src/main/java/com/github/pockethub/core/OnLoadListener.java
index b43a0f029..c07b8089a 100644
--- a/app/src/main/java/com/github/mobile/core/OnLoadListener.java
+++ b/app/src/main/java/com/github/pockethub/core/OnLoadListener.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core;
+package com.github.pockethub.core;
/**
* Load listener callback
diff --git a/app/src/main/java/com/github/mobile/core/ResourcePager.java b/app/src/main/java/com/github/pockethub/core/ResourcePager.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/core/ResourcePager.java
rename to app/src/main/java/com/github/pockethub/core/ResourcePager.java
index 8ae0866a6..c7b14ea1d 100644
--- a/app/src/main/java/com/github/mobile/core/ResourcePager.java
+++ b/app/src/main/java/com/github/pockethub/core/ResourcePager.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core;
+package com.github.pockethub.core;
import java.io.IOException;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/core/UrlMatcher.java b/app/src/main/java/com/github/pockethub/core/UrlMatcher.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/UrlMatcher.java
rename to app/src/main/java/com/github/pockethub/core/UrlMatcher.java
index eab3cd63f..9ee2ebd4d 100644
--- a/app/src/main/java/com/github/mobile/core/UrlMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/UrlMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core;
+package com.github.pockethub.core;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/core/code/FullTree.java b/app/src/main/java/com/github/pockethub/core/code/FullTree.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/code/FullTree.java
rename to app/src/main/java/com/github/pockethub/core/code/FullTree.java
index f8bc7d934..0f741d75d 100644
--- a/app/src/main/java/com/github/mobile/core/code/FullTree.java
+++ b/app/src/main/java/com/github/pockethub/core/code/FullTree.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.code;
+package com.github.pockethub.core.code;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import static org.eclipse.egit.github.core.TreeEntry.TYPE_BLOB;
import static org.eclipse.egit.github.core.TreeEntry.TYPE_TREE;
import android.text.TextUtils;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.core.ref.RefUtils;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.core.ref.RefUtils;
import java.util.List;
import java.util.Map;
diff --git a/app/src/main/java/com/github/mobile/core/code/RefreshBlobTask.java b/app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/code/RefreshBlobTask.java
rename to app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java
index a71213f23..c4084013c 100644
--- a/app/src/main/java/com/github/mobile/core/code/RefreshBlobTask.java
+++ b/app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.code;
+package com.github.pockethub.core.code;
import android.accounts.Account;
import android.content.Context;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Blob;
diff --git a/app/src/main/java/com/github/mobile/core/code/RefreshTreeTask.java b/app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/core/code/RefreshTreeTask.java
rename to app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java
index 723372cfc..a27468d70 100644
--- a/app/src/main/java/com/github/mobile/core/code/RefreshTreeTask.java
+++ b/app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.code;
+package com.github.pockethub.core.code;
import android.accounts.Account;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.core.ref.RefUtils;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.core.ref.RefUtils;
import com.google.inject.Inject;
import java.io.IOException;
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitCompareTask.java b/app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/core/commit/CommitCompareTask.java
rename to app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java
index 933cd672a..1518aa50c 100644
--- a/app/src/main/java/com/github/mobile/core/commit/CommitCompareTask.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitMatch.java b/app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/core/commit/CommitMatch.java
rename to app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java
index 4a4dfe995..d71debe99 100644
--- a/app/src/main/java/com/github/mobile/core/commit/CommitMatch.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitPager.java b/app/src/main/java/com/github/pockethub/core/commit/CommitPager.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/commit/CommitPager.java
rename to app/src/main/java/com/github/pockethub/core/commit/CommitPager.java
index f50ef9847..dcf157315 100644
--- a/app/src/main/java/com/github/mobile/core/commit/CommitPager.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitPager.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
import org.eclipse.egit.github.core.RepositoryCommit;
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitStore.java b/app/src/main/java/com/github/pockethub/core/commit/CommitStore.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/commit/CommitStore.java
rename to app/src/main/java/com/github/pockethub/core/commit/CommitStore.java
index 689796085..c2247459a 100644
--- a/app/src/main/java/com/github/mobile/core/commit/CommitStore.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitStore.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
-import com.github.mobile.core.ItemStore;
+import com.github.pockethub.core.ItemStore;
import java.io.IOException;
import java.util.HashMap;
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitUriMatcher.java b/app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/core/commit/CommitUriMatcher.java
rename to app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java
index b49411d6b..c7568e915 100644
--- a/app/src/main/java/com/github/mobile/core/commit/CommitUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import android.net.Uri;
-import com.github.mobile.core.repo.RepositoryUtils;
+import com.github.pockethub.core.repo.RepositoryUtils;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/core/commit/CommitUtils.java b/app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/commit/CommitUtils.java
rename to app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java
index 1afba8cf4..ec8c52ba2 100644
--- a/app/src/main/java/com/github/mobile/core/commit/CommitUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import android.text.TextUtils;
import android.widget.ImageView;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.AvatarLoader;
import java.text.NumberFormat;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/core/commit/FullCommit.java b/app/src/main/java/com/github/pockethub/core/commit/FullCommit.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/commit/FullCommit.java
rename to app/src/main/java/com/github/pockethub/core/commit/FullCommit.java
index 2a0b4e305..aeb09e2ce 100644
--- a/app/src/main/java/com/github/mobile/core/commit/FullCommit.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/FullCommit.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/core/commit/FullCommitFile.java b/app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/commit/FullCommitFile.java
rename to app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java
index ec0db2bb4..daf3353df 100644
--- a/app/src/main/java/com/github/mobile/core/commit/FullCommitFile.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import android.util.SparseArray;
diff --git a/app/src/main/java/com/github/mobile/core/commit/RefreshCommitTask.java b/app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/commit/RefreshCommitTask.java
rename to app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java
index d916eb46d..f78769953 100644
--- a/app/src/main/java/com/github/mobile/core/commit/RefreshCommitTask.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.commit;
+package com.github.pockethub.core.commit;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.HttpImageGetter;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.HttpImageGetter;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/core/gist/FullGist.java b/app/src/main/java/com/github/pockethub/core/gist/FullGist.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/gist/FullGist.java
rename to app/src/main/java/com/github/pockethub/core/gist/FullGist.java
index c72af8888..464776531 100644
--- a/app/src/main/java/com/github/mobile/core/gist/FullGist.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/FullGist.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import java.io.Serializable;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/core/gist/GistEventMatcher.java b/app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/gist/GistEventMatcher.java
rename to app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java
index 1946da67c..f7bff1b25 100644
--- a/app/src/main/java/com/github/mobile/core/gist/GistEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import static org.eclipse.egit.github.core.event.Event.TYPE_GIST;
diff --git a/app/src/main/java/com/github/mobile/core/gist/GistPager.java b/app/src/main/java/com/github/pockethub/core/gist/GistPager.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/core/gist/GistPager.java
rename to app/src/main/java/com/github/pockethub/core/gist/GistPager.java
index 3e7c43c3e..5892d7d0e 100644
--- a/app/src/main/java/com/github/mobile/core/gist/GistPager.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistPager.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.Gist;
diff --git a/app/src/main/java/com/github/mobile/core/gist/GistStore.java b/app/src/main/java/com/github/pockethub/core/gist/GistStore.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/gist/GistStore.java
rename to app/src/main/java/com/github/pockethub/core/gist/GistStore.java
index 11469f1e3..cd5b99233 100644
--- a/app/src/main/java/com/github/mobile/core/gist/GistStore.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistStore.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
-import com.github.mobile.core.ItemStore;
+import com.github.pockethub.core.ItemStore;
import java.io.IOException;
import java.util.Map;
diff --git a/app/src/main/java/com/github/mobile/core/gist/GistUriMatcher.java b/app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/gist/GistUriMatcher.java
rename to app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java
index a1e181e16..abb7ec204 100644
--- a/app/src/main/java/com/github/mobile/core/gist/GistUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import android.net.Uri;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/core/gist/RefreshGistTask.java b/app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/core/gist/RefreshGistTask.java
rename to app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java
index b4ffee560..3beaa21ad 100644
--- a/app/src/main/java/com/github/mobile/core/gist/RefreshGistTask.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.HttpImageGetter;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.HttpImageGetter;
import com.google.inject.Inject;
import java.util.Collections;
diff --git a/app/src/main/java/com/github/mobile/core/gist/StarGistTask.java b/app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/gist/StarGistTask.java
rename to app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java
index ce2de2936..f318c1529 100644
--- a/app/src/main/java/com/github/mobile/core/gist/StarGistTask.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Gist;
diff --git a/app/src/main/java/com/github/mobile/core/gist/UnstarGistTask.java b/app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/gist/UnstarGistTask.java
rename to app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java
index e124b0406..b1ab9fa20 100644
--- a/app/src/main/java/com/github/mobile/core/gist/UnstarGistTask.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.gist;
+package com.github.pockethub.core.gist;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Gist;
diff --git a/app/src/main/java/com/github/mobile/core/issue/FullIssue.java b/app/src/main/java/com/github/pockethub/core/issue/FullIssue.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/issue/FullIssue.java
rename to app/src/main/java/com/github/pockethub/core/issue/FullIssue.java
index 128960f81..875233e2b 100644
--- a/app/src/main/java/com/github/mobile/core/issue/FullIssue.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/FullIssue.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
import java.io.Serializable;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/core/issue/IssueEventMatcher.java b/app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/issue/IssueEventMatcher.java
rename to app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java
index 0e3b020a6..74e4e6db9 100644
--- a/app/src/main/java/com/github/mobile/core/issue/IssueEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUES;
import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUE_COMMENT;
diff --git a/app/src/main/java/com/github/mobile/core/issue/IssueFilter.java b/app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/core/issue/IssueFilter.java
rename to app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java
index 4eabbe6a2..7541e1ef4 100644
--- a/app/src/main/java/com/github/mobile/core/issue/IssueFilter.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import static org.eclipse.egit.github.core.service.IssueService.DIRECTION_DESCENDING;
diff --git a/app/src/main/java/com/github/mobile/core/issue/IssuePager.java b/app/src/main/java/com/github/pockethub/core/issue/IssuePager.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/issue/IssuePager.java
rename to app/src/main/java/com/github/pockethub/core/issue/IssuePager.java
index 0d4fba135..9a59c19b1 100644
--- a/app/src/main/java/com/github/mobile/core/issue/IssuePager.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssuePager.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.Issue;
diff --git a/app/src/main/java/com/github/mobile/core/issue/IssueStore.java b/app/src/main/java/com/github/pockethub/core/issue/IssueStore.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/issue/IssueStore.java
rename to app/src/main/java/com/github/pockethub/core/issue/IssueStore.java
index 5669fd406..51d50d833 100644
--- a/app/src/main/java/com/github/mobile/core/issue/IssueStore.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueStore.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
-import com.github.mobile.core.ItemStore;
-import com.github.mobile.util.HtmlUtils;
+import com.github.pockethub.core.ItemStore;
+import com.github.pockethub.util.HtmlUtils;
import java.io.IOException;
import java.util.HashMap;
diff --git a/app/src/main/java/com/github/mobile/core/issue/IssueUriMatcher.java b/app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/core/issue/IssueUriMatcher.java
rename to app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java
index 2b330f9f8..06442e3e9 100644
--- a/app/src/main/java/com/github/mobile/core/issue/IssueUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
import android.net.Uri;
import android.text.TextUtils;
-import com.github.mobile.core.repo.RepositoryUtils;
+import com.github.pockethub.core.repo.RepositoryUtils;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/core/issue/IssueUtils.java b/app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/issue/IssueUtils.java
rename to app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java
index 95b9dd664..d171cc461 100644
--- a/app/src/main/java/com/github/mobile/core/issue/IssueUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/core/issue/RefreshIssueTask.java b/app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/issue/RefreshIssueTask.java
rename to app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java
index d2195feeb..78beb427e 100644
--- a/app/src/main/java/com/github/mobile/core/issue/RefreshIssueTask.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.issue;
+package com.github.pockethub.core.issue;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.HttpImageGetter;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.HttpImageGetter;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/core/ref/RefUtils.java b/app/src/main/java/com/github/pockethub/core/ref/RefUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/ref/RefUtils.java
rename to app/src/main/java/com/github/pockethub/core/ref/RefUtils.java
index 284d5d00b..187118b7f 100644
--- a/app/src/main/java/com/github/mobile/core/ref/RefUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/ref/RefUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.ref;
+package com.github.pockethub.core.ref;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/core/repo/DeleteRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/core/repo/DeleteRepositoryTask.java
rename to app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java
index f93a1c1b8..6e9adb989 100644
--- a/app/src/main/java/com/github/mobile/core/repo/DeleteRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java
@@ -1,18 +1,17 @@
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AccountAuthenticator;
-import com.github.mobile.api.GitHubClientV2;
-import com.github.mobile.model.Authorization;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AccountAuthenticator;
+import com.github.pockethub.api.GitHubClientV2;
+import com.github.pockethub.model.Authorization;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/core/repo/ForkRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/core/repo/ForkRepositoryTask.java
rename to app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java
index a894eb18e..2ccfc1a8a 100644
--- a/app/src/main/java/com/github/mobile/core/repo/ForkRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java
@@ -1,11 +1,11 @@
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/core/repo/RefreshRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/repo/RefreshRepositoryTask.java
rename to app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java
index b12b5c493..397dc36e1 100644
--- a/app/src/main/java/com/github/mobile/core/repo/RefreshRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/core/repo/RepositoryEventMatcher.java b/app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/repo/RepositoryEventMatcher.java
rename to app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java
index 8b91be530..5ffaeff76 100644
--- a/app/src/main/java/com/github/mobile/core/repo/RepositoryEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
import static org.eclipse.egit.github.core.event.Event.TYPE_FORK;
diff --git a/app/src/main/java/com/github/mobile/core/repo/RepositoryUriMatcher.java b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/core/repo/RepositoryUriMatcher.java
rename to app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java
index 94cdc06aa..c01291557 100644
--- a/app/src/main/java/com/github/mobile/core/repo/RepositoryUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.net.Uri;
diff --git a/app/src/main/java/com/github/mobile/core/repo/RepositoryUtils.java b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/repo/RepositoryUtils.java
rename to app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java
index d367adaa6..62577ad81 100644
--- a/app/src/main/java/com/github/mobile/core/repo/RepositoryUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/core/repo/StarRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/repo/StarRepositoryTask.java
rename to app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java
index 598a51509..e632d2838 100644
--- a/app/src/main/java/com/github/mobile/core/repo/StarRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/core/repo/StarredRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/repo/StarredRepositoryTask.java
rename to app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java
index 96e0c90b4..5b68f9a47 100644
--- a/app/src/main/java/com/github/mobile/core/repo/StarredRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
import org.eclipse.egit.github.core.service.WatcherService;
@@ -22,7 +22,7 @@
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
/**
diff --git a/app/src/main/java/com/github/mobile/core/repo/UnstarRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/repo/UnstarRepositoryTask.java
rename to app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java
index c0f285220..c394ff973 100644
--- a/app/src/main/java/com/github/mobile/core/repo/UnstarRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.repo;
+package com.github.pockethub.core.repo;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/core/search/SearchUser.java b/app/src/main/java/com/github/pockethub/core/search/SearchUser.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/search/SearchUser.java
rename to app/src/main/java/com/github/pockethub/core/search/SearchUser.java
index 69d8855c7..db19c181f 100644
--- a/app/src/main/java/com/github/mobile/core/search/SearchUser.java
+++ b/app/src/main/java/com/github/pockethub/core/search/SearchUser.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.search;
+package com.github.pockethub.core.search;
import java.io.Serializable;
import java.util.Date;
diff --git a/app/src/main/java/com/github/mobile/core/search/SearchUserService.java b/app/src/main/java/com/github/pockethub/core/search/SearchUserService.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/core/search/SearchUserService.java
rename to app/src/main/java/com/github/pockethub/core/search/SearchUserService.java
index 1a1d16ca0..a034096b3 100644
--- a/app/src/main/java/com/github/mobile/core/search/SearchUserService.java
+++ b/app/src/main/java/com/github/pockethub/core/search/SearchUserService.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.search;
+package com.github.pockethub.core.search;
import static org.eclipse.egit.github.core.client.IGitHubConstants.CHARSET_UTF8;
import static org.eclipse.egit.github.core.client.IGitHubConstants.PARAM_START_PAGE;
diff --git a/app/src/main/java/com/github/mobile/core/user/FollowUserTask.java b/app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/user/FollowUserTask.java
rename to app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java
index 7bc2f1be5..48b22ead6 100644
--- a/app/src/main/java/com/github/mobile/core/user/FollowUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/core/user/FollowingUserTask.java b/app/src/main/java/com/github/pockethub/core/user/FollowingUserTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/user/FollowingUserTask.java
rename to app/src/main/java/com/github/pockethub/core/user/FollowingUserTask.java
index d79c0dd72..2f285eda3 100644
--- a/app/src/main/java/com/github/mobile/core/user/FollowingUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/FollowingUserTask.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import org.eclipse.egit.github.core.service.UserService;
@@ -21,7 +21,7 @@
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
/**
diff --git a/app/src/main/java/com/github/mobile/core/user/RefreshUserTask.java b/app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/user/RefreshUserTask.java
rename to app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java
index e3bd0267a..fed4c7f28 100644
--- a/app/src/main/java/com/github/mobile/core/user/RefreshUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/core/user/UnfollowUserTask.java b/app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/user/UnfollowUserTask.java
rename to app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java
index 458a9f5af..2c93edee5 100644
--- a/app/src/main/java/com/github/mobile/core/user/UnfollowUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/core/user/UserComparator.java b/app/src/main/java/com/github/pockethub/core/user/UserComparator.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/core/user/UserComparator.java
rename to app/src/main/java/com/github/pockethub/core/user/UserComparator.java
index adf0b359a..03e610e00 100644
--- a/app/src/main/java/com/github/mobile/core/user/UserComparator.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserComparator.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
-import com.github.mobile.accounts.GitHubAccount;
+import com.github.pockethub.accounts.GitHubAccount;
import com.google.inject.Inject;
import java.util.Comparator;
diff --git a/app/src/main/java/com/github/mobile/core/user/UserEventMatcher.java b/app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/core/user/UserEventMatcher.java
rename to app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java
index 437daca3d..fb69fb58f 100644
--- a/app/src/main/java/com/github/mobile/core/user/UserEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import static org.eclipse.egit.github.core.event.Event.TYPE_FOLLOW;
diff --git a/app/src/main/java/com/github/mobile/core/user/UserPager.java b/app/src/main/java/com/github/pockethub/core/user/UserPager.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/core/user/UserPager.java
rename to app/src/main/java/com/github/pockethub/core/user/UserPager.java
index 88b1623c4..c1721ef58 100644
--- a/app/src/main/java/com/github/mobile/core/user/UserPager.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserPager.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/core/user/UserUriMatcher.java b/app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/core/user/UserUriMatcher.java
rename to app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java
index b80129900..5528d6587 100644
--- a/app/src/main/java/com/github/mobile/core/user/UserUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.core.user;
+package com.github.pockethub.core.user;
import android.net.Uri;
-import com.github.mobile.core.repo.RepositoryUtils;
+import com.github.pockethub.core.repo.RepositoryUtils;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/model/App.java b/app/src/main/java/com/github/pockethub/model/App.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/model/App.java
rename to app/src/main/java/com/github/pockethub/model/App.java
index d541a69d6..23ce547d9 100644
--- a/app/src/main/java/com/github/mobile/model/App.java
+++ b/app/src/main/java/com/github/pockethub/model/App.java
@@ -1,4 +1,4 @@
-package com.github.mobile.model;
+package com.github.pockethub.model;
import java.util.HashMap;
import java.util.Map;
diff --git a/app/src/main/java/com/github/mobile/model/Authorization.java b/app/src/main/java/com/github/pockethub/model/Authorization.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/model/Authorization.java
rename to app/src/main/java/com/github/pockethub/model/Authorization.java
index 163dccc88..d11183fbb 100644
--- a/app/src/main/java/com/github/mobile/model/Authorization.java
+++ b/app/src/main/java/com/github/pockethub/model/Authorization.java
@@ -1,4 +1,4 @@
-package com.github.mobile.model;
+package com.github.pockethub.model;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/app/src/main/java/com/github/mobile/persistence/AccountDataManager.java b/app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/persistence/AccountDataManager.java
rename to app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java
index 2a2d383e2..c13d8c56e 100644
--- a/app/src/main/java/com/github/mobile/persistence/AccountDataManager.java
+++ b/app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.persistence;
+package com.github.pockethub.persistence;
import android.accounts.Account;
import android.content.Context;
@@ -22,12 +22,12 @@
import android.database.sqlite.SQLiteQueryBuilder;
import android.util.Log;
-import com.github.mobile.RequestFuture;
-import com.github.mobile.RequestReader;
-import com.github.mobile.RequestWriter;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.persistence.OrganizationRepositories.Factory;
+import com.github.pockethub.RequestFuture;
+import com.github.pockethub.RequestReader;
+import com.github.pockethub.RequestWriter;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.persistence.OrganizationRepositories.Factory;
import com.google.inject.Inject;
import com.google.inject.name.Named;
diff --git a/app/src/main/java/com/github/mobile/persistence/CacheHelper.java b/app/src/main/java/com/github/pockethub/persistence/CacheHelper.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/persistence/CacheHelper.java
rename to app/src/main/java/com/github/pockethub/persistence/CacheHelper.java
index 541f93a50..bd385496f 100644
--- a/app/src/main/java/com/github/mobile/persistence/CacheHelper.java
+++ b/app/src/main/java/com/github/pockethub/persistence/CacheHelper.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.persistence;
+package com.github.pockethub.persistence;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
diff --git a/app/src/main/java/com/github/mobile/persistence/DatabaseCache.java b/app/src/main/java/com/github/pockethub/persistence/DatabaseCache.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/persistence/DatabaseCache.java
rename to app/src/main/java/com/github/pockethub/persistence/DatabaseCache.java
index fb72cbcca..9b94e9096 100644
--- a/app/src/main/java/com/github/mobile/persistence/DatabaseCache.java
+++ b/app/src/main/java/com/github/pockethub/persistence/DatabaseCache.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.persistence;
+package com.github.pockethub.persistence;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
diff --git a/app/src/main/java/com/github/mobile/persistence/OrganizationRepositories.java b/app/src/main/java/com/github/pockethub/persistence/OrganizationRepositories.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/persistence/OrganizationRepositories.java
rename to app/src/main/java/com/github/pockethub/persistence/OrganizationRepositories.java
index b5c7eb47e..f8af20161 100644
--- a/app/src/main/java/com/github/mobile/persistence/OrganizationRepositories.java
+++ b/app/src/main/java/com/github/pockethub/persistence/OrganizationRepositories.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.persistence;
+package com.github.pockethub.persistence;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteQueryBuilder;
-import com.github.mobile.accounts.GitHubAccount;
+import com.github.pockethub.accounts.GitHubAccount;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.assistedinject.Assisted;
diff --git a/app/src/main/java/com/github/mobile/persistence/Organizations.java b/app/src/main/java/com/github/pockethub/persistence/Organizations.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/persistence/Organizations.java
rename to app/src/main/java/com/github/pockethub/persistence/Organizations.java
index c435a3c54..f9284fdcb 100644
--- a/app/src/main/java/com/github/mobile/persistence/Organizations.java
+++ b/app/src/main/java/com/github/pockethub/persistence/Organizations.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.persistence;
+package com.github.pockethub.persistence;
import android.content.ContentValues;
import android.database.Cursor;
diff --git a/app/src/main/java/com/github/mobile/persistence/PersistableResource.java b/app/src/main/java/com/github/pockethub/persistence/PersistableResource.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/persistence/PersistableResource.java
rename to app/src/main/java/com/github/pockethub/persistence/PersistableResource.java
index 11d1e3718..53c3f104e 100644
--- a/app/src/main/java/com/github/mobile/persistence/PersistableResource.java
+++ b/app/src/main/java/com/github/pockethub/persistence/PersistableResource.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.persistence;
+package com.github.pockethub.persistence;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
diff --git a/app/src/main/java/com/github/mobile/sync/ContentProviderAdapter.java b/app/src/main/java/com/github/pockethub/sync/ContentProviderAdapter.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/sync/ContentProviderAdapter.java
rename to app/src/main/java/com/github/pockethub/sync/ContentProviderAdapter.java
index 68df13001..e7b9c6727 100644
--- a/app/src/main/java/com/github/mobile/sync/ContentProviderAdapter.java
+++ b/app/src/main/java/com/github/pockethub/sync/ContentProviderAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.sync;
+package com.github.pockethub.sync;
import android.content.ContentProvider;
import android.content.ContentValues;
diff --git a/app/src/main/java/com/github/mobile/sync/SyncAdapter.java b/app/src/main/java/com/github/pockethub/sync/SyncAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/sync/SyncAdapter.java
rename to app/src/main/java/com/github/pockethub/sync/SyncAdapter.java
index 2b971a00d..59775b2b8 100644
--- a/app/src/main/java/com/github/mobile/sync/SyncAdapter.java
+++ b/app/src/main/java/com/github/pockethub/sync/SyncAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.sync;
+package com.github.pockethub.sync;
import android.accounts.Account;
import android.accounts.AccountManager;
@@ -23,8 +23,8 @@
import android.content.SyncResult;
import android.os.Bundle;
-import com.github.mobile.accounts.AccountScope;
-import com.github.mobile.sync.SyncCampaign.Factory;
+import com.github.pockethub.accounts.AccountScope;
+import com.github.pockethub.sync.SyncCampaign.Factory;
import com.google.inject.Inject;
import roboguice.inject.ContextScope;
diff --git a/app/src/main/java/com/github/mobile/sync/SyncAdapterService.java b/app/src/main/java/com/github/pockethub/sync/SyncAdapterService.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/sync/SyncAdapterService.java
rename to app/src/main/java/com/github/pockethub/sync/SyncAdapterService.java
index 2f6a1c9b2..5af070733 100644
--- a/app/src/main/java/com/github/mobile/sync/SyncAdapterService.java
+++ b/app/src/main/java/com/github/pockethub/sync/SyncAdapterService.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.sync;
+package com.github.pockethub.sync;
import android.content.Intent;
import android.os.IBinder;
diff --git a/app/src/main/java/com/github/mobile/sync/SyncCampaign.java b/app/src/main/java/com/github/pockethub/sync/SyncCampaign.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/sync/SyncCampaign.java
rename to app/src/main/java/com/github/pockethub/sync/SyncCampaign.java
index 15991ae3a..df119603d 100644
--- a/app/src/main/java/com/github/mobile/sync/SyncCampaign.java
+++ b/app/src/main/java/com/github/pockethub/sync/SyncCampaign.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.sync;
+package com.github.pockethub.sync;
import android.content.SyncResult;
import android.database.SQLException;
import android.util.Log;
-import com.github.mobile.persistence.DatabaseCache;
-import com.github.mobile.persistence.OrganizationRepositories;
-import com.github.mobile.persistence.Organizations;
+import com.github.pockethub.persistence.DatabaseCache;
+import com.github.pockethub.persistence.OrganizationRepositories;
+import com.github.pockethub.persistence.Organizations;
import com.google.inject.Inject;
import com.google.inject.assistedinject.Assisted;
diff --git a/app/src/main/java/com/github/mobile/ui/BaseActivity.java b/app/src/main/java/com/github/pockethub/ui/BaseActivity.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/BaseActivity.java
rename to app/src/main/java/com/github/pockethub/ui/BaseActivity.java
index 5a9aef467..6e46fdf5c 100644
--- a/app/src/main/java/com/github/mobile/ui/BaseActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/BaseActivity.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.os.Bundle;
import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.mobile.ui.roboactivities.RoboActionBarActivity;
+import com.github.pockethub.ui.roboactivities.RoboActionBarActivity;
import java.io.Serializable;
diff --git a/app/src/main/java/com/github/mobile/ui/CheckableRelativeLayout.java b/app/src/main/java/com/github/pockethub/ui/CheckableRelativeLayout.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/CheckableRelativeLayout.java
rename to app/src/main/java/com/github/pockethub/ui/CheckableRelativeLayout.java
index 19032bf8e..06ccfb6ab 100644
--- a/app/src/main/java/com/github/mobile/ui/CheckableRelativeLayout.java
+++ b/app/src/main/java/com/github/pockethub/ui/CheckableRelativeLayout.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/app/src/main/java/com/github/mobile/ui/ConfirmDialogFragment.java b/app/src/main/java/com/github/pockethub/ui/ConfirmDialogFragment.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/ConfirmDialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/ConfirmDialogFragment.java
index 1af8d68b7..c60aa2928 100644
--- a/app/src/main/java/com/github/mobile/ui/ConfirmDialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/ConfirmDialogFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import static android.app.Activity.RESULT_CANCELED;
import static android.app.Activity.RESULT_OK;
diff --git a/app/src/main/java/com/github/mobile/ui/DialogFragment.java b/app/src/main/java/com/github/pockethub/ui/DialogFragment.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/DialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/DialogFragment.java
index 101001711..25ee071f0 100644
--- a/app/src/main/java/com/github/mobile/ui/DialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/DialogFragment.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.mobile.ui.roboactivities.RoboSupportFragment;
+import com.github.pockethub.ui.roboactivities.RoboSupportFragment;
import java.io.Serializable;
diff --git a/app/src/main/java/com/github/mobile/ui/DialogFragmentActivity.java b/app/src/main/java/com/github/pockethub/ui/DialogFragmentActivity.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/DialogFragmentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/DialogFragmentActivity.java
index cffb5de3d..2d2cfd69d 100644
--- a/app/src/main/java/com/github/mobile/ui/DialogFragmentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/DialogFragmentActivity.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.os.Bundle;
import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.mobile.ui.roboactivities.RoboActionBarActivity;
+import com.github.pockethub.ui.roboactivities.RoboActionBarActivity;
import java.io.Serializable;
diff --git a/app/src/main/java/com/github/mobile/ui/DialogFragmentHelper.java b/app/src/main/java/com/github/pockethub/ui/DialogFragmentHelper.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/ui/DialogFragmentHelper.java
rename to app/src/main/java/com/github/pockethub/ui/DialogFragmentHelper.java
index 214a2af62..658bde06d 100644
--- a/app/src/main/java/com/github/mobile/ui/DialogFragmentHelper.java
+++ b/app/src/main/java/com/github/pockethub/ui/DialogFragmentHelper.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import static android.app.Activity.RESULT_CANCELED;
import android.app.AlertDialog;
diff --git a/app/src/main/java/com/github/mobile/ui/DialogResultListener.java b/app/src/main/java/com/github/pockethub/ui/DialogResultListener.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/DialogResultListener.java
rename to app/src/main/java/com/github/pockethub/ui/DialogResultListener.java
index ad4bc57f7..ba95193a3 100644
--- a/app/src/main/java/com/github/mobile/ui/DialogResultListener.java
+++ b/app/src/main/java/com/github/pockethub/ui/DialogResultListener.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.Activity;
import android.os.Bundle;
diff --git a/app/src/main/java/com/github/mobile/ui/FragmentPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/FragmentPagerAdapter.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/ui/FragmentPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/FragmentPagerAdapter.java
index 1ccc5ea95..0a44c8f48 100644
--- a/app/src/main/java/com/github/mobile/ui/FragmentPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/FragmentPagerAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
diff --git a/app/src/main/java/com/github/mobile/ui/FragmentProvider.java b/app/src/main/java/com/github/pockethub/ui/FragmentProvider.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/FragmentProvider.java
rename to app/src/main/java/com/github/pockethub/ui/FragmentProvider.java
index 16194d1e6..bcaff5d68 100644
--- a/app/src/main/java/com/github/mobile/ui/FragmentProvider.java
+++ b/app/src/main/java/com/github/pockethub/ui/FragmentProvider.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.support.v4.app.Fragment;
diff --git a/app/src/main/java/com/github/mobile/ui/FragmentStatePagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/FragmentStatePagerAdapter.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/FragmentStatePagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/FragmentStatePagerAdapter.java
index 85bdaf075..023b328a5 100644
--- a/app/src/main/java/com/github/mobile/ui/FragmentStatePagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/FragmentStatePagerAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
diff --git a/app/src/main/java/com/github/mobile/ui/HeaderFooterListAdapter.java b/app/src/main/java/com/github/pockethub/ui/HeaderFooterListAdapter.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/ui/HeaderFooterListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/HeaderFooterListAdapter.java
index 331f034e2..082d9a5a8 100644
--- a/app/src/main/java/com/github/mobile/ui/HeaderFooterListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/HeaderFooterListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.view.View;
import android.widget.BaseAdapter;
diff --git a/app/src/main/java/com/github/mobile/ui/ItemListFragment.java b/app/src/main/java/com/github/pockethub/ui/ItemListFragment.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/ItemListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/ItemListFragment.java
index b68343630..b52db400f 100644
--- a/app/src/main/java/com/github/mobile/ui/ItemListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/ItemListFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.Activity;
import android.os.Bundle;
@@ -35,9 +35,9 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.util.ToastUtils;
import java.util.Collections;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/LightAlertDialog.java b/app/src/main/java/com/github/pockethub/ui/LightAlertDialog.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/LightAlertDialog.java
rename to app/src/main/java/com/github/pockethub/ui/LightAlertDialog.java
index db627a637..4a0a599cf 100644
--- a/app/src/main/java/com/github/mobile/ui/LightAlertDialog.java
+++ b/app/src/main/java/com/github/pockethub/ui/LightAlertDialog.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.AlertDialog;
import android.content.Context;
diff --git a/app/src/main/java/com/github/mobile/ui/LightProgressDialog.java b/app/src/main/java/com/github/pockethub/ui/LightProgressDialog.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/LightProgressDialog.java
rename to app/src/main/java/com/github/pockethub/ui/LightProgressDialog.java
index 799338087..e18bd39ac 100644
--- a/app/src/main/java/com/github/mobile/ui/LightProgressDialog.java
+++ b/app/src/main/java/com/github/pockethub/ui/LightProgressDialog.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
-import com.github.mobile.R;
+import com.github.pockethub.R;
/**
diff --git a/app/src/main/java/com/github/mobile/ui/MainActivity.java b/app/src/main/java/com/github/pockethub/ui/MainActivity.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/MainActivity.java
rename to app/src/main/java/com/github/pockethub/ui/MainActivity.java
index 4f7c36ad4..44da81411 100644
--- a/app/src/main/java/com/github/mobile/ui/MainActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/MainActivity.java
@@ -1,6 +1,6 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
-import static com.github.mobile.ui.NavigationDrawerObject.TYPE_SEPERATOR;
+import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_SEPERATOR;
import android.app.SearchManager;
import android.content.Context;
import android.os.Bundle;
@@ -16,16 +16,16 @@
import android.view.View;
import android.view.Window;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.core.user.UserComparator;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.gist.GistsPagerFragment;
-import com.github.mobile.ui.issue.FilterListFragment;
-import com.github.mobile.ui.issue.IssueDashboardPagerFragment;
-import com.github.mobile.ui.repo.OrganizationLoader;
-import com.github.mobile.ui.user.HomePagerFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.core.user.UserComparator;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.gist.GistsPagerFragment;
+import com.github.pockethub.ui.issue.FilterListFragment;
+import com.github.pockethub.ui.issue.IssueDashboardPagerFragment;
+import com.github.pockethub.ui.repo.OrganizationLoader;
+import com.github.pockethub.ui.user.HomePagerFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import com.google.inject.Provider;
diff --git a/app/src/main/java/com/github/mobile/ui/MarkdownLoader.java b/app/src/main/java/com/github/pockethub/ui/MarkdownLoader.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/MarkdownLoader.java
rename to app/src/main/java/com/github/pockethub/ui/MarkdownLoader.java
index 06362a96f..be4df5f65 100644
--- a/app/src/main/java/com/github/mobile/ui/MarkdownLoader.java
+++ b/app/src/main/java/com/github/pockethub/ui/MarkdownLoader.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import static org.eclipse.egit.github.core.service.MarkdownService.MODE_GFM;
import android.accounts.Account;
@@ -21,8 +21,8 @@
import android.text.Html.ImageGetter;
import android.util.Log;
-import com.github.mobile.accounts.AuthenticatedUserLoader;
-import com.github.mobile.util.HtmlUtils;
+import com.github.pockethub.accounts.AuthenticatedUserLoader;
+import com.github.pockethub.util.HtmlUtils;
import com.google.inject.Inject;
import java.io.IOException;
diff --git a/app/src/main/java/com/github/mobile/ui/NavigationDrawerAdapter.java b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/NavigationDrawerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java
index b429b34c0..974572869 100644
--- a/app/src/main/java/com/github/mobile/ui/NavigationDrawerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java
@@ -1,9 +1,9 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
-import static com.github.mobile.ui.NavigationDrawerObject.TYPE_ITEM_MENU;
-import static com.github.mobile.ui.NavigationDrawerObject.TYPE_ITEM_ORG;
-import static com.github.mobile.ui.NavigationDrawerObject.TYPE_SEPERATOR;
-import static com.github.mobile.ui.NavigationDrawerObject.TYPE_SUBHEADER;
+import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_ITEM_MENU;
+import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_ITEM_ORG;
+import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_SEPERATOR;
+import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_SUBHEADER;
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
@@ -13,8 +13,8 @@
import android.widget.ImageView;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
import java.util.ArrayList;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/NavigationDrawerFragment.java b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerFragment.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/NavigationDrawerFragment.java
rename to app/src/main/java/com/github/pockethub/ui/NavigationDrawerFragment.java
index 22719f1d8..bb21a7a1e 100644
--- a/app/src/main/java/com/github/mobile/ui/NavigationDrawerFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerFragment.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.Activity;
@@ -25,8 +25,8 @@
import android.widget.ListView;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/NavigationDrawerObject.java b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerObject.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/NavigationDrawerObject.java
rename to app/src/main/java/com/github/pockethub/ui/NavigationDrawerObject.java
index d5365c716..5385d4fe2 100644
--- a/app/src/main/java/com/github/mobile/ui/NavigationDrawerObject.java
+++ b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerObject.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/NewsFragment.java b/app/src/main/java/com/github/pockethub/ui/NewsFragment.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/NewsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/NewsFragment.java
index 099e92fa6..21422f875 100644
--- a/app/src/main/java/com/github/mobile/ui/NewsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/NewsFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import static android.content.Intent.ACTION_VIEW;
import static android.content.Intent.CATEGORY_BROWSABLE;
@@ -31,19 +31,19 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.mobile.R;
-import com.github.mobile.core.gist.GistEventMatcher;
-import com.github.mobile.core.issue.IssueEventMatcher;
-import com.github.mobile.core.repo.RepositoryEventMatcher;
-import com.github.mobile.core.user.UserEventMatcher;
-import com.github.mobile.core.user.UserEventMatcher.UserPair;
-import com.github.mobile.ui.commit.CommitCompareViewActivity;
-import com.github.mobile.ui.commit.CommitViewActivity;
-import com.github.mobile.ui.gist.GistsViewActivity;
-import com.github.mobile.ui.issue.IssuesViewActivity;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
-import com.github.mobile.ui.user.NewsListAdapter;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.core.gist.GistEventMatcher;
+import com.github.pockethub.core.issue.IssueEventMatcher;
+import com.github.pockethub.core.repo.RepositoryEventMatcher;
+import com.github.pockethub.core.user.UserEventMatcher;
+import com.github.pockethub.core.user.UserEventMatcher.UserPair;
+import com.github.pockethub.ui.commit.CommitCompareViewActivity;
+import com.github.pockethub.ui.commit.CommitViewActivity;
+import com.github.pockethub.ui.gist.GistsViewActivity;
+import com.github.pockethub.ui.issue.IssuesViewActivity;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.ui.user.NewsListAdapter;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/PagedItemFragment.java b/app/src/main/java/com/github/pockethub/ui/PagedItemFragment.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/PagedItemFragment.java
rename to app/src/main/java/com/github/pockethub/ui/PagedItemFragment.java
index 47a857901..5f4ce97be 100644
--- a/app/src/main/java/com/github/mobile/ui/PagedItemFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/PagedItemFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.Activity;
import android.os.Bundle;
@@ -22,8 +22,8 @@
import android.widget.AbsListView.OnScrollListener;
import android.widget.ListView;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.core.ResourcePager;
import java.io.IOException;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/PagerActivity.java b/app/src/main/java/com/github/pockethub/ui/PagerActivity.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/PagerActivity.java
rename to app/src/main/java/com/github/pockethub/ui/PagerActivity.java
index ce5f2da06..3687d33a4 100644
--- a/app/src/main/java/com/github/mobile/ui/PagerActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/PagerActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager.OnPageChangeListener;
diff --git a/app/src/main/java/com/github/mobile/ui/PagerFragment.java b/app/src/main/java/com/github/pockethub/ui/PagerFragment.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/PagerFragment.java
rename to app/src/main/java/com/github/pockethub/ui/PagerFragment.java
index 899726650..36eab0e6a 100644
--- a/app/src/main/java/com/github/mobile/ui/PagerFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/PagerFragment.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
diff --git a/app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java b/app/src/main/java/com/github/pockethub/ui/PatchedScrollingViewBehavior.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java
rename to app/src/main/java/com/github/pockethub/ui/PatchedScrollingViewBehavior.java
index 25e8e0588..efffd510a 100644
--- a/app/src/main/java/com/github/mobile/ui/PatchedScrollingViewBehavior.java
+++ b/app/src/main/java/com/github/pockethub/ui/PatchedScrollingViewBehavior.java
@@ -1,11 +1,10 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.content.Context;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.View;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/ProgressDialogTask.java b/app/src/main/java/com/github/pockethub/ui/ProgressDialogTask.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/ProgressDialogTask.java
rename to app/src/main/java/com/github/pockethub/ui/ProgressDialogTask.java
index 5829febf1..9ce82bfb2 100644
--- a/app/src/main/java/com/github/mobile/ui/ProgressDialogTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/ProgressDialogTask.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.app.AlertDialog;
import android.content.Context;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import java.util.concurrent.Executor;
diff --git a/app/src/main/java/com/github/mobile/ui/ResourceLoadingIndicator.java b/app/src/main/java/com/github/pockethub/ui/ResourceLoadingIndicator.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/ResourceLoadingIndicator.java
rename to app/src/main/java/com/github/pockethub/ui/ResourceLoadingIndicator.java
index 95ccf787b..aa0eaa72a 100644
--- a/app/src/main/java/com/github/mobile/ui/ResourceLoadingIndicator.java
+++ b/app/src/main/java/com/github/pockethub/ui/ResourceLoadingIndicator.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R;
+import com.github.pockethub.R;
/**
* Helper for showing more items are being loaded at the bottom of a list via a
diff --git a/app/src/main/java/com/github/mobile/ui/SelectableLinkMovementMethod.java b/app/src/main/java/com/github/pockethub/ui/SelectableLinkMovementMethod.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/SelectableLinkMovementMethod.java
rename to app/src/main/java/com/github/pockethub/ui/SelectableLinkMovementMethod.java
index 780b9cc0f..bd19cf1d6 100644
--- a/app/src/main/java/com/github/mobile/ui/SelectableLinkMovementMethod.java
+++ b/app/src/main/java/com/github/pockethub/ui/SelectableLinkMovementMethod.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.text.NoCopySpan;
import android.text.Spannable;
diff --git a/app/src/main/java/com/github/mobile/ui/SingleChoiceDialogFragment.java b/app/src/main/java/com/github/pockethub/ui/SingleChoiceDialogFragment.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/SingleChoiceDialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/SingleChoiceDialogFragment.java
index b2ef971f7..00b10f40d 100644
--- a/app/src/main/java/com/github/mobile/ui/SingleChoiceDialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/SingleChoiceDialogFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
diff --git a/app/src/main/java/com/github/mobile/ui/StyledText.java b/app/src/main/java/com/github/pockethub/ui/StyledText.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/StyledText.java
rename to app/src/main/java/com/github/pockethub/ui/StyledText.java
index fb5e4de6c..bc3283103 100644
--- a/app/src/main/java/com/github/mobile/ui/StyledText.java
+++ b/app/src/main/java/com/github/pockethub/ui/StyledText.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import static android.graphics.Typeface.BOLD;
import android.text.SpannableStringBuilder;
@@ -26,7 +26,7 @@
import android.view.View;
import android.view.View.OnClickListener;
-import com.github.mobile.util.TimeUtils;
+import com.github.pockethub.util.TimeUtils;
import java.util.Date;
import java.util.Locale;
diff --git a/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java b/app/src/main/java/com/github/pockethub/ui/TabPagerActivity.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
rename to app/src/main/java/com/github/pockethub/ui/TabPagerActivity.java
index 8f7ae7321..1bb26aa13 100644
--- a/app/src/main/java/com/github/mobile/ui/TabPagerActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/TabPagerActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
@@ -23,7 +23,7 @@
import android.widget.TabHost.TabContentFactory;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
+import com.github.pockethub.R;
/**
* Activity with tabbed pages
diff --git a/app/src/main/java/com/github/mobile/ui/TabPagerFragment.java b/app/src/main/java/com/github/pockethub/ui/TabPagerFragment.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/TabPagerFragment.java
rename to app/src/main/java/com/github/pockethub/ui/TabPagerFragment.java
index d08e6d481..7b9435317 100644
--- a/app/src/main/java/com/github/mobile/ui/TabPagerFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/TabPagerFragment.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.os.Bundle;
import android.support.annotation.Nullable;
@@ -10,7 +10,7 @@
import android.view.ViewGroup;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
+import com.github.pockethub.R;
import static android.widget.TabHost.OnTabChangeListener;
import static android.widget.TabHost.TabContentFactory;
diff --git a/app/src/main/java/com/github/mobile/ui/TextWatcherAdapter.java b/app/src/main/java/com/github/pockethub/ui/TextWatcherAdapter.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/TextWatcherAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/TextWatcherAdapter.java
index 2a1ef1f23..e0c1a0abb 100644
--- a/app/src/main/java/com/github/mobile/ui/TextWatcherAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/TextWatcherAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.text.Editable;
import android.text.TextWatcher;
diff --git a/app/src/main/java/com/github/mobile/ui/ViewPager.java b/app/src/main/java/com/github/pockethub/ui/ViewPager.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/ViewPager.java
rename to app/src/main/java/com/github/pockethub/ui/ViewPager.java
index 6cfdf599f..8ab6138b9 100644
--- a/app/src/main/java/com/github/mobile/ui/ViewPager.java
+++ b/app/src/main/java/com/github/pockethub/ui/ViewPager.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/app/src/main/java/com/github/mobile/ui/WebView.java b/app/src/main/java/com/github/pockethub/ui/WebView.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/WebView.java
rename to app/src/main/java/com/github/pockethub/ui/WebView.java
index 5d085428f..659ff5be4 100644
--- a/app/src/main/java/com/github/mobile/ui/WebView.java
+++ b/app/src/main/java/com/github/pockethub/ui/WebView.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui;
+package com.github.pockethub.ui;
import android.content.Context;
import android.util.AttributeSet;
diff --git a/app/src/main/java/com/github/mobile/ui/code/RepositoryCodeFragment.java b/app/src/main/java/com/github/pockethub/ui/code/RepositoryCodeFragment.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/code/RepositoryCodeFragment.java
rename to app/src/main/java/com/github/pockethub/ui/code/RepositoryCodeFragment.java
index e01a5a971..79a357061 100644
--- a/app/src/main/java/com/github/mobile/ui/code/RepositoryCodeFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/code/RepositoryCodeFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.code;
+package com.github.pockethub.ui.code;
import static android.app.Activity.RESULT_OK;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.RequestCodes.REF_UPDATE;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.RequestCodes.REF_UPDATE;
import android.app.Activity;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
@@ -35,22 +35,22 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.core.code.FullTree;
-import com.github.mobile.core.code.FullTree.Entry;
-import com.github.mobile.core.code.FullTree.Folder;
-import com.github.mobile.core.code.RefreshTreeTask;
-import com.github.mobile.core.ref.RefUtils;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.HeaderFooterListAdapter;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.ui.ref.BranchFileViewActivity;
-import com.github.mobile.ui.ref.CodeTreeAdapter;
-import com.github.mobile.ui.ref.RefDialog;
-import com.github.mobile.ui.ref.RefDialogFragment;
-import com.github.mobile.util.ToastUtils;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.code.FullTree;
+import com.github.pockethub.core.code.FullTree.Entry;
+import com.github.pockethub.core.code.FullTree.Folder;
+import com.github.pockethub.core.code.RefreshTreeTask;
+import com.github.pockethub.core.ref.RefUtils;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.HeaderFooterListAdapter;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.ui.ref.BranchFileViewActivity;
+import com.github.pockethub.ui.ref.CodeTreeAdapter;
+import com.github.pockethub.ui.ref.RefDialog;
+import com.github.pockethub.ui.ref.RefDialogFragment;
+import com.github.pockethub.util.ToastUtils;
+import com.github.pockethub.util.TypefaceUtils;
import com.google.inject.Inject;
import java.util.LinkedList;
diff --git a/app/src/main/java/com/github/mobile/ui/comment/CommentListAdapter.java b/app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/comment/CommentListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java
index aab7b8ddc..79cada42b 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/CommentListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import android.content.Context;
import android.support.v7.widget.PopupMenu;
@@ -26,11 +26,11 @@
import android.widget.ImageView;
import com.github.kevinsawicki.wishlist.MultiTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.TimeUtils;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.TimeUtils;
+import com.github.pockethub.util.TypefaceUtils;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/comment/CommentPreviewPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/comment/CommentPreviewPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java
index 524e8414c..91b195ee5 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/CommentPreviewPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentPagerAdapter;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentPagerAdapter;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/comment/CreateCommentActivity.java b/app/src/main/java/com/github/pockethub/ui/comment/CreateCommentActivity.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/comment/CreateCommentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/comment/CreateCommentActivity.java
index 11eaf7996..4bb1667ec 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/CreateCommentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/CreateCommentActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import android.content.Intent;
import android.os.Bundle;
@@ -21,16 +21,16 @@
import android.view.Menu;
import android.view.MenuItem;
-import com.github.mobile.R;
-import com.github.mobile.ui.TabPagerActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.TabPagerActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
-import static com.github.mobile.Intents.EXTRA_COMMENT;
-import static com.github.mobile.util.TypefaceUtils.ICON_EDIT;
-import static com.github.mobile.util.TypefaceUtils.ICON_WATCH;
+import static com.github.pockethub.Intents.EXTRA_COMMENT;
+import static com.github.pockethub.util.TypefaceUtils.ICON_EDIT;
+import static com.github.pockethub.util.TypefaceUtils.ICON_WATCH;
/**
* Base activity for creating comments
diff --git a/app/src/main/java/com/github/mobile/ui/comment/DeleteCommentListener.java b/app/src/main/java/com/github/pockethub/ui/comment/DeleteCommentListener.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/comment/DeleteCommentListener.java
rename to app/src/main/java/com/github/pockethub/ui/comment/DeleteCommentListener.java
index 0976ad1cd..87491827a 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/DeleteCommentListener.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/DeleteCommentListener.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/comment/EditCommentListener.java b/app/src/main/java/com/github/pockethub/ui/comment/EditCommentListener.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/comment/EditCommentListener.java
rename to app/src/main/java/com/github/pockethub/ui/comment/EditCommentListener.java
index 9d0ca5c6d..f31884ad2 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/EditCommentListener.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/EditCommentListener.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/comment/RawCommentFragment.java b/app/src/main/java/com/github/pockethub/ui/comment/RawCommentFragment.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/comment/RawCommentFragment.java
rename to app/src/main/java/com/github/pockethub/ui/comment/RawCommentFragment.java
index 01e4d4ca3..b480de1cc 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/RawCommentFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/RawCommentFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import android.app.Activity;
import android.os.Bundle;
@@ -24,9 +24,9 @@
import android.view.ViewGroup;
import android.widget.EditText;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.TextWatcherAdapter;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.TextWatcherAdapter;
/**
* Fragment to display raw comment text
diff --git a/app/src/main/java/com/github/mobile/ui/comment/RenderedCommentFragment.java b/app/src/main/java/com/github/pockethub/ui/comment/RenderedCommentFragment.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/comment/RenderedCommentFragment.java
rename to app/src/main/java/com/github/pockethub/ui/comment/RenderedCommentFragment.java
index 2d4d21f95..1578c6439 100644
--- a/app/src/main/java/com/github/mobile/ui/comment/RenderedCommentFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/RenderedCommentFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.comment;
+package com.github.pockethub.ui.comment;
import android.os.Bundle;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
@@ -26,11 +26,11 @@
import com.github.kevinsawicki.wishlist.Keyboard;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.MarkdownLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.MarkdownLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.io.Serializable;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitCompareListFragment.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitCompareListFragment.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitCompareListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitCompareListFragment.java
index 0e19d56a5..98ba46e84 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitCompareListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitCompareListFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_HEAD;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_HEAD;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.accounts.Account;
import android.app.Activity;
import android.os.Bundle;
@@ -35,13 +35,13 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.CommitCompareTask;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.HeaderFooterListAdapter;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.CommitCompareTask;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.HeaderFooterListAdapter;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.text.MessageFormat;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitCompareViewActivity.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitCompareViewActivity.java
similarity index 87%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitCompareViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitCompareViewActivity.java
index a9904143d..b7c0b2424 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitCompareViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitCompareViewActivity.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_HEAD;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_HEAD;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@@ -27,11 +27,11 @@
import android.view.Menu;
import android.view.MenuItem;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitDiffListFragment.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitDiffListFragment.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitDiffListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitDiffListFragment.java
index 2ac27f593..51ab38254 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitDiffListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitDiffListFragment.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import static android.app.Activity.RESULT_OK;
import static android.content.DialogInterface.BUTTON_NEGATIVE;
import static android.graphics.Paint.UNDERLINE_TEXT_FLAG;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_COMMENT;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.RequestCodes.COMMENT_CREATE;
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_COMMENT;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.RequestCodes.COMMENT_CREATE;
import android.accounts.Account;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
@@ -50,20 +50,20 @@
import com.github.kevinsawicki.wishlist.ViewFinder;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.CommitStore;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.core.commit.FullCommit;
-import com.github.mobile.core.commit.FullCommitFile;
-import com.github.mobile.core.commit.RefreshCommitTask;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.HeaderFooterListAdapter;
-import com.github.mobile.ui.LightAlertDialog;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.ShareUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.CommitStore;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.core.commit.FullCommit;
+import com.github.pockethub.core.commit.FullCommitFile;
+import com.github.pockethub.core.commit.RefreshCommitTask;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.HeaderFooterListAdapter;
+import com.github.pockethub.ui.LightAlertDialog;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.ShareUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.util.Collections;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitFileComparator.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitFileComparator.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java
index 48a3e3446..fc5ecefe3 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitFileComparator.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitFileListAdapter.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitFileListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java
index 63ebf4cb1..d8382a8e7 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitFileListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import static com.github.kevinsawicki.wishlist.ViewUpdater.FORMAT_INT;
import android.content.res.Resources;
@@ -22,12 +22,12 @@
import com.github.kevinsawicki.wishlist.MultiTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.FullCommitFile;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.TimeUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.FullCommitFile;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.TimeUtils;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitFileViewActivity.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileViewActivity.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitFileViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitFileViewActivity.java
index 85a2fff6c..626765c71 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitFileViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileViewActivity.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
-
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_HEAD;
-import static com.github.mobile.Intents.EXTRA_PATH;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.util.PreferenceUtils.RENDER_MARKDOWN;
-import static com.github.mobile.util.PreferenceUtils.WRAP;
+package com.github.pockethub.ui.commit;
+
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_HEAD;
+import static com.github.pockethub.Intents.EXTRA_PATH;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.util.PreferenceUtils.RENDER_MARKDOWN;
+import static com.github.pockethub.util.PreferenceUtils.WRAP;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
@@ -34,19 +34,19 @@
import android.widget.ProgressBar;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.code.RefreshBlobTask;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.ui.BaseActivity;
-import com.github.mobile.ui.MarkdownLoader;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.MarkdownUtils;
-import com.github.mobile.util.PreferenceUtils;
-import com.github.mobile.util.ShareUtils;
-import com.github.mobile.util.SourceEditor;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.code.RefreshBlobTask;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.ui.BaseActivity;
+import com.github.pockethub.ui.MarkdownLoader;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.MarkdownUtils;
+import com.github.pockethub.util.PreferenceUtils;
+import com.github.pockethub.util.ShareUtils;
+import com.github.pockethub.util.SourceEditor;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Blob;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitListAdapter.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java
index b5eb4fe40..53dfc6bf1 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import android.text.TextUtils;
import android.view.LayoutInflater;
@@ -21,11 +21,11 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitListFragment.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitListFragment.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitListFragment.java
index 471c6d6f3..7eb5a81f1 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitListFragment.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import static android.app.Activity.RESULT_OK;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.RequestCodes.COMMIT_VIEW;
-import static com.github.mobile.RequestCodes.REF_UPDATE;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.RequestCodes.COMMIT_VIEW;
+import static com.github.pockethub.RequestCodes.REF_UPDATE;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
@@ -33,20 +33,20 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.commit.CommitPager;
-import com.github.mobile.core.commit.CommitStore;
-import com.github.mobile.core.ref.RefUtils;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.DialogResultListener;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.ui.PagedItemFragment;
-import com.github.mobile.ui.ref.RefDialog;
-import com.github.mobile.ui.ref.RefDialogFragment;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.commit.CommitPager;
+import com.github.pockethub.core.commit.CommitStore;
+import com.github.pockethub.core.ref.RefUtils;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.DialogResultListener;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.ui.PagedItemFragment;
+import com.github.pockethub.ui.ref.RefDialog;
+import com.github.pockethub.ui.ref.RefDialogFragment;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java
index 37d402b8d..6ad6f96df 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
-import com.github.mobile.ui.FragmentStatePagerAdapter;
+import com.github.pockethub.ui.FragmentStatePagerAdapter;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CommitViewActivity.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitViewActivity.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/commit/CommitViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CommitViewActivity.java
index 0f0fbb9c6..1a77302db 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CommitViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitViewActivity.java
@@ -13,26 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_BASES;
-import static com.github.mobile.Intents.EXTRA_POSITION;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_BASES;
+import static com.github.pockethub.Intents.EXTRA_POSITION;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.MenuItem;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.ui.FragmentProvider;
-import com.github.mobile.ui.PagerActivity;
-import com.github.mobile.ui.ViewPager;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.ui.FragmentProvider;
+import com.github.pockethub.ui.PagerActivity;
+import com.github.pockethub.ui.ViewPager;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CreateCommentActivity.java b/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentActivity.java
similarity index 86%
rename from app/src/main/java/com/github/mobile/ui/commit/CreateCommentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CreateCommentActivity.java
index a5d97e7c2..695b73811 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CreateCommentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentActivity.java
@@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_PATH;
-import static com.github.mobile.Intents.EXTRA_POSITION;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_PATH;
+import static com.github.pockethub.Intents.EXTRA_POSITION;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.text.TextUtils;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.ui.comment.CommentPreviewPagerAdapter;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.ui.comment.CommentPreviewPagerAdapter;
import org.eclipse.egit.github.core.CommitComment;
import org.eclipse.egit.github.core.Repository;
@@ -36,7 +36,7 @@
* Activity to create a comment on a commit
*/
public class CreateCommentActivity extends
- com.github.mobile.ui.comment.CreateCommentActivity {
+ com.github.pockethub.ui.comment.CreateCommentActivity {
/**
* Create intent to create a comment
diff --git a/app/src/main/java/com/github/mobile/ui/commit/CreateCommentTask.java b/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/commit/CreateCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java
index 8a09fb1ae..006167bd0 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/CreateCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.CommitComment;
diff --git a/app/src/main/java/com/github/mobile/ui/commit/DiffStyler.java b/app/src/main/java/com/github/pockethub/ui/commit/DiffStyler.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/commit/DiffStyler.java
rename to app/src/main/java/com/github/pockethub/ui/commit/DiffStyler.java
index 503c1be9f..c5d5aa6b4 100644
--- a/app/src/main/java/com/github/mobile/ui/commit/DiffStyler.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/DiffStyler.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.commit;
+package com.github.pockethub.ui.commit;
import android.content.res.Resources;
import android.text.TextUtils;
import android.widget.TextView;
-import com.github.mobile.R;
+import com.github.pockethub.R;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/CreateCommentActivity.java b/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentActivity.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/gist/CreateCommentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/gist/CreateCommentActivity.java
index 894e029c4..cd1b66eb7 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/CreateCommentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentActivity.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.Intents.EXTRA_GIST;
+import static com.github.pockethub.Intents.EXTRA_GIST;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Gist;
@@ -31,7 +31,7 @@
* Activity to create a comment on a {@link Gist}
*/
public class CreateCommentActivity extends
- com.github.mobile.ui.comment.CreateCommentActivity {
+ com.github.pockethub.ui.comment.CreateCommentActivity {
/**
* Create intent to create a comment
diff --git a/app/src/main/java/com/github/mobile/ui/gist/CreateCommentTask.java b/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/gist/CreateCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java
index 86b57a04f..fce9a32b6 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/CreateCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/CreateGistActivity.java b/app/src/main/java/com/github/pockethub/ui/gist/CreateGistActivity.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/gist/CreateGistActivity.java
rename to app/src/main/java/com/github/pockethub/ui/gist/CreateGistActivity.java
index 0786db649..1636dc30a 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/CreateGistActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/CreateGistActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
@@ -27,11 +27,11 @@
import android.widget.CheckBox;
import android.widget.EditText;
-import com.github.mobile.R;
-import com.github.mobile.ui.BaseActivity;
-import com.github.mobile.ui.MainActivity;
-import com.github.mobile.ui.TextWatcherAdapter;
-import com.github.mobile.util.ShareUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.BaseActivity;
+import com.github.pockethub.ui.MainActivity;
+import com.github.pockethub.ui.TextWatcherAdapter;
+import com.github.pockethub.util.ShareUtils;
import org.eclipse.egit.github.core.Gist;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/CreateGistTask.java b/app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/gist/CreateGistTask.java
rename to app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java
index fb552c178..6e28cde0f 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/CreateGistTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.util.Collections;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/DeleteCommentTask.java b/app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/gist/DeleteCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java
index 216940609..75764af99 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/DeleteCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_COMMENTS;
@@ -22,9 +22,9 @@
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/DeleteGistTask.java b/app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/gist/DeleteGistTask.java
rename to app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java
index 3d1952d7e..42abc3d03 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/DeleteGistTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static android.app.Activity.RESULT_OK;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Gist;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/EditCommentActivity.java b/app/src/main/java/com/github/pockethub/ui/gist/EditCommentActivity.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/gist/EditCommentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/gist/EditCommentActivity.java
index 0b7fdd54e..cfa0c2173 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/EditCommentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/EditCommentActivity.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.Intents.EXTRA_COMMENT;
-import static com.github.mobile.Intents.EXTRA_GIST;
+import static com.github.pockethub.Intents.EXTRA_COMMENT;
+import static com.github.pockethub.Intents.EXTRA_GIST;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.ui.comment.CommentPreviewPagerAdapter;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.comment.CommentPreviewPagerAdapter;
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Gist;
@@ -33,7 +33,7 @@
* Activity to edit a comment on a {@link Gist}
*/
public class EditCommentActivity extends
- com.github.mobile.ui.comment.CreateCommentActivity {
+ com.github.pockethub.ui.comment.CreateCommentActivity {
/**
* Create intent to edit a comment
diff --git a/app/src/main/java/com/github/mobile/ui/gist/EditCommentTask.java b/app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/gist/EditCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java
index 9bea60794..9a919564b 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/EditCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_COMMENTS;
import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_GISTS;
@@ -21,10 +21,10 @@
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistFileFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/GistFileFragment.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/gist/GistFileFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistFileFragment.java
index ed14b4efd..df0334376 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistFileFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistFileFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.Intents.EXTRA_GIST_FILE;
-import static com.github.mobile.Intents.EXTRA_GIST_ID;
-import static com.github.mobile.util.PreferenceUtils.WRAP;
+import static com.github.pockethub.Intents.EXTRA_GIST_FILE;
+import static com.github.pockethub.Intents.EXTRA_GIST_ID;
+import static com.github.pockethub.util.PreferenceUtils.WRAP;
import android.accounts.Account;
import android.app.Activity;
import android.content.SharedPreferences;
@@ -31,13 +31,13 @@
import android.view.ViewGroup;
import android.webkit.WebView;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.util.PreferenceUtils;
-import com.github.mobile.util.SourceEditor;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.util.PreferenceUtils;
+import com.github.pockethub.util.SourceEditor;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.io.IOException;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistFilesPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/gist/GistFilesPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java
index 1e668cc5d..db3e3aeee 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistFilesPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.Intents.EXTRA_GIST_FILE;
+import static com.github.pockethub.Intents.EXTRA_GIST_FILE;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
-import com.github.mobile.ui.FragmentPagerAdapter;
+import com.github.pockethub.ui.FragmentPagerAdapter;
import java.util.Map;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistFilesViewActivity.java b/app/src/main/java/com/github/pockethub/ui/gist/GistFilesViewActivity.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/gist/GistFilesViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistFilesViewActivity.java
index 7957a6229..a39c4cc40 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistFilesViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistFilesViewActivity.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_GIST_ID;
-import static com.github.mobile.Intents.EXTRA_POSITION;
+import static com.github.pockethub.Intents.EXTRA_GIST_ID;
+import static com.github.pockethub.Intents.EXTRA_POSITION;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
@@ -26,16 +26,16 @@
import android.widget.ProgressBar;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.gist.FullGist;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.core.gist.RefreshGistTask;
-import com.github.mobile.ui.FragmentProvider;
-import com.github.mobile.ui.PagerActivity;
-import com.github.mobile.ui.ViewPager;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.gist.FullGist;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.core.gist.RefreshGistTask;
+import com.github.pockethub.ui.FragmentProvider;
+import com.github.pockethub.ui.PagerActivity;
+import com.github.pockethub.ui.ViewPager;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
import com.google.inject.Inject;
import com.viewpagerindicator.TitlePageIndicator;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/GistFragment.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/gist/GistFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistFragment.java
index 9bfb07da5..cfc365197 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistFragment.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static android.app.Activity.RESULT_OK;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
-import static com.github.mobile.Intents.EXTRA_COMMENT;
-import static com.github.mobile.Intents.EXTRA_GIST_ID;
-import static com.github.mobile.RequestCodes.COMMENT_CREATE;
-import static com.github.mobile.RequestCodes.COMMENT_DELETE;
-import static com.github.mobile.RequestCodes.COMMENT_EDIT;
+import static com.github.pockethub.Intents.EXTRA_COMMENT;
+import static com.github.pockethub.Intents.EXTRA_GIST_ID;
+import static com.github.pockethub.RequestCodes.COMMENT_CREATE;
+import static com.github.pockethub.RequestCodes.COMMENT_DELETE;
+import static com.github.pockethub.RequestCodes.COMMENT_EDIT;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
@@ -42,27 +42,26 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.core.OnLoadListener;
-import com.github.mobile.core.gist.FullGist;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.core.gist.RefreshGistTask;
-import com.github.mobile.core.gist.StarGistTask;
-import com.github.mobile.core.gist.UnstarGistTask;
-import com.github.mobile.ui.ConfirmDialogFragment;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.HeaderFooterListAdapter;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.ui.comment.CommentListAdapter;
-import com.github.mobile.ui.comment.DeleteCommentListener;
-import com.github.mobile.ui.comment.EditCommentListener;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.ShareUtils;
-import com.github.mobile.util.ToastUtils;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.core.OnLoadListener;
+import com.github.pockethub.core.gist.FullGist;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.core.gist.RefreshGistTask;
+import com.github.pockethub.core.gist.StarGistTask;
+import com.github.pockethub.core.gist.UnstarGistTask;
+import com.github.pockethub.ui.ConfirmDialogFragment;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.HeaderFooterListAdapter;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.ui.comment.CommentListAdapter;
+import com.github.pockethub.ui.comment.DeleteCommentListener;
+import com.github.pockethub.ui.comment.EditCommentListener;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.ShareUtils;
+import com.github.pockethub.util.ToastUtils;
+import com.github.pockethub.util.TypefaceUtils;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistListAdapter.java b/app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/gist/GistListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java
index 4e0929bd1..c31b3c112 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import android.app.Activity;
import android.text.TextUtils;
@@ -21,10 +21,10 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistQueriesPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/gist/GistQueriesPagerAdapter.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/gist/GistQueriesPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistQueriesPagerAdapter.java
index e06f7b67c..2feb1fde1 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistQueriesPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistQueriesPagerAdapter.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import android.content.res.Resources;
import android.support.v4.app.Fragment;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentPagerAdapter;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentPagerAdapter;
/**
* Pager adapter for different Gist queries
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistsFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/GistsFragment.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/gist/GistsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistsFragment.java
index 4bdcabd51..83bb50159 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistsFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.RequestCodes.GIST_CREATE;
-import static com.github.mobile.RequestCodes.GIST_VIEW;
+import static com.github.pockethub.RequestCodes.GIST_CREATE;
+import static com.github.pockethub.RequestCodes.GIST_VIEW;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
@@ -24,10 +24,10 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.ui.PagedItemFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.ui.PagedItemFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistsPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/gist/GistsPagerAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/gist/GistsPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistsPagerAdapter.java
index 018c4d19c..18b55c0dd 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistsPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistsPagerAdapter.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.Intents.EXTRA_GIST_ID;
+import static com.github.pockethub.Intents.EXTRA_GIST_ID;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.util.SparseArray;
import android.view.ViewGroup;
-import com.github.mobile.ui.FragmentStatePagerAdapter;
+import com.github.pockethub.ui.FragmentStatePagerAdapter;
/**
* Adapter to page through an array of Gists
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistsPagerFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/GistsPagerFragment.java
similarity index 82%
rename from app/src/main/java/com/github/mobile/ui/gist/GistsPagerFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistsPagerFragment.java
index 5f1c617d0..b35faf6b2 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistsPagerFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistsPagerFragment.java
@@ -1,8 +1,8 @@
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.util.TypefaceUtils.ICON_PERSON;
-import static com.github.mobile.util.TypefaceUtils.ICON_STAR;
-import static com.github.mobile.util.TypefaceUtils.ICON_TEAM;
+import static com.github.pockethub.util.TypefaceUtils.ICON_PERSON;
+import static com.github.pockethub.util.TypefaceUtils.ICON_STAR;
+import static com.github.pockethub.util.TypefaceUtils.ICON_TEAM;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.Menu;
@@ -10,8 +10,8 @@
import android.view.MenuItem;
import android.view.View;
-import com.github.mobile.R;
-import com.github.mobile.ui.TabPagerFragment;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.TabPagerFragment;
public class GistsPagerFragment extends TabPagerFragment {
diff --git a/app/src/main/java/com/github/mobile/ui/gist/GistsViewActivity.java b/app/src/main/java/com/github/pockethub/ui/gist/GistsViewActivity.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/gist/GistsViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/gist/GistsViewActivity.java
index dbd9cfde6..8d02917ff 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/GistsViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistsViewActivity.java
@@ -13,30 +13,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_GIST;
-import static com.github.mobile.Intents.EXTRA_GIST_ID;
-import static com.github.mobile.Intents.EXTRA_GIST_IDS;
-import static com.github.mobile.Intents.EXTRA_POSITION;
+import static com.github.pockethub.Intents.EXTRA_GIST;
+import static com.github.pockethub.Intents.EXTRA_GIST_ID;
+import static com.github.pockethub.Intents.EXTRA_GIST_IDS;
+import static com.github.pockethub.Intents.EXTRA_POSITION;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.MenuItem;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.OnLoadListener;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.ui.ConfirmDialogFragment;
-import com.github.mobile.ui.FragmentProvider;
-import com.github.mobile.ui.MainActivity;
-import com.github.mobile.ui.PagerActivity;
-import com.github.mobile.ui.ViewPager;
-import com.github.mobile.ui.user.UriLauncherActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.OnLoadListener;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.ui.ConfirmDialogFragment;
+import com.github.pockethub.ui.FragmentProvider;
+import com.github.pockethub.ui.MainActivity;
+import com.github.pockethub.ui.PagerActivity;
+import com.github.pockethub.ui.ViewPager;
+import com.github.pockethub.ui.user.UriLauncherActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.io.Serializable;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/MyGistsFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/MyGistsFragment.java
similarity index 84%
rename from app/src/main/java/com/github/mobile/ui/gist/MyGistsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/MyGistsFragment.java
index 5438d955e..17333ea53 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/MyGistsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/MyGistsFragment.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
import static android.app.Activity.RESULT_OK;
-import static com.github.mobile.RequestCodes.GIST_CREATE;
-import static com.github.mobile.RequestCodes.GIST_VIEW;
+import static com.github.pockethub.RequestCodes.GIST_CREATE;
+import static com.github.pockethub.RequestCodes.GIST_VIEW;
import android.content.Intent;
-import com.github.mobile.accounts.GitHubAccount;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.gist.GistPager;
+import com.github.pockethub.accounts.GitHubAccount;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.gist.GistPager;
import com.google.inject.Inject;
import com.google.inject.Provider;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/PublicGistsFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/PublicGistsFragment.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/gist/PublicGistsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/PublicGistsFragment.java
index 3a61e7a9e..bf45d19c5 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/PublicGistsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/PublicGistsFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.gist.GistPager;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.gist.GistPager;
import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.client.PageIterator;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/RandomGistTask.java b/app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/gist/RandomGistTask.java
rename to app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java
index 5983639dc..f8ff0b010 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/RandomGistTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import static com.github.mobile.RequestCodes.GIST_VIEW;
+import static com.github.pockethub.RequestCodes.GIST_VIEW;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.core.gist.GistStore;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.gist.GistStore;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/gist/StarredGistsFragment.java b/app/src/main/java/com/github/pockethub/ui/gist/StarredGistsFragment.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/gist/StarredGistsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/gist/StarredGistsFragment.java
index 4426c9a38..f034e1d4c 100644
--- a/app/src/main/java/com/github/mobile/ui/gist/StarredGistsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/StarredGistsFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.gist;
+package com.github.pockethub.ui.gist;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.gist.GistPager;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.gist.GistPager;
import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.client.PageIterator;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java b/app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialog.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java
rename to app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialog.java
index b9d80370d..50cda817d 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialog.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import android.accounts.Account;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import java.util.ArrayList;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialogFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialogFragment.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/issue/AssigneeDialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialogFragment.java
index 6adee49bb..30fdbc1f3 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialogFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.Activity.RESULT_OK;
import static android.content.DialogInterface.BUTTON_NEGATIVE;
@@ -30,10 +30,10 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.SingleChoiceDialogFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.SingleChoiceDialogFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/CreateCommentActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentActivity.java
similarity index 83%
rename from app/src/main/java/com/github/mobile/ui/issue/CreateCommentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/CreateCommentActivity.java
index 69faff561..d2403ad80 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/CreateCommentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentActivity.java
@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.Intents.EXTRA_ISSUE_NUMBER;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_NAME;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_OWNER;
-import static com.github.mobile.Intents.EXTRA_USER;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_NUMBER;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_NAME;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_OWNER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.ui.comment.CommentPreviewPagerAdapter;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.comment.CommentPreviewPagerAdapter;
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Issue;
@@ -36,7 +36,7 @@
* Activity to create a comment on an {@link Issue}
*/
public class CreateCommentActivity extends
- com.github.mobile.ui.comment.CreateCommentActivity {
+ com.github.pockethub.ui.comment.CreateCommentActivity {
/**
* Create intent to create a comment
diff --git a/app/src/main/java/com/github/mobile/ui/issue/CreateCommentTask.java b/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/issue/CreateCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java
index 5a631c0c5..e82e09794 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/CreateCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.accounts.Account;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/CreateIssueTask.java b/app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/CreateIssueTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java
index 6426d7213..10a92c57c 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/CreateIssueTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/DashboardIssueFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueFragment.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/issue/DashboardIssueFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueFragment.java
index a9d4aa39d..d8832b8d7 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/DashboardIssueFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueFragment.java
@@ -13,20 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.RequestCodes.ISSUE_VIEW;
+import static com.github.pockethub.RequestCodes.ISSUE_VIEW;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.PagedItemFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.PagedItemFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/DashboardIssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/issue/DashboardIssueListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java
index 6e84dcf4e..930510b74 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/DashboardIssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueUtils;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.RepositoryIssue;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/DeleteCommentTask.java b/app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/issue/DeleteCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java
index 94fd849df..9f7d0e59f 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/DeleteCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.accounts.Account;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditAssigneeTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/EditAssigneeTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java
index c882640b4..642462adc 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditAssigneeTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
import android.accounts.Account;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditCommentActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/EditCommentActivity.java
similarity index 85%
rename from app/src/main/java/com/github/mobile/ui/issue/EditCommentActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditCommentActivity.java
index 665b1281d..6a419de86 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditCommentActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditCommentActivity.java
@@ -13,20 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.Intents.EXTRA_COMMENT;
-import static com.github.mobile.Intents.EXTRA_ISSUE_NUMBER;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_NAME;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_OWNER;
-import static com.github.mobile.Intents.EXTRA_USER;
+import static com.github.pockethub.Intents.EXTRA_COMMENT;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_NUMBER;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_NAME;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_OWNER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.ui.comment.CommentPreviewPagerAdapter;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.comment.CommentPreviewPagerAdapter;
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Issue;
@@ -37,7 +37,7 @@
* Activity to edit a comment on an {@link Issue}
*/
public class EditCommentActivity extends
- com.github.mobile.ui.comment.CreateCommentActivity {
+ com.github.pockethub.ui.comment.CreateCommentActivity {
/**
* Create intent to edit a comment
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditCommentTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/issue/EditCommentTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java
index ae443b5c4..8ce27a8e3 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.accounts.Account;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.HtmlUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditIssueActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/EditIssueActivity.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/issue/EditIssueActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditIssueActivity.java
index b85d8f3fa..cbc13956e 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditIssueActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditIssueActivity.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
-import static com.github.mobile.Intents.EXTRA_ISSUE;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_NAME;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_OWNER;
-import static com.github.mobile.Intents.EXTRA_USER;
-import static com.github.mobile.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
-import static com.github.mobile.RequestCodes.ISSUE_LABELS_UPDATE;
-import static com.github.mobile.RequestCodes.ISSUE_MILESTONE_UPDATE;
+import static com.github.pockethub.Intents.EXTRA_ISSUE;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_NAME;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_OWNER;
+import static com.github.pockethub.Intents.EXTRA_USER;
+import static com.github.pockethub.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_LABELS_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_MILESTONE_UPDATE;
import android.accounts.Account;
import android.content.Intent;
import android.os.Bundle;
@@ -39,15 +39,15 @@
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.ui.TextWatcherAdapter;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.core.issue.IssueUtils;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.ui.TextWatcherAdapter;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditIssueTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/issue/EditIssueTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java
index e261fc59b..91f179d67 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditIssueTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.accounts.Account;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/EditIssuesFilterActivity.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditIssuesFilterActivity.java
index 3ce1f8a67..8cacfc101 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditIssuesFilterActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditIssuesFilterActivity.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.view.View.GONE;
-import static com.github.mobile.Intents.EXTRA_ISSUE_FILTER;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_FILTER;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
@@ -30,11 +30,11 @@
import android.widget.RadioButton;
import android.widget.TextView;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.Set;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditLabelsTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/issue/EditLabelsTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java
index 0f465125a..df8fc8efb 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditLabelsTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.RequestCodes.ISSUE_LABELS_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_LABELS_UPDATE;
import android.accounts.Account;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import java.util.Arrays;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditMilestoneTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/EditMilestoneTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java
index aebf571a7..60ac3626b 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditMilestoneTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.RequestCodes.ISSUE_MILESTONE_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_MILESTONE_UPDATE;
import android.accounts.Account;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/EditStateTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java
similarity index 87%
rename from app/src/main/java/com/github/mobile/ui/issue/EditStateTask.java
rename to app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java
index a3dd47b2d..867756fa9 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/EditStateTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java
@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.RequestCodes.ISSUE_CLOSE;
-import static com.github.mobile.RequestCodes.ISSUE_REOPEN;
+import static com.github.pockethub.RequestCodes.ISSUE_CLOSE;
+import static com.github.pockethub.RequestCodes.ISSUE_REOPEN;
import static org.eclipse.egit.github.core.service.IssueService.STATE_CLOSED;
import static org.eclipse.egit.github.core.service.IssueService.STATE_OPEN;
import android.accounts.Account;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.ConfirmDialogFragment;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.ConfirmDialogFragment;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.IRepositoryIdProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/FilterListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/issue/FilterListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java
index e0f6f4e55..e5ff9d6c7 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/FilterListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.view.LayoutInflater;
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.util.AvatarLoader;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/FilterListFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/FilterListFragment.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/FilterListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/FilterListFragment.java
index e35e58078..0ea125a3d 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/FilterListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/FilterListFragment.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import android.os.Bundle;
@@ -8,11 +8,11 @@
import com.github.kevinsawicki.wishlist.AsyncLoader;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/FiltersViewActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/FiltersViewActivity.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/FiltersViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/FiltersViewActivity.java
index e7b8cbf73..c0bff722d 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/FiltersViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/FiltersViewActivity.java
@@ -13,27 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
-import android.util.TypedValue;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.RequestFuture;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.ConfirmDialogFragment;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.MainActivity;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.RequestFuture;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.ConfirmDialogFragment;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.MainActivity;
import com.google.inject.Inject;
/**
diff --git a/app/src/main/java/com/github/mobile/ui/issue/FiltersViewFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/FiltersViewFragment.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/issue/FiltersViewFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/FiltersViewFragment.java
index 9d0b4c161..3e5e667ce 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/FiltersViewFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/FiltersViewFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
@@ -28,18 +28,18 @@
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.RequestFuture;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.ConfirmDialogFragment;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.MainActivity;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.RequestFuture;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.ConfirmDialogFragment;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.MainActivity;
import com.google.inject.Inject;
/**
- * Activity to display a list of saved {@link com.github.mobile.core.issue.IssueFilter} objects
+ * Activity to display a list of saved {@link com.github.pockethub.core.issue.IssueFilter} objects
*/
public class FiltersViewFragment extends DialogFragment implements
OnItemLongClickListener {
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueBrowseActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueBrowseActivity.java
similarity index 86%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueBrowseActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueBrowseActivity.java
index cea8817b3..dbf435c7c 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueBrowseActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueBrowseActivity.java
@@ -13,22 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_ISSUE_FILTER;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_FILTER;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.MenuItem;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueDashboardPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueDashboardPagerAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueDashboardPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueDashboardPagerAdapter.java
index 683770d33..e91388875 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueDashboardPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueDashboardPagerAdapter.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
-import static com.github.mobile.ui.issue.DashboardIssueFragment.ARG_FILTER;
+import static com.github.pockethub.ui.issue.DashboardIssueFragment.ARG_FILTER;
import static org.eclipse.egit.github.core.service.IssueService.DIRECTION_DESCENDING;
import static org.eclipse.egit.github.core.service.IssueService.FIELD_DIRECTION;
import static org.eclipse.egit.github.core.service.IssueService.FIELD_FILTER;
@@ -29,8 +29,8 @@
import android.os.Bundle;
import android.support.v4.app.Fragment;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentStatePagerAdapter;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentStatePagerAdapter;
import java.io.Serializable;
import java.util.HashMap;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueDashboardPagerFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueDashboardPagerFragment.java
similarity index 84%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueDashboardPagerFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueDashboardPagerFragment.java
index 09051533f..ccd87a98d 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueDashboardPagerFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueDashboardPagerFragment.java
@@ -13,22 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.util.TypefaceUtils.ICON_ADD;
-import static com.github.mobile.util.TypefaceUtils.ICON_BROADCAST;
-import static com.github.mobile.util.TypefaceUtils.ICON_FOLLOW;
-import static com.github.mobile.util.TypefaceUtils.ICON_WATCH;
+import static com.github.pockethub.util.TypefaceUtils.ICON_ADD;
+import static com.github.pockethub.util.TypefaceUtils.ICON_BROADCAST;
+import static com.github.pockethub.util.TypefaceUtils.ICON_FOLLOW;
+import static com.github.pockethub.util.TypefaceUtils.ICON_WATCH;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.MenuItem;
import android.view.View;
-import com.github.mobile.ui.MainActivity;
-import com.github.mobile.ui.TabPagerFragment;
+import com.github.pockethub.ui.MainActivity;
+import com.github.pockethub.ui.TabPagerFragment;
/**
* Dashboard activity for issues
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueFragment.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueFragment.java
index da5d170ab..2e88e7760 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueFragment.java
@@ -13,35 +13,34 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.Activity.RESULT_OK;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
-import static com.github.mobile.Intents.EXTRA_COMMENT;
-import static com.github.mobile.Intents.EXTRA_ISSUE;
-import static com.github.mobile.Intents.EXTRA_ISSUE_NUMBER;
-import static com.github.mobile.Intents.EXTRA_IS_COLLABORATOR;
-import static com.github.mobile.Intents.EXTRA_IS_OWNER;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_NAME;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_OWNER;
-import static com.github.mobile.Intents.EXTRA_USER;
-import static com.github.mobile.RequestCodes.COMMENT_CREATE;
-import static com.github.mobile.RequestCodes.COMMENT_DELETE;
-import static com.github.mobile.RequestCodes.COMMENT_EDIT;
-import static com.github.mobile.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
-import static com.github.mobile.RequestCodes.ISSUE_CLOSE;
-import static com.github.mobile.RequestCodes.ISSUE_EDIT;
-import static com.github.mobile.RequestCodes.ISSUE_LABELS_UPDATE;
-import static com.github.mobile.RequestCodes.ISSUE_MILESTONE_UPDATE;
-import static com.github.mobile.RequestCodes.ISSUE_REOPEN;
-import static com.github.mobile.util.TypefaceUtils.ICON_COMMIT;
+import static com.github.pockethub.Intents.EXTRA_COMMENT;
+import static com.github.pockethub.Intents.EXTRA_ISSUE;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_NUMBER;
+import static com.github.pockethub.Intents.EXTRA_IS_COLLABORATOR;
+import static com.github.pockethub.Intents.EXTRA_IS_OWNER;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_NAME;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_OWNER;
+import static com.github.pockethub.Intents.EXTRA_USER;
+import static com.github.pockethub.RequestCodes.COMMENT_CREATE;
+import static com.github.pockethub.RequestCodes.COMMENT_DELETE;
+import static com.github.pockethub.RequestCodes.COMMENT_EDIT;
+import static com.github.pockethub.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_CLOSE;
+import static com.github.pockethub.RequestCodes.ISSUE_EDIT;
+import static com.github.pockethub.RequestCodes.ISSUE_LABELS_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_MILESTONE_UPDATE;
+import static com.github.pockethub.RequestCodes.ISSUE_REOPEN;
+import static com.github.pockethub.util.TypefaceUtils.ICON_COMMIT;
import static org.eclipse.egit.github.core.service.IssueService.STATE_OPEN;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
-import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -56,27 +55,27 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.core.issue.FullIssue;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.core.issue.RefreshIssueTask;
-import com.github.mobile.ui.ConfirmDialogFragment;
-import com.github.mobile.ui.DialogFragment;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.HeaderFooterListAdapter;
-import com.github.mobile.ui.SelectableLinkMovementMethod;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.ui.comment.CommentListAdapter;
-import com.github.mobile.ui.comment.DeleteCommentListener;
-import com.github.mobile.ui.comment.EditCommentListener;
-import com.github.mobile.ui.commit.CommitCompareViewActivity;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.ShareUtils;
-import com.github.mobile.util.ToastUtils;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.core.issue.FullIssue;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.core.issue.IssueUtils;
+import com.github.pockethub.core.issue.RefreshIssueTask;
+import com.github.pockethub.ui.ConfirmDialogFragment;
+import com.github.pockethub.ui.DialogFragment;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.HeaderFooterListAdapter;
+import com.github.pockethub.ui.SelectableLinkMovementMethod;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.ui.comment.CommentListAdapter;
+import com.github.pockethub.ui.comment.DeleteCommentListener;
+import com.github.pockethub.ui.comment.EditCommentListener;
+import com.github.pockethub.ui.commit.CommitCompareViewActivity;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.ShareUtils;
+import com.github.pockethub.util.ToastUtils;
+import com.github.pockethub.util.TypefaceUtils;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java
index c7ffc76f2..c8b766276 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.graphics.Paint.STRIKE_THRU_TEXT_FLAG;
import static org.eclipse.egit.github.core.service.IssueService.STATE_CLOSED;
@@ -25,10 +25,10 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import java.util.Date;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueSearchActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueSearchActivity.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueSearchActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueSearchActivity.java
index dda283ca4..fb45c511c 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueSearchActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueSearchActivity.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.SearchManager.APP_DATA;
import static android.app.SearchManager.QUERY;
import static android.content.Intent.ACTION_SEARCH;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
@@ -31,11 +31,11 @@
import android.view.Menu;
import android.view.MenuItem;
-import com.github.mobile.R;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
-import com.github.mobile.ui.roboactivities.RoboActionBarActivity;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.ui.roboactivities.RoboActionBarActivity;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssueSearchSuggestionsProvider.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueSearchSuggestionsProvider.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/issue/IssueSearchSuggestionsProvider.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssueSearchSuggestionsProvider.java
index a34349eed..4e7cafcb2 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssueSearchSuggestionsProvider.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueSearchSuggestionsProvider.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.content.Context;
import android.content.SearchRecentSuggestionsProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssuesFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/IssuesFragment.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/IssuesFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssuesFragment.java
index e3bbd3d27..2038bc716 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssuesFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssuesFragment.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.Activity.RESULT_OK;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
-import static com.github.mobile.Intents.EXTRA_ISSUE;
-import static com.github.mobile.Intents.EXTRA_ISSUE_FILTER;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.RequestCodes.ISSUE_CREATE;
-import static com.github.mobile.RequestCodes.ISSUE_FILTER_EDIT;
-import static com.github.mobile.RequestCodes.ISSUE_VIEW;
+import static com.github.pockethub.Intents.EXTRA_ISSUE;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_FILTER;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.RequestCodes.ISSUE_CREATE;
+import static com.github.pockethub.RequestCodes.ISSUE_FILTER_EDIT;
+import static com.github.pockethub.RequestCodes.ISSUE_VIEW;
import android.app.Activity;
import android.app.SearchManager;
import android.content.Context;
@@ -40,16 +40,16 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.RequestFuture;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.issue.IssueFilter;
-import com.github.mobile.core.issue.IssuePager;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.PagedItemFragment;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.RequestFuture;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.issue.IssueFilter;
+import com.github.pockethub.core.issue.IssuePager;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.PagedItemFragment;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssuesPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/issue/IssuesPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java
index 4f20f3f94..eda0f1b8b 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssuesPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java
@@ -13,22 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
-
-import static com.github.mobile.Intents.EXTRA_ISSUE_NUMBER;
-import static com.github.mobile.Intents.EXTRA_IS_COLLABORATOR;
-import static com.github.mobile.Intents.EXTRA_IS_OWNER;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_NAME;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY_OWNER;
-import static com.github.mobile.Intents.EXTRA_USER;
+package com.github.pockethub.ui.issue;
+
+import static com.github.pockethub.Intents.EXTRA_ISSUE_NUMBER;
+import static com.github.pockethub.Intents.EXTRA_IS_COLLABORATOR;
+import static com.github.pockethub.Intents.EXTRA_IS_OWNER;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_NAME;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY_OWNER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
import android.util.SparseArray;
import android.view.ViewGroup;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.ui.FragmentStatePagerAdapter;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.ui.FragmentStatePagerAdapter;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/IssuesViewActivity.java b/app/src/main/java/com/github/pockethub/ui/issue/IssuesViewActivity.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/issue/IssuesViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/issue/IssuesViewActivity.java
index 706d256df..8f99f5085 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/IssuesViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssuesViewActivity.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_ISSUE_NUMBERS;
-import static com.github.mobile.Intents.EXTRA_POSITION;
-import static com.github.mobile.Intents.EXTRA_REPOSITORIES;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_ISSUE_NUMBERS;
+import static com.github.pockethub.Intents.EXTRA_POSITION;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORIES;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.accounts.Account;
import android.content.Intent;
import android.os.Bundle;
@@ -28,19 +28,19 @@
import android.view.Menu;
import android.view.MenuItem;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.accounts.AuthenticatedUserTask;
-import com.github.mobile.core.issue.IssueStore;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.core.repo.RefreshRepositoryTask;
-import com.github.mobile.ui.FragmentProvider;
-import com.github.mobile.ui.PagerActivity;
-import com.github.mobile.ui.ViewPager;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
-import com.github.mobile.ui.user.UriLauncherActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.core.issue.IssueStore;
+import com.github.pockethub.core.issue.IssueUtils;
+import com.github.pockethub.core.repo.RefreshRepositoryTask;
+import com.github.pockethub.ui.FragmentProvider;
+import com.github.pockethub.ui.PagerActivity;
+import com.github.pockethub.ui.ViewPager;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.ui.user.UriLauncherActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/LabelDrawableSpan.java b/app/src/main/java/com/github/pockethub/ui/issue/LabelDrawableSpan.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/issue/LabelDrawableSpan.java
rename to app/src/main/java/com/github/pockethub/ui/issue/LabelDrawableSpan.java
index 465d0d341..dcec9be57 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/LabelDrawableSpan.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/LabelDrawableSpan.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.graphics.Color.WHITE;
import static android.graphics.Typeface.DEFAULT_BOLD;
@@ -32,9 +32,9 @@
import android.text.style.DynamicDrawableSpan;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.ServiceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.ServiceUtils;
import java.util.Arrays;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/LabelsDialog.java b/app/src/main/java/com/github/pockethub/ui/issue/LabelsDialog.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/issue/LabelsDialog.java
rename to app/src/main/java/com/github/pockethub/ui/issue/LabelsDialog.java
index 2953feeb0..0e07d66e3 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/LabelsDialog.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/LabelsDialog.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import android.accounts.Account;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/LabelsDialogFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/LabelsDialogFragment.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/issue/LabelsDialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/LabelsDialogFragment.java
index dc29d584f..b44b0afa4 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/LabelsDialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/LabelsDialogFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.Activity.RESULT_OK;
import static android.content.DialogInterface.BUTTON_NEGATIVE;
@@ -32,10 +32,10 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.DialogFragmentHelper;
-import com.github.mobile.ui.LightAlertDialog;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.DialogFragmentHelper;
+import com.github.pockethub.ui.LightAlertDialog;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/MilestoneDialog.java b/app/src/main/java/com/github/pockethub/ui/issue/MilestoneDialog.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/issue/MilestoneDialog.java
rename to app/src/main/java/com/github/pockethub/ui/issue/MilestoneDialog.java
index b68d6aa3d..5793045df 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/MilestoneDialog.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/MilestoneDialog.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import static org.eclipse.egit.github.core.service.IssueService.STATE_CLOSED;
@@ -21,10 +21,10 @@
import android.accounts.Account;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/MilestoneDialogFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/MilestoneDialogFragment.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/issue/MilestoneDialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/MilestoneDialogFragment.java
index 0ddf44af9..9ffa38fa6 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/MilestoneDialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/MilestoneDialogFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.Activity.RESULT_OK;
import static android.content.DialogInterface.BUTTON_NEGATIVE;
@@ -32,9 +32,9 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.SingleChoiceDialogFragment;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.SingleChoiceDialogFragment;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/RepositoryIssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/issue/RepositoryIssueListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java
index 0d6c5a215..5b4c2bc2c 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/RepositoryIssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java
@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.issue.IssueUtils;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.Issue;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/SearchIssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/issue/SearchIssueListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java
index eda997638..eadca3280 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/SearchIssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import android.text.TextUtils;
import android.view.LayoutInflater;
@@ -21,9 +21,9 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.SearchIssue;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/issue/SearchIssueListFragment.java b/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListFragment.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/issue/SearchIssueListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListFragment.java
index a12f9af97..4e9a36d8b 100644
--- a/app/src/main/java/com/github/mobile/ui/issue/SearchIssueListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.issue;
+package com.github.pockethub.ui.issue;
import static android.app.SearchManager.APP_DATA;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import static org.eclipse.egit.github.core.service.IssueService.STATE_OPEN;
import android.os.Bundle;
import android.support.v4.content.Loader;
@@ -24,10 +24,10 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java b/app/src/main/java/com/github/pockethub/ui/ref/BranchFileViewActivity.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/ref/BranchFileViewActivity.java
index b442a509e..04122212d 100644
--- a/app/src/main/java/com/github/mobile/ui/ref/BranchFileViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/ref/BranchFileViewActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.ref;
+package com.github.pockethub.ui.ref;
import android.content.Intent;
import android.os.Bundle;
@@ -28,19 +28,19 @@
import android.widget.ProgressBar;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.code.RefreshBlobTask;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.ui.BaseActivity;
-import com.github.mobile.ui.MarkdownLoader;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.HttpImageGetter;
-import com.github.mobile.util.MarkdownUtils;
-import com.github.mobile.util.PreferenceUtils;
-import com.github.mobile.util.ShareUtils;
-import com.github.mobile.util.SourceEditor;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.code.RefreshBlobTask;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.ui.BaseActivity;
+import com.github.pockethub.ui.MarkdownLoader;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.MarkdownUtils;
+import com.github.pockethub.util.PreferenceUtils;
+import com.github.pockethub.util.ShareUtils;
+import com.github.pockethub.util.SourceEditor;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Blob;
@@ -48,12 +48,12 @@
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.util.EncodingUtils;
-import static com.github.mobile.Intents.EXTRA_BASE;
-import static com.github.mobile.Intents.EXTRA_HEAD;
-import static com.github.mobile.Intents.EXTRA_PATH;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.util.PreferenceUtils.RENDER_MARKDOWN;
-import static com.github.mobile.util.PreferenceUtils.WRAP;
+import static com.github.pockethub.Intents.EXTRA_BASE;
+import static com.github.pockethub.Intents.EXTRA_HEAD;
+import static com.github.pockethub.Intents.EXTRA_PATH;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.util.PreferenceUtils.RENDER_MARKDOWN;
+import static com.github.pockethub.util.PreferenceUtils.WRAP;
/**
* Activity to view a file on a branch
diff --git a/app/src/main/java/com/github/mobile/ui/ref/CodeTreeAdapter.java b/app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/ref/CodeTreeAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java
index 3f196f0d8..7453e3be4 100644
--- a/app/src/main/java/com/github/mobile/ui/ref/CodeTreeAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.ref;
+package com.github.pockethub.ui.ref;
import android.app.Activity;
import android.content.Context;
@@ -22,12 +22,12 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.MultiTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.code.FullTree.Entry;
-import com.github.mobile.core.code.FullTree.Folder;
-import com.github.mobile.core.commit.CommitUtils;
-import com.github.mobile.util.ServiceUtils;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.code.FullTree.Entry;
+import com.github.pockethub.core.code.FullTree.Folder;
+import com.github.pockethub.core.commit.CommitUtils;
+import com.github.pockethub.util.ServiceUtils;
+import com.github.pockethub.util.TypefaceUtils;
/**
* Adapter to display a source code tree
diff --git a/app/src/main/java/com/github/mobile/ui/ref/RefDialog.java b/app/src/main/java/com/github/pockethub/ui/ref/RefDialog.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/ref/RefDialog.java
rename to app/src/main/java/com/github/pockethub/ui/ref/RefDialog.java
index 56c102e91..29442bb99 100644
--- a/app/src/main/java/com/github/mobile/ui/ref/RefDialog.java
+++ b/app/src/main/java/com/github/pockethub/ui/ref/RefDialog.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.ref;
+package com.github.pockethub.ui.ref;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import android.accounts.Account;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.core.ref.RefUtils;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.ProgressDialogTask;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.ref.RefUtils;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.ToastUtils;
import java.util.ArrayList;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/ref/RefDialogFragment.java b/app/src/main/java/com/github/pockethub/ui/ref/RefDialogFragment.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/ref/RefDialogFragment.java
rename to app/src/main/java/com/github/pockethub/ui/ref/RefDialogFragment.java
index d10b22c81..21e554870 100644
--- a/app/src/main/java/com/github/mobile/ui/ref/RefDialogFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/ref/RefDialogFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.ref;
+package com.github.pockethub.ui.ref;
import static android.app.Activity.RESULT_OK;
import static android.content.DialogInterface.BUTTON_NEGATIVE;
@@ -29,11 +29,11 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.ref.RefUtils;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.ui.SingleChoiceDialogFragment;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.core.ref.RefUtils;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.ui.SingleChoiceDialogFragment;
+import com.github.pockethub.util.TypefaceUtils;
import java.util.ArrayList;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/ContributorListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/repo/ContributorListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java
index 3ce14e8b4..98ae1857a 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/ContributorListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import android.content.Context;
import android.view.LayoutInflater;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
import org.eclipse.egit.github.core.Contributor;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/DefaultRepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/repo/DefaultRepositoryListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java
index 356d1d450..5beafa319 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/DefaultRepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.TypefaceUtils;
import java.util.HashMap;
import java.util.HashSet;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/OrganizationLoader.java b/app/src/main/java/com/github/pockethub/ui/repo/OrganizationLoader.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/repo/OrganizationLoader.java
rename to app/src/main/java/com/github/pockethub/ui/repo/OrganizationLoader.java
index 72ae6caaf..f1138c769 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/OrganizationLoader.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/OrganizationLoader.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AuthenticatedUserLoader;
-import com.github.mobile.core.user.UserComparator;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AuthenticatedUserLoader;
+import com.github.pockethub.core.user.UserComparator;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import com.google.inject.Provider;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RecentRepositories.java b/app/src/main/java/com/github/pockethub/ui/repo/RecentRepositories.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/repo/RecentRepositories.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RecentRepositories.java
index 2f464b1be..49cad0907 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RecentRepositories.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RecentRepositories.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import android.content.Context;
import android.os.AsyncTask;
-import com.github.mobile.RequestReader;
-import com.github.mobile.RequestWriter;
+import com.github.pockethub.RequestReader;
+import com.github.pockethub.RequestWriter;
import java.io.File;
import java.io.Serializable;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryContributorsActivity.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryContributorsActivity.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryContributorsActivity.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryContributorsActivity.java
index 5b13df83b..1cb0866de 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryContributorsActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryContributorsActivity.java
@@ -13,20 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.MenuItem;
-import com.github.mobile.Intents;
-import com.github.mobile.R;
-import com.github.mobile.ui.DialogFragmentActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.Intents;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.DialogFragmentActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryContributorsFragment.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryContributorsFragment.java
similarity index 87%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryContributorsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryContributorsFragment.java
index a9cfc84bc..ba4614f5c 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryContributorsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryContributorsFragment.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.content.Loader;
@@ -23,13 +23,13 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.core.user.RefreshUserTask;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.ui.user.UserViewActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.core.user.RefreshUserTask;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.ui.user.UserViewActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryListAdapter.java
similarity index 86%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryListAdapter.java
index cd76384f5..8c42dc4b8 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryListAdapter.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
-import static com.github.mobile.util.TypefaceUtils.ICON_FORK;
-import static com.github.mobile.util.TypefaceUtils.ICON_MIRROR_PRIVATE;
-import static com.github.mobile.util.TypefaceUtils.ICON_MIRROR_PUBLIC;
-import static com.github.mobile.util.TypefaceUtils.ICON_PRIVATE;
-import static com.github.mobile.util.TypefaceUtils.ICON_PUBLIC;
+import static com.github.pockethub.util.TypefaceUtils.ICON_FORK;
+import static com.github.pockethub.util.TypefaceUtils.ICON_MIRROR_PRIVATE;
+import static com.github.pockethub.util.TypefaceUtils.ICON_MIRROR_PUBLIC;
+import static com.github.pockethub.util.TypefaceUtils.ICON_PRIVATE;
+import static com.github.pockethub.util.TypefaceUtils.ICON_PUBLIC;
import android.text.TextUtils;
import android.view.LayoutInflater;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryListFragment.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryListFragment.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryListFragment.java
index 029eadc6d..69b3b839e 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryListFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
-import static com.github.mobile.Intents.EXTRA_USER;
-import static com.github.mobile.RequestCodes.REPOSITORY_VIEW;
-import static com.github.mobile.ResultCodes.RESOURCE_CHANGED;
+import static com.github.pockethub.Intents.EXTRA_USER;
+import static com.github.pockethub.RequestCodes.REPOSITORY_VIEW;
+import static com.github.pockethub.ResultCodes.RESOURCE_CHANGED;
import static java.util.Locale.US;
import android.app.Activity;
import android.app.AlertDialog;
@@ -30,16 +30,16 @@
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.persistence.AccountDataManager;
-import com.github.mobile.ui.HeaderFooterListAdapter;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.ui.LightAlertDialog;
-import com.github.mobile.ui.user.OrganizationSelectionListener;
-import com.github.mobile.ui.user.OrganizationSelectionProvider;
-import com.github.mobile.ui.user.UserViewActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.persistence.AccountDataManager;
+import com.github.pockethub.ui.HeaderFooterListAdapter;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.ui.LightAlertDialog;
+import com.github.pockethub.ui.user.OrganizationSelectionListener;
+import com.github.pockethub.ui.user.OrganizationSelectionProvider;
+import com.github.pockethub.ui.user.UserViewActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.Collections;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryNewsFragment.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryNewsFragment.java
similarity index 84%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryNewsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryNewsFragment.java
index e0bc79138..c57fdf185 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryNewsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryNewsFragment.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
import android.app.Activity;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.user.UserEventMatcher.UserPair;
-import com.github.mobile.ui.NewsFragment;
-import com.github.mobile.ui.issue.IssuesViewActivity;
-import com.github.mobile.ui.user.EventPager;
-import com.github.mobile.ui.user.UserViewActivity;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.user.UserEventMatcher.UserPair;
+import com.github.pockethub.ui.NewsFragment;
+import com.github.pockethub.ui.issue.IssuesViewActivity;
+import com.github.pockethub.ui.user.EventPager;
+import com.github.pockethub.ui.user.UserViewActivity;
import org.eclipse.egit.github.core.Issue;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryPagerAdapter.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryPagerAdapter.java
index 5d499f530..7193705d7 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryPagerAdapter.java
@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentPagerAdapter;
-import com.github.mobile.ui.code.RepositoryCodeFragment;
-import com.github.mobile.ui.commit.CommitListFragment;
-import com.github.mobile.ui.issue.IssuesFragment;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentPagerAdapter;
+import com.github.pockethub.ui.code.RepositoryCodeFragment;
+import com.github.pockethub.ui.commit.CommitListFragment;
+import com.github.pockethub.ui.issue.IssuesFragment;
/**
* Adapter to view a repository's various pages
diff --git a/app/src/main/java/com/github/mobile/ui/repo/RepositoryViewActivity.java b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryViewActivity.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/repo/RepositoryViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/repo/RepositoryViewActivity.java
index 73c0f27b5..deec4086b 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/RepositoryViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/RepositoryViewActivity.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_REPOSITORY;
-import static com.github.mobile.ResultCodes.RESOURCE_CHANGED;
-import static com.github.mobile.ui.repo.RepositoryPagerAdapter.ITEM_CODE;
-import static com.github.mobile.util.TypefaceUtils.ICON_CODE;
-import static com.github.mobile.util.TypefaceUtils.ICON_COMMIT;
-import static com.github.mobile.util.TypefaceUtils.ICON_ISSUE_OPEN;
-import static com.github.mobile.util.TypefaceUtils.ICON_NEWS;
+import static com.github.pockethub.Intents.EXTRA_REPOSITORY;
+import static com.github.pockethub.ResultCodes.RESOURCE_CHANGED;
+import static com.github.pockethub.ui.repo.RepositoryPagerAdapter.ITEM_CODE;
+import static com.github.pockethub.util.TypefaceUtils.ICON_CODE;
+import static com.github.pockethub.util.TypefaceUtils.ICON_COMMIT;
+import static com.github.pockethub.util.TypefaceUtils.ICON_ISSUE_OPEN;
+import static com.github.pockethub.util.TypefaceUtils.ICON_NEWS;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
@@ -35,21 +35,21 @@
import com.afollestad.materialdialogs.MaterialDialog;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.repo.DeleteRepositoryTask;
-import com.github.mobile.core.repo.ForkRepositoryTask;
-import com.github.mobile.core.repo.RefreshRepositoryTask;
-import com.github.mobile.core.repo.RepositoryUtils;
-import com.github.mobile.core.repo.StarRepositoryTask;
-import com.github.mobile.core.repo.StarredRepositoryTask;
-import com.github.mobile.core.repo.UnstarRepositoryTask;
-import com.github.mobile.ui.TabPagerActivity;
-import com.github.mobile.ui.user.UriLauncherActivity;
-import com.github.mobile.ui.user.UserViewActivity;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.ShareUtils;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.repo.DeleteRepositoryTask;
+import com.github.pockethub.core.repo.ForkRepositoryTask;
+import com.github.pockethub.core.repo.RefreshRepositoryTask;
+import com.github.pockethub.core.repo.RepositoryUtils;
+import com.github.pockethub.core.repo.StarRepositoryTask;
+import com.github.pockethub.core.repo.StarredRepositoryTask;
+import com.github.pockethub.core.repo.UnstarRepositoryTask;
+import com.github.pockethub.ui.TabPagerActivity;
+import com.github.pockethub.ui.user.UriLauncherActivity;
+import com.github.pockethub.ui.user.UserViewActivity;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.ShareUtils;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Repository;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/UserRepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/repo/UserRepositoryListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java
index 2ffeca053..3d74e36d8 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/UserRepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/repo/UserRepositoryListFragment.java b/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListFragment.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/repo/UserRepositoryListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListFragment.java
index d5c9be213..ee6c62b6f 100644
--- a/app/src/main/java/com/github/mobile/ui/repo/UserRepositoryListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.repo;
+package com.github.pockethub.ui.repo;
-import static com.github.mobile.Intents.EXTRA_USER;
-import static com.github.mobile.RequestCodes.REPOSITORY_VIEW;
-import static com.github.mobile.ResultCodes.RESOURCE_CHANGED;
+import static com.github.pockethub.Intents.EXTRA_USER;
+import static com.github.pockethub.RequestCodes.REPOSITORY_VIEW;
+import static com.github.pockethub.ResultCodes.RESOURCE_CHANGED;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
@@ -25,9 +25,9 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.ui.PagedItemFragment;
+import com.github.pockethub.R;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.ui.PagedItemFragment;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java b/app/src/main/java/com/github/pockethub/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java
rename to app/src/main/java/com/github/pockethub/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java
index d23e022fb..c504de7ff 100644
--- a/app/src/main/java/com/github/mobile/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/roboactivities/ActionBarAccountAuthenticatorActivity.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui.roboactivities;
+package com.github.pockethub.ui.roboactivities;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.AccountManager;
diff --git a/app/src/main/java/com/github/mobile/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java b/app/src/main/java/com/github/pockethub/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java
rename to app/src/main/java/com/github/pockethub/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java
index ff7735e95..62c568d85 100644
--- a/app/src/main/java/com/github/mobile/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/roboactivities/RoboActionBarAccountAuthenticatorActivity.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui.roboactivities;
+package com.github.pockethub.ui.roboactivities;
import android.accounts.AccountAuthenticatorActivity;
import android.content.Intent;
diff --git a/app/src/main/java/com/github/mobile/ui/roboactivities/RoboActionBarActivity.java b/app/src/main/java/com/github/pockethub/ui/roboactivities/RoboActionBarActivity.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/roboactivities/RoboActionBarActivity.java
rename to app/src/main/java/com/github/pockethub/ui/roboactivities/RoboActionBarActivity.java
index 19769a727..0d579b122 100644
--- a/app/src/main/java/com/github/mobile/ui/roboactivities/RoboActionBarActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/roboactivities/RoboActionBarActivity.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui.roboactivities;
+package com.github.pockethub.ui.roboactivities;
import android.content.Intent;
import android.content.res.Configuration;
diff --git a/app/src/main/java/com/github/mobile/ui/roboactivities/RoboSupportFragment.java b/app/src/main/java/com/github/pockethub/ui/roboactivities/RoboSupportFragment.java
similarity index 92%
rename from app/src/main/java/com/github/mobile/ui/roboactivities/RoboSupportFragment.java
rename to app/src/main/java/com/github/pockethub/ui/roboactivities/RoboSupportFragment.java
index 8fe76de32..941bc7961 100644
--- a/app/src/main/java/com/github/mobile/ui/roboactivities/RoboSupportFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/roboactivities/RoboSupportFragment.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui.roboactivities;
+package com.github.pockethub.ui.roboactivities;
import roboguice.RoboGuice;
import android.os.Bundle;
diff --git a/app/src/main/java/com/github/mobile/ui/search/RepositorySearchSuggestionsProvider.java b/app/src/main/java/com/github/pockethub/ui/search/RepositorySearchSuggestionsProvider.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/search/RepositorySearchSuggestionsProvider.java
rename to app/src/main/java/com/github/pockethub/ui/search/RepositorySearchSuggestionsProvider.java
index bbcc6346b..c3987b90b 100644
--- a/app/src/main/java/com/github/mobile/ui/search/RepositorySearchSuggestionsProvider.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/RepositorySearchSuggestionsProvider.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import android.content.Context;
import android.content.SearchRecentSuggestionsProvider;
diff --git a/app/src/main/java/com/github/mobile/ui/search/SearchActivity.java b/app/src/main/java/com/github/pockethub/ui/search/SearchActivity.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/search/SearchActivity.java
rename to app/src/main/java/com/github/pockethub/ui/search/SearchActivity.java
index d448b0d05..c1da86712 100644
--- a/app/src/main/java/com/github/mobile/ui/search/SearchActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchActivity.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import static android.app.SearchManager.QUERY;
import static android.content.Intent.ACTION_SEARCH;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.util.TypefaceUtils.ICON_PERSON;
-import static com.github.mobile.util.TypefaceUtils.ICON_PUBLIC;
+import static com.github.pockethub.util.TypefaceUtils.ICON_PERSON;
+import static com.github.pockethub.util.TypefaceUtils.ICON_PUBLIC;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
@@ -34,10 +34,10 @@
import android.widget.ProgressBar;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.R;
-import com.github.mobile.ui.MainActivity;
-import com.github.mobile.ui.TabPagerActivity;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.MainActivity;
+import com.github.pockethub.ui.TabPagerActivity;
+import com.github.pockethub.util.ToastUtils;
/**
* Activity to view search results
diff --git a/app/src/main/java/com/github/mobile/ui/search/SearchPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/search/SearchPagerAdapter.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/search/SearchPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/search/SearchPagerAdapter.java
index c485547a2..36170441b 100644
--- a/app/src/main/java/com/github/mobile/ui/search/SearchPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchPagerAdapter.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import android.content.res.Resources;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentPagerAdapter;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentPagerAdapter;
/**
* Adapter to view various pages of search screen
diff --git a/app/src/main/java/com/github/mobile/ui/search/SearchRepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/search/SearchRepositoryListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java
index ef6054a91..066fa707e 100644
--- a/app/src/main/java/com/github/mobile/ui/search/SearchRepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
-import com.github.mobile.R;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.ui.repo.RepositoryListAdapter;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.ui.repo.RepositoryListAdapter;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.SearchRepository;
diff --git a/app/src/main/java/com/github/mobile/ui/search/SearchRepositoryListFragment.java b/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListFragment.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/search/SearchRepositoryListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListFragment.java
index 96a009a24..26d630c99 100644
--- a/app/src/main/java/com/github/mobile/ui/search/SearchRepositoryListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import static android.app.SearchManager.QUERY;
import android.app.Activity;
@@ -24,11 +24,11 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.core.repo.RefreshRepositoryTask;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.core.repo.RefreshRepositoryTask;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
import com.google.inject.Inject;
import java.io.IOException;
diff --git a/app/src/main/java/com/github/mobile/ui/search/SearchUserListAdapter.java b/app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/search/SearchUserListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java
index 8199e1e93..53acd8a4e 100644
--- a/app/src/main/java/com/github/mobile/ui/search/SearchUserListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import android.content.Context;
import android.view.LayoutInflater;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.core.search.SearchUser;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.core.search.SearchUser;
+import com.github.pockethub.util.AvatarLoader;
/**
* Adapter for a list of searched users
diff --git a/app/src/main/java/com/github/mobile/ui/search/SearchUserListFragment.java b/app/src/main/java/com/github/pockethub/ui/search/SearchUserListFragment.java
similarity index 85%
rename from app/src/main/java/com/github/mobile/ui/search/SearchUserListFragment.java
rename to app/src/main/java/com/github/pockethub/ui/search/SearchUserListFragment.java
index 0a2c7f8a5..4fd90b8b3 100644
--- a/app/src/main/java/com/github/mobile/ui/search/SearchUserListFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchUserListFragment.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.search;
+package com.github.pockethub.ui.search;
import static android.app.SearchManager.QUERY;
import android.app.Activity;
@@ -23,15 +23,15 @@
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.core.search.SearchUser;
-import com.github.mobile.core.search.SearchUserService;
-import com.github.mobile.core.user.RefreshUserTask;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.ui.user.UserViewActivity;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.core.search.SearchUser;
+import com.github.pockethub.core.search.SearchUserService;
+import com.github.pockethub.core.user.RefreshUserTask;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.ui.user.UserViewActivity;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/user/EventPager.java b/app/src/main/java/com/github/pockethub/ui/user/EventPager.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/user/EventPager.java
rename to app/src/main/java/com/github/pockethub/ui/user/EventPager.java
index 33b725970..268802903 100644
--- a/app/src/main/java/com/github/mobile/ui/user/EventPager.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/EventPager.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.event.Event;
diff --git a/app/src/main/java/com/github/mobile/ui/user/EventType.java b/app/src/main/java/com/github/pockethub/ui/user/EventType.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/user/EventType.java
rename to app/src/main/java/com/github/pockethub/ui/user/EventType.java
index 5d92b4254..da2e606f4 100644
--- a/app/src/main/java/com/github/mobile/ui/user/EventType.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/EventType.java
@@ -1,7 +1,7 @@
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.event.Event;
import org.eclipse.egit.github.core.event.IssuesPayload;
diff --git a/app/src/main/java/com/github/mobile/ui/user/FollowersFragment.java b/app/src/main/java/com/github/pockethub/ui/user/FollowersFragment.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/user/FollowersFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/FollowersFragment.java
index e35c5744c..84373ef3f 100644
--- a/app/src/main/java/com/github/mobile/ui/user/FollowersFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/FollowersFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.os.Bundle;
-import com.github.mobile.R;
+import com.github.pockethub.R;
/**
diff --git a/app/src/main/java/com/github/mobile/ui/user/FollowingFragment.java b/app/src/main/java/com/github/pockethub/ui/user/FollowingFragment.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/user/FollowingFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/FollowingFragment.java
index da91359ed..1f2696905 100644
--- a/app/src/main/java/com/github/mobile/ui/user/FollowingFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/FollowingFragment.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.os.Bundle;
-import com.github.mobile.R;
+import com.github.pockethub.R;
/**
diff --git a/app/src/main/java/com/github/mobile/ui/user/HomePagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java
similarity index 94%
rename from app/src/main/java/com/github/mobile/ui/user/HomePagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java
index f0959bd17..cc1eaa1de 100644
--- a/app/src/main/java/com/github/mobile/ui/user/HomePagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.content.res.Resources;
import android.os.Bundle;
@@ -21,9 +21,9 @@
import android.support.v4.app.FragmentManager;
import android.view.ViewGroup;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentPagerAdapter;
-import com.github.mobile.ui.repo.RepositoryListFragment;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentPagerAdapter;
+import com.github.pockethub.ui.repo.RepositoryListFragment;
import java.util.HashSet;
import java.util.Set;
diff --git a/app/src/main/java/com/github/mobile/ui/user/HomePagerFragment.java b/app/src/main/java/com/github/pockethub/ui/user/HomePagerFragment.java
similarity index 86%
rename from app/src/main/java/com/github/mobile/ui/user/HomePagerFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/HomePagerFragment.java
index 21288406f..df584d6c6 100644
--- a/app/src/main/java/com/github/mobile/ui/user/HomePagerFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/HomePagerFragment.java
@@ -1,4 +1,4 @@
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.content.Context;
import android.content.SharedPreferences;
@@ -6,9 +6,9 @@
import android.support.annotation.Nullable;
import android.view.View;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.ui.TabPagerFragment;
-import com.github.mobile.util.PreferenceUtils;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.ui.TabPagerFragment;
+import com.github.pockethub.util.PreferenceUtils;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java b/app/src/main/java/com/github/pockethub/ui/user/IconAndViewTextManager.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
rename to app/src/main/java/com/github/pockethub/ui/user/IconAndViewTextManager.java
index 4e80e3752..f2f5b2556 100644
--- a/app/src/main/java/com/github/mobile/ui/user/IconAndViewTextManager.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/IconAndViewTextManager.java
@@ -1,11 +1,11 @@
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.text.TextUtils;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.core.issue.IssueUtils;
-import com.github.mobile.ui.StyledText;
-import com.github.mobile.util.TimeUtils;
+import com.github.pockethub.core.issue.IssueUtils;
+import com.github.pockethub.ui.StyledText;
+import com.github.pockethub.util.TimeUtils;
import org.eclipse.egit.github.core.Comment;
import org.eclipse.egit.github.core.Commit;
diff --git a/app/src/main/java/com/github/mobile/ui/user/MembersFragment.java b/app/src/main/java/com/github/pockethub/ui/user/MembersFragment.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/user/MembersFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/MembersFragment.java
index 10659286a..3be2ed696 100644
--- a/app/src/main/java/com/github/mobile/ui/user/MembersFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/MembersFragment.java
@@ -13,20 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import static com.github.mobile.Intents.EXTRA_USER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.os.Bundle;
import android.support.v4.content.Loader;
import android.view.View;
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.ThrowableLoader;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.ui.ItemListFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.ThrowableLoader;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.ui.ItemListFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/user/MyFollowersFragment.java b/app/src/main/java/com/github/pockethub/ui/user/MyFollowersFragment.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/user/MyFollowersFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/MyFollowersFragment.java
index 9b8fd37e5..e999dd7b3 100644
--- a/app/src/main/java/com/github/mobile/ui/user/MyFollowersFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/MyFollowersFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.user.UserPager;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.user.UserPager;
import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.client.PageIterator;
diff --git a/app/src/main/java/com/github/mobile/ui/user/MyFollowingFragment.java b/app/src/main/java/com/github/pockethub/ui/user/MyFollowingFragment.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/user/MyFollowingFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/MyFollowingFragment.java
index c60e38f0b..d3821b56c 100644
--- a/app/src/main/java/com/github/mobile/ui/user/MyFollowingFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/MyFollowingFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.user.UserPager;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.user.UserPager;
import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.client.PageIterator;
diff --git a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java
index fb5bb4787..55b8072e1 100644
--- a/app/src/main/java/com/github/mobile/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.text.TextUtils;
import android.view.LayoutInflater;
@@ -22,9 +22,9 @@
import android.widget.TextView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.event.CreatePayload;
import org.eclipse.egit.github.core.event.Event;
diff --git a/app/src/main/java/com/github/mobile/ui/user/OrganizationNewsFragment.java b/app/src/main/java/com/github/pockethub/ui/user/OrganizationNewsFragment.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/user/OrganizationNewsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/OrganizationNewsFragment.java
index a657cb528..317ea4f81 100644
--- a/app/src/main/java/com/github/mobile/ui/user/OrganizationNewsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/OrganizationNewsFragment.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.client.PageIterator;
import org.eclipse.egit.github.core.event.Event;
diff --git a/app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionListener.java b/app/src/main/java/com/github/pockethub/ui/user/OrganizationSelectionListener.java
similarity index 95%
rename from app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionListener.java
rename to app/src/main/java/com/github/pockethub/ui/user/OrganizationSelectionListener.java
index f5cbad8d4..9e715ab9e 100644
--- a/app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionListener.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/OrganizationSelectionListener.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionProvider.java b/app/src/main/java/com/github/pockethub/ui/user/OrganizationSelectionProvider.java
similarity index 96%
rename from app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionProvider.java
rename to app/src/main/java/com/github/pockethub/ui/user/OrganizationSelectionProvider.java
index bbe32d674..20c78e821 100644
--- a/app/src/main/java/com/github/mobile/ui/user/OrganizationSelectionProvider.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/OrganizationSelectionProvider.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/user/PagedUserFragment.java b/app/src/main/java/com/github/pockethub/ui/user/PagedUserFragment.java
similarity index 90%
rename from app/src/main/java/com/github/mobile/ui/user/PagedUserFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/PagedUserFragment.java
index cfa69b26e..57985be4a 100644
--- a/app/src/main/java/com/github/mobile/ui/user/PagedUserFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/PagedUserFragment.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.view.View;
import android.widget.ListView;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.accounts.AccountUtils;
-import com.github.mobile.ui.PagedItemFragment;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.accounts.AccountUtils;
+import com.github.pockethub.ui.PagedItemFragment;
+import com.github.pockethub.util.AvatarLoader;
import com.google.inject.Inject;
import java.util.List;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UriLauncherActivity.java b/app/src/main/java/com/github/pockethub/ui/user/UriLauncherActivity.java
similarity index 89%
rename from app/src/main/java/com/github/mobile/ui/user/UriLauncherActivity.java
rename to app/src/main/java/com/github/pockethub/ui/user/UriLauncherActivity.java
index 6e6ac7bdd..3e62cf9ff 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UriLauncherActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UriLauncherActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import static android.content.DialogInterface.BUTTON_POSITIVE;
import static android.content.Intent.ACTION_VIEW;
@@ -32,18 +32,18 @@
import android.os.Bundle;
import android.text.TextUtils;
-import com.github.mobile.R;
-import com.github.mobile.core.commit.CommitMatch;
-import com.github.mobile.core.commit.CommitUriMatcher;
-import com.github.mobile.core.gist.GistUriMatcher;
-import com.github.mobile.core.issue.IssueUriMatcher;
-import com.github.mobile.core.repo.RepositoryUriMatcher;
-import com.github.mobile.core.user.UserUriMatcher;
-import com.github.mobile.ui.LightAlertDialog;
-import com.github.mobile.ui.commit.CommitViewActivity;
-import com.github.mobile.ui.gist.GistsViewActivity;
-import com.github.mobile.ui.issue.IssuesViewActivity;
-import com.github.mobile.ui.repo.RepositoryViewActivity;
+import com.github.pockethub.R;
+import com.github.pockethub.core.commit.CommitMatch;
+import com.github.pockethub.core.commit.CommitUriMatcher;
+import com.github.pockethub.core.gist.GistUriMatcher;
+import com.github.pockethub.core.issue.IssueUriMatcher;
+import com.github.pockethub.core.repo.RepositoryUriMatcher;
+import com.github.pockethub.core.user.UserUriMatcher;
+import com.github.pockethub.ui.LightAlertDialog;
+import com.github.pockethub.ui.commit.CommitViewActivity;
+import com.github.pockethub.ui.gist.GistsViewActivity;
+import com.github.pockethub.ui.issue.IssuesViewActivity;
+import com.github.pockethub.ui.repo.RepositoryViewActivity;
import java.net.URI;
import java.text.MessageFormat;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserCreatedNewsFragment.java b/app/src/main/java/com/github/pockethub/ui/user/UserCreatedNewsFragment.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/user/UserCreatedNewsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserCreatedNewsFragment.java
index 4fe309b96..664433684 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserCreatedNewsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserCreatedNewsFragment.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.client.PageIterator;
import org.eclipse.egit.github.core.event.Event;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserFollowersFragment.java b/app/src/main/java/com/github/pockethub/ui/user/UserFollowersFragment.java
similarity index 87%
rename from app/src/main/java/com/github/mobile/ui/user/UserFollowersFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserFollowersFragment.java
index 30da0858f..4424a0c6a 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserFollowersFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserFollowersFragment.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import static com.github.mobile.Intents.EXTRA_USER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.app.Activity;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.user.UserPager;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.user.UserPager;
import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.client.PageIterator;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserFollowingFragment.java b/app/src/main/java/com/github/pockethub/ui/user/UserFollowingFragment.java
similarity index 87%
rename from app/src/main/java/com/github/mobile/ui/user/UserFollowingFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserFollowingFragment.java
index 9df454ad2..0f612e4e0 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserFollowingFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserFollowingFragment.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import static com.github.mobile.Intents.EXTRA_USER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.app.Activity;
-import com.github.mobile.core.ResourcePager;
-import com.github.mobile.core.user.UserPager;
+import com.github.pockethub.core.ResourcePager;
+import com.github.pockethub.core.user.UserPager;
import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.client.PageIterator;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserListAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/user/UserListAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java
index 8ed970bdd..715fb2f24 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.view.LayoutInflater;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
-import com.github.mobile.R;
-import com.github.mobile.util.AvatarLoader;
+import com.github.pockethub.R;
+import com.github.pockethub.util.AvatarLoader;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserNewsFragment.java b/app/src/main/java/com/github/pockethub/ui/user/UserNewsFragment.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/user/UserNewsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserNewsFragment.java
index c5cf8ad44..1a6460ac5 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserNewsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserNewsFragment.java
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import static com.github.mobile.Intents.EXTRA_USER;
+import static com.github.pockethub.Intents.EXTRA_USER;
import android.os.Bundle;
-import com.github.mobile.core.user.UserEventMatcher.UserPair;
-import com.github.mobile.ui.NewsFragment;
+import com.github.pockethub.core.user.UserEventMatcher.UserPair;
+import com.github.pockethub.ui.NewsFragment;
import org.eclipse.egit.github.core.Repository;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/UserPagerAdapter.java
similarity index 91%
rename from app/src/main/java/com/github/mobile/ui/user/UserPagerAdapter.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserPagerAdapter.java
index c7a6a7eeb..6bf8c379f 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserPagerAdapter.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import android.content.res.Resources;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
-import com.github.mobile.R;
-import com.github.mobile.ui.FragmentPagerAdapter;
-import com.github.mobile.ui.repo.UserRepositoryListFragment;
+import com.github.pockethub.R;
+import com.github.pockethub.ui.FragmentPagerAdapter;
+import com.github.pockethub.ui.repo.UserRepositoryListFragment;
/**
* Pager adapter for a user's different views
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserReceivedNewsFragment.java b/app/src/main/java/com/github/pockethub/ui/user/UserReceivedNewsFragment.java
similarity index 93%
rename from app/src/main/java/com/github/mobile/ui/user/UserReceivedNewsFragment.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserReceivedNewsFragment.java
index f76b2909c..09dee07ce 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserReceivedNewsFragment.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserReceivedNewsFragment.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.core.ResourcePager;
+import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.client.PageIterator;
import org.eclipse.egit.github.core.event.Event;
diff --git a/app/src/main/java/com/github/mobile/ui/user/UserViewActivity.java b/app/src/main/java/com/github/pockethub/ui/user/UserViewActivity.java
similarity index 88%
rename from app/src/main/java/com/github/mobile/ui/user/UserViewActivity.java
rename to app/src/main/java/com/github/pockethub/ui/user/UserViewActivity.java
index 1f68dd5d6..bc8c3d2fa 100644
--- a/app/src/main/java/com/github/mobile/ui/user/UserViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserViewActivity.java
@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP;
-import static com.github.mobile.Intents.EXTRA_USER;
-import static com.github.mobile.util.TypefaceUtils.ICON_FOLLOW;
-import static com.github.mobile.util.TypefaceUtils.ICON_NEWS;
-import static com.github.mobile.util.TypefaceUtils.ICON_PUBLIC;
-import static com.github.mobile.util.TypefaceUtils.ICON_WATCH;
+import static com.github.pockethub.Intents.EXTRA_USER;
+import static com.github.pockethub.util.TypefaceUtils.ICON_FOLLOW;
+import static com.github.pockethub.util.TypefaceUtils.ICON_NEWS;
+import static com.github.pockethub.util.TypefaceUtils.ICON_PUBLIC;
+import static com.github.pockethub.util.TypefaceUtils.ICON_WATCH;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
@@ -31,16 +31,16 @@
import android.widget.ProgressBar;
import com.github.kevinsawicki.wishlist.ViewUtils;
-import com.github.mobile.Intents.Builder;
-import com.github.mobile.R;
-import com.github.mobile.core.user.FollowUserTask;
-import com.github.mobile.core.user.FollowingUserTask;
-import com.github.mobile.core.user.RefreshUserTask;
-import com.github.mobile.core.user.UnfollowUserTask;
-import com.github.mobile.ui.MainActivity;
-import com.github.mobile.ui.TabPagerActivity;
-import com.github.mobile.util.AvatarLoader;
-import com.github.mobile.util.ToastUtils;
+import com.github.pockethub.Intents.Builder;
+import com.github.pockethub.R;
+import com.github.pockethub.core.user.FollowUserTask;
+import com.github.pockethub.core.user.FollowingUserTask;
+import com.github.pockethub.core.user.RefreshUserTask;
+import com.github.pockethub.core.user.UnfollowUserTask;
+import com.github.pockethub.ui.MainActivity;
+import com.github.pockethub.ui.TabPagerActivity;
+import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.User;
diff --git a/app/src/main/java/com/github/mobile/util/AvatarLoader.java b/app/src/main/java/com/github/pockethub/util/AvatarLoader.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/util/AvatarLoader.java
rename to app/src/main/java/com/github/pockethub/util/AvatarLoader.java
index 4b5a47f02..3ae5439e5 100644
--- a/app/src/main/java/com/github/mobile/util/AvatarLoader.java
+++ b/app/src/main/java/com/github/pockethub/util/AvatarLoader.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import android.content.Context;
import android.content.res.TypedArray;
@@ -24,7 +24,7 @@
import android.util.Log;
import android.widget.ImageView;
-import com.github.mobile.R;
+import com.github.pockethub.R;
import com.google.inject.Inject;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
diff --git a/app/src/main/java/com/github/mobile/util/GravatarUtils.java b/app/src/main/java/com/github/pockethub/util/GravatarUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/util/GravatarUtils.java
rename to app/src/main/java/com/github/pockethub/util/GravatarUtils.java
index 0d3a40667..39bfbc1fa 100644
--- a/app/src/main/java/com/github/mobile/util/GravatarUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/GravatarUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static java.util.Locale.US;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/util/HtmlUtils.java b/app/src/main/java/com/github/pockethub/util/HtmlUtils.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/util/HtmlUtils.java
rename to app/src/main/java/com/github/pockethub/util/HtmlUtils.java
index a3d5d009f..4a330ca48 100644
--- a/app/src/main/java/com/github/mobile/util/HtmlUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/HtmlUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import android.graphics.Canvas;
import android.graphics.Paint;
diff --git a/app/src/main/java/com/github/mobile/util/HttpImageGetter.java b/app/src/main/java/com/github/pockethub/util/HttpImageGetter.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/util/HttpImageGetter.java
rename to app/src/main/java/com/github/pockethub/util/HttpImageGetter.java
index 3c8acfa56..dd01a2beb 100644
--- a/app/src/main/java/com/github/mobile/util/HttpImageGetter.java
+++ b/app/src/main/java/com/github/pockethub/util/HttpImageGetter.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static android.util.Base64.DEFAULT;
import static android.view.View.GONE;
@@ -33,8 +33,8 @@
import com.github.kevinsawicki.http.HttpRequest;
import com.github.kevinsawicki.http.HttpRequest.HttpRequestException;
-import com.github.mobile.R;
-import com.github.mobile.accounts.AuthenticatedUserTask;
+import com.github.pockethub.R;
+import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
import java.io.File;
diff --git a/app/src/main/java/com/github/mobile/util/ImageUtils.java b/app/src/main/java/com/github/pockethub/util/ImageUtils.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/util/ImageUtils.java
rename to app/src/main/java/com/github/pockethub/util/ImageUtils.java
index b2fbb8b73..6e9ee7406 100644
--- a/app/src/main/java/com/github/mobile/util/ImageUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/ImageUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static android.graphics.Bitmap.Config.ARGB_8888;
import static android.graphics.Color.WHITE;
diff --git a/app/src/main/java/com/github/mobile/util/MarkdownUtils.java b/app/src/main/java/com/github/pockethub/util/MarkdownUtils.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/util/MarkdownUtils.java
rename to app/src/main/java/com/github/pockethub/util/MarkdownUtils.java
index 30c60f3be..311523d5e 100644
--- a/app/src/main/java/com/github/mobile/util/MarkdownUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/MarkdownUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static java.util.Locale.US;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/util/PreferenceUtils.java b/app/src/main/java/com/github/pockethub/util/PreferenceUtils.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/util/PreferenceUtils.java
rename to app/src/main/java/com/github/pockethub/util/PreferenceUtils.java
index ed9d29fe7..eb6852a0b 100644
--- a/app/src/main/java/com/github/mobile/util/PreferenceUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/PreferenceUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import android.content.Context;
import android.content.SharedPreferences;
diff --git a/app/src/main/java/com/github/mobile/util/ServiceUtils.java b/app/src/main/java/com/github/pockethub/util/ServiceUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/util/ServiceUtils.java
rename to app/src/main/java/com/github/pockethub/util/ServiceUtils.java
index 23a609f20..11e1fe20b 100644
--- a/app/src/main/java/com/github/mobile/util/ServiceUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/ServiceUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static android.content.Context.WINDOW_SERVICE;
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
diff --git a/app/src/main/java/com/github/mobile/util/ShareUtils.java b/app/src/main/java/com/github/pockethub/util/ShareUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/util/ShareUtils.java
rename to app/src/main/java/com/github/pockethub/util/ShareUtils.java
index 06ae0da0a..0814bb059 100644
--- a/app/src/main/java/com/github/mobile/util/ShareUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/ShareUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static android.content.Intent.ACTION_SEND;
import static android.content.Intent.EXTRA_SUBJECT;
diff --git a/app/src/main/java/com/github/mobile/util/SourceEditor.java b/app/src/main/java/com/github/pockethub/util/SourceEditor.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/util/SourceEditor.java
rename to app/src/main/java/com/github/pockethub/util/SourceEditor.java
index 75659676b..9c4e8c176 100644
--- a/app/src/main/java/com/github/mobile/util/SourceEditor.java
+++ b/app/src/main/java/com/github/pockethub/util/SourceEditor.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static org.eclipse.egit.github.core.Blob.ENCODING_BASE64;
import static org.eclipse.egit.github.core.client.IGitHubConstants.CHARSET_UTF8;
@@ -25,7 +25,7 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;
-import com.github.mobile.ui.user.UriLauncherActivity;
+import com.github.pockethub.ui.user.UriLauncherActivity;
import java.io.UnsupportedEncodingException;
diff --git a/app/src/main/java/com/github/mobile/util/TimeUtils.java b/app/src/main/java/com/github/pockethub/util/TimeUtils.java
similarity index 97%
rename from app/src/main/java/com/github/mobile/util/TimeUtils.java
rename to app/src/main/java/com/github/pockethub/util/TimeUtils.java
index 80ccad384..75146a404 100644
--- a/app/src/main/java/com/github/mobile/util/TimeUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/TimeUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import static android.text.format.DateUtils.FORMAT_NUMERIC_DATE;
import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
diff --git a/app/src/main/java/com/github/mobile/util/ToastUtils.java b/app/src/main/java/com/github/pockethub/util/ToastUtils.java
similarity index 98%
rename from app/src/main/java/com/github/mobile/util/ToastUtils.java
rename to app/src/main/java/com/github/pockethub/util/ToastUtils.java
index 3d352dc33..0c486531e 100644
--- a/app/src/main/java/com/github/mobile/util/ToastUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/ToastUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import android.app.Activity;
import android.text.TextUtils;
diff --git a/app/src/main/java/com/github/mobile/util/TypefaceUtils.java b/app/src/main/java/com/github/pockethub/util/TypefaceUtils.java
similarity index 99%
rename from app/src/main/java/com/github/mobile/util/TypefaceUtils.java
rename to app/src/main/java/com/github/pockethub/util/TypefaceUtils.java
index 93c088862..72540267f 100644
--- a/app/src/main/java/com/github/mobile/util/TypefaceUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/TypefaceUtils.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.github.mobile.util;
+package com.github.pockethub.util;
import android.content.Context;
import android.graphics.Paint;
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 99b89635c..98221e327 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -33,7 +33,7 @@
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
- android:name="com.github.mobile.ui.NavigationDrawerFragment"
+ android:name="com.github.pockethub.ui.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/commit_compare.xml b/app/src/main/res/layout/commit_compare.xml
index dba30bdcb..65b7cdf29 100644
--- a/app/src/main/res/layout/commit_compare.xml
+++ b/app/src/main/res/layout/commit_compare.xml
@@ -31,6 +31,6 @@
android:layout_below="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
- class="com.github.mobile.ui.commit.CommitCompareListFragment" />
+ class="com.github.pockethub.ui.commit.CommitCompareListFragment" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/gist_file_view.xml b/app/src/main/res/layout/gist_file_view.xml
index ec7a1257d..32a151784 100644
--- a/app/src/main/res/layout/gist_file_view.xml
+++ b/app/src/main/res/layout/gist_file_view.xml
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
diff --git a/app/src/main/res/layout/issue_search.xml b/app/src/main/res/layout/issue_search.xml
index a2b1d8c58..3b7a12b42 100644
--- a/app/src/main/res/layout/issue_search.xml
+++ b/app/src/main/res/layout/issue_search.xml
@@ -32,6 +32,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
- class="com.github.mobile.ui.issue.SearchIssueListFragment" />
+ class="com.github.pockethub.ui.issue.SearchIssueListFragment" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/issues_filter_list.xml b/app/src/main/res/layout/issues_filter_list.xml
index 0734dbf4d..58fa78b70 100644
--- a/app/src/main/res/layout/issues_filter_list.xml
+++ b/app/src/main/res/layout/issues_filter_list.xml
@@ -32,6 +32,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
- class="com.github.mobile.ui.issue.FilterListFragment" />
+ class="com.github.pockethub.ui.issue.FilterListFragment" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/navigation_drawer_list_item_image.xml b/app/src/main/res/layout/navigation_drawer_list_item_image.xml
index 4ebf4a85a..12c43509e 100644
--- a/app/src/main/res/layout/navigation_drawer_list_item_image.xml
+++ b/app/src/main/res/layout/navigation_drawer_list_item_image.xml
@@ -1,5 +1,5 @@
-
@@ -24,4 +24,4 @@
android:textColor="#212121"
android:layout_centerVertical="true" />
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/navigation_drawer_list_item_text.xml b/app/src/main/res/layout/navigation_drawer_list_item_text.xml
index 55be74ecc..57ebc55bb 100644
--- a/app/src/main/res/layout/navigation_drawer_list_item_text.xml
+++ b/app/src/main/res/layout/navigation_drawer_list_item_text.xml
@@ -1,5 +1,5 @@
-
@@ -26,4 +26,4 @@
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:layout_centerVertical="true" />
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/pager.xml b/app/src/main/res/layout/pager.xml
index 30942aed7..0d6fa2772 100644
--- a/app/src/main/res/layout/pager.xml
+++ b/app/src/main/res/layout/pager.xml
@@ -27,7 +27,7 @@
android:background="?attr/colorPrimary"
android:id="@+id/toolbar" />
-
diff --git a/app/src/main/res/layout/pager_with_tabs.xml b/app/src/main/res/layout/pager_with_tabs.xml
index 90f1e9f3a..bd2099489 100644
--- a/app/src/main/res/layout/pager_with_tabs.xml
+++ b/app/src/main/res/layout/pager_with_tabs.xml
@@ -47,7 +47,7 @@
-
-
diff --git a/app/src/main/res/layout/repo_contributors.xml b/app/src/main/res/layout/repo_contributors.xml
index 9381f2412..5e816bbb6 100644
--- a/app/src/main/res/layout/repo_contributors.xml
+++ b/app/src/main/res/layout/repo_contributors.xml
@@ -33,6 +33,6 @@
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="@id/toolbar"
- class="com.github.mobile.ui.repo.RepositoryContributorsFragment" />
+ class="com.github.pockethub.ui.repo.RepositoryContributorsFragment" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/repo_issue_list.xml b/app/src/main/res/layout/repo_issue_list.xml
index d9e1fb7d1..04a2c4eb1 100644
--- a/app/src/main/res/layout/repo_issue_list.xml
+++ b/app/src/main/res/layout/repo_issue_list.xml
@@ -33,6 +33,6 @@
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="@id/toolbar"
- class="com.github.mobile.ui.issue.IssuesFragment" />
+ class="com.github.pockethub.ui.issue.IssuesFragment" />
\ No newline at end of file
diff --git a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java b/app/src/test/java/com/github/pockethub/ui/user/IconAndViewTextManagerTest.java
similarity index 99%
rename from app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
rename to app/src/test/java/com/github/pockethub/ui/user/IconAndViewTextManagerTest.java
index 7cb98b938..a22e3f769 100644
--- a/app/src/test/java/com/github/mobile/ui/user/IconAndViewTextManagerTest.java
+++ b/app/src/test/java/com/github/pockethub/ui/user/IconAndViewTextManagerTest.java
@@ -1,6 +1,6 @@
-package com.github.mobile.ui.user;
+package com.github.pockethub.ui.user;
-import com.github.mobile.util.TypefaceUtils;
+import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.event.Event;
import org.eclipse.egit.github.core.event.IssuesPayload;
From 23b1defc9e7348a765fe0b89b12a60ebe07b5093 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Wed, 5 Aug 2015 00:38:54 -0700
Subject: [PATCH 062/561] Reset the build number and version names
---
app/build.gradle | 40 ++++++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index c457e0a89..712330b81 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,5 +1,23 @@
apply plugin: 'com.android.application'
+repositories {
+ flatDir {
+ dirs 'libs'
+ }
+}
+
+// Manifest version information!
+def versionMajor = 0
+def versionMinor = 1
+def versionPatch = 0
+def versionBuild = 0 // bump for dogfood builds, public betas, etc.
+
+def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
+def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
+
+def isTravis = "true".equals(System.getenv("TRAVIS"))
+def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
+
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
@@ -8,13 +26,13 @@ android {
applicationId 'com.github.pockethub'
minSdkVersion 15
targetSdkVersion 22
- versionCode 1900
- versionName '1.9.0'
+ versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
+ versionName "${versionMajor}.${versionMinor}.${versionPatch}"
def Properties githubProps = new Properties()
- if(file('../github.properties').exists())
+ if (file('../github.properties').exists()) {
githubProps.load(new FileInputStream(file('../github.properties')))
- else
+ } else {
logger.log(LogLevel.ERROR, "github.properties can not be found, please add it to the project root")
resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
@@ -23,6 +41,10 @@ android {
def oauth = getValue(githubProps, "GITHUB_CALLBACK")
resValue "string", "github_oauth", oauth
resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : "DEFAULT"
+ }
+
+ buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
+ buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
}
packagingOptions {
@@ -35,11 +57,13 @@ android {
warning 'MissingTranslation'
abortOnError false
}
-}
-repositories {
- flatDir {
- dirs 'libs'
+ dexOptions {
+ // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
+// preDexLibraries = preDexEnabled && !isTravis
+
+ // False for now until we set up Travis CI for this
+ preDexLibraries = false
}
}
From a50512ba621dc0870789d6f35a514ec3653d8094 Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Wed, 5 Aug 2015 00:40:57 -0700
Subject: [PATCH 063/561] Add some type safety and standard braces
---
app/build.gradle | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 712330b81..a35683216 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -38,7 +38,7 @@ android {
resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
resValue "string", "github_client", getValue(githubProps, "GITHUB_CLIENT")
- def oauth = getValue(githubProps, "GITHUB_CALLBACK")
+ String oauth = getValue(githubProps, "GITHUB_CALLBACK")
resValue "string", "github_oauth", oauth
resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : "DEFAULT"
}
@@ -67,12 +67,12 @@ android {
}
}
-def getValue(def props, def name){
- if(props && props[name])
+def String getValue(Properties props, String name) {
+ if (props && props[name]) {
return props[name]
- else if(System.getenv(name))
+ } else if (System.getenv(name)) {
return System.getenv(name)
- else {
+ } else {
logger.log(LogLevel.ERROR, name + " has not been provided, add it to your github.properties file")
return "DEFAULT"
}
From d07e20f26fad4e2f8240301e437e14a2e903950c Mon Sep 17 00:00:00 2001
From: Karl Lindmark
Date: Wed, 5 Aug 2015 01:24:40 +0200
Subject: [PATCH 064/561] Update the Swedish translation
Update the Swedish translation with translations for the new English
strings, as well as using more suitable words.
---
app/src/main/res/values-sv/strings.xml | 194 ++++++++++++++-----------
app/src/main/res/values/config.xml | 2 +-
2 files changed, 108 insertions(+), 88 deletions(-)
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 252c994c6..7a3db93df 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -18,9 +18,9 @@
Inläsning av konto & organisationer misslyckades
- Inläsning av frågor misslyckades
- Inläsning av repositories misslyckades
- Inläsning av repository misslyckades
+ Inläsning av ärenden misslyckades
+ Inläsning av repon misslyckades
+ Inläsning av repot misslyckades
Inläsning av medverkande misslyckades
Inläsning av Gist misslyckades
Inläsning av nyheter misslyckades
@@ -29,7 +29,7 @@
Inläsning av personen misslyckades
Inläsning av Gistfilens innehåll misslyckades
Inläsning av Gists misslyckades
- Inläsning av frågan misslyckades
+ Inläsning av ärendet misslyckades
Inläsning av medarbetare misslyckades
Inläsningen av milstolpar misslyckades
Inläsning av etiketter misslyckades
@@ -45,6 +45,8 @@
Misslyckades att avläsa följar-status
Stjärnmärkning misslyckades
Borttagning av stjärnmärkning misslyckades
+ Forkningen misslyckades
+ Borttagningen misslyckades
Misslyckades att avläsa stjärnmärkning
Misslyckades med att rendera markdown
Misslyckades med sökning efter användare
@@ -52,29 +54,29 @@
- Laddar Gist…
- Laddar slumpvald Gist…
- Laddar flera frågor…
- Laddar frågor…
- Laddar kommentarer…
- Laddar repository…
- Laddar frågan…
- Laddar nyheter…
- Laddar prenumeranter…
- Laddar personer…
- Laddar Gists…
- Laddar medarbetare…
- Laddar milstolpar…
- Laddar etiketter…
- Laddar commits…
- Läser in filer & commits…
- Läser in brancher & taggar…
+ Laddar Gist…
+ Laddar slumpvald Gist…
+ Laddar fler ärenden…
+ Laddar ärenden…
+ Laddar kommentarer…
+ Laddar repot…
+ Laddar ärendet…
+ Laddar nyheter…
+ Laddar prenumeranter…
+ Laddar personer…
+ Laddar Gists…
+ Laddar medarbetare…
+ Laddar milstolpar…
+ Laddar etiketter…
+ Laddar commits…
+ Läser in filer & commits…
+ Läser in brancher & taggar…
Inga bokmärken
- Inga repositories
+ Inga repon
Inga medverkande
Inga frågor
Inga Gists
@@ -87,29 +89,31 @@
- Uppdaterar förvärvare…
- Uppdaterar frågor…
- Uppdaterar etiketter…
- Uppdaterar milstolpar…
+ Uppdaterar förvärvare…
+ Uppdaterar ärenden…
+ Uppdaterar etiketter…
+ Uppdaterar milstolpar…
+ Hem
Nyheter
- Frågor
+ Ärenden
Gists
Commits
GitHub sök
- Hitta Repositories
- Hitta Frågor
- Sök…
+ Hitta repon
+ Hitta ärenden
+ Sök…
Pull Request #
- Rensa Historik
- Search history cleared
- Loggar in…
- Skapar Gist…
+ Rensa sökhistorik
+ Sökhistorik rensad
+ Loggar in…
+ Laddar användarprofil…
+ Skapar Gist…
Skapa
Skapa Gist
puts \'Hello World!\'
- Gör den här Gisten allmän
+ Gör den här Gisten publik
Medverkande
fil.rb
Gist
@@ -126,49 +130,54 @@
Ta bort
TA BORT
Uppdatera
- Frågor
+ Ärenden
Bokmärken
Gists
- Fråga #
+ Ärende #
Gist\u0020
- Filtrera Frågor
- Skapa Kommentar
+ Filtrera ärenden
+ Skapa kommentar
Skriv en kommentar
- Visa Mer…
- Repositories
- Frågor
- Ändra Etiketter
+ Visa mer…
+ Repon
+ Ärenden
+ Ändra etiketter
Milstolpe:
- Ändra Milstolpe
+ Ändra milstolpe
Ändra Förvärvaren
Beskrivning
Gist skapad i Android
Titel
Ändra
Stjärnmärk
- Stärnmärker Gist…
+ Stärnmärker Gist…
Ta bort stjärmärkning
- Tar bort stjärmärkning av Gist…
+ Forka
+ Tar bort stjärmärkning av Gist…
Konton
- Välj Förvärvare
- Välj Milstolpe
- Välj Etiketter
- Välj Branch eller Tag
+ Välj förvärvare
+ Välj milstolpe
+ Välj etiketter
+ Välj branch eller tag
Autentiseringskod
Tvåfaktor-autentisering är aktiverad för ditt konto. Ange autentiseringskod för att verifiera din identitet.
- Inga Milstolpar
+ Inga milstolpar
Ingen har tilldelats detta
är tilldelad
Inga Gists hittades
- Bekräfta Borttagning
+ Bekräfta borttagning
Är du säker på att du vill ta bort den här Gisten?
- Tar bort Gist…
- Skapar kommentar…
+ Tar bort Gist…
+ Är du säker på att du vill radera denna kommentar?
+ Radera kommentar
+ Skapar kommentar…
+ Uppdaterar kommentar…
+ Raderar kommentar…
Är du säker på att du vill ta bort det här bokmärket?
- Fråga
- Ny Fråga
+ Ärendeöversikt
+ Nytt ärende
Anonym
- Frågefilter sparat till bokmärken
+ Ärendefilter sparat till bokmärken
NYLIGEN VISADE
Senaste
Ta bort senaste
@@ -185,42 +194,42 @@
Ny på GitHub? <a href=\"https://github.com/join\">Klicka här</a> för att registrera dig
Osäker på vad du ska göra? <a href=\"https://help.github.com/articles/about-two-factor-authentication\">Få hjälp.</a>
Kan inte ansluta till GitHub
- Ange ett giltligt Användarnamn & lösenord
- Ange ett giltligt lösenord.
+ Ange ett giltigt användarnamn & lösenord
+ Ange ett giltigt lösenord.
Lösenord
- Användarnamn eller Email
- Användarnamn eller Email
+ Användarnamn eller epost
+ Användarnamn eller epost
Prenumeranter
Prenumererar på
Följ
- Sluta följa
+ Avfölja
Prenumeranter
Prenumererar
Medlemmar
- Stänger Fråga…
- Öppnar Frågan Igen…
+ Stänger ärende…
+ Öppnar FrÃ¥gan Igen…
Avatar
- Skapar Fråga…
+ Skapar ärende…
skapad\u0020
updaterad\u0020
öppnad\u0020
Rensa
Commits: %d
- Öppna Frågor
- Stängda Frågor
- Ta Bort Bokmärke
+ Öppna ärenden
+ Stängda ärenden
+ Radera bokmärke
Spara
Tillämpa
Etiketter:
Förvärvare
Milstolpe
Etiketter
- Är du säker på att du vill stänga den här frågan?
- Är du säker på att du vill öppna den här frågan igen?
- Stäng Fråga
- Öppna Fråga Igen
+ Är du säker på att du vill stänga det här ärendet?
+ Är du säker på att du vill öppna det här ärendet igen?
+ Stäng ärende
+ Öppna ärende igen
Stängd
- Ingen Beskrivning Given.
+ Ingen beskrivning given.
Stäng
Öppna Igen
Ogiltlig GitHub-adress
@@ -228,9 +237,9 @@
Avbryt
OSÄKER
App-konflikt
- En annan installerad App är redan konfigurerad för GitHub autentisering. \n\nDu måste ta bort den andra appen från konto och synk inställningarna och avinstallera den innan GitHub appen kan användas.
- Öppnar {0}…
- Jämför Commit
+ En annan installerad app är redan konfigurerad för GitHub-autentisering. \n\nDu måste ta bort den andra appen från konto- och synkinställningarna och avinstallera den innan GitHub-appen kan användas.
+ Öppnar {0}…
+ Jämför commit
Commit\u0020
Förälder\u0020
skrev detta den
@@ -242,17 +251,18 @@
Aktivera wrapping
Inaktivera wrapping
Kod
- Följer personer…
- Slutar följa personer…
- Stjärnmärk…
- Ta bort stjärnmärkning…
- Raderar repository…
- Navigera till…
+ Följer personer…
+ Avföljer personer…
+ Stjärnmärk…
+ Ta bort stjärnmärkning…
+ Forkar repot…
+ Raderar repot…
+ Navigera till…
Navigera till %s
%d commits
- repositories
+ repon
användare
nyheter
följer
@@ -262,13 +272,13 @@
medlemmar
kod
commits
- problem
+ ärenden
visat
tilldelat
skapat
nämnt
mina
- sjtärnmärkt
+ stjärnmärkt
alla
Dela
@@ -280,12 +290,22 @@
Kopiera hash
Kopierad till clipboard
+
+ Stäng navigationsvyn
+ Öppna navigationsvyn
+ Underrubrik
+
Är du helt säker?
Du kan INTE ångra detta.
- Detta kommer att radera repository, wiki, frågor, kommentarer och
+ Detta kommer att radera repot, wiki, frågor, kommentarer och
alla medverkarkopplingar permanent.
- Repository har raderats
+ Repot har raderats
+ Autentisering görs nu via hemsidan,
+ tryck nu på knappen för att fortsätta.
+ \n\n I och med att Github har infört restriktioner mot tredjepartsapplikationer är det
+ inte längre möjligt att verkställa ändringar mot vissa organisationer. Du kan läsa mer här: \n
+ https://help.github.com/articles/about-third-party-application-restrictions/
diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml
index 9254e5569..1031441de 100644
--- a/app/src/main/res/values/config.xml
+++ b/app/src/main/res/values/config.xml
@@ -1,4 +1,4 @@
- com.github
+ com.github
\ No newline at end of file
From 55e162252ab4525c6ba3cd97746e78cd647442f4 Mon Sep 17 00:00:00 2001
From: Karl Lindmark
Date: Wed, 5 Aug 2015 01:36:16 +0200
Subject: [PATCH 065/561] Update the Swedish translation further
---
app/src/main/res/values-sv/strings.xml | 46 +++++++++++++-------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 7a3db93df..eb4910e5a 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -22,13 +22,13 @@
Inläsning av repon misslyckades
Inläsning av repot misslyckades
Inläsning av medverkande misslyckades
- Inläsning av Gist misslyckades
+ Inläsning av gist misslyckades
Inläsning av nyheter misslyckades
Inläsning av prenumeranter misslyckades
Inläsning av personer misslyckades
Inläsning av personen misslyckades
- Inläsning av Gistfilens innehåll misslyckades
- Inläsning av Gists misslyckades
+ Inläsning av gistfilens innehåll misslyckades
+ Inläsning av gists misslyckades
Inläsning av ärendet misslyckades
Inläsning av medarbetare misslyckades
Inläsningen av milstolpar misslyckades
@@ -36,12 +36,12 @@
Inläsning av bokmärken misslyckades
Inläsning av medlemmar misslyckades
Inläsning av commits misslyckades
- Inläsning av commit misslyckades
+ Inläsning av commiten misslyckades
Inläsning av filen misslyckades
Inläsning av kod misslyckades
Inläsning av brancher & taggar misslyckades
Misslyckades att följa personen
- Misslyckades att sluta följa personen
+ Misslyckades att avfölja personen
Misslyckades att avläsa följar-status
Stjärnmärkning misslyckades
Borttagning av stjärnmärkning misslyckades
@@ -54,8 +54,8 @@
- Laddar Gist…
- Laddar slumpvald Gist…
+ Laddar gist…
+ Laddar slumpvald gist…
Laddar fler ärenden…
Laddar ärenden…
Laddar kommentarer…
@@ -64,7 +64,7 @@
Laddar nyheter…
Laddar prenumeranter…
Laddar personer…
- Laddar Gists…
+ Laddar gists…
Laddar medarbetare…
Laddar milstolpar…
Laddar etiketter…
@@ -78,8 +78,8 @@
Inga bokmärken
Inga repon
Inga medverkande
- Inga frågor
- Inga Gists
+ Inga ärenden
+ Inga gists
Inga personer
Inga prenumeranter
Inga medlemmar
@@ -104,16 +104,16 @@
Hitta repon
Hitta ärenden
Sök…
- Pull Request #
+ Pull request #
Rensa sökhistorik
Sökhistorik rensad
Loggar in…
Laddar användarprofil…
- Skapar Gist…
+ Skapar gist…
Skapa
- Skapa Gist
+ Skapa gist
puts \'Hello World!\'
- Gör den här Gisten publik
+ Gör den här gisten publik
Medverkande
fil.rb
Gist
@@ -123,7 +123,7 @@
Slumpad
Filnamn
Filinnehållet
- Ny Gist
+ Ny gist
Filtrera
Bokmärka
Kommentera
@@ -150,10 +150,10 @@
Titel
Ändra
Stjärnmärk
- Stärnmärker Gist…
+ Stärnmärker gist…
Ta bort stjärmärkning
Forka
- Tar bort stjärmärkning av Gist…
+ Tar bort stjärmärkning av gist…
Konton
Välj förvärvare
Välj milstolpe
@@ -164,10 +164,10 @@
Inga milstolpar
Ingen har tilldelats detta
är tilldelad
- Inga Gists hittades
+ Inga gists hittades
Bekräfta borttagning
- Är du säker på att du vill ta bort den här Gisten?
- Tar bort Gist…
+ Är du säker på att du vill ta bort den här gisten?
+ Tar bort gist…
Är du säker på att du vill radera denna kommentar?
Radera kommentar
Skapar kommentar…
@@ -207,7 +207,7 @@
Prenumererar
Medlemmar
Stänger ärende…
- Öppnar FrÃ¥gan Igen…
+ Öppnar ärendet igen…
Avatar
Skapar ärende…
skapad\u0020
@@ -233,7 +233,7 @@
Stäng
Öppna Igen
Ogiltlig GitHub-adress
- Den följande adressen kunde inte öppnas av den här aplikationen:\n{0}
+ Den följande adressen kunde inte öppnas av den här applikationen:\n{0}
Avbryt
OSÄKER
App-konflikt
@@ -298,7 +298,7 @@
Är du helt säker?
Du kan INTE ångra detta.
- Detta kommer att radera repot, wiki, frågor, kommentarer och
+ Detta kommer att radera repot, wiki, ärenden, kommentarer och
alla medverkarkopplingar permanent.
Repot har raderats
From 31c41d448cd12bb7065234d3a3070c5a92ef8d1c Mon Sep 17 00:00:00 2001
From: Karl Lindmark
Date: Wed, 5 Aug 2015 10:45:34 +0200
Subject: [PATCH 066/561] Update the Swedish translation per the PR comments
---
app/src/main/res/values-sv/strings.xml | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index eb4910e5a..aa11a32ec 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -89,7 +89,7 @@
- Uppdaterar förvärvare…
+ Uppdaterar ansvarig…
Uppdaterar ärenden…
Uppdaterar etiketter…
Uppdaterar milstolpar…
@@ -144,18 +144,18 @@
Ändra etiketter
Milstolpe:
Ändra milstolpe
- Ändra Förvärvaren
+ Ändra ansvarig
Beskrivning
Gist skapad i Android
Titel
Ändra
Stjärnmärk
- Stärnmärker gist…
+ Stjärnmärker gist…
Ta bort stjärmärkning
Forka
Tar bort stjärmärkning av gist…
Konton
- Välj förvärvare
+ Välj ansvarig
Välj milstolpe
Välj etiketter
Välj branch eller tag
@@ -202,7 +202,7 @@
Prenumeranter
Prenumererar på
Följ
- Avfölja
+ Avfölj
Prenumeranter
Prenumererar
Medlemmar
@@ -221,7 +221,7 @@
Spara
Tillämpa
Etiketter:
- Förvärvare
+ Ansvarig
Milstolpe
Etiketter
Är du säker på att du vill stänga det här ärendet?
@@ -251,10 +251,10 @@
Aktivera wrapping
Inaktivera wrapping
Kod
- Följer personer…
- Avföljer personer…
- Stjärnmärk…
- Ta bort stjärnmärkning…
+ Följer användare…
+ Avföljer användare…
+ Stjärnmärker…
+ Tar bort stjärnmärkning…
Forkar repot…
Raderar repot…
Navigera till…
From b619377016661b62dc99384a3220a5bdd50515bc Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Wed, 5 Aug 2015 01:15:17 +0200
Subject: [PATCH 067/561] =?UTF-8?q?Replace=20"..."=20with=20ellipsis=20cha?=
=?UTF-8?q?racter=20(=E2=80=A6,=20…)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/main/res/values-pt/strings.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 8b1b2e450..a8b339c18 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -276,9 +276,9 @@
Apagar Comentário
Copiar hash
Repositório excluÃdo
- Apagando comentário...
- Excluindo...
- Editando comentário...
+ Apagando comentário…
+ Excluindo…
+ Editando comentário…
Carregamento dos contribuidores falhou
Exclusão falhou
Pesquisa GitHub
From 5abfa7299a8c203d9721b86c0f30cb60f083bc6d Mon Sep 17 00:00:00 2001
From: Lars Grefer
Date: Wed, 5 Aug 2015 00:33:22 +0200
Subject: [PATCH 068/561] updated german translation
---
app/src/main/res/values-de/strings.xml | 7 +++++++
app/src/main/res/values/config.xml | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 148db749b..130c0a67f 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -302,5 +302,12 @@
Repository ist gelöscht
Benutzername oder E-Mail-Adresse
+ Lade Benutzerprofil...
+ Die Authentifizierung wird nun über die Website durchgeführt,
+ drücke den Einloggen-Button um fortzufahren.
+ \n\n Da GitHub Restriktionen für Drittanbieter hinzugefügt hat,
+ ist es uns nicht möglich in bestimmten Organisationen zu schreiben.
+ Mehr Informationen darüber hier:\n
+ https://help.github.com/articles/about-third-party-application-restrictions/
diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml
index 9254e5569..1031441de 100644
--- a/app/src/main/res/values/config.xml
+++ b/app/src/main/res/values/config.xml
@@ -1,4 +1,4 @@
- com.github
+ com.github
\ No newline at end of file
From a84568a08676fd328827030ec319dbb866b14702 Mon Sep 17 00:00:00 2001
From: Joel
Date: Thu, 6 Aug 2015 17:20:52 +0800
Subject: [PATCH 069/561] Fix GitHubModule path in roboguice.xml
---
app/src/main/res/values/roboguice.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values/roboguice.xml b/app/src/main/res/values/roboguice.xml
index 97c74b989..7269d69cc 100644
--- a/app/src/main/res/values/roboguice.xml
+++ b/app/src/main/res/values/roboguice.xml
@@ -16,6 +16,6 @@
-->
- - com.github.mobile.GitHubModule
+ - com.github.pockethub.GitHubModule
From 9d69a53f35a4be6f5fee1d0da1c154bb4289deaf Mon Sep 17 00:00:00 2001
From: Henri Sweers
Date: Fri, 7 Aug 2015 04:44:37 -0700
Subject: [PATCH 070/561] Update other stale references
---
app/src/main/AndroidManifest.xml | 40 +++++++++----------
.../java/com/github/pockethub/Intents.java | 11 ++---
.../pockethub/accounts/AccountUtils.java | 17 ++++----
app/src/main/res/layout/pager_with_tabs.xml | 4 +-
proguard.cfg | 8 ++--
5 files changed, 41 insertions(+), 39 deletions(-)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 74902a676..0babd081e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -57,7 +57,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="true">
-
+
@@ -70,7 +70,7 @@
android:name="com.github.pockethub.ui.issue.EditIssuesFilterActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -79,7 +79,7 @@
android:name="com.github.pockethub.ui.issue.EditIssueActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -103,7 +103,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="true">
-
+
@@ -112,7 +112,7 @@
android:name="com.github.pockethub.ui.gist.GistsViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -121,7 +121,7 @@
android:name="com.github.pockethub.ui.gist.GistFilesViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -130,7 +130,7 @@
android:name="com.github.pockethub.ui.issue.CreateCommentActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -139,7 +139,7 @@
android:name="com.github.pockethub.ui.issue.EditCommentActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -148,7 +148,7 @@
android:name="com.github.pockethub.ui.gist.CreateCommentActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -157,7 +157,7 @@
android:name="com.github.pockethub.ui.gist.EditCommentActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -166,7 +166,7 @@
android:name="com.github.pockethub.ui.commit.CreateCommentActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -176,7 +176,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="true">
-
+
@@ -190,7 +190,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="true">
-
+
@@ -200,7 +200,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="true">
-
+
@@ -209,7 +209,7 @@
android:name="com.github.pockethub.ui.issue.IssuesViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -313,7 +313,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/commit_compare_title">
-
+
@@ -322,7 +322,7 @@
android:name="com.github.pockethub.ui.commit.CommitViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -331,7 +331,7 @@
android:name="com.github.pockethub.ui.commit.CommitFileViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -340,7 +340,7 @@
android:name="com.github.pockethub.ui.ref.BranchFileViewActivity"
android:configChanges="orientation|keyboardHidden|screenSize">
-
+
@@ -389,4 +389,4 @@
android:value="@string/github_oauth"/>
-
\ No newline at end of file
+
diff --git a/app/src/main/java/com/github/pockethub/Intents.java b/app/src/main/java/com/github/pockethub/Intents.java
index 86ffd46c1..3ace3f1ab 100644
--- a/app/src/main/java/com/github/pockethub/Intents.java
+++ b/app/src/main/java/com/github/pockethub/Intents.java
@@ -15,12 +15,8 @@
*/
package com.github.pockethub;
-import static org.eclipse.egit.github.core.RepositoryId.createFromUrl;
import android.content.Intent;
-import java.io.Serializable;
-import java.util.ArrayList;
-
import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.GistFile;
import org.eclipse.egit.github.core.Issue;
@@ -28,6 +24,11 @@
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.User;
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import static org.eclipse.egit.github.core.RepositoryId.createFromUrl;
+
/**
* Helper for creating intents
*/
@@ -36,7 +37,7 @@ public class Intents {
/**
* Prefix for all intents created
*/
- public static final String INTENT_PREFIX = "com.github.mobile.";
+ public static final String INTENT_PREFIX = "com.github.pockethub.";
/**
* Prefix for all extra data added to intents
diff --git a/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java b/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
index c67b2e11e..5c8b2f474 100644
--- a/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
@@ -15,11 +15,6 @@
*/
package com.github.pockethub.accounts;
-import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
-import static android.content.DialogInterface.BUTTON_POSITIVE;
-import static android.util.Log.DEBUG;
-import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
-import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AccountManagerFuture;
@@ -40,13 +35,19 @@
import com.github.pockethub.R;
import com.github.pockethub.ui.LightAlertDialog;
+import org.eclipse.egit.github.core.User;
+import org.eclipse.egit.github.core.client.RequestException;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.client.RequestException;
+import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
+import static android.content.DialogInterface.BUTTON_POSITIVE;
+import static android.util.Log.DEBUG;
+import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
+import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
/**
* Helpers for accessing {@link AccountManager}
@@ -81,7 +82,7 @@ public static boolean hasAuthenticator(final AccountManager manager) {
for (AuthenticatorDescription descriptor : types)
if (descriptor != null
&& ACCOUNT_TYPE.equals(descriptor.type)) {
- HAS_AUTHENTICATOR = "com.github.mobile"
+ HAS_AUTHENTICATOR = "com.github.pockethub"
.equals(descriptor.packageName);
break;
}
diff --git a/app/src/main/res/layout/pager_with_tabs.xml b/app/src/main/res/layout/pager_with_tabs.xml
index bd2099489..eac8a0ba1 100644
--- a/app/src/main/res/layout/pager_with_tabs.xml
+++ b/app/src/main/res/layout/pager_with_tabs.xml
@@ -49,7 +49,7 @@
@@ -64,4 +64,4 @@
style="@style/ListSpinner"
android:layout_centerInParent="true"
android:visibility="gone" />
-
\ No newline at end of file
+
diff --git a/proguard.cfg b/proguard.cfg
index 87f745925..571b45b10 100644
--- a/proguard.cfg
+++ b/proguard.cfg
@@ -46,11 +46,11 @@
*** startFinalizer(java.lang.Class,java.lang.Object);
}
--keep class com.github.mobile.**
--keepclassmembers class com.github.mobile.** { *; }
--keepclassmembers class com.github.mobile.** { public (...); }
+-keep class com.github.pockethub.**
+-keepclassmembers class com.github.pockethub.** { *; }
+-keepclassmembers class com.github.pockethub.** { public (...); }
-keep class org.eclipse.egit.github.**
--keepclassmembers class com.github.mobile.** { public (...); }
+-keepclassmembers class com.github.pockethub.** { public (...); }
-keepclassmembers class org.eclipse.egit.github.** { *; }
-keepclassmembers class * extends com.actionbarsherlock.ActionBarSherlock { public (...); }
From 3c600da9f654c94f980663dcf8eea8d5a89edc36 Mon Sep 17 00:00:00 2001
From: Henrik Olsson
Date: Tue, 11 Aug 2015 13:04:44 +0200
Subject: [PATCH 071/561] Fixed build.gradle if statment wrapper
---
app/build.gradle | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index a35683216..fc3a1848a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -34,14 +34,14 @@ android {
githubProps.load(new FileInputStream(file('../github.properties')))
} else {
logger.log(LogLevel.ERROR, "github.properties can not be found, please add it to the project root")
-
- resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
- resValue "string", "github_client", getValue(githubProps, "GITHUB_CLIENT")
-
- String oauth = getValue(githubProps, "GITHUB_CALLBACK")
- resValue "string", "github_oauth", oauth
- resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : "DEFAULT"
}
+
+ resValue "string", "github_secret", getValue(githubProps, "GITHUB_SECRET")
+ resValue "string", "github_client", getValue(githubProps, "GITHUB_CLIENT")
+
+ String oauth = getValue(githubProps, "GITHUB_CALLBACK")
+ resValue "string", "github_oauth", oauth
+ resValue "string", "github_oauth_scheme", oauth != "DEFAULT" ? oauth.split("://")[0] : "DEFAULT"
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
@@ -107,4 +107,4 @@ dependencies {
}
compile 'com.android.support:design:22.2.1'
-}
\ No newline at end of file
+}
From f825fbd722805787adee60cf78c5f33c6d7faf98 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 12 Aug 2015 16:00:14 +0200
Subject: [PATCH 072/561] Moved handler creation (Not needed when doing
Synchronous calls)
---
settings.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/settings.gradle b/settings.gradle
index e7b4def49..3dd3c6ead 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include ':app'
+include ':app', ':GithubAndroidSdk'
From 132fbd557cda121dec006f4d4b6b2cfcc82474db Mon Sep 17 00:00:00 2001
From: Henrik
Date: Sun, 16 Aug 2015 12:30:02 +0200
Subject: [PATCH 073/561] Fixed premature onActivityResult below Lollipop
---
app/src/main/AndroidManifest.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0babd081e..96c0a27ef 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -231,7 +231,7 @@
+ android:launchMode="singleTop">
@@ -346,7 +346,8 @@
-
+
Date: Sat, 22 Aug 2015 10:05:15 +0700
Subject: [PATCH 074/561] Add progress dialog during webpage loading
After "log in" is pressed, there's a blank
white screen for several seconds.
This will be an indicator that something
is happening (which is loading the webpage).
It's better than leaving the user wondering.
---
.../pockethub/accounts/LoginWebViewActivity.java | 15 +++++++++++++++
app/src/main/res/values/strings.xml | 1 +
2 files changed, 16 insertions(+)
diff --git a/app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java b/app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java
index a4c446e12..bc5e116bd 100644
--- a/app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java
+++ b/app/src/main/java/com/github/pockethub/accounts/LoginWebViewActivity.java
@@ -1,12 +1,14 @@
package com.github.pockethub.accounts;
import android.content.Intent;
+import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebViewClient;
import com.github.pockethub.R;
+import com.github.pockethub.ui.LightProgressDialog;
import com.github.pockethub.ui.WebView;
public class LoginWebViewActivity extends AppCompatActivity {
@@ -17,6 +19,19 @@ protected void onCreate(Bundle savedInstanceState) {
WebView webView = new WebView(this);
webView.loadUrl(getIntent().getStringExtra(LoginActivity.INTENT_EXTRA_URL));
webView.setWebViewClient(new WebViewClient() {
+ LightProgressDialog dialog = (LightProgressDialog) LightProgressDialog.create(
+ LoginWebViewActivity.this, R.string.loading);
+
+ @Override
+ public void onPageStarted(android.webkit.WebView view, String url, Bitmap favicon) {
+ dialog.show();
+ }
+
+ @Override
+ public void onPageFinished(android.webkit.WebView view, String url) {
+ dialog.dismiss();
+ }
+
@Override
public boolean shouldOverrideUrlLoading(android.webkit.WebView view, String url) {
Uri uri = Uri.parse(url);
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 204b0798b..0eed7b042 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -70,6 +70,7 @@
Loading Commits…
Loading Files & Comments…
Loading Branches & Tags…
+ Loading…
From 2b86ea04d9ef017677c73221f10594f5f47783f6 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Thu, 27 Aug 2015 16:10:19 +0700
Subject: [PATCH 075/561] Fix #871. Remove appbar middle line for pre-L
---
app/src/main/res/layout/pager_with_tabs.xml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/app/src/main/res/layout/pager_with_tabs.xml b/app/src/main/res/layout/pager_with_tabs.xml
index eac8a0ba1..c1e7e669a 100644
--- a/app/src/main/res/layout/pager_with_tabs.xml
+++ b/app/src/main/res/layout/pager_with_tabs.xml
@@ -53,12 +53,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
-
-
Date: Thu, 3 Sep 2015 05:54:41 +0700
Subject: [PATCH 076/561] Add Bugsnag
---
app/build.gradle | 2 ++
app/src/main/AndroidManifest.xml | 5 +++++
.../main/java/com/github/pockethub/ui/MainActivity.java | 7 +++++--
app/src/main/res/values/strings.xml | 2 ++
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index fc3a1848a..3aff5401b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -97,6 +97,8 @@ dependencies {
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.afollestad:material-dialogs:0.7.3.2'
+ compile 'com.bugsnag:bugsnag-android:+'
+
//Self compiled .aar version of wishlist
compile (name:'lib', ext:'aar')
testCompile 'junit:junit:4.12'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 96c0a27ef..630a5df8e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,6 +4,7 @@
+
@@ -388,6 +389,10 @@
+
+
diff --git a/app/src/main/java/com/github/pockethub/ui/MainActivity.java b/app/src/main/java/com/github/pockethub/ui/MainActivity.java
index 44da81411..91e389058 100644
--- a/app/src/main/java/com/github/pockethub/ui/MainActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/MainActivity.java
@@ -1,6 +1,5 @@
package com.github.pockethub.ui;
-import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_SEPERATOR;
import android.app.SearchManager;
import android.content.Context;
import android.os.Bundle;
@@ -16,6 +15,7 @@
import android.view.View;
import android.view.Window;
+import com.bugsnag.android.Bugsnag;
import com.github.pockethub.R;
import com.github.pockethub.accounts.AccountUtils;
import com.github.pockethub.core.user.UserComparator;
@@ -29,10 +29,12 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
+import org.eclipse.egit.github.core.User;
+
import java.util.Collections;
import java.util.List;
-import org.eclipse.egit.github.core.User;
+import static com.github.pockethub.ui.NavigationDrawerObject.TYPE_SEPERATOR;
public class MainActivity extends BaseActivity implements NavigationDrawerFragment.NavigationDrawerCallbacks,
LoaderManager.LoaderCallbacks> {
@@ -59,6 +61,7 @@ public class MainActivity extends BaseActivity implements NavigationDrawerFragme
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ Bugsnag.init(this);
setContentView(R.layout.activity_main);
setSupportActionBar((android.support.v7.widget.Toolbar) findViewById(R.id.toolbar));
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0eed7b042..9f29e32f0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -14,6 +14,8 @@
limitations under the License.
-->
+
+ 071042af7240b1a939bfe921b07ccc6d
Loading account & organizations failed
From 558f07878219b19d48befe784dd937b3598c0498 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Wed, 9 Sep 2015 17:53:56 +0700
Subject: [PATCH 077/561] Fix typo
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6e8b70268..20c8055c9 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ are welcomed and appreciated but will be thoroughly reviewed and discussed. **Pl
1. Create a github application (https://github.com/settings/applications/new)
2. Create a github.properties in the root folder of the repo
-3. Add these three value too the github.properties
+3. Add these three value to the github.properties
```
GITHUB_CLIENT=your_application_client_id
From 7b6e71f62136402ce93b495452dd424c533b3a49 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Wed, 9 Sep 2015 17:55:35 +0700
Subject: [PATCH 078/561] Fix grammar. Nit stuff.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 20c8055c9..6c0378b71 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ are welcomed and appreciated but will be thoroughly reviewed and discussed. **Pl
1. Create a github application (https://github.com/settings/applications/new)
2. Create a github.properties in the root folder of the repo
-3. Add these three value to the github.properties
+3. Add these three values to the github.properties
```
GITHUB_CLIENT=your_application_client_id
From 3b1935022332b5e58ff67ba69835cc1979094685 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Fri, 18 Sep 2015 23:29:00 +0200
Subject: [PATCH 079/561] Updated libs (Fixes some bugs) Added Application for
adding credentials to the SDK RoboGuice Modules injects fixed Intents updated
to new SDK
---
app/build.gradle | 16 ++---
app/src/main/AndroidManifest.xml | 13 +---
.../java/com/github/pockethub/GitHub.java | 15 ++++
.../com/github/pockethub/GitHubModule.java | 14 ++--
.../java/com/github/pockethub/Intents.java | 71 +++++++++++--------
.../com/github/pockethub/ServicesModule.java | 10 ++-
6 files changed, 80 insertions(+), 59 deletions(-)
create mode 100644 app/src/main/java/com/github/pockethub/GitHub.java
diff --git a/app/build.gradle b/app/build.gradle
index fc3a1848a..3f0dc0713 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -19,13 +19,13 @@ def isTravis = "true".equals(System.getenv("TRAVIS"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.1'
+ compileSdkVersion 23
+ buildToolsVersion '23.0.1'
defaultConfig {
applicationId 'com.github.pockethub'
minSdkVersion 15
- targetSdkVersion 22
+ targetSdkVersion 23
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
@@ -80,19 +80,18 @@ def String getValue(Properties props, String name) {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:22.2.1'
+ compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:3.7.0.201502260915-r'
- compile 'com.android.support:support-v4:22.2.1'
+ compile 'com.android.support:support-v4:23.0.1'
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
-
- compile 'com.github.alorma:github-sdk:1.0.1'
+ compile 'com.github.alorma:github-sdk:1.2.0'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
@@ -105,6 +104,5 @@ dependencies {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
-
- compile 'com.android.support:design:22.2.1'
+ compile 'com.android.support:design:23.0.1'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0babd081e..8782a3fd9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -23,7 +23,8 @@
android:hardwareAccelerated="false"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
- android:theme="@style/Theme.GitHub">
+ android:theme="@style/Theme.GitHub"
+ android:name="com.github.pockethub.GitHub">
-
-
-
-
(store);
}
return store;
}
@Provides
- GistStore gistStore(GistService service) {
+ GistStore gistStore(Context context) {
GistStore store = gists != null ? gists.get() : null;
if (store == null) {
- store = new GistStore(service);
+ store = new GistStore(context);
gists = new WeakReference<>(store);
}
return store;
}
@Provides
- CommitStore commitStore(CommitService service) {
+ CommitStore commitStore(Context context) {
CommitStore store = commits != null ? commits.get() : null;
if (store == null) {
- store = new CommitStore(service);
+ store = new CommitStore(context);
commits = new WeakReference<>(store);
}
return store;
diff --git a/app/src/main/java/com/github/pockethub/Intents.java b/app/src/main/java/com/github/pockethub/Intents.java
index 3ace3f1ab..407232740 100644
--- a/app/src/main/java/com/github/pockethub/Intents.java
+++ b/app/src/main/java/com/github/pockethub/Intents.java
@@ -16,19 +16,18 @@
package com.github.pockethub;
import android.content.Intent;
+import android.os.Parcelable;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.GistFile;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.RepositoryId;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.GistFile;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
+import com.github.pockethub.util.InfoUtils;
import java.io.Serializable;
import java.util.ArrayList;
-import static org.eclipse.egit.github.core.RepositoryId.createFromUrl;
-
/**
* Helper for creating intents
*/
@@ -45,25 +44,25 @@ public class Intents {
public static final String INTENT_EXTRA_PREFIX = INTENT_PREFIX + "extra.";
/**
- * Repository handle
+ * Repo handle
*/
public static final String EXTRA_REPOSITORY = INTENT_EXTRA_PREFIX
+ "REPOSITORY";
/**
- * Repository ids collection handle
+ * Repo ids collection handle
*/
public static final String EXTRA_REPOSITORIES = INTENT_EXTRA_PREFIX
+ "REPOSITORIES";
/**
- * Repository name
+ * Repo name
*/
public static final String EXTRA_REPOSITORY_NAME = INTENT_EXTRA_PREFIX
+ "REPOSITORY_NAME";
/**
- * Repository owner
+ * Repo owner
*/
public static final String EXTRA_REPOSITORY_OWNER = INTENT_EXTRA_PREFIX
+ "REPOSITORY_OWNER";
@@ -177,15 +176,15 @@ public class Intents {
public static final String EXTRA_PATH = INTENT_EXTRA_PREFIX + "PATH";
/**
- * Resolve the {@link RepositoryId} referenced by the given intent
+ * Resolve the {@link Repo} referenced by the given intent
*
* @param intent
* @return repository id
*/
- public static RepositoryId repoFrom(Intent intent) {
+ public static Repo repoFrom(Intent intent) {
String repoName = intent.getStringExtra(EXTRA_REPOSITORY_NAME);
String repoOwner = intent.getStringExtra(EXTRA_REPOSITORY_OWNER);
- return RepositoryId.create(repoOwner, repoName);
+ return InfoUtils.createRepoFromData(repoOwner, repoName);
}
/**
@@ -206,24 +205,13 @@ public Builder(String actionSuffix) {
intent = new Intent(INTENT_PREFIX + actionSuffix);
}
- /**
- * Add repository id to intent being built up
- *
- * @param repositoryId
- * @return this builder
- */
- public Builder repo(RepositoryId repositoryId) {
- return add(EXTRA_REPOSITORY_NAME, repositoryId.getName()).add(
- EXTRA_REPOSITORY_OWNER, repositoryId.getOwner());
- }
-
/**
* Add repository to intent being built up
*
* @param repository
* @return this builder
*/
- public Builder repo(Repository repository) {
+ public Builder repo(Repo repository) {
return add(EXTRA_REPOSITORY, repository);
}
@@ -234,8 +222,8 @@ public Builder repo(Repository repository) {
* @return this builder
*/
public Builder issue(Issue issue) {
- return repo(createFromUrl(issue.getHtmlUrl())).add(EXTRA_ISSUE,
- issue).add(EXTRA_ISSUE_NUMBER, issue.getNumber());
+ return repo(InfoUtils.createRepoFromUrl(issue.html_url)).add(EXTRA_ISSUE,
+ issue).add(EXTRA_ISSUE_NUMBER, issue.number);
}
/**
@@ -350,6 +338,31 @@ public Builder add(String fieldName, Serializable value) {
return this;
}
+
+ /**
+ * Add extra field data value to intent being built up
+ *
+ * @param fieldName
+ * @param value
+ * @return this builder
+ */
+ public Builder add(String fieldName, Parcelable value) {
+ intent.putExtra(fieldName, value);
+ return this;
+ }
+
+ /**
+ * Add extra field data value to intent being built up
+ *
+ * @param fieldName
+ * @param value
+ * @return this builder
+ */
+ public Builder add(String fieldName, ArrayList extends Parcelable> value) {
+ intent.putParcelableArrayListExtra(fieldName, value);
+ return this;
+ }
+
/**
* Get built intent
*
diff --git a/app/src/main/java/com/github/pockethub/ServicesModule.java b/app/src/main/java/com/github/pockethub/ServicesModule.java
index 9b754d498..0ef781239 100644
--- a/app/src/main/java/com/github/pockethub/ServicesModule.java
+++ b/app/src/main/java/com/github/pockethub/ServicesModule.java
@@ -15,13 +15,17 @@
*/
package com.github.pockethub;
+import android.content.Context;
+
+import com.alorma.github.sdk.bean.dto.response.Content;
+import com.alorma.github.sdk.services.user.GetAuthUserClient;
import com.github.pockethub.core.search.SearchUserService;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import java.io.IOException;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.CollaboratorService;
import org.eclipse.egit.github.core.service.CommitService;
@@ -85,8 +89,8 @@ RepositoryService repoService(GitHubClient client) {
}
@Provides
- User currentUser(UserService userService) throws IOException {
- return userService.getUser();
+ User currentUser(Context context) throws IOException {
+ return new GetAuthUserClient(context).executeSync();
}
@Provides
From f5b0aa39a73f7dc9d9586037a9992cd841896cb9 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Fri, 18 Sep 2015 23:30:46 +0200
Subject: [PATCH 080/561] Removed local TwoFactorAuth from app Updated
LoginActivity to fit SDK changes Refactoring
---
.../pockethub/accounts/AccountUtils.java | 23 +-
.../pockethub/accounts/LoginActivity.java | 13 +-
.../accounts/TwoFactorAuthActivity.java | 260 ------------------
.../accounts/TwoFactorAuthClient.java | 153 -----------
.../accounts/TwoFactorAuthException.java | 63 -----
5 files changed, 29 insertions(+), 483 deletions(-)
delete mode 100644 app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java
delete mode 100644 app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java
delete mode 100644 app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java
diff --git a/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java b/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
index 5c8b2f474..bec370c4e 100644
--- a/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
+++ b/app/src/main/java/com/github/pockethub/accounts/AccountUtils.java
@@ -32,10 +32,11 @@
import android.text.TextUtils;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.Organization;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.pockethub.R;
import com.github.pockethub.ui.LightAlertDialog;
-import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.client.RequestException;
import java.io.IOException;
@@ -103,7 +104,25 @@ public static boolean isUser(final Context context, final User user) {
if (user == null)
return false;
- String login = user.getLogin();
+ String login = user.login;
+ if (login == null)
+ return false;
+
+ return login.equals(getLogin(context));
+ }
+
+ /**
+ * Is the given user the owner of the default account?
+ *
+ * @param context
+ * @param user
+ * @return true if default account user, false otherwise
+ */
+ public static boolean isUser(final Context context, final Organization user) {
+ if (user == null)
+ return false;
+
+ String login = user.login;
if (login == null)
return false;
diff --git a/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java b/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
index 42955ef23..4f006a752 100644
--- a/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
@@ -32,6 +32,9 @@
import com.alorma.github.basesdk.ApiClient;
import com.alorma.github.basesdk.client.BaseClient;
+import com.alorma.github.basesdk.client.GithubDeveloperCredentialsProvider;
+import com.alorma.github.basesdk.client.credentials.GithubDeveloperCredentials;
+import com.alorma.github.sdk.bean.dto.response.Organization;
import com.alorma.github.sdk.bean.dto.response.Token;
import com.alorma.github.sdk.login.AccountsHelper;
import com.alorma.github.sdk.security.GitHub;
@@ -47,7 +50,7 @@
import java.util.List;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
import retrofit.RetrofitError;
import retrofit.client.Response;
@@ -90,7 +93,7 @@ public static void configureSyncFor(Account account) {
}
public static class AccountLoader extends
- AuthenticatedUserTask> {
+ AuthenticatedUserTask> {
@Inject
private AccountDataManager cache;
@@ -100,7 +103,7 @@ protected AccountLoader(Context context) {
}
@Override
- protected List run(Account account) throws Exception {
+ protected List run(Account account) throws Exception {
return cache.getOrgs(true);
}
}
@@ -183,10 +186,10 @@ private void openLoadingDialog() {
}
public void handleLogin() {
- openLoginInBrowser(new GitHub(this));
+ openLoginInBrowser(GithubDeveloperCredentials.getInstance().getProvider());
}
- private void openLoginInBrowser(ApiClient client) {
+ private void openLoginInBrowser(GithubDeveloperCredentialsProvider client) {
String initialScope = "user,public_repo,repo,delete_repo,notifications,gist";
HttpUrl.Builder url = new HttpUrl.Builder()
.scheme("https")
diff --git a/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java
deleted file mode 100644
index dc9becb97..000000000
--- a/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthActivity.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright 2013 GitHub Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.pockethub.accounts;
-
-import static android.content.DialogInterface.OnCancelListener;
-import static android.view.KeyEvent.ACTION_DOWN;
-import static android.view.KeyEvent.KEYCODE_ENTER;
-import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
-import static com.github.pockethub.accounts.AccountConstants.ACCOUNT_TYPE;
-import static com.github.pockethub.accounts.LoginActivity.configureSyncFor;
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.os.Bundle;
-import android.text.Editable;
-import android.text.Html;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.text.method.LinkMovementMethod;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import com.github.kevinsawicki.wishlist.ViewFinder;
-import com.github.pockethub.R;
-import com.github.pockethub.ui.LightProgressDialog;
-import com.github.pockethub.ui.TextWatcherAdapter;
-import com.github.pockethub.ui.roboactivities.RoboActionBarActivity;
-
-import java.io.IOException;
-
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.service.OAuthService;
-import org.eclipse.egit.github.core.service.UserService;
-
-import roboguice.util.RoboAsyncTask;
-
-/**
- * Activity to enter two-factor authentication OTP code
- */
-public class TwoFactorAuthActivity extends RoboActionBarActivity {
-
- /**
- * Create intent to enter two-factor authentication code
- *
- * @param username
- * @param password
- * @return
- */
- public static Intent createIntent(Context context, String username, String password) {
- Intent intent = new Intent(context, TwoFactorAuthActivity.class);
- intent.putExtra(PARAM_USERNAME, username);
- intent.putExtra(PARAM_PASSWORD, password);
- return intent;
- }
-
- /**
- * Exception sent back to calling Activity
- */
- public static final String PARAM_EXCEPTION = "exception";
-
- /**
- * User name entered in login screen
- */
- public static final String PARAM_USERNAME = "username";
-
- /**
- * Password entered in login screen
- */
- public static final String PARAM_PASSWORD = "password";
-
- private static final String TAG = "TwoFactorAuthActivity";
-
- private AccountManager accountManager;
-
- private EditText otpCodeText;
-
- private RoboAsyncTask authenticationTask;
-
- private MenuItem loginItem;
-
- private String username;
-
- private String password;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setContentView(R.layout.login_two_factor_auth);
-
- setSupportActionBar((android.support.v7.widget.Toolbar) findViewById(R.id.toolbar));
-
- accountManager = AccountManager.get(this);
-
- ViewFinder finder = new ViewFinder(this);
- otpCodeText = finder.find(R.id.et_otp_code);
-
- final Intent intent = getIntent();
- username = intent.getStringExtra(PARAM_USERNAME);
- password = intent.getStringExtra(PARAM_PASSWORD);
-
- TextView signupText = finder.find(R.id.tv_signup);
- signupText.setMovementMethod(LinkMovementMethod.getInstance());
- signupText.setText(Html.fromHtml(getString(R.string.signup_link_two_factor_auth)));
-
- TextWatcher watcher = new TextWatcherAdapter() {
-
- @Override
- public void afterTextChanged(Editable gitDirEditText) {
- updateEnablement();
- }
- };
- otpCodeText.addTextChangedListener(watcher);
-
- otpCodeText.setOnKeyListener(new View.OnKeyListener() {
-
- @Override
- public boolean onKey(View v, int keyCode, KeyEvent event) {
- if (event != null && ACTION_DOWN == event.getAction()
- && keyCode == KEYCODE_ENTER && loginEnabled()) {
- handleLogin();
- return true;
- } else
- return false;
- }
- });
-
- otpCodeText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-
- @Override
- public boolean onEditorAction(TextView v, int actionId,
- KeyEvent event) {
- if (actionId == IME_ACTION_DONE && loginEnabled()) {
- handleLogin();
- return true;
- }
- return false;
- }
- });
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- updateEnablement();
- }
-
- private boolean loginEnabled() {
- Editable otpCode = otpCodeText.getText();
- return !TextUtils.isEmpty(otpCode) && otpCode.length() == 6;
- }
-
- private void updateEnablement() {
- if (loginItem != null)
- loginItem.setEnabled(loginEnabled());
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.m_login:
- handleLogin();
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu optionsMenu) {
- getMenuInflater().inflate(R.menu.login, optionsMenu);
- loginItem = optionsMenu.findItem(R.id.m_login);
- return true;
- }
-
- private void handleLogin() {
- final String otpCode = otpCodeText.getText().toString();
-
- final AlertDialog dialog = LightProgressDialog.create(this,
- R.string.login_activity_authenticating);
- dialog.setCancelable(true);
- dialog.setOnCancelListener(new OnCancelListener() {
-
- @Override
- public void onCancel(DialogInterface dialog) {
- if (authenticationTask != null)
- authenticationTask.cancel(true);
- }
- });
- dialog.show();
-
- authenticationTask = new RoboAsyncTask(this) {
-
- @Override
- public User call() throws Exception {
- TwoFactorAuthClient client = new TwoFactorAuthClient();
- client.setCredentials(username, password);
- client.setOtpCode(otpCode);
-
- OAuthService service = new OAuthService(client);
- String authToken = AccountAuthenticator.getAuthorization(service);
- if (authToken == null)
- authToken = AccountAuthenticator.createAuthorization(service);
- client.setOAuth2Token(authToken);
-
- User user = new UserService(client).getUser();
- Account account = new Account(user.getLogin(), ACCOUNT_TYPE);
- accountManager.addAccountExplicitly(account, password, null);
- accountManager.setAuthToken(account, ACCOUNT_TYPE, authToken);
-
- configureSyncFor(account);
- try {
- new LoginActivity.AccountLoader(TwoFactorAuthActivity.this).call();
- } catch (IOException e) {
- Log.d(TAG, "Exception loading organizations", e);
- }
-
- return user;
- }
-
- @Override
- protected void onException(Exception e) throws RuntimeException {
- dialog.dismiss();
-
- Log.d(TAG, "Exception requesting handling two-factor authentication", e);
- setResult(RESULT_CANCELED, new Intent().putExtra(PARAM_EXCEPTION, e));
- finish();
- }
-
- @Override
- public void onSuccess(User user) {
- dialog.dismiss();
- setResult(RESULT_OK);
- finish();
- }
- };
- authenticationTask.execute();
- }
-}
diff --git a/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java
deleted file mode 100644
index 31aa7a2c6..000000000
--- a/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthClient.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright 2013 GitHub Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.pockethub.accounts;
-
-import android.text.TextUtils;
-import com.github.pockethub.DefaultClient;
-import org.eclipse.egit.github.core.client.GitHubClient;
-import org.eclipse.egit.github.core.client.GitHubRequest;
-import org.eclipse.egit.github.core.client.GitHubResponse;
-
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.net.HttpURLConnection;
-
-/**
- * {@link GitHubClient} extension that checks response headers to find
- * two-factor authentication related ones
- */
-public class TwoFactorAuthClient extends DefaultClient {
-
- /**
- * Two-factor authentication code header
- */
- protected static final String HEADER_OTP = "X-GitHub-OTP";
-
- /**
- * Two-factor authentication type by application
- */
- public static final int TWO_FACTOR_AUTH_TYPE_APP = 1001;
-
- /**
- * Two-factor authentication type by sms
- */
- public static final int TWO_FACTOR_AUTH_TYPE_SMS = 1002;
-
- private String otpCode;
-
- public TwoFactorAuthClient() {
- super();
- }
-
- /**
- * Set OTP code which will be added to POST requests
- *
- * @param otpCode
- */
- public void setOtpCode(String otpCode) {
- this.otpCode = otpCode;
- }
-
- /**
- * Get response from URI and bind to specified type
- *
- * @param request
- * @return response
- * @throws java.io.IOException
- */
- @Override
- public GitHubResponse get(GitHubRequest request) throws IOException {
- HttpURLConnection httpRequest = createGet(request.generateUri());
- if (!TextUtils.isEmpty(otpCode))
- httpRequest.setRequestProperty(HEADER_OTP, otpCode);
-
- try {
- String accept = request.getResponseContentType();
- if (accept != null)
- httpRequest.setRequestProperty(HEADER_ACCEPT, accept);
- final int code = httpRequest.getResponseCode();
- updateRateLimits(httpRequest);
- if (isOk(code))
- return new GitHubResponse(httpRequest, getBody(request,
- getStream(httpRequest)));
- if (isEmpty(code))
- return new GitHubResponse(httpRequest, null);
- throw createException(getStream(httpRequest), code,
- httpRequest.getResponseMessage());
- } catch (IOException e) {
- throw checkTwoFactorAuthError(httpRequest, e);
- }
- }
-
- /**
- * Post data to URI
- *
- * @param
- * @param uri
- * @param params
- * @param type
- * @return response
- * @throws IOException
- */
- @Override
- public V post(final String uri, final Object params, final Type type)
- throws IOException {
- HttpURLConnection request = createPost(uri);
- if (!TextUtils.isEmpty(otpCode))
- request.setRequestProperty(HEADER_OTP, otpCode);
-
- try {
- return sendJson(request, params, type);
- } catch (IOException e) {
- throw checkTwoFactorAuthError(request, e);
- }
- }
-
- private IOException checkTwoFactorAuthError(HttpURLConnection request, IOException e) throws IOException {
- String otpHeader = request.getHeaderField(HEADER_OTP);
- if (!TextUtils.isEmpty(otpHeader) && otpHeader.contains("required"))
- return createTwoFactorAuthException(e, otpHeader);
- else
- return e;
- }
-
- private TwoFactorAuthException createTwoFactorAuthException(
- IOException cause, String otpHeader) {
- int twoFactorAuthType = -1;
- if (otpHeader.contains("app"))
- twoFactorAuthType = TWO_FACTOR_AUTH_TYPE_APP;
- else if (otpHeader.contains("sms"))
- twoFactorAuthType = TWO_FACTOR_AUTH_TYPE_SMS;
-
- return new TwoFactorAuthException(cause, twoFactorAuthType);
- }
-
- private V sendJson(final HttpURLConnection request,
- final Object params, final Type type) throws IOException {
- sendParams(request, params);
- final int code = request.getResponseCode();
- updateRateLimits(request);
- if (isOk(code))
- if (type != null)
- return parseJson(getStream(request), type);
- else
- return null;
- if (isEmpty(code))
- return null;
- throw createException(getStream(request), code,
- request.getResponseMessage());
- }
-}
diff --git a/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java b/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java
deleted file mode 100644
index 237525cd7..000000000
--- a/app/src/main/java/com/github/pockethub/accounts/TwoFactorAuthException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2013 GitHub Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.pockethub.accounts;
-
-import java.io.IOException;
-
-/**
- * Exception class to be thrown when server responds with a 401 and
- * an X-GitHub-OTP: required;:2fa-type header.
- * This exception wraps an {@link IOException} that is the actual exception
- * that occurred when the request was made.
- */
-public class TwoFactorAuthException extends IOException {
-
- /**
- * serialVersionUID
- */
- private static final long serialVersionUID = 3889626691109709714L;
-
- /**
- * Cause exception
- */
- protected final IOException cause;
-
- /**
- * Two-factor authentication type
- */
- protected final int twoFactorAuthType;
-
- /**
- * Create two-factor authentification exception
- *
- * @param cause
- * @param twoFactorAuthType
- */
- public TwoFactorAuthException(IOException cause, int twoFactorAuthType) {
- this.cause = cause;
- this.twoFactorAuthType = twoFactorAuthType;
- }
-
- @Override
- public String getMessage() {
- return cause != null ? cause.getMessage() : super.getMessage();
- }
-
- @Override
- public IOException getCause() {
- return cause;
- }
-}
\ No newline at end of file
From 435118e8d41edca5130abd334598bffa9fbdfb0d Mon Sep 17 00:00:00 2001
From: Henrik
Date: Fri, 18 Sep 2015 23:32:05 +0200
Subject: [PATCH 081/561] Extra API payloads that the SDK didn't need, but we
do
---
.../com/github/pockethub/api/FollowEventPayload.java | 9 +++++++++
.../java/com/github/pockethub/api/GistEventPayload.java | 9 +++++++++
2 files changed, 18 insertions(+)
create mode 100644 app/src/main/java/com/github/pockethub/api/FollowEventPayload.java
create mode 100644 app/src/main/java/com/github/pockethub/api/GistEventPayload.java
diff --git a/app/src/main/java/com/github/pockethub/api/FollowEventPayload.java b/app/src/main/java/com/github/pockethub/api/FollowEventPayload.java
new file mode 100644
index 000000000..57b4c0b23
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/api/FollowEventPayload.java
@@ -0,0 +1,9 @@
+package com.github.pockethub.api;
+
+import com.alorma.github.sdk.bean.dto.response.User;
+import com.alorma.github.sdk.bean.dto.response.events.payload.GithubEventPayload;
+
+public class FollowEventPayload extends GithubEventPayload {
+
+ public User target;
+}
diff --git a/app/src/main/java/com/github/pockethub/api/GistEventPayload.java b/app/src/main/java/com/github/pockethub/api/GistEventPayload.java
new file mode 100644
index 000000000..bcf5bf401
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/api/GistEventPayload.java
@@ -0,0 +1,9 @@
+package com.github.pockethub.api;
+
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.events.payload.ActionEventPayload;
+
+public class GistEventPayload extends ActionEventPayload {
+
+ public Gist gist;
+}
From a4b1f2c5d9ba11c5845cb7c0716c53fb5dc35a04 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Tue, 22 Sep 2015 15:57:34 +0700
Subject: [PATCH 082/561] Add logout function
---
.../pockethub/accounts/LoginActivity.java | 14 ++++++----
.../com/github/pockethub/ui/MainActivity.java | 26 +++++++------------
2 files changed, 18 insertions(+), 22 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java b/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
index 42955ef23..4d7acf189 100644
--- a/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
+++ b/app/src/main/java/com/github/pockethub/accounts/LoginActivity.java
@@ -15,7 +15,6 @@
*/
package com.github.pockethub.accounts;
-import static com.github.pockethub.accounts.AccountConstants.PROVIDER_AUTHORITY;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.AlertDialog;
@@ -45,13 +44,15 @@
import com.google.inject.Inject;
import com.squareup.okhttp.HttpUrl;
-import java.util.List;
-
import org.eclipse.egit.github.core.User;
+import java.util.List;
+
import retrofit.RetrofitError;
import retrofit.client.Response;
+import static com.github.pockethub.accounts.AccountConstants.PROVIDER_AUTHORITY;
+
/**
* Activity to login
*/
@@ -130,8 +131,9 @@ public void onCreate(Bundle savedInstanceState) {
accounts = accountManager.getAccountsByType(getString(R.string.account_type));
- if (accounts != null && accounts.length > 0)
+ if (accounts != null && accounts.length > 0) {
openMain();
+ }
}
@Override
@@ -169,8 +171,10 @@ public void onFail(RetrofitError error) {
}
private void openMain() {
- if(progressDialog != null)
+ if (progressDialog != null) {
progressDialog.dismiss();
+ }
+
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
diff --git a/app/src/main/java/com/github/pockethub/ui/MainActivity.java b/app/src/main/java/com/github/pockethub/ui/MainActivity.java
index ed3f9e08f..3e6928f58 100644
--- a/app/src/main/java/com/github/pockethub/ui/MainActivity.java
+++ b/app/src/main/java/com/github/pockethub/ui/MainActivity.java
@@ -1,9 +1,10 @@
package com.github.pockethub.ui;
+import android.accounts.Account;
+import android.accounts.AccountManager;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
-import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
@@ -44,8 +45,6 @@ public class MainActivity extends BaseActivity implements NavigationDrawerFragme
LoaderManager.LoaderCallbacks> {
private static final String TAG = "MainActivity";
- public static final String STRING_LOGGED_IN = "log";
- public static boolean RESULT_LOG_IN = false;
private NavigationDrawerFragment mNavigationDrawerFragment;
@@ -60,9 +59,7 @@ public class MainActivity extends BaseActivity implements NavigationDrawerFragme
private NavigationDrawerAdapter navigationAdapter;
private User org;
-
- private SharedPreferences sp;
-
+
@Inject
private AvatarLoader avatars;
@@ -72,13 +69,6 @@ protected void onCreate(Bundle savedInstanceState) {
Bugsnag.init(this);
setContentView(R.layout.activity_main);
- sp = getSharedPreferences(STRING_LOGGED_IN,0);
- boolean result = sp.getBoolean(STRING_LOGGED_IN, false);
- if (result) {
- Intent in = new Intent(this, LoginActivity.class);
- startActivity(in);
- }
-
setSupportActionBar((android.support.v7.widget.Toolbar) findViewById(R.id.toolbar));
getSupportLoaderManager().initLoader(0, null, this);
@@ -181,10 +171,12 @@ public void onNavigationDrawerItemSelected(int position) {
fragment = new FilterListFragment();
break;
case 5:
- RESULT_LOG_IN = true;
- SharedPreferences.Editor editor = sp.edit();
- editor.putBoolean(STRING_LOGGED_IN, RESULT_LOG_IN);
- editor.commit();
+ Account[] allAccounts = AccountManager.get(this).getAccounts();
+
+ for (Account account : allAccounts) {
+ AccountManager.get(this).removeAccount(account, null, null);
+ }
+
Intent in = new Intent(this, LoginActivity.class);
in.addFlags(IntentCompat.FLAG_ACTIVITY_CLEAR_TASK
| Intent.FLAG_ACTIVITY_NEW_TASK);
From 1bb7109229c420ece555586eee129d6df99b7a28 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Wed, 23 Sep 2015 10:47:22 +0700
Subject: [PATCH 083/561] Update supporting libraries
We also add jitpack.io for MaterialDialog.
This addition will make Travis happy, and gives us
the green badge we all like.
---
app/build.gradle | 14 ++++++++------
build.gradle | 2 ++
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 3aff5401b..cbcf45c6c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -19,13 +19,13 @@ def isTravis = "true".equals(System.getenv("TRAVIS"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
android {
- compileSdkVersion 22
+ compileSdkVersion 23
buildToolsVersion '22.0.1'
defaultConfig {
applicationId 'com.github.pockethub'
minSdkVersion 15
- targetSdkVersion 22
+ targetSdkVersion 23
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
@@ -80,14 +80,14 @@ def String getValue(Properties props, String name) {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:22.2.1'
+ compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:2.0'
compile 'com.github.kevinsawicki:http-request:5.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:3.7.0.201502260915-r'
- compile 'com.android.support:support-v4:22.2.1'
+ compile 'com.android.support:support-v4:23.0.1'
compile ('com.google.inject.extensions:guice-assistedinject:3.0'){
exclude group: 'com.google.inject'
}
@@ -96,7 +96,9 @@ dependencies {
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.squareup.okio:okio:1.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
- compile 'com.afollestad:material-dialogs:0.7.3.2'
+ compile('com.afollestad.material-dialogs:core:0.8.0.1@aar') {
+ transitive = true
+ }
compile 'com.bugsnag:bugsnag-android:+'
//Self compiled .aar version of wishlist
@@ -108,5 +110,5 @@ dependencies {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
- compile 'com.android.support:design:22.2.1'
+ compile 'com.android.support:design:23.0.1'
}
diff --git a/build.gradle b/build.gradle
index 3c22d3d2e..4c86aafdb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,6 +3,7 @@
buildscript {
repositories {
jcenter()
+ maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
@@ -16,6 +17,7 @@ allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://repo.eclipse.org/content/groups/releases" }
+ maven { url "https://jitpack.io" }
jcenter()
}
}
From 786bab20e15127943568a36c48779276b4db8d04 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Wed, 23 Sep 2015 12:32:06 +0700
Subject: [PATCH 084/561] Add encrypted version for Travis build
---
github.properties.enc | 1 +
1 file changed, 1 insertion(+)
create mode 100644 github.properties.enc
diff --git a/github.properties.enc b/github.properties.enc
new file mode 100644
index 000000000..d51496b98
--- /dev/null
+++ b/github.properties.enc
@@ -0,0 +1 @@
+L€õ_;ÄôV»8×\"#=ÊiÛÿÎ 2J¶;Þ¬þc‰_&lÔ»‰,¢ÉW¥/¹¶¿n–b22–—ÛL¨Éwåhìüsðo!öIªUÏ(U¸ÏųäP˜4\hkèa°Ïq÷1¶–yü§!/fAD[UGJ1=-ªefé„®Àäb$ÀKaÔt
\ No newline at end of file
From efb4cc3404e22b9adf94e73eb4fc784d90e12ec4 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Wed, 23 Sep 2015 12:33:03 +0700
Subject: [PATCH 085/561] Include github.properties
---
.travis.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index edc8385d6..f2a0d5549 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,5 +13,7 @@ notifications:
sudo: false
+before_script:
+ - openssl aes-256-cbc -K $encrypted_7e1c958561a2_key -iv $encrypted_7e1c958561a2_iv -in github.properties.enc -out github.properties -d
script:
- ./gradlew clean build
From d21f0229333fff137b38b9bea62385adc3dd7531 Mon Sep 17 00:00:00 2001
From: Fadil Sutomo
Date: Wed, 23 Sep 2015 12:38:07 +0700
Subject: [PATCH 086/561] Change sdk to v23
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index f2a0d5549..c706a2d71 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,7 @@ language: android
android:
components:
- platform-tools
- - android-22
+ - android-23
- build-tools-22.0.1
- extra
From 8a648ca7b69b1f58a9cb8dc177849170cb3d1bcd Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:25:51 +0200
Subject: [PATCH 087/561] Update core models
---
.../pockethub/core/NoSuchPageException.java | 21 ++++
.../github/pockethub/core/PageIterator.java | 98 +++++++++++++++++++
.../github/pockethub/core/ResourcePager.java | 7 +-
.../github/pockethub/core/code/FullTree.java | 40 ++++----
.../pockethub/core/commit/FullCommit.java | 26 ++---
.../pockethub/core/commit/FullCommitFile.java | 8 +-
.../github/pockethub/core/gist/FullGist.java | 7 +-
.../pockethub/core/issue/FullIssue.java | 10 +-
.../github/pockethub/util/AvatarLoader.java | 32 +++---
.../github/pockethub/util/ConvertUtils.java | 14 +++
.../pockethub/util/HttpImageGetter.java | 54 ++++++++--
.../com/github/pockethub/util/InfoUtils.java | 93 ++++++++++++++++++
.../github/pockethub/util/RequestUtils.java | 40 ++++++++
.../github/pockethub/util/SourceEditor.java | 7 +-
.../com/github/pockethub/util/TimeUtils.java | 24 +++++
15 files changed, 410 insertions(+), 71 deletions(-)
create mode 100644 app/src/main/java/com/github/pockethub/core/NoSuchPageException.java
create mode 100644 app/src/main/java/com/github/pockethub/core/PageIterator.java
create mode 100644 app/src/main/java/com/github/pockethub/util/ConvertUtils.java
create mode 100644 app/src/main/java/com/github/pockethub/util/InfoUtils.java
create mode 100644 app/src/main/java/com/github/pockethub/util/RequestUtils.java
diff --git a/app/src/main/java/com/github/pockethub/core/NoSuchPageException.java b/app/src/main/java/com/github/pockethub/core/NoSuchPageException.java
new file mode 100644
index 000000000..298078ca6
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/core/NoSuchPageException.java
@@ -0,0 +1,21 @@
+package com.github.pockethub.core;
+
+import java.io.IOException;
+import java.util.NoSuchElementException;
+
+public class NoSuchPageException extends NoSuchElementException {
+
+ protected final IOException cause;
+
+ public NoSuchPageException(IOException cause) {
+ this.cause = cause;
+ }
+
+ public String getMessage() {
+ return this.cause != null ? this.cause.getMessage() : super.getMessage();
+ }
+
+ public IOException getCause() {
+ return this.cause;
+ }
+}
diff --git a/app/src/main/java/com/github/pockethub/core/PageIterator.java b/app/src/main/java/com/github/pockethub/core/PageIterator.java
new file mode 100644
index 000000000..c23671544
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/core/PageIterator.java
@@ -0,0 +1,98 @@
+package com.github.pockethub.core;
+
+import android.net.Uri;
+
+import com.alorma.github.sdk.services.client.GithubClient;
+
+import org.eclipse.egit.github.core.util.UrlUtils;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+public class PageIterator implements Iterator>, Iterable>{
+
+ protected GitHubRequest> request;
+ protected int nextPage;
+ protected int lastPage;
+ protected Uri next;
+ protected Uri last;
+
+ public PageIterator(GitHubRequest> request, int nextPage) {
+ this.request = request;
+ this.nextPage = this.lastPage = nextPage;
+ this.next = Uri.EMPTY;
+ }
+
+ protected int parsePageNumber(Uri uri) {
+ if(uri != null && uri != Uri.EMPTY) {
+
+ String param = uri.getQueryParameter("page");
+ if(param != null && param.length() != 0) {
+ try {
+ return Integer.parseInt(param);
+ } catch (NumberFormatException var4) {
+ return -1;
+ }
+ } else {
+ return -1;
+ }
+ } else {
+ return -1;
+ }
+ }
+
+ public int getNextPage() {
+ return this.nextPage;
+ }
+
+ public int getLastPage() {
+ return this.lastPage;
+ }
+
+ public boolean hasNext() {
+ return this.nextPage == 0 || this.next != null;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException("Remove not supported");
+ }
+
+ public Collection next() {
+ if(!this.hasNext()) {
+ throw new NoSuchElementException();
+ } else {
+ List resources = null;
+ GithubClient client = request.execute(nextPage);
+ Object response = client.executeSync();
+ if(response != null)
+ resources = (List) response;
+
+ if(resources == null)
+ resources = Collections.emptyList();
+
+ ++this.nextPage;
+ this.last = client.last;
+ this.lastPage = parsePageNumber(last);
+ this.next = client.next;
+ this.nextPage = parsePageNumber(next);
+ return (Collection)resources;
+ }
+ }
+
+ public GitHubRequest> getRequest() {
+ return this.request;
+ }
+
+ public Iterator> iterator() {
+ return this;
+ }
+
+ public interface GitHubRequest{
+ GithubClient execute(int page);
+ }
+}
diff --git a/app/src/main/java/com/github/pockethub/core/ResourcePager.java b/app/src/main/java/com/github/pockethub/core/ResourcePager.java
index c7b14ea1d..c6391810a 100644
--- a/app/src/main/java/com/github/pockethub/core/ResourcePager.java
+++ b/app/src/main/java/com/github/pockethub/core/ResourcePager.java
@@ -15,6 +15,8 @@
*/
package com.github.pockethub.core;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
@@ -22,9 +24,6 @@
import java.util.List;
import java.util.Map;
-import org.eclipse.egit.github.core.client.NoSuchPageException;
-import org.eclipse.egit.github.core.client.PageIterator;
-
/**
* Generic resource pager for elements with an id that can be paged
*
@@ -170,5 +169,5 @@ protected E register(final E resource) {
* @return iterator
*/
public abstract PageIterator createIterator(final int page,
- final int size);
+ final int size);
}
diff --git a/app/src/main/java/com/github/pockethub/core/code/FullTree.java b/app/src/main/java/com/github/pockethub/core/code/FullTree.java
index 0f741d75d..0d4d7d4c0 100644
--- a/app/src/main/java/com/github/pockethub/core/code/FullTree.java
+++ b/app/src/main/java/com/github/pockethub/core/code/FullTree.java
@@ -20,17 +20,20 @@
import static org.eclipse.egit.github.core.TreeEntry.TYPE_TREE;
import android.text.TextUtils;
+import com.alorma.github.sdk.bean.dto.response.GitReference;
+import com.alorma.github.sdk.bean.dto.response.GitTree;
+import com.alorma.github.sdk.bean.dto.response.GitTreeEntry;
+import com.alorma.github.sdk.bean.dto.response.GitTreeType;
import com.github.pockethub.core.commit.CommitUtils;
import com.github.pockethub.core.ref.RefUtils;
+import com.google.gson.Gson;
+
+import org.eclipse.egit.github.core.Tree;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-import org.eclipse.egit.github.core.Reference;
-import org.eclipse.egit.github.core.Tree;
-import org.eclipse.egit.github.core.TreeEntry;
-
/**
* {@link Tree} with additional information
*/
@@ -49,7 +52,7 @@ public static class Entry implements Comparable {
/**
* Raw tree entry
*/
- public final TreeEntry entry;
+ public final GitTreeEntry entry;
/**
* Name
@@ -62,10 +65,10 @@ private Entry() {
this.name = null;
}
- private Entry(TreeEntry entry, Folder parent) {
+ private Entry(GitTreeEntry entry, Folder parent) {
this.entry = entry;
this.parent = parent;
- this.name = CommitUtils.getName(entry.getPath());
+ this.name = CommitUtils.getName(entry.path);
}
@Override
@@ -95,11 +98,11 @@ private Folder() {
super();
}
- private Folder(TreeEntry entry, Folder parent) {
+ private Folder(GitTreeEntry entry, Folder parent) {
super(entry, parent);
}
- private void addFile(TreeEntry entry, String[] pathSegments, int index) {
+ private void addFile(GitTreeEntry entry, String[] pathSegments, int index) {
if (index == pathSegments.length - 1) {
Entry file = new Entry(entry, this);
files.put(file.name, file);
@@ -110,7 +113,7 @@ private void addFile(TreeEntry entry, String[] pathSegments, int index) {
}
}
- private void addFolder(TreeEntry entry, String[] pathSegments, int index) {
+ private void addFolder(GitTreeEntry entry, String[] pathSegments, int index) {
if (index == pathSegments.length - 1) {
Folder folder = new Folder(entry, this);
folders.put(folder.name, folder);
@@ -121,9 +124,9 @@ private void addFolder(TreeEntry entry, String[] pathSegments, int index) {
}
}
- private void add(final TreeEntry entry) {
- String type = entry.getType();
- String path = entry.getPath();
+ private void add(final GitTreeEntry entry) {
+ String type = entry.type.toString();
+ String path = entry.path;
if (TextUtils.isEmpty(path))
return;
@@ -154,7 +157,7 @@ private void add(final TreeEntry entry) {
/**
* Tree
*/
- public final Tree tree;
+ public final GitTree tree;
/**
* Root folder
@@ -164,7 +167,7 @@ private void add(final TreeEntry entry) {
/**
* Reference
*/
- public final Reference reference;
+ public final GitReference reference;
/**
* Branch where tree is present
@@ -177,15 +180,16 @@ private void add(final TreeEntry entry) {
* @param tree
* @param reference
*/
- public FullTree(final Tree tree, final Reference reference) {
+ public FullTree(final GitTree tree, final GitReference reference) {
this.tree = tree;
this.reference = reference;
this.branch = RefUtils.getName(reference);
root = new Folder();
- List entries = tree.getTree();
+ List entries = tree.tree;
if (entries != null && !entries.isEmpty())
- for (TreeEntry entry : entries)
+ for (GitTreeEntry entry : entries) {
root.add(entry);
+ }
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/commit/FullCommit.java b/app/src/main/java/com/github/pockethub/core/commit/FullCommit.java
index aeb09e2ce..f226854e8 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/FullCommit.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/FullCommit.java
@@ -17,6 +17,10 @@
import android.text.TextUtils;
+import com.alorma.github.sdk.bean.dto.response.Commit;
+import com.alorma.github.sdk.bean.dto.response.CommitComment;
+import com.alorma.github.sdk.bean.dto.response.CommitFile;
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
@@ -24,10 +28,6 @@
import java.util.Iterator;
import java.util.List;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.CommitFile;
-import org.eclipse.egit.github.core.RepositoryCommit;
-
/**
* Commit model with comments
*/
@@ -36,7 +36,7 @@ public class FullCommit extends ArrayList implements
private static final long serialVersionUID = 2470370479577730822L;
- private final RepositoryCommit commit;
+ private final Commit commit;
private final List files;
@@ -45,9 +45,9 @@ public class FullCommit extends ArrayList implements
*
* @param commit
*/
- public FullCommit(final RepositoryCommit commit) {
+ public FullCommit(final Commit commit) {
this.commit = commit;
- List rawFiles = commit.getFiles();
+ List rawFiles = commit.files;
if (rawFiles != null && !rawFiles.isEmpty()) {
files = new ArrayList<>(rawFiles.size());
for (CommitFile file : rawFiles)
@@ -62,11 +62,11 @@ public FullCommit(final RepositoryCommit commit) {
* @param commit
* @param comments
*/
- public FullCommit(final RepositoryCommit commit,
+ public FullCommit(final Commit commit,
final Collection comments) {
this.commit = commit;
- List rawFiles = commit.getFiles();
+ List rawFiles = commit.files;
boolean hasComments = comments != null && !comments.isEmpty();
boolean hasFiles = rawFiles != null && !rawFiles.isEmpty();
if (hasFiles) {
@@ -77,7 +77,7 @@ public FullCommit(final RepositoryCommit commit,
FullCommitFile full = new FullCommitFile(file);
while (iterator.hasNext()) {
CommitComment comment = iterator.next();
- if (file.getFilename().equals(comment.getPath())) {
+ if (file.getFileName().equals(comment.path)) {
full.add(comment);
iterator.remove();
}
@@ -97,13 +97,13 @@ public FullCommit(final RepositoryCommit commit,
@Override
public boolean add(final CommitComment comment) {
- String path = comment.getPath();
+ String path = comment.path;
if (TextUtils.isEmpty(path))
return super.add(comment);
else {
boolean added = false;
for (FullCommitFile file : files)
- if (path.equals(file.getFile().getFilename())) {
+ if (path.equals(file.getFile().filename)) {
file.add(comment);
added = true;
break;
@@ -124,7 +124,7 @@ public List getFiles() {
/**
* @return commit
*/
- public RepositoryCommit getCommit() {
+ public Commit getCommit() {
return commit;
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java b/app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java
index daf3353df..6cfc2a6af 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/FullCommitFile.java
@@ -17,13 +17,13 @@
import android.util.SparseArray;
+import com.alorma.github.sdk.bean.dto.response.CommitComment;
+import com.alorma.github.sdk.bean.dto.response.CommitFile;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.CommitFile;
-
/**
* Commit file with comments
*/
@@ -62,7 +62,7 @@ public List get(final int line) {
* @return this file
*/
public FullCommitFile add(final CommitComment comment) {
- int line = comment.getPosition();
+ int line = comment.position;
if (line >= 0) {
List lineComments = comments.get(line);
if (lineComments == null) {
diff --git a/app/src/main/java/com/github/pockethub/core/gist/FullGist.java b/app/src/main/java/com/github/pockethub/core/gist/FullGist.java
index 464776531..d6ca25a41 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/FullGist.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/FullGist.java
@@ -20,12 +20,13 @@
import java.util.Collection;
import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
/**
* Gist model with comments and starred status
*/
-public class FullGist extends ArrayList implements Serializable {
+public class FullGist extends ArrayList implements Serializable {
private static final long serialVersionUID = -5966699489498437000L;
@@ -41,7 +42,7 @@ public class FullGist extends ArrayList implements Serializable {
* @param comments
*/
public FullGist(final Gist gist, final boolean starred,
- final Collection comments) {
+ final Collection comments) {
super(comments);
this.starred = starred;
diff --git a/app/src/main/java/com/github/pockethub/core/issue/FullIssue.java b/app/src/main/java/com/github/pockethub/core/issue/FullIssue.java
index 875233e2b..178abf634 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/FullIssue.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/FullIssue.java
@@ -19,14 +19,14 @@
import java.util.ArrayList;
import java.util.Collection;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.IssueEvent;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.issue.IssueEvent;
/**
* Issue model with comments
*/
-public class FullIssue extends ArrayList implements Serializable {
+public class FullIssue extends ArrayList implements Serializable {
private static final long serialVersionUID = 4586476132467323827L;
@@ -41,7 +41,7 @@ public class FullIssue extends ArrayList implements Serializable {
* @param comments
* @param events
*/
- public FullIssue(final Issue issue, final Collection comments, final Collection events) {
+ public FullIssue(final Issue issue, final Collection comments, final Collection events) {
super(comments);
this.events = events;
diff --git a/app/src/main/java/com/github/pockethub/util/AvatarLoader.java b/app/src/main/java/com/github/pockethub/util/AvatarLoader.java
index 3ae5439e5..99cac42c4 100644
--- a/app/src/main/java/com/github/pockethub/util/AvatarLoader.java
+++ b/app/src/main/java/com/github/pockethub/util/AvatarLoader.java
@@ -24,6 +24,9 @@
import android.util.Log;
import android.widget.ImageView;
+import com.alorma.github.sdk.bean.dto.response.Contributor;
+import com.alorma.github.sdk.bean.dto.response.Organization;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.pockethub.R;
import com.google.inject.Inject;
import com.squareup.okhttp.Cache;
@@ -37,10 +40,6 @@
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicReference;
-import org.eclipse.egit.github.core.CommitUser;
-import org.eclipse.egit.github.core.Contributor;
-import org.eclipse.egit.github.core.User;
-
import roboguice.util.RoboAsyncTask;
/**
@@ -123,7 +122,7 @@ public void bind(final ActionBar actionBar, final AtomicReference userRefe
if (user == null)
return;
- String avatarUrl = user.getAvatarUrl();
+ String avatarUrl = user.avatar_url;
if (TextUtils.isEmpty(avatarUrl))
return;
@@ -163,10 +162,10 @@ public void bind(final ImageView view, final User user) {
* Bind view to image at URL
*
* @param view The ImageView that is to display the user's avatar.
- * @param user A CommitUser object that points to the desired user.
+ * @param org A User object that points to the desired user.
*/
- public void bind(final ImageView view, final CommitUser user) {
- bind(view, getAvatarUrl(user));
+ public void bind(final ImageView view, final Organization org) {
+ bind(view, getAvatarUrl(org));
}
/**
@@ -176,7 +175,7 @@ public void bind(final ImageView view, final CommitUser user) {
* @param contributor A Contributor object that points to the desired user.
*/
public void bind(final ImageView view, final Contributor contributor) {
- bind(view, contributor.getAvatarUrl());
+ bind(view, contributor.author.avatar_url);
}
private void bind(final ImageView view, String url) {
@@ -200,15 +199,22 @@ private String getAvatarUrl(User user) {
if (user == null)
return null;
- String avatarUrl = user.getAvatarUrl();
+ String avatarUrl = user.avatar_url;
if (TextUtils.isEmpty(avatarUrl)) {
- avatarUrl = getAvatarUrl(GravatarUtils.getHash(user.getEmail()));
+ avatarUrl = getAvatarUrl(GravatarUtils.getHash(user.email));
}
return avatarUrl;
}
- private String getAvatarUrl(CommitUser user) {
- return getAvatarUrl(GravatarUtils.getHash(user.getEmail()));
+ private String getAvatarUrl(Organization org) {
+ if (org == null)
+ return null;
+
+ String avatarUrl = org.avatar_url;
+ if (TextUtils.isEmpty(avatarUrl)) {
+ avatarUrl = getAvatarUrl(GravatarUtils.getHash(org.email));
+ }
+ return avatarUrl;
}
private String getAvatarUrl(String id) {
diff --git a/app/src/main/java/com/github/pockethub/util/ConvertUtils.java b/app/src/main/java/com/github/pockethub/util/ConvertUtils.java
new file mode 100644
index 000000000..7cda4b266
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/util/ConvertUtils.java
@@ -0,0 +1,14 @@
+package com.github.pockethub.util;
+
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
+
+public class ConvertUtils {
+ public static Repo eventRepoToRepo(Repo repo) {
+ String[] ref = repo.name.split("/");
+ repo.owner = new User();
+ repo.owner.login = ref[0];
+ repo.name = ref[1];
+ return repo;
+ }
+}
diff --git a/app/src/main/java/com/github/pockethub/util/HttpImageGetter.java b/app/src/main/java/com/github/pockethub/util/HttpImageGetter.java
index dd01a2beb..795ad1d7d 100644
--- a/app/src/main/java/com/github/pockethub/util/HttpImageGetter.java
+++ b/app/src/main/java/com/github/pockethub/util/HttpImageGetter.java
@@ -19,6 +19,7 @@
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static java.lang.Integer.MAX_VALUE;
+import static java.lang.Integer.valueOf;
import static org.eclipse.egit.github.core.client.IGitHubConstants.HOST_DEFAULT;
import android.accounts.Account;
import android.content.Context;
@@ -26,11 +27,15 @@
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
+import android.text.Html;
import android.text.Html.ImageGetter;
import android.text.TextUtils;
import android.util.Base64;
import android.widget.TextView;
+import com.alorma.github.basesdk.client.BaseClient;
+import com.alorma.github.sdk.bean.dto.request.RequestMarkdownDTO;
+import com.alorma.github.sdk.services.content.GetMarkdownClient;
import com.github.kevinsawicki.http.HttpRequest;
import com.github.kevinsawicki.http.HttpRequest.HttpRequestException;
import com.github.pockethub.R;
@@ -47,6 +52,9 @@
import org.eclipse.egit.github.core.RepositoryId;
import org.eclipse.egit.github.core.service.ContentsService;
+import retrofit.RetrofitError;
+import retrofit.client.Response;
+
/**
* Getter for an image
*/
@@ -106,7 +114,7 @@ private HttpImageGetter show(final TextView view, final CharSequence html) {
if (TextUtils.isEmpty(html))
return hide(view);
- view.setText(html);
+ view.setText(trim(html));
view.setVisibility(VISIBLE);
view.setTag(null);
return this;
@@ -119,6 +127,13 @@ private HttpImageGetter hide(final TextView view) {
return this;
}
+ //All comments end with "\n\n" removing 2 chars
+ private CharSequence trim(CharSequence val){
+ if(val.charAt(val.length()-1) == '\n' && val.charAt(val.length()-2) == '\n')
+ val = val.subSequence(0, val.length()-2);
+ return val;
+ }
+
/**
* Encode given HTML string and map it to the given id
*
@@ -164,15 +179,38 @@ public HttpImageGetter bind(final TextView view, final String html,
encoded = rawHtmlCache.get(id);
if (encoded == null) {
- encoded = HtmlUtils.encode(html, loading);
- if (containsImages(html))
- rawHtmlCache.put(id, encoded);
- else {
- rawHtmlCache.remove(id);
- fullHtmlCache.put(id, encoded);
- return show(view, encoded);
+ if (!html.matches("<[a-z][\\s\\S]*>")) {
+ RequestMarkdownDTO markdownDTO = new RequestMarkdownDTO();
+ markdownDTO.text = html;
+ GetMarkdownClient markdownClient = new GetMarkdownClient(context, markdownDTO);
+ markdownClient.setOnResultCallback(new BaseClient.OnResultCallback() {
+ @Override
+ public void onResponseOk(String data, Response response) {
+ continueBind(view, data, id);
+ }
+
+ @Override
+ public void onFail(RetrofitError retrofitError) {
+ continueBind(view, html, id);
+ }
+ });
+ markdownClient.execute();
+ } else {
+ return continueBind(view, html, id);
}
}
+ return this;
+ }
+
+ private HttpImageGetter continueBind(final TextView view, final String html, final Object id){
+ CharSequence encoded = HtmlUtils.encode(html, loading);
+ if (containsImages(html))
+ rawHtmlCache.put(id, encoded);
+ else {
+ rawHtmlCache.remove(id);
+ fullHtmlCache.put(id, encoded);
+ return show(view, encoded);
+ }
if (TextUtils.isEmpty(encoded))
return hide(view);
diff --git a/app/src/main/java/com/github/pockethub/util/InfoUtils.java b/app/src/main/java/com/github/pockethub/util/InfoUtils.java
new file mode 100644
index 000000000..7e4f55881
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/util/InfoUtils.java
@@ -0,0 +1,93 @@
+package com.github.pockethub.util;
+
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
+import com.alorma.github.sdk.bean.info.CommitInfo;
+import com.alorma.github.sdk.bean.info.IssueInfo;
+import com.alorma.github.sdk.bean.info.RepoInfo;
+
+public class InfoUtils {
+
+ public static RepoInfo createRepoInfo(Repo repo) {
+ return createRepoInfo(repo, repo.default_branch);
+ }
+
+ public static RepoInfo createRepoInfo(Repo repo, String branch) {
+ RepoInfo repoInfo = new RepoInfo();
+ repoInfo.permissions = repo.permissions;
+ repoInfo.branch = branch;
+ repoInfo.name = repo.name;
+ repoInfo.owner = repo.owner.login;
+ return repoInfo;
+ }
+
+ public static IssueInfo createIssueInfo(Repo repo, Issue issue) {
+ IssueInfo issueInfo = new IssueInfo(createRepoInfo(repo));
+ if (issue != null) {
+ issueInfo.num = issue.number;
+ issueInfo.state = issue.state;
+ issueInfo.commentNum = issue.comments;
+ }
+ return issueInfo;
+ }
+
+ public static IssueInfo createIssueInfo(Repo repo, int issueNumber) {
+ IssueInfo issueInfo = new IssueInfo(createRepoInfo(repo));
+ issueInfo.num = issueNumber;
+ return issueInfo;
+ }
+
+ public static Repo createRepoFromUrl(String url) {
+ if (url == null || url.length() == 0)
+ return null;
+ String owner = null;
+ String name = null;
+ for (String segment : url.split("/")) //$NON-NLS-1$
+ if (segment.length() > 0)
+ if (owner == null)
+ owner = segment;
+ else if (name == null)
+ name = segment;
+ else
+ break;
+
+ if (owner != null && owner.length() > 0 && name != null && name.length() > 0) {
+ Repo repo = new Repo();
+ User user = new User();
+ user.login = owner;
+ repo.owner = user;
+ repo.name = name;
+ return repo;
+ } else {
+ return null;
+ }
+ }
+
+ public static String createRepoId(Repo repo) {
+ if(repo.name.contains("/"))
+ return repo.name;
+ else
+ return createRepoId(repo.owner.login, repo.name);
+ }
+
+ public static String createRepoId(String owner, String name) {
+ return owner + "/" + name;
+ }
+
+ public static Repo createRepoFromData(String repoOwner, String repoName) {
+ Repo repo = new Repo();
+ User user = new User();
+ user.login = repoOwner;
+ repo.owner = user;
+ repo.name = repoName;
+ return repo;
+ }
+
+ public static CommitInfo createCommitInfo(Repo repo, String sha) {
+ CommitInfo commitInfo = new CommitInfo();
+ commitInfo.repoInfo = createRepoInfo(repo);
+ commitInfo.sha = sha;
+ return commitInfo;
+ }
+}
diff --git a/app/src/main/java/com/github/pockethub/util/RequestUtils.java b/app/src/main/java/com/github/pockethub/util/RequestUtils.java
new file mode 100644
index 000000000..eec64069c
--- /dev/null
+++ b/app/src/main/java/com/github/pockethub/util/RequestUtils.java
@@ -0,0 +1,40 @@
+package com.github.pockethub.util;
+
+import com.alorma.github.sdk.bean.dto.request.CommitCommentRequest;
+import com.alorma.github.sdk.bean.dto.request.EditGistRequestDTO;
+import com.alorma.github.sdk.bean.dto.request.IssueRequest;
+import com.alorma.github.sdk.bean.dto.request.RequestMarkdownDTO;
+import com.alorma.github.sdk.bean.dto.response.CommitComment;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.Label;
+
+public class RequestUtils {
+ public static EditGistRequestDTO editGist(Gist gist) {
+ EditGistRequestDTO editGistRequestDTO = new EditGistRequestDTO();
+ editGistRequestDTO.description = gist.description;
+ editGistRequestDTO.files = gist.files;
+ return editGistRequestDTO;
+ }
+
+ public static RequestMarkdownDTO markdown(String raw) {
+ RequestMarkdownDTO requestMarkdownDTO = new RequestMarkdownDTO();
+ requestMarkdownDTO.text = raw;
+ return requestMarkdownDTO;
+ }
+
+ public static IssueRequest issueFull(Issue issue, String body, String title) {
+ IssueRequest request = new IssueRequest();
+ request.body = body;
+ request.title = title;
+ request.assignee = issue.user.login;
+ request.milestone = issue.milestone.number;
+ request.state = issue.state;
+ request.labels = new String[request.labels.length];
+
+ for (int i = 0; i < request.labels.length; i++)
+ request.labels[i] = issue.labels.get(i).name;
+ return request;
+ }
+
+}
diff --git a/app/src/main/java/com/github/pockethub/util/SourceEditor.java b/app/src/main/java/com/github/pockethub/util/SourceEditor.java
index 9c4e8c176..b7357c2ba 100644
--- a/app/src/main/java/com/github/pockethub/util/SourceEditor.java
+++ b/app/src/main/java/com/github/pockethub/util/SourceEditor.java
@@ -25,6 +25,7 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;
+import com.alorma.github.sdk.bean.dto.response.GitBlob;
import com.github.pockethub.ui.user.UriLauncherActivity;
import java.io.UnsupportedEncodingException;
@@ -184,11 +185,11 @@ private void loadSource() {
* @param blob
* @return this editor
*/
- public SourceEditor setSource(final String name, final Blob blob) {
- String content = blob.getContent();
+ public SourceEditor setSource(final String name, final GitBlob blob) {
+ String content = blob.content;
if (content == null)
content = "";
- boolean encoded = !TextUtils.isEmpty(content) && ENCODING_BASE64.equals(blob.getEncoding());
+ boolean encoded = !TextUtils.isEmpty(content) && ENCODING_BASE64.equals(blob.encoding);
return setSource(name, content, encoded);
}
diff --git a/app/src/main/java/com/github/pockethub/util/TimeUtils.java b/app/src/main/java/com/github/pockethub/util/TimeUtils.java
index 75146a404..449799725 100644
--- a/app/src/main/java/com/github/pockethub/util/TimeUtils.java
+++ b/app/src/main/java/com/github/pockethub/util/TimeUtils.java
@@ -21,7 +21,11 @@
import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
import android.text.format.DateUtils;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Locale;
/**
* Utilities for dealing with dates and times
@@ -43,4 +47,24 @@ public static CharSequence getRelativeTime(final Date date) {
else
return "just now";
}
+
+ public static CharSequence getRelativeTime(final String date) {
+ return getRelativeTime(stringToDate(date));
+ }
+
+ public static Date stringToDate(String value){
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.getDefault());
+ Date date = null;
+ try {
+ date = format.parse(value);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return date;
+ }
+
+ public static String dateToString(Date value){
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.getDefault());
+ return format.format(value);
+ }
}
From 3cf1239c8ea9749b446af696e093490146b00466 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:31:57 +0200
Subject: [PATCH 088/561] Adapters updated to use new SDK
---
.../pockethub/ui/NavigationDrawerAdapter.java | 12 +-
.../ui/comment/CommentListAdapter.java | 60 +++++----
.../comment/CommentPreviewPagerAdapter.java | 6 +-
.../ui/commit/CommitFileListAdapter.java | 28 ++---
.../ui/commit/CommitListAdapter.java | 13 +-
.../ui/commit/CommitPagerAdapter.java | 9 +-
.../ui/gist/GistFilesPagerAdapter.java | 10 +-
.../pockethub/ui/gist/GistListAdapter.java | 21 ++--
.../ui/issue/DashboardIssueListAdapter.java | 28 +++--
.../pockethub/ui/issue/FilterListAdapter.java | 15 +--
.../pockethub/ui/issue/IssueListAdapter.java | 10 +-
.../ui/issue/IssuesPagerAdapter.java | 41 +++---
.../ui/issue/RepositoryIssueListAdapter.java | 21 ++--
.../ui/issue/SearchIssueListAdapter.java | 34 +++--
.../pockethub/ui/ref/CodeTreeAdapter.java | 65 +++++-----
.../ui/repo/ContributorListAdapter.java | 9 +-
.../ui/repo/DefaultRepositoryListAdapter.java | 36 +++---
.../ui/repo/UserRepositoryListAdapter.java | 28 ++---
.../search/SearchRepositoryListAdapter.java | 19 +--
.../ui/search/SearchUserListAdapter.java | 11 +-
.../pockethub/ui/user/HomePagerAdapter.java | 4 +-
.../pockethub/ui/user/NewsListAdapter.java | 118 +++++++++++++++---
.../pockethub/ui/user/UserListAdapter.java | 6 +-
23 files changed, 350 insertions(+), 254 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java
index 974572869..1e714f856 100644
--- a/app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/NavigationDrawerAdapter.java
@@ -13,23 +13,23 @@
import android.widget.ImageView;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.Organization;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.pockethub.R;
import com.github.pockethub.util.AvatarLoader;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.egit.github.core.User;
-
public class NavigationDrawerAdapter extends BaseAdapter {
private final Context context;
private final AvatarLoader avatars;
private final LayoutInflater inflater;
- private List orgs = new ArrayList<>();
+ private List orgs = new ArrayList<>();
private List data;
- public NavigationDrawerAdapter(Context context, List orgs, final AvatarLoader avatars) {
+ public NavigationDrawerAdapter(Context context, List orgs, final AvatarLoader avatars) {
this.orgs.addAll(orgs);
this.context = context;
this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@@ -52,12 +52,12 @@ else if (i == names.length)
else if (i == names.length + 1)
data.add(new NavigationDrawerObject("Organizations", TYPE_SUBHEADER));
else
- data.add(new NavigationDrawerObject(orgs.get(i - names.length - 2).getLogin(), TYPE_ITEM_ORG,
+ data.add(new NavigationDrawerObject(orgs.get(i - names.length - 2).login, TYPE_ITEM_ORG,
orgs.get(i - names.length - 2)));
}
}
- public void setOrgs(List orgs) {
+ public void setOrgs(List orgs) {
this.orgs.addAll(orgs);
this.orgs.remove(0);
notifyDataSetChanged();
diff --git a/app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java b/app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java
index 79cada42b..9afecb363 100644
--- a/app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/CommentListAdapter.java
@@ -16,15 +16,27 @@
package com.github.pockethub.ui.comment;
import android.content.Context;
+import android.support.v4.text.TextUtilsCompat;
import android.support.v7.widget.PopupMenu;
import android.text.Html;
+import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
+import android.view.TextureView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.issue.IssueEvent;
+import com.alorma.github.sdk.bean.issue.IssueStory;
+import com.alorma.github.sdk.bean.issue.IssueStoryComment;
+import com.alorma.github.sdk.bean.issue.IssueStoryDetail;
+import com.alorma.github.sdk.bean.issue.IssueStoryEvent;
import com.github.kevinsawicki.wishlist.MultiTypeAdapter;
import com.github.pockethub.R;
import com.github.pockethub.util.AvatarLoader;
@@ -34,12 +46,8 @@
import java.util.Collection;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.IssueEvent;
-
/**
- * Adapter for a list of {@link Comment} objects
+ * Adapter for a list of {@link GithubComment} objects
*/
public class CommentListAdapter extends MultiTypeAdapter {
@@ -73,7 +81,7 @@ public class CommentListAdapter extends MultiTypeAdapter {
* @param avatars
* @param imageGetter
*/
- public CommentListAdapter(LayoutInflater inflater, Comment[] elements,
+ public CommentListAdapter(LayoutInflater inflater, GithubComment[] elements,
AvatarLoader avatars, HttpImageGetter imageGetter, Issue issue) {
this(inflater, elements, avatars, imageGetter, null, null, null, false, issue);
this.context = inflater.getContext();
@@ -102,7 +110,7 @@ public CommentListAdapter(LayoutInflater inflater, AvatarLoader avatars,
* @param userName
* @param isOwner
*/
- public CommentListAdapter(LayoutInflater inflater, Comment[] elements,
+ public CommentListAdapter(LayoutInflater inflater, GithubComment[] elements,
AvatarLoader avatars, HttpImageGetter imageGetter,
EditCommentListener editCommentListener, DeleteCommentListener deleteCommentListener,
String userName, boolean isOwner, Issue issue) {
@@ -122,17 +130,17 @@ public CommentListAdapter(LayoutInflater inflater, Comment[] elements,
@Override
protected void update(int position, Object obj, int type) {
if(type == 0)
- updateComment((Comment) obj);
+ updateComment((GithubComment) obj);
else
updateEvent((IssueEvent) obj);
}
protected void updateEvent(final IssueEvent event) {
TypefaceUtils.setOcticons(textView(0));
- String message = String.format("%s %s", event.getActor().getLogin(), event.getEvent());
- avatars.bind(imageView(2), event.getActor());
+ String message = String.format("%s %s", event.actor.login, event.event);
+ avatars.bind(imageView(2), event.actor);
- String eventString = event.getEvent();
+ String eventString = event.event;
switch (eventString) {
case "assigned":
@@ -174,8 +182,8 @@ protected void updateEvent(final IssueEvent event) {
context.getResources().getColor(R.color.text_description));
break;
case "merged":
- message += String.format(" commit %s into %s from %s ", event.getCommitId().substring(0,6), issue.getPullRequest().getBase().getRef(),
- issue.getPullRequest().getHead().getRef());
+ message += String.format(" commit %s into %s from %s ", event.commit_id.substring(0, 6), issue.pullRequest.base.ref,
+ issue.pullRequest.head.ref);
setText(0, TypefaceUtils.ICON_MERGE);
textView(0).setTextColor(
context.getResources().getColor(R.color.issue_event_merged));
@@ -192,21 +200,21 @@ protected void updateEvent(final IssueEvent event) {
break;
}
- message += " " + TimeUtils.getRelativeTime(event.getCreatedAt());
+ message += " " + TimeUtils.getRelativeTime(event.created_at);
setText(1, Html.fromHtml(message));
}
- protected void updateComment(final Comment comment) {
- imageGetter.bind(textView(0), comment.getBodyHtml(), comment.getId());
- avatars.bind(imageView(3), comment.getUser());
+ protected void updateComment(final GithubComment comment) {
+ imageGetter.bind(textView(0), comment.body, comment.id);
+ avatars.bind(imageView(3), comment.user);
- setText(1, comment.getUser().getLogin());
- setText(2, TimeUtils.getRelativeTime(comment.getUpdatedAt()));
+ setText(1, comment.user.login);
+ setText(2, TimeUtils.getRelativeTime(comment.updated_at));
- final boolean canEdit = (isOwner || comment.getUser().getLogin().equals(userName))
+ final boolean canEdit = (isOwner || comment.user.login.equals(userName))
&& editCommentListener != null;
- final boolean canDelete = (isOwner || comment.getUser().getLogin().equals(userName))
+ final boolean canDelete = (isOwner || comment.user.login.equals(userName))
&& deleteCommentListener != null;
final ImageView ivMore = view(4);
@@ -222,7 +230,7 @@ public void onClick(View v) {
});
}
- private void showMorePopup(View v, final Comment comment, final boolean canEdit, final boolean canDelete ) {
+ private void showMorePopup(View v, final GithubComment comment, final boolean canEdit, final boolean canDelete ) {
PopupMenu menu = new PopupMenu(context, v);
menu.inflate(R.menu.comment_popup);
@@ -264,10 +272,14 @@ public MultiTypeAdapter setItems(final Object[] items) {
this.clear();
for (Object item : items) {
- if(item instanceof Comment)
+ if(item instanceof GithubComment)
this.addItem(0, item);
- else
+ else if(item instanceof GithubEvent)
this.addItem(1, item);
+ else if(item instanceof IssueStoryComment)
+ this.addItem(0, ((IssueStoryComment) item).comment);
+ else if(item instanceof IssueStoryEvent)
+ this.addItem(1, ((IssueStoryEvent) item).event);
}
notifyDataSetChanged();
diff --git a/app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java
index 91b195ee5..b9f79f83f 100644
--- a/app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/comment/CommentPreviewPagerAdapter.java
@@ -22,14 +22,14 @@
import com.github.pockethub.R;
import com.github.pockethub.ui.FragmentPagerAdapter;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
/**
* Pager of a raw and rendered comment text
*/
public class CommentPreviewPagerAdapter extends FragmentPagerAdapter {
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
private RawCommentFragment textFragment;
@@ -47,7 +47,7 @@ public class CommentPreviewPagerAdapter extends FragmentPagerAdapter {
* @param repo
*/
public CommentPreviewPagerAdapter(ActionBarActivity activity,
- IRepositoryIdProvider repo) {
+ Repo repo) {
super(activity);
this.context = activity.getApplicationContext();
this.repo = repo;
diff --git a/app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java
index d8382a8e7..4742d60da 100644
--- a/app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileListAdapter.java
@@ -20,6 +20,8 @@
import android.text.TextUtils;
import android.view.LayoutInflater;
+import com.alorma.github.sdk.bean.dto.response.CommitComment;
+import com.alorma.github.sdk.bean.dto.response.CommitFile;
import com.github.kevinsawicki.wishlist.MultiTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.pockethub.R;
@@ -31,8 +33,6 @@
import java.util.List;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.CommitFile;
/**
* Adapter to display a list of files changed in commits
@@ -86,14 +86,14 @@ public int getViewTypeCount() {
public long getItemId(int position) {
switch (getItemViewType(position)) {
case TYPE_FILE_HEADER:
- String sha = ((CommitFile) getItem(position)).getSha();
+ String sha = ((CommitFile) getItem(position)).sha;
if (!TextUtils.isEmpty(sha))
return sha.hashCode();
else
return super.getItemId(position);
case TYPE_COMMENT:
case TYPE_LINE_COMMENT:
- return ((CommitComment) getItem(position)).getId();
+ return Long.parseLong(((CommitComment) getItem(position)).id);
default:
return super.getItemId(position);
}
@@ -107,7 +107,7 @@ public long getItemId(int position) {
*/
public void addItem(final FullCommitFile file) {
addItem(TYPE_FILE_HEADER, file.getFile());
- List lines = diffStyler.get(file.getFile().getFilename());
+ List lines = diffStyler.get(file.getFile().filename);
int number = 0;
for (CharSequence line : lines) {
addItem(TYPE_FILE_LINE, line);
@@ -124,7 +124,7 @@ public void addItem(final FullCommitFile file) {
*/
public void addItem(final CommitFile file) {
addItem(TYPE_FILE_HEADER, file);
- addItems(TYPE_FILE_LINE, diffStyler.get(file.getFilename()));
+ addItems(TYPE_FILE_LINE, diffStyler.get(file.filename));
}
/**
@@ -173,7 +173,7 @@ protected void update(final int position, final Object item, final int type) {
switch (type) {
case TYPE_FILE_HEADER:
CommitFile file = (CommitFile) item;
- String path = file.getFilename();
+ String path = file.filename;
int lastSlash = path.lastIndexOf('/');
if (lastSlash != -1) {
setText(0, path.substring(lastSlash + 1));
@@ -186,11 +186,11 @@ protected void update(final int position, final Object item, final int type) {
StyledText stats = new StyledText();
stats.foreground('+', addTextColor);
- stats.foreground(FORMAT_INT.format(file.getAdditions()),
+ stats.foreground(FORMAT_INT.format(file.additions),
addTextColor);
stats.append(' ').append(' ').append(' ');
stats.foreground('-', removeTextColor);
- stats.foreground(FORMAT_INT.format(file.getDeletions()),
+ stats.foreground(FORMAT_INT.format(file.deletions),
removeTextColor);
setText(2, stats);
return;
@@ -201,11 +201,11 @@ protected void update(final int position, final Object item, final int type) {
case TYPE_LINE_COMMENT:
case TYPE_COMMENT:
CommitComment comment = (CommitComment) item;
- avatars.bind(imageView(1), comment.getUser());
- setText(2, comment.getUser().getLogin());
- setText(3, TimeUtils.getRelativeTime(comment.getUpdatedAt()));
- imageGetter.bind(textView(0), comment.getBodyHtml(),
- comment.getId());
+ avatars.bind(imageView(1), comment.user);
+ setText(2, comment.user.login);
+ setText(3, TimeUtils.getRelativeTime(comment.updated_at));
+ imageGetter.bind(textView(0), comment.body_html,
+ comment.id);
}
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java
index 53dfc6bf1..1d71c9a40 100644
--- a/app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitListAdapter.java
@@ -20,6 +20,7 @@
import android.view.View;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.Commit;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.pockethub.R;
import com.github.pockethub.core.commit.CommitUtils;
@@ -34,7 +35,7 @@
/**
* Adapter to display commits
*/
-public class CommitListAdapter extends SingleTypeAdapter {
+public class CommitListAdapter extends SingleTypeAdapter {
private final AvatarLoader avatars;
@@ -45,7 +46,7 @@ public class CommitListAdapter extends SingleTypeAdapter {
* @param avatars
*/
public CommitListAdapter(int viewId, LayoutInflater inflater,
- Collection elements, AvatarLoader avatars) {
+ Collection elements, AvatarLoader avatars) {
super(inflater, viewId);
this.avatars = avatars;
@@ -54,7 +55,7 @@ public CommitListAdapter(int viewId, LayoutInflater inflater,
@Override
public long getItemId(int position) {
- String sha = getItem(position).getSha();
+ String sha = getItem(position).sha;
if (!TextUtils.isEmpty(sha))
return sha.hashCode();
else
@@ -77,8 +78,8 @@ protected View initialize(View view) {
}
@Override
- protected void update(int position, RepositoryCommit item) {
- setText(0, CommitUtils.abbreviate(item.getSha()));
+ protected void update(int position, Commit item) {
+ setText(0, CommitUtils.abbreviate(item.sha));
StyledText authorText = new StyledText();
authorText.bold(CommitUtils.getAuthor(item));
@@ -87,7 +88,7 @@ protected void update(int position, RepositoryCommit item) {
setText(1, authorText);
CommitUtils.bindAuthor(item, avatars, imageView(2));
- setText(3, item.getCommit().getMessage());
+ setText(3, item.commit.message);
setText(4, CommitUtils.getCommentCount(item));
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java
index 6ad6f96df..bfa59c8c0 100644
--- a/app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitPagerAdapter.java
@@ -21,16 +21,17 @@
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import com.github.pockethub.ui.FragmentStatePagerAdapter;
-import org.eclipse.egit.github.core.Repository;
+import com.alorma.github.sdk.bean.dto.response.Repo;
/**
* Pager over commits
*/
public class CommitPagerAdapter extends FragmentStatePagerAdapter {
- private final Repository repository;
+ private final Repo repository;
private final CharSequence[] ids;
@@ -40,7 +41,7 @@ public class CommitPagerAdapter extends FragmentStatePagerAdapter {
* @param ids
*/
public CommitPagerAdapter(ActionBarActivity activity,
- Repository repository, CharSequence[] ids) {
+ Repo repository, CharSequence[] ids) {
super(activity);
this.repository = repository;
@@ -51,7 +52,7 @@ public CommitPagerAdapter(ActionBarActivity activity,
public Fragment getItem(final int position) {
Bundle arguments = new Bundle();
arguments.putString(EXTRA_BASE, ids[position].toString());
- arguments.putSerializable(EXTRA_REPOSITORY, repository);
+ arguments.putParcelable(EXTRA_REPOSITORY, repository);
CommitDiffListFragment fragment = new CommitDiffListFragment();
fragment.setArguments(arguments);
return fragment;
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java
index db3e3aeee..26a8e764c 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistFilesPagerAdapter.java
@@ -20,12 +20,12 @@
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBarActivity;
+import com.alorma.github.sdk.bean.dto.response.GistFile;
import com.github.pockethub.ui.FragmentPagerAdapter;
import java.util.Map;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.GistFile;
+import com.alorma.github.sdk.bean.dto.response.Gist;
/**
* Pager adapter for all the files in a given gist
@@ -41,7 +41,7 @@ public class GistFilesPagerAdapter extends FragmentPagerAdapter {
public GistFilesPagerAdapter(ActionBarActivity activity, Gist gist) {
super(activity);
- Map gistFiles = gist.getFiles();
+ Map gistFiles = gist.files;
if (gistFiles != null && !gistFiles.isEmpty())
files = gistFiles.values().toArray(new GistFile[gistFiles.size()]);
else
@@ -50,7 +50,7 @@ public GistFilesPagerAdapter(ActionBarActivity activity, Gist gist) {
@Override
public CharSequence getPageTitle(int position) {
- return files[position].getFilename();
+ return files[position].filename;
}
@Override
@@ -58,7 +58,7 @@ public Fragment getItem(final int position) {
GistFile file = files[position];
Fragment fragment = new GistFileFragment();
Bundle args = new Bundle();
- args.putSerializable(EXTRA_GIST_FILE, file);
+ args.putParcelable(EXTRA_GIST_FILE, file);
fragment.setArguments(args);
return fragment;
}
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java b/app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java
index c31b3c112..5a2843e9e 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/GistListAdapter.java
@@ -24,12 +24,13 @@
import com.github.pockethub.R;
import com.github.pockethub.ui.StyledText;
import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TimeUtils;
import com.github.pockethub.util.TypefaceUtils;
import java.util.Collection;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Adapter to display a list of {@link Gist} objects
@@ -55,7 +56,7 @@ public GistListAdapter(AvatarLoader avatars, Activity activity,
@Override
public long getItemId(final int position) {
- final String id = getItem(position).getId();
+ final String id = getItem(position).id;
return !TextUtils.isEmpty(id) ? id.hashCode() : super
.getItemId(position);
}
@@ -79,27 +80,27 @@ protected View initialize(View view) {
@Override
protected void update(int position, Gist gist) {
- setText(0, gist.getId());
+ setText(0, gist.id);
- String description = gist.getDescription();
+ String description = gist.description;
if (!TextUtils.isEmpty(description))
setText(1, description);
else
setText(1, R.string.no_description_given);
- User user = gist.getUser();
+ User user = gist.owner;
avatars.bind(imageView(5), user);
StyledText authorText = new StyledText();
if (user != null)
- authorText.bold(user.getLogin());
+ authorText.bold(user.login);
else
authorText.bold(anonymous);
authorText.append(' ');
- authorText.append(gist.getCreatedAt());
+ authorText.append(TimeUtils.stringToDate(gist.created_at));
setText(2, authorText);
- setNumber(3, gist.getComments());
- setNumber(4, gist.getFiles().size());
+ setNumber(3, gist.comments);
+ setNumber(4, gist.files.size());
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java
index 930510b74..4ea565442 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/DashboardIssueListAdapter.java
@@ -19,9 +19,11 @@
import android.view.View;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.Issue;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueUtils;
import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TimeUtils;
import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.RepositoryIssue;
@@ -30,7 +32,7 @@
* Adapter to display a list of dashboard issues
*/
public class DashboardIssueListAdapter extends
- IssueListAdapter {
+ IssueListAdapter {
private int numberPaintFlags;
@@ -42,18 +44,18 @@ public class DashboardIssueListAdapter extends
* @param elements
*/
public DashboardIssueListAdapter(AvatarLoader avatars,
- LayoutInflater inflater, RepositoryIssue[] elements) {
+ LayoutInflater inflater, Issue[] elements) {
super(R.layout.dashboard_issue_item, inflater, elements, avatars);
}
@Override
public long getItemId(final int position) {
- return getItem(position).getId();
+ return Long.parseLong(getItem(position).id);
}
@Override
- protected int getNumber(final RepositoryIssue issue) {
- return issue.getNumber();
+ protected int getNumber(final Issue issue) {
+ return issue.number;
}
@Override
@@ -76,12 +78,12 @@ protected int[] getChildViewIds() {
}
@Override
- protected void update(int position, RepositoryIssue issue) {
- updateNumber(issue.getNumber(), issue.getState(), numberPaintFlags, 1);
+ protected void update(int position, Issue issue) {
+ updateNumber(issue.number, issue.state, numberPaintFlags, 1);
- avatars.bind(imageView(3), issue.getUser());
+ avatars.bind(imageView(3), issue.user);
- String[] segments = issue.getUrl().split("/");
+ String[] segments = issue.url.split("/");
int length = segments.length;
if (length >= 4)
setText(0, segments[length - 4] + '/' + segments[length - 3]);
@@ -90,10 +92,10 @@ protected void update(int position, RepositoryIssue issue) {
setGone(6, !IssueUtils.isPullRequest(issue));
- setText(2, issue.getTitle());
+ setText(2, issue.title);
- updateReporter(issue.getUser().getLogin(), issue.getCreatedAt(), 4);
- setNumber(5, issue.getComments());
- updateLabels(issue.getLabels(), 7);
+ updateReporter(issue.user.login, TimeUtils.stringToDate(issue.created_at), 4);
+ setNumber(5, issue.comments);
+ updateLabels(issue.labels, 7);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java
index e5ff9d6c7..7043e5918 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/FilterListAdapter.java
@@ -18,6 +18,8 @@
import android.view.LayoutInflater;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.Label;
+import com.alorma.github.sdk.bean.dto.response.Milestone;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.pockethub.R;
@@ -26,9 +28,8 @@
import java.util.Collection;
-import org.eclipse.egit.github.core.Label;
-import org.eclipse.egit.github.core.Milestone;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
+import com.github.pockethub.util.InfoUtils;
/**
* Adapter to display a list of {@link IssueFilter} objects
@@ -61,8 +62,8 @@ protected int[] getChildViewIds() {
@Override
protected void update(int position, IssueFilter filter) {
- avatars.bind(imageView(0), filter.getRepository().getOwner());
- setText(1, filter.getRepository().generateId());
+ avatars.bind(imageView(0), filter.getRepository().owner);
+ setText(1, InfoUtils.createRepoId(filter.getRepository()));
if (filter.isOpen())
setText(2, R.string.open_issues);
else
@@ -78,14 +79,14 @@ protected void update(int position, IssueFilter filter) {
Milestone milestone = filter.getMilestone();
if (milestone != null)
- ViewUtils.setGone(setText(4, milestone.getTitle()), false);
+ ViewUtils.setGone(setText(4, milestone.title), false);
else
setGone(4, true);
User assignee = filter.getAssignee();
if (assignee != null) {
avatars.bind(imageView(7), assignee);
- ViewUtils.setGone(setText(6, assignee.getLogin()), false);
+ ViewUtils.setGone(setText(6, assignee.login), false);
} else
setGone(5, true);
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java
index c8b766276..356a6c03a 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssueListAdapter.java
@@ -23,6 +23,8 @@
import android.view.View;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.IssueState;
+import com.alorma.github.sdk.bean.dto.response.Label;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.pockethub.R;
@@ -33,8 +35,6 @@
import java.util.Date;
import java.util.List;
-import org.eclipse.egit.github.core.Label;
-
/**
* Base list adapter to display issues
*
@@ -112,11 +112,11 @@ public void setItems(final Object[] items) {
* @param flags
* @param viewIndex
*/
- protected void updateNumber(int number, String state, int flags,
+ protected void updateNumber(int number, IssueState state, int flags,
int viewIndex) {
TextView view = textView(viewIndex);
view.setText(Integer.toString(number));
- if (STATE_CLOSED.equals(state))
+ if (state.equals(IssueState.closed))
view.setPaintFlags(flags | STRIKE_THRU_TEXT_FLAG);
else
view.setPaintFlags(flags);
@@ -149,7 +149,7 @@ protected void updateLabels(final List labels, final int viewIndex) {
if (labels != null && !labels.isEmpty()) {
int size = Math.min(labels.size(), MAX_LABELS);
for (int i = 0; i < size; i++) {
- String color = labels.get(i).getColor();
+ String color = labels.get(i).color;
if (!TextUtils.isEmpty(color)) {
View view = view(viewIndex + i);
view.setBackgroundColor(Color.parseColor('#' + color));
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java
index eda0f1b8b..ce0df4f36 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/IssuesPagerAdapter.java
@@ -27,25 +27,24 @@
import android.util.SparseArray;
import android.view.ViewGroup;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.FragmentStatePagerAdapter;
import java.util.List;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.RepositoryId;
-import org.eclipse.egit.github.core.RepositoryIssue;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+
/**
* Adapter to page through an {@link Issue} array
*/
public class IssuesPagerAdapter extends FragmentStatePagerAdapter {
- private final Repository repo;
+ private final Repo repo;
- private final List repos;
+ private final List repos;
private final int[] issues;
@@ -65,7 +64,7 @@ public class IssuesPagerAdapter extends FragmentStatePagerAdapter {
* @param collaborator
*/
public IssuesPagerAdapter(ActionBarActivity activity,
- List repoIds, int[] issueNumbers,
+ List repoIds, int[] issueNumbers,
IssueStore issueStore, boolean collaborator, boolean owner) {
super(activity);
@@ -84,7 +83,7 @@ public IssuesPagerAdapter(ActionBarActivity activity,
* @param collaborator
*/
public IssuesPagerAdapter(ActionBarActivity activity,
- Repository repository, int[] issueNumbers,
+ Repo repository, int[] issueNumbers,
boolean collaborator, boolean owner) {
super(activity);
@@ -101,19 +100,19 @@ public Fragment getItem(int position) {
IssueFragment fragment = new IssueFragment();
Bundle args = new Bundle();
if (repo != null) {
- args.putString(EXTRA_REPOSITORY_NAME, repo.getName());
- User owner = repo.getOwner();
- args.putString(EXTRA_REPOSITORY_OWNER, owner.getLogin());
- args.putSerializable(EXTRA_USER, owner);
+ args.putString(EXTRA_REPOSITORY_NAME, repo.name);
+ User owner = repo.owner;
+ args.putString(EXTRA_REPOSITORY_OWNER, owner.login);
+ args.putParcelable(EXTRA_USER, owner);
} else {
- RepositoryId repo = repos.get(position);
- args.putString(EXTRA_REPOSITORY_NAME, repo.getName());
- args.putString(EXTRA_REPOSITORY_OWNER, repo.getOwner());
- RepositoryIssue issue = store.getIssue(repo, issues[position]);
- if (issue != null && issue.getUser() != null) {
- Repository fullRepo = issue.getRepository();
- if (fullRepo != null && fullRepo.getOwner() != null)
- args.putSerializable(EXTRA_USER, fullRepo.getOwner());
+ Repo repo = repos.get(position);
+ args.putString(EXTRA_REPOSITORY_NAME, repo.name);
+ args.putString(EXTRA_REPOSITORY_OWNER, repo.owner.login);
+ Issue issue = store.getIssue(repo, issues[position]);
+ if (issue != null && issue.user != null) {
+ Repo fullRepo = issue.repository;
+ if (fullRepo != null && fullRepo.owner != null)
+ args.putParcelable(EXTRA_USER, fullRepo.owner);
}
}
args.putInt(EXTRA_ISSUE_NUMBER, issues[position]);
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java
index 5b4c2bc2c..56728f313 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/RepositoryIssueListAdapter.java
@@ -22,9 +22,12 @@
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueUtils;
import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TimeUtils;
import com.github.pockethub.util.TypefaceUtils;
-import org.eclipse.egit.github.core.Issue;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+
+import java.sql.Time;
/**
* Adapter for a list of {@link Issue} objects
@@ -45,7 +48,7 @@ public RepositoryIssueListAdapter(LayoutInflater inflater,
@Override
public long getItemId(int position) {
- return getItem(position).getId();
+ return Long.parseLong(getItem(position).id);
}
@Override
@@ -60,7 +63,7 @@ protected View initialize(View view) {
@Override
protected int getNumber(Issue issue) {
- return issue.getNumber();
+ return issue.number;
}
@Override
@@ -73,16 +76,16 @@ protected int[] getChildViewIds() {
@Override
protected void update(int position, Issue issue) {
- updateNumber(issue.getNumber(), issue.getState(), numberPaintFlags, 0);
+ updateNumber(issue.number, issue.state, numberPaintFlags, 0);
- avatars.bind(imageView(2), issue.getUser());
+ avatars.bind(imageView(2), issue.user);
setGone(5, !IssueUtils.isPullRequest(issue));
- setText(1, issue.getTitle());
+ setText(1, issue.title);
- updateReporter(issue.getUser().getLogin(), issue.getCreatedAt(), 3);
- setNumber(4, issue.getComments());
- updateLabels(issue.getLabels(), 6);
+ updateReporter(issue.user.login, TimeUtils.stringToDate(issue.created_at), 3);
+ setNumber(4, issue.comments);
+ updateLabels(issue.labels, 6);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java b/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java
index eadca3280..3c0ccb7f9 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/SearchIssueListAdapter.java
@@ -20,18 +20,20 @@
import android.view.View;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.Issue;
import com.github.kevinsawicki.wishlist.ViewUtils;
import com.github.pockethub.R;
import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TimeUtils;
import com.github.pockethub.util.TypefaceUtils;
import org.eclipse.egit.github.core.SearchIssue;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Adapter for a list of searched for issues
*/
-public class SearchIssueListAdapter extends IssueListAdapter {
+public class SearchIssueListAdapter extends IssueListAdapter {
private int numberPaintFlags;
@@ -40,19 +42,19 @@ public class SearchIssueListAdapter extends IssueListAdapter {
* @param elements
* @param avatars
*/
- public SearchIssueListAdapter(LayoutInflater inflater,
- SearchIssue[] elements, AvatarLoader avatars) {
+ public SearchIssueListAdapter(LayoutInflater inflater, Issue[] elements,
+ AvatarLoader avatars) {
super(R.layout.repo_issue_item, inflater, elements, avatars);
}
@Override
public long getItemId(int position) {
- return getItem(position).getNumber();
+ return getItem(position).number;
}
@Override
- protected int getNumber(SearchIssue issue) {
- return issue.getNumber();
+ protected int getNumber(Issue issue) {
+ return issue.number;
}
@Override
@@ -76,20 +78,14 @@ protected int[] getChildViewIds() {
}
@Override
- protected void update(int position, SearchIssue issue) {
- updateNumber(issue.getNumber(), issue.getState(), numberPaintFlags, 0);
+ protected void update(int position, Issue issue) {
+ updateNumber(issue.number, issue.state, numberPaintFlags, 0);
- String gravatarId = issue.getGravatarId();
- User user;
- if (!TextUtils.isEmpty(gravatarId))
- user = new User().setGravatarId(gravatarId);
- else
- user = null;
- avatars.bind(imageView(2), user);
+ avatars.bind(imageView(2), issue.user);
- setText(1, issue.getTitle());
+ setText(1, issue.title);
- updateReporter(issue.getUser(), issue.getCreatedAt(), 3);
- setNumber(4, issue.getComments());
+ updateReporter(issue.user.login, TimeUtils.stringToDate(issue.created_at), 3);
+ setNumber(4, issue.comments);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java b/app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java
index 7453e3be4..8392daa75 100644
--- a/app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/ref/CodeTreeAdapter.java
@@ -96,24 +96,24 @@ public void setItems(final Folder root) {
@Override
protected int getChildLayoutId(final int type) {
switch (type) {
- case TYPE_BLOB:
- return R.layout.blob_item;
- case TYPE_TREE:
- return R.layout.folder_item;
- default:
- return -1;
+ case TYPE_BLOB:
+ return R.layout.blob_item;
+ case TYPE_TREE:
+ return R.layout.folder_item;
+ default:
+ return -1;
}
}
@Override
protected int[] getChildViewIds(final int type) {
switch (type) {
- case TYPE_BLOB:
- return new int[] { R.id.tv_file, R.id.tv_size };
- case TYPE_TREE:
- return new int[] { R.id.tv_folder, R.id.tv_folders, R.id.tv_files };
- default:
- return null;
+ case TYPE_BLOB:
+ return new int[]{R.id.tv_file, R.id.tv_size};
+ case TYPE_TREE:
+ return new int[]{R.id.tv_folder, R.id.tv_folders, R.id.tv_files};
+ default:
+ return null;
}
}
@@ -127,15 +127,15 @@ protected View initialize(final int type, View view) {
paddingBottom = view.getPaddingBottom();
switch (type) {
- case TYPE_BLOB:
- TypefaceUtils.setOcticons((TextView) view
- .findViewById(R.id.tv_file_icon));
- break;
- case TYPE_TREE:
- TypefaceUtils.setOcticons(
- (TextView) view.findViewById(R.id.tv_folder_icon),
- (TextView) view.findViewById(R.id.tv_folders_icon),
- (TextView) view.findViewById(R.id.tv_files_icon));
+ case TYPE_BLOB:
+ TypefaceUtils.setOcticons((TextView) view
+ .findViewById(R.id.tv_file_icon));
+ break;
+ case TYPE_TREE:
+ TypefaceUtils.setOcticons(
+ (TextView) view.findViewById(R.id.tv_folder_icon),
+ (TextView) view.findViewById(R.id.tv_folders_icon),
+ (TextView) view.findViewById(R.id.tv_files_icon));
}
return view;
@@ -151,18 +151,17 @@ protected void update(final int position, final Object item, final int type) {
paddingBottom);
switch (type) {
- case TYPE_BLOB:
- Entry file = (Entry) item;
- setText(0, file.name);
- setText(1, Formatter.formatFileSize(context, file.entry.getSize()));
-
- break;
- case TYPE_TREE:
- Folder folder = (Folder) item;
- setText(0, CommitUtils.getName(folder.name));
- setNumber(1, folder.folders.size());
- setNumber(2, folder.files.size());
- break;
+ case TYPE_BLOB:
+ Entry file = (Entry) item;
+ setText(0, file.name);
+ setText(1, Formatter.formatFileSize(context, file.entry.size));
+ break;
+ case TYPE_TREE:
+ Folder folder = (Folder) item;
+ setText(0, CommitUtils.getName(folder.name));
+ setNumber(1, folder.folders.size());
+ setNumber(2, folder.files.size());
+ break;
}
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java
index 98ae1857a..654bd3ff7 100644
--- a/app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/ContributorListAdapter.java
@@ -18,12 +18,11 @@
import android.content.Context;
import android.view.LayoutInflater;
+import com.alorma.github.sdk.bean.dto.response.Contributor;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.pockethub.R;
import com.github.pockethub.util.AvatarLoader;
-import org.eclipse.egit.github.core.Contributor;
-
/**
* List adapter for a list of contributors
*/
@@ -51,7 +50,7 @@ public ContributorListAdapter(final Context context,
@Override
public long getItemId(final int position) {
- return getItem(position).getId();
+ return getItem(position).id;
}
@Override
@@ -62,7 +61,7 @@ protected int[] getChildViewIds() {
@Override
protected void update(int position, Contributor contributor) {
avatars.bind(imageView(0), contributor);
- setText(1, contributor.getLogin());
- setText(2, context.getString(R.string.contributions, contributor.getContributions()));
+ setText(1, contributor.author.login);
+ setText(2, context.getString(R.string.contributions, contributor.total));
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java
index 5beafa319..6ed5d4f25 100644
--- a/app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java
@@ -29,14 +29,14 @@
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Adapter for the default account's repositories
*/
public class DefaultRepositoryListAdapter extends
- RepositoryListAdapter {
+ RepositoryListAdapter {
private int descriptionColor;
@@ -54,7 +54,7 @@ public class DefaultRepositoryListAdapter extends
* @param account
*/
public DefaultRepositoryListAdapter(LayoutInflater inflater,
- Repository[] elements, AtomicReference account) {
+ Repo[] elements, AtomicReference account) {
super(R.layout.repo_item, inflater, elements);
this.account = account;
@@ -78,9 +78,9 @@ public DefaultRepositoryListAdapter clearHeaders() {
* @param text
* @return this adapter
*/
- public DefaultRepositoryListAdapter registerHeader(Repository repository,
+ public DefaultRepositoryListAdapter registerHeader(Repo repository,
String text) {
- headers.put(repository.getId(), text);
+ headers.put(repository.id, text);
return this;
}
@@ -91,8 +91,8 @@ public DefaultRepositoryListAdapter registerHeader(Repository repository,
* @return this adapter
*/
public DefaultRepositoryListAdapter registerNoSeparator(
- Repository repository) {
- noSeparators.add(repository.getId());
+ Repo repository) {
+ noSeparators.add(repository.id);
return this;
}
@@ -115,26 +115,26 @@ protected int[] getChildViewIds() {
}
@Override
- protected void update(int position, Repository repository) {
- String headerValue = headers.get(repository.getId());
+ protected void update(int position, Repo repository) {
+ String headerValue = headers.get(repository.id);
if (headerValue != null) {
setGone(5, false);
setText(6, headerValue);
} else
setGone(5, true);
- setGone(7, noSeparators.contains(repository.getId()));
+ setGone(7, noSeparators.contains(repository.id));
StyledText name = new StyledText();
- if (!account.get().getLogin().equals(repository.getOwner().getLogin()))
- name.foreground(repository.getOwner().getLogin(), descriptionColor)
+ if (!account.get().login.equals(repository.owner.login))
+ name.foreground(repository.owner.login, descriptionColor)
.foreground('/', descriptionColor);
- name.bold(repository.getName());
+ name.bold(repository.name);
setText(8, name);
- updateDetails(repository.getDescription(), repository.getLanguage(),
- repository.getWatchers(), repository.getForks(),
- repository.isPrivate(), repository.isFork(),
- repository.getMirrorUrl());
+ updateDetails(repository.description, repository.language,
+ repository.watchers_count, repository.forks_count,
+ repository.isPrivate, repository.fork,
+ repository.mirror_url);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java
index 3d74e36d8..a697b9a97 100644
--- a/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/repo/UserRepositoryListAdapter.java
@@ -23,14 +23,14 @@
import com.github.pockethub.ui.StyledText;
import com.github.pockethub.util.TypefaceUtils;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Adapter for a list of repositories
*/
public class UserRepositoryListAdapter extends
- RepositoryListAdapter {
+ RepositoryListAdapter {
private final String login;
@@ -44,15 +44,15 @@ public class UserRepositoryListAdapter extends
* @param user
*/
public UserRepositoryListAdapter(LayoutInflater inflater,
- Repository[] elements, User user) {
+ Repo[] elements, User user) {
super(R.layout.user_repo_item, inflater, elements);
- login = user.getLogin();
+ login = user.login;
}
@Override
public long getItemId(final int position) {
- return getItem(position).getId();
+ return getItem(position).id;
}
@Override
@@ -73,17 +73,17 @@ protected int[] getChildViewIds() {
}
@Override
- protected void update(int position, Repository repository) {
+ protected void update(int position, Repo repository) {
StyledText name = new StyledText();
- if (!login.equals(repository.getOwner().getLogin()))
- name.foreground(repository.getOwner().getLogin(), descriptionColor)
+ if (!login.equals(repository.owner.login))
+ name.foreground(repository.owner.login, descriptionColor)
.foreground('/', descriptionColor);
- name.bold(repository.getName());
+ name.bold(repository.name);
setText(5, name);
- updateDetails(repository.getDescription(), repository.getLanguage(),
- repository.getWatchers(), repository.getForks(),
- repository.isPrivate(), repository.isFork(),
- repository.getMirrorUrl());
+ updateDetails(repository.description, repository.language,
+ repository.watchers_count, repository.forks_count,
+ repository.isPrivate, repository.fork,
+ repository.mirror_url);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java b/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java
index 066fa707e..7a07b0571 100644
--- a/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchRepositoryListAdapter.java
@@ -20,6 +20,7 @@
import android.view.View;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import com.github.pockethub.R;
import com.github.pockethub.ui.StyledText;
import com.github.pockethub.ui.repo.RepositoryListAdapter;
@@ -31,7 +32,7 @@
* Adapter for a list of searched for repositories
*/
public class SearchRepositoryListAdapter extends
- RepositoryListAdapter {
+ RepositoryListAdapter {
/**
* Create list adapter for searched for repositories
@@ -40,13 +41,13 @@ public class SearchRepositoryListAdapter extends
* @param elements
*/
public SearchRepositoryListAdapter(LayoutInflater inflater,
- SearchRepository[] elements) {
+ Repo[] elements) {
super(R.layout.user_repo_item, inflater, elements);
}
@Override
public long getItemId(final int position) {
- final String id = getItem(position).getId();
+ final String id = String.valueOf(getItem(position).id);
return !TextUtils.isEmpty(id) ? id.hashCode() : super
.getItemId(position);
}
@@ -68,14 +69,14 @@ protected int[] getChildViewIds() {
}
@Override
- protected void update(int position, SearchRepository repository) {
+ protected void update(int position, Repo repository) {
StyledText name = new StyledText();
- name.append(repository.getOwner()).append('/');
- name.bold(repository.getName());
+ name.append(repository.owner.login).append('/');
+ name.bold(repository.name);
setText(5, name);
- updateDetails(repository.getDescription(), repository.getLanguage(),
- repository.getWatchers(), repository.getForks(),
- repository.isPrivate(), repository.isFork(), null);
+ updateDetails(repository.description, repository.language,
+ repository.watchers_count, repository.forks_count,
+ repository.isPrivate, repository.fork, null);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java b/app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java
index 53acd8a4e..c61c9531f 100644
--- a/app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/search/SearchUserListAdapter.java
@@ -18,6 +18,7 @@
import android.content.Context;
import android.view.LayoutInflater;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.pockethub.R;
import com.github.pockethub.core.search.SearchUser;
@@ -26,7 +27,7 @@
/**
* Adapter for a list of searched users
*/
-public class SearchUserListAdapter extends SingleTypeAdapter {
+public class SearchUserListAdapter extends SingleTypeAdapter {
private final AvatarLoader avatars;
@@ -38,7 +39,7 @@ public class SearchUserListAdapter extends SingleTypeAdapter {
* @param avatars
*/
public SearchUserListAdapter(final Context context,
- final SearchUser[] elements, final AvatarLoader avatars) {
+ final User[] elements, final AvatarLoader avatars) {
super(LayoutInflater.from(context), R.layout.user_item);
this.avatars = avatars;
@@ -47,7 +48,7 @@ public SearchUserListAdapter(final Context context,
@Override
public long getItemId(final int position) {
- String userId = getItem(position).getId();
+ String userId = String.valueOf(getItem(position).id);
return Long.parseLong(userId.replace("user-", ""));
}
@@ -57,7 +58,7 @@ protected int[] getChildViewIds() {
}
@Override
- protected void update(final int position, final SearchUser user) {
- setText(1, user.getLogin());
+ protected void update(final int position, final User user) {
+ setText(1, user.login);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java
index cc1eaa1de..3797de7e6 100644
--- a/app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/HomePagerAdapter.java
@@ -28,7 +28,7 @@
import java.util.HashSet;
import java.util.Set;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Pager adapter for a user's different views
@@ -81,7 +81,7 @@ public Fragment getItem(int position) {
if (fragment != null) {
Bundle args = new Bundle();
- args.putSerializable("org", org);
+ args.putParcelable("org", org);
fragment.setArguments(args);
}
return fragment;
diff --git a/app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java
index 55b8072e1..e1fcd5de5 100644
--- a/app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/NewsListAdapter.java
@@ -16,22 +16,39 @@
package com.github.pockethub.ui.user;
import android.text.TextUtils;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+import com.alorma.github.sdk.bean.dto.response.events.EventType;
+import com.alorma.github.sdk.bean.dto.response.events.payload.CommitCommentEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.CreatedEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.DeleteEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.ForkEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.GithubEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.IssueCommentEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.IssueEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.MemberEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.PublicEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.PullRequestEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.PullRequestReviewCommentEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.PushEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.ReleaseEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.TeamAddEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.UnhandledPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.WatchedEventPayload;
import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.github.pockethub.R;
+import com.github.pockethub.api.FollowEventPayload;
+import com.github.pockethub.api.GistEventPayload;
import com.github.pockethub.util.AvatarLoader;
import com.github.pockethub.util.TypefaceUtils;
+import com.google.gson.Gson;
-import org.eclipse.egit.github.core.event.CreatePayload;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.EventPayload;
-import org.eclipse.egit.github.core.event.GistPayload;
-import org.eclipse.egit.github.core.event.IssueCommentPayload;
-import org.eclipse.egit.github.core.event.IssuesPayload;
+import java.util.Objects;
import static org.eclipse.egit.github.core.event.Event.TYPE_COMMIT_COMMENT;
import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
@@ -55,7 +72,7 @@
/**
* Adapter for a list of news events
*/
-public class NewsListAdapter extends SingleTypeAdapter {
+public class NewsListAdapter extends SingleTypeAdapter {
private final IconAndViewTextManager iconAndViewTextManager = new IconAndViewTextManager(this);
@@ -65,33 +82,35 @@ public class NewsListAdapter extends SingleTypeAdapter {
* @param event
* @return true if renderable, false otherwise
*/
- public static boolean isValid(final Event event) {
+ public static boolean isValid(final GithubEvent event) {
if (event == null)
return false;
- final EventPayload payload = event.getPayload();
- if (payload == null || EventPayload.class.equals(payload.getClass()))
+ if (event.payload == null)
return false;
- final String type = event.getType();
+ Gson gson = new Gson();
+ final String json = gson.toJson(event.payload);
+
+ final String type = event.type.toString();
if (TextUtils.isEmpty(type))
return false;
return TYPE_COMMIT_COMMENT.equals(type) //
|| (TYPE_CREATE.equals(type) //
- && ((CreatePayload) payload).getRefType() != null) //
+ && (gson.fromJson(json, CreatedEventPayload.class)).ref_type != null) //
|| TYPE_DELETE.equals(type) //
|| TYPE_DOWNLOAD.equals(type) //
|| TYPE_FOLLOW.equals(type) //
|| TYPE_FORK.equals(type) //
|| TYPE_FORK_APPLY.equals(type) //
- || (TYPE_GIST.equals(type) //
- && ((GistPayload) payload).getGist() != null) //
+ || (TYPE_GIST.equals(type)
+ && (gson.fromJson(json, GistEventPayload.class)).gist != null)
|| TYPE_GOLLUM.equals(type) //
|| (TYPE_ISSUE_COMMENT.equals(type) //
- && ((IssueCommentPayload) payload).getIssue() != null) //
+ && (gson.fromJson(json, IssueCommentEventPayload.class)).issue != null) //
|| (TYPE_ISSUES.equals(type) //
- && ((IssuesPayload) payload).getIssue() != null) //
+ && (gson.fromJson(json, IssueEventPayload.class)).issue != null) //
|| TYPE_MEMBER.equals(type) //
|| TYPE_PUBLIC.equals(type) //
|| TYPE_PULL_REQUEST.equals(type) //
@@ -110,7 +129,7 @@ public static boolean isValid(final Event event) {
* @param elements
* @param avatars
*/
- public NewsListAdapter(LayoutInflater inflater, Event[] elements,
+ public NewsListAdapter(LayoutInflater inflater, GithubEvent[] elements,
AvatarLoader avatars) {
super(inflater, R.layout.news_item);
@@ -118,6 +137,67 @@ public NewsListAdapter(LayoutInflater inflater, Event[] elements,
setItems(elements);
}
+ private Class getClassFromType(EventType type) {
+ switch (type){
+ case WatchEvent:
+ return WatchedEventPayload.class;
+ case CreateEvent:
+ return CreatedEventPayload.class;
+ case CommitCommentEvent:
+ return CommitCommentEventPayload.class;
+ case DownloadEvent:
+ return ReleaseEventPayload.class;
+ case FollowEvent:
+ return FollowEventPayload.class;
+ case ForkEvent:
+ return ForkEventPayload.class;
+ case GistEvent:
+ return GistEventPayload.class;
+ case IssueCommentEvent:
+ return IssueCommentEventPayload.class;
+ case IssuesEvent:
+ return IssueEventPayload.class;
+ case MemberEvent:
+ return MemberEventPayload.class;
+ case PublicEvent:
+ return PublicEventPayload.class;
+ case PullRequestEvent:
+ return PullRequestEventPayload.class;
+ case PullRequestReviewCommentEvent:
+ return PullRequestReviewCommentEventPayload.class;
+ case PushEvent:
+ return PushEventPayload.class;
+ case TeamAddEvent:
+ return TeamAddEventPayload.class;
+ case DeleteEvent:
+ return DeleteEventPayload.class;
+ case ReleaseEvent:
+ return ReleaseEventPayload.class;
+ case Unhandled:
+ return UnhandledPayload.class;
+
+ default:
+ return GithubEventPayload.class;
+ }
+ }
+
+ @Override
+ public void setItems(Object[] items) {
+ if(items != null) {
+ GithubEvent[] elements = new GithubEvent[items.length];
+ Gson gson = new Gson();
+ for (int i = 0; i < items.length; i++) {
+ GithubEvent element = (GithubEvent) items[i];
+ String json = gson.toJson(element.payload);
+ element.payload = gson.fromJson(json, getClassFromType(element.type));
+ elements[i] = element;
+ }
+ super.setItems(elements);
+ }else{
+ super.setItems(items);
+ }
+ }
+
/**
* Create list adapter
*
@@ -131,7 +211,7 @@ public NewsListAdapter(LayoutInflater inflater, AvatarLoader avatars) {
@Override
public long getItemId(final int position) {
- final String id = getItem(position).getId();
+ final String id = String.valueOf(getItem(position).id);
return !TextUtils.isEmpty(id) ? id.hashCode() : super
.getItemId(position);
}
@@ -151,7 +231,7 @@ protected View initialize(View view) {
}
@Override
- protected void update(int position, Event event) {
+ protected void update(int position, GithubEvent event) {
iconAndViewTextManager.update(position, event);
}
diff --git a/app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java b/app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java
index 715fb2f24..e30ffb28a 100644
--- a/app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/UserListAdapter.java
@@ -21,7 +21,7 @@
import com.github.pockethub.R;
import com.github.pockethub.util.AvatarLoader;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* List adapter for a list of users
@@ -47,7 +47,7 @@ public UserListAdapter(final LayoutInflater inflater,
@Override
public long getItemId(final int position) {
- return getItem(position).getId();
+ return getItem(position).id;
}
@Override
@@ -58,6 +58,6 @@ protected int[] getChildViewIds() {
@Override
protected void update(final int position, final User user) {
avatars.bind(imageView(0), user);
- setText(1, user.getLogin());
+ setText(1, user.login);
}
}
From 6439e983954b6e8fe3c6b63f3ba72b89e0939724 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:33:37 +0200
Subject: [PATCH 089/561] Tasks updated to use new SDK Removed
CreateCommentTask as it was not needed
---
.../pockethub/core/code/RefreshBlobTask.java | 21 ++--
.../pockethub/core/code/RefreshTreeTask.java | 63 ++++++------
.../core/commit/CommitCompareTask.java | 20 ++--
.../core/commit/RefreshCommitTask.java | 35 +++----
.../pockethub/core/gist/RefreshGistTask.java | 16 +--
.../pockethub/core/gist/StarGistTask.java | 2 +-
.../pockethub/core/gist/UnstarGistTask.java | 2 +-
.../core/issue/RefreshIssueTask.java | 70 +++++--------
.../core/repo/DeleteRepositoryTask.java | 9 +-
.../core/repo/ForkRepositoryTask.java | 15 +--
.../core/repo/RefreshRepositoryTask.java | 16 +--
.../core/repo/StarRepositoryTask.java | 10 +-
.../core/repo/StarredRepositoryTask.java | 9 +-
.../core/repo/UnstarRepositoryTask.java | 10 +-
.../pockethub/core/user/FollowUserTask.java | 2 +-
.../pockethub/core/user/RefreshUserTask.java | 5 +-
.../pockethub/core/user/UnfollowUserTask.java | 2 +-
.../ui/commit/CreateCommentTask.java | 27 +++---
.../pockethub/ui/gist/CreateCommentTask.java | 14 +--
.../pockethub/ui/gist/CreateGistTask.java | 18 ++--
.../pockethub/ui/gist/DeleteCommentTask.java | 39 ++------
.../pockethub/ui/gist/DeleteGistTask.java | 2 +-
.../pockethub/ui/gist/EditCommentTask.java | 46 +++------
.../pockethub/ui/gist/RandomGistTask.java | 19 +++-
.../pockethub/ui/issue/CreateCommentTask.java | 97 -------------------
.../pockethub/ui/issue/CreateIssueTask.java | 25 +++--
.../pockethub/ui/issue/DeleteCommentTask.java | 22 ++---
.../pockethub/ui/issue/EditAssigneeTask.java | 22 ++---
.../pockethub/ui/issue/EditCommentTask.java | 29 +++---
.../pockethub/ui/issue/EditIssueTask.java | 19 ++--
.../pockethub/ui/issue/EditLabelsTask.java | 27 +++---
.../pockethub/ui/issue/EditMilestoneTask.java | 24 ++---
.../pockethub/ui/issue/EditStateTask.java | 18 ++--
33 files changed, 311 insertions(+), 444 deletions(-)
delete mode 100644 app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java
diff --git a/app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java b/app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java
index c4084013c..0420e143a 100644
--- a/app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java
+++ b/app/src/main/java/com/github/pockethub/core/code/RefreshBlobTask.java
@@ -18,31 +18,28 @@
import android.accounts.Account;
import android.content.Context;
+import com.alorma.github.sdk.bean.dto.response.GitBlob;
+import com.alorma.github.sdk.services.git.GetGitBlobClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
-import com.google.inject.Inject;
+import com.github.pockethub.util.InfoUtils;
-import org.eclipse.egit.github.core.Blob;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.service.DataService;
+import com.alorma.github.sdk.bean.dto.response.Repo;
/**
* Task to refresh a blob
*/
-public class RefreshBlobTask extends AuthenticatedUserTask {
+public class RefreshBlobTask extends AuthenticatedUserTask {
- private final Repository repository;
+ private final Repo repository;
private final String blobSha;
- @Inject
- private DataService service;
-
/**
* @param repository
* @param blobSha
* @param context
*/
- public RefreshBlobTask(Repository repository, String blobSha,
+ public RefreshBlobTask(Repo repository, String blobSha,
Context context) {
super(context);
@@ -51,7 +48,7 @@ public RefreshBlobTask(Repository repository, String blobSha,
}
@Override
- protected Blob run(Account account) throws Exception {
- return service.getBlob(repository, blobSha);
+ protected GitBlob run(Account account) throws Exception {
+ return new GetGitBlobClient(context, InfoUtils.createCommitInfo(repository, blobSha)).executeSync();
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java b/app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java
index a27468d70..982c8fac1 100644
--- a/app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java
+++ b/app/src/main/java/com/github/pockethub/core/code/RefreshTreeTask.java
@@ -20,19 +20,20 @@
import android.text.TextUtils;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.GitCommit;
+import com.alorma.github.sdk.bean.dto.response.GitReference;
+import com.alorma.github.sdk.bean.dto.response.GitTree;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.services.git.GetGitCommitClient;
+import com.alorma.github.sdk.services.git.GetGitTreeClient;
+import com.alorma.github.sdk.services.git.GetReferenceClient;
+import com.alorma.github.sdk.services.repo.GetRepoClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.github.pockethub.core.ref.RefUtils;
-import com.google.inject.Inject;
+import com.github.pockethub.util.InfoUtils;
import java.io.IOException;
-import org.eclipse.egit.github.core.Commit;
-import org.eclipse.egit.github.core.Reference;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.Tree;
-import org.eclipse.egit.github.core.service.DataService;
-import org.eclipse.egit.github.core.service.RepositoryService;
-
/**
* Task to load the tree for a repository's default branch
*/
@@ -40,15 +41,9 @@ public class RefreshTreeTask extends AuthenticatedUserTask {
private static final String TAG = "RefreshTreeTask";
- private final Repository repository;
-
- private final Reference reference;
-
- @Inject
- private RepositoryService repoService;
+ private final Repo repository;
- @Inject
- private DataService dataService;
+ private final GitReference reference;
/**
* Create task to refresh repository's tree
@@ -57,50 +52,50 @@ public class RefreshTreeTask extends AuthenticatedUserTask {
* @param reference
* @param context
*/
- public RefreshTreeTask(final Repository repository,
- final Reference reference, final Context context) {
+ public RefreshTreeTask(final Repo repository,
+ final GitReference reference, final Context context) {
super(context);
this.repository = repository;
this.reference = reference;
}
- private boolean isValidRef(Reference ref) {
- return ref != null && ref.getObject() != null
- && !TextUtils.isEmpty(ref.getObject().getSha());
+ private boolean isValidRef(GitReference ref) {
+ return ref != null && ref.object != null
+ && !TextUtils.isEmpty(ref.object.sha);
}
@Override
protected FullTree run(Account account) throws Exception {
- Reference ref = reference;
+ GitReference ref = reference;
String branch = RefUtils.getPath(ref);
if (branch == null) {
- branch = repository.getMasterBranch();
+ branch = repository.default_branch;
if (TextUtils.isEmpty(branch)) {
- branch = repoService.getRepository(repository)
- .getMasterBranch();
+ branch = new GetRepoClient(context,
+ InfoUtils.createRepoInfo(repository))
+ .executeSync().default_branch;
if (TextUtils.isEmpty(branch))
throw new IOException(
- "Repository does not have master branch");
+ "Repo does not have master branch");
}
- branch = "heads/" + branch;
+ branch = "refs/heads/" + branch;
}
if (!isValidRef(ref)) {
- ref = dataService.getReference(repository, branch);
+ ref = new GetReferenceClient(context, InfoUtils.createRepoInfo(repository, branch)).executeSync();
if (!isValidRef(ref))
throw new IOException(
"Reference does not have associated commit SHA-1");
}
- Commit commit = dataService.getCommit(repository, ref.getObject()
- .getSha());
- if (commit == null || commit.getTree() == null
- || TextUtils.isEmpty(commit.getTree().getSha()))
+ GitCommit commit = new GetGitCommitClient(context,
+ InfoUtils.createRepoInfo(repository, ref.object.sha)).executeSync();
+ if (commit == null || commit.tree == null
+ || TextUtils.isEmpty(commit.tree.sha))
throw new IOException("Commit does not have associated tree SHA-1");
- Tree tree = dataService.getTree(repository, commit.getTree().getSha(),
- true);
+ GitTree tree = new GetGitTreeClient(context, InfoUtils.createRepoInfo(repository, commit.tree.sha),true).executeSync();
return new FullTree(tree, ref);
}
diff --git a/app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java b/app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java
index 1518aa50c..f773eeb02 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitCompareTask.java
@@ -19,25 +19,24 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.CompareCommit;
+import com.alorma.github.sdk.services.repo.CompareCommitsClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
+import com.github.pockethub.util.InfoUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.RepositoryCommitCompare;
import org.eclipse.egit.github.core.service.CommitService;
/**
* Task to compare two commits
*/
-public class CommitCompareTask extends
- AuthenticatedUserTask {
+public class CommitCompareTask extends AuthenticatedUserTask {
private static final String TAG = "CommitCompareTask";
- @Inject
- private CommitService service;
-
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
private final String base;
@@ -49,7 +48,7 @@ public class CommitCompareTask extends
* @param base
* @param head
*/
- public CommitCompareTask(Context context, IRepositoryIdProvider repository,
+ public CommitCompareTask(Context context, Repo repository,
String base, String head) {
super(context);
@@ -59,8 +58,9 @@ public CommitCompareTask(Context context, IRepositoryIdProvider repository,
}
@Override
- protected RepositoryCommitCompare run(Account account) throws Exception {
- return service.compare(repository, base, head);
+ protected CompareCommit run(Account account) throws Exception {
+ return new CompareCommitsClient(context,
+ InfoUtils.createRepoInfo(repository), base, head).executeSync();
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java b/app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java
index f78769953..6f031d064 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/RefreshCommitTask.java
@@ -19,19 +19,20 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.Commit;
+import com.alorma.github.sdk.bean.dto.response.CommitComment;
+import com.alorma.github.sdk.bean.dto.response.GitCommit;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.info.CommitInfo;
+import com.alorma.github.sdk.services.commit.GetCommitCommentsClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.github.pockethub.util.HtmlUtils;
import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.InfoUtils;
import com.google.inject.Inject;
import java.util.List;
-import org.eclipse.egit.github.core.Commit;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.eclipse.egit.github.core.service.CommitService;
-
/**
* Task to load a commit by SHA-1 id
*/
@@ -42,10 +43,7 @@ public class RefreshCommitTask extends AuthenticatedUserTask {
@Inject
private CommitStore store;
- @Inject
- private CommitService service;
-
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
private final String id;
@@ -57,7 +55,7 @@ public class RefreshCommitTask extends AuthenticatedUserTask {
* @param id
* @param imageGetter
*/
- public RefreshCommitTask(Context context, IRepositoryIdProvider repository,
+ public RefreshCommitTask(Context context, Repo repository,
String id, HttpImageGetter imageGetter) {
super(context);
@@ -68,15 +66,14 @@ public RefreshCommitTask(Context context, IRepositoryIdProvider repository,
@Override
protected FullCommit run(Account account) throws Exception {
- RepositoryCommit commit = store.refreshCommit(repository, id);
- Commit rawCommit = commit.getCommit();
- if (rawCommit != null && rawCommit.getCommentCount() > 0) {
- List comments = service.getComments(repository,
- commit.getSha());
+ Commit commit = store.refreshCommit(repository, id);
+ GitCommit rawCommit = commit.commit;
+ if (rawCommit != null && rawCommit.comment_count > 0) {
+ List comments = new GetCommitCommentsClient(context,
+ InfoUtils.createCommitInfo(repository, commit.sha)).executeSync();
for (CommitComment comment : comments) {
- String formatted = HtmlUtils.format(comment.getBodyHtml())
- .toString();
- comment.setBodyHtml(formatted);
+ String formatted = HtmlUtils.format(comment.body_html).toString();
+ comment.body_html = formatted;
imageGetter.encode(comment, formatted);
}
return new FullCommit(commit, comments);
diff --git a/app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java b/app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java
index 3beaa21ad..3cee6238d 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/RefreshGistTask.java
@@ -19,6 +19,8 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.services.gists.GetGistCommentsClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.github.pockethub.util.HtmlUtils;
import com.github.pockethub.util.HttpImageGetter;
@@ -28,7 +30,7 @@
import java.util.List;
import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
import org.eclipse.egit.github.core.service.GistService;
/**
@@ -66,15 +68,15 @@ public RefreshGistTask(Context context, String gistId,
@Override
public FullGist run(Account account) throws Exception {
Gist gist = store.refreshGist(id);
- List comments;
- if (gist.getComments() > 0)
- comments = service.getComments(id);
+ List comments;
+ if (gist.comments > 0)
+ comments = new GetGistCommentsClient(context, id).executeSync();
else
comments = Collections.emptyList();
- for (Comment comment : comments) {
- String formatted = HtmlUtils.format(comment.getBodyHtml())
+ for (GithubComment comment : comments) {
+ String formatted = HtmlUtils.format(comment.body_html)
.toString();
- comment.setBodyHtml(formatted);
+ comment.body_html = formatted;
imageGetter.encode(comment, formatted);
}
return new FullGist(gist, service.isStarred(id), comments);
diff --git a/app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java b/app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java
index f318c1529..cce5e12f4 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/StarGistTask.java
@@ -22,7 +22,7 @@
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
import org.eclipse.egit.github.core.service.GistService;
/**
diff --git a/app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java b/app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java
index b1ab9fa20..57a98598c 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/UnstarGistTask.java
@@ -22,7 +22,7 @@
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
import org.eclipse.egit.github.core.service.GistService;
/**
diff --git a/app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java b/app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java
index 78beb427e..ce223d7e2 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/RefreshIssueTask.java
@@ -19,37 +19,29 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.IssueState;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.issue.IssueStory;
+import com.alorma.github.sdk.bean.issue.PullRequestStory;
+import com.alorma.github.sdk.services.issues.story.IssueStoryLoader;
+import com.alorma.github.sdk.services.pullrequest.story.PullRequestStoryLoader;
import com.github.pockethub.accounts.AuthenticatedUserTask;
-import com.github.pockethub.util.HtmlUtils;
import com.github.pockethub.util.HttpImageGetter;
+import com.github.pockethub.util.InfoUtils;
import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.IssueEvent;
-import org.eclipse.egit.github.core.service.IssueService;
-
/**
* Task to load and store an {@link Issue}
*/
-public class RefreshIssueTask extends AuthenticatedUserTask {
+public class RefreshIssueTask extends AuthenticatedUserTask {
private static final String TAG = "RefreshIssueTask";
- @Inject
- private IssueService service;
-
@Inject
private IssueStore store;
- private final IRepositoryIdProvider repositoryId;
+ private final Repo repo;
private final int issueNumber;
@@ -61,47 +53,37 @@ public class RefreshIssueTask extends AuthenticatedUserTask {
* Create task to refresh given issue
*
* @param context
- * @param repositoryId
+ * @param repo
* @param issueNumber
* @param bodyImageGetter
* @param commentImageGetter
*/
public RefreshIssueTask(Context context,
- IRepositoryIdProvider repositoryId, int issueNumber,
+ Repo repo, int issueNumber,
HttpImageGetter bodyImageGetter, HttpImageGetter commentImageGetter) {
super(context);
- this.repositoryId = repositoryId;
+ this.repo = repo;
this.issueNumber = issueNumber;
this.bodyImageGetter = bodyImageGetter;
this.commentImageGetter = commentImageGetter;
}
@Override
- public FullIssue run(Account account) throws Exception {
- Issue issue = store.refreshIssue(repositoryId, issueNumber);
- bodyImageGetter.encode(issue.getId(), issue.getBodyHtml());
- List comments;
- if (issue.getComments() > 0)
- comments = service.getComments(repositoryId, issueNumber);
- else
- comments = Collections.emptyList();
-
- for (Comment comment : comments) {
- String formatted = HtmlUtils.format(comment.getBodyHtml())
- .toString();
- comment.setBodyHtml(formatted);
- commentImageGetter.encode(comment.getId(), formatted);
+ public IssueStory run(Account account) throws Exception {
+ Issue issue = store.refreshIssue(repo, issueNumber);
+ bodyImageGetter.encode(issue.id, issue.body_html);
+
+ if(issue.pullRequest != null) {
+ PullRequestStory story = new PullRequestStoryLoader(context, InfoUtils.createIssueInfo(repo, issue)).executeSync();
+ IssueStory issueStory = new IssueStory();
+ issueStory.issue = story.pullRequest;
+ issueStory.issue.pullRequest = story.pullRequest;
+ issueStory.details = story.details;
+ return issueStory;
+ }else {
+ return new IssueStoryLoader(context, InfoUtils.createIssueInfo(repo, issue)).executeSync();
}
-
- String[] repo = repositoryId.generateId().split("/");
- Iterator> eventsIterator = service.pageIssueEvents(repo[0], repo[1], issueNumber).iterator();
- List events = new ArrayList<>();
-
- while (eventsIterator.hasNext())
- events.addAll(eventsIterator.next());
-
- return new FullIssue(issue, comments, events);
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java
index 6e9adb989..1aae67054 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/DeleteRepositoryTask.java
@@ -10,12 +10,13 @@
import com.github.pockethub.api.GitHubClientV2;
import com.github.pockethub.model.Authorization;
import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.InfoUtils;
import com.google.inject.Inject;
import java.util.Collections;
import java.util.List;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.OAuthService;
import org.eclipse.egit.github.core.service.RepositoryService;
import org.eclipse.egit.github.core.util.EncodingUtils;
@@ -32,7 +33,7 @@ public class DeleteRepositoryTask extends ProgressDialogTask {
@Inject
private OAuthService oAuthService;
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
/**
* Create task for context and id provider
@@ -40,7 +41,7 @@ public class DeleteRepositoryTask extends ProgressDialogTask {
* @param context
* @param repo
*/
- public DeleteRepositoryTask(Context context, IRepositoryIdProvider repo) {
+ public DeleteRepositoryTask(Context context, Repo repo) {
super(context);
this.repo = repo;
}
@@ -58,7 +59,7 @@ public void start() {
@Override
protected Void run(Account account) throws Exception {
- final String id = repo.generateId();
+ final String id = InfoUtils.createRepoId(repo);
String[] paths = id.split("/");
final String owner = paths[0];
final String repository = paths[1];
diff --git a/app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java
index 2ccfc1a8a..46105431a 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/ForkRepositoryTask.java
@@ -4,25 +4,26 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.services.repo.actions.ForkRepoClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Repository;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.RepositoryService;
/**
* Task to fork a repository
*/
-public class ForkRepositoryTask extends ProgressDialogTask {
+public class ForkRepositoryTask extends ProgressDialogTask {
private static final String TAG = "ForkRepositoryTask";
@Inject
private RepositoryService service;
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
/**
* Create task for context and id provider
@@ -30,7 +31,7 @@ public class ForkRepositoryTask extends ProgressDialogTask {
* @param context
* @param repo
*/
- public ForkRepositoryTask(Context context, IRepositoryIdProvider repo) {
+ public ForkRepositoryTask(Context context, Repo repo) {
super(context);
this.repo = repo;
@@ -48,8 +49,8 @@ public void start() {
}
@Override
- protected Repository run(Account account) throws Exception {
- return service.forkRepository(repo);
+ protected Repo run(Account account) throws Exception {
+ return new Repo();
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java
index 397dc36e1..065a99199 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RefreshRepositoryTask.java
@@ -19,24 +19,26 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.services.repo.GetRepoClient;
import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.InfoUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Repository;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.RepositoryService;
/**
* Task to refresh a repository
*/
-public class RefreshRepositoryTask extends ProgressDialogTask {
+public class RefreshRepositoryTask extends ProgressDialogTask {
private static final String TAG = "RefreshRepositoryTask";
@Inject
private RepositoryService service;
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
/**
* Create task for context and id provider
@@ -44,15 +46,15 @@ public class RefreshRepositoryTask extends ProgressDialogTask {
* @param context
* @param repo
*/
- public RefreshRepositoryTask(Context context, IRepositoryIdProvider repo) {
+ public RefreshRepositoryTask(Context context, Repo repo) {
super(context);
this.repo = repo;
}
@Override
- protected Repository run(Account account) throws Exception {
- return service.getRepository(repo);
+ protected Repo run(Account account) throws Exception {
+ return new GetRepoClient(context, InfoUtils.createRepoInfo(repo)).executeSync();
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java
index e632d2838..cd225dc6d 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/StarRepositoryTask.java
@@ -19,11 +19,12 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.services.repo.actions.StarRepoClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.WatcherService;
/**
@@ -36,7 +37,7 @@ public class StarRepositoryTask extends ProgressDialogTask {
@Inject
private WatcherService service;
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
/**
* Create task for context and id provider
@@ -44,7 +45,7 @@ public class StarRepositoryTask extends ProgressDialogTask {
* @param context
* @param repo
*/
- public StarRepositoryTask(Context context, IRepositoryIdProvider repo) {
+ public StarRepositoryTask(Context context, Repo repo) {
super(context);
this.repo = repo;
@@ -63,8 +64,7 @@ public void start() {
@Override
protected Void run(Account account) throws Exception {
- service.watch(repo);
-
+ new StarRepoClient(context, repo.owner.login, repo.name).executeSync();
return null;
}
diff --git a/app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java
index 5b68f9a47..f7677eab1 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/StarredRepositoryTask.java
@@ -15,13 +15,14 @@
*/
package com.github.pockethub.core.repo;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.WatcherService;
import android.accounts.Account;
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.services.repo.actions.CheckRepoStarredClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
@@ -35,7 +36,7 @@ public class StarredRepositoryTask extends AuthenticatedUserTask {
@Inject
private WatcherService service;
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
/**
* Create task for context and id provider
@@ -43,7 +44,7 @@ public class StarredRepositoryTask extends AuthenticatedUserTask {
* @param context
* @param repo
*/
- public StarredRepositoryTask(Context context, IRepositoryIdProvider repo) {
+ public StarredRepositoryTask(Context context, Repo repo) {
super(context);
this.repo = repo;
@@ -51,7 +52,7 @@ public StarredRepositoryTask(Context context, IRepositoryIdProvider repo) {
@Override
protected Boolean run(Account account) throws Exception {
- return service.isWatching(repo);
+ return new CheckRepoStarredClient(context, repo.owner.login, repo.name).executeSync().getStatus() == 204;
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java b/app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java
index c394ff973..16691db69 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/UnstarRepositoryTask.java
@@ -19,11 +19,12 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.services.repo.actions.UnstarRepoClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.WatcherService;
/**
@@ -36,7 +37,7 @@ public class UnstarRepositoryTask extends ProgressDialogTask {
@Inject
private WatcherService service;
- private final IRepositoryIdProvider repo;
+ private final Repo repo;
/**
* Create task for context and id provider
@@ -44,7 +45,7 @@ public class UnstarRepositoryTask extends ProgressDialogTask {
* @param context
* @param repo
*/
- public UnstarRepositoryTask(Context context, IRepositoryIdProvider repo) {
+ public UnstarRepositoryTask(Context context, Repo repo) {
super(context);
this.repo = repo;
@@ -63,8 +64,7 @@ public void start() {
@Override
protected Void run(Account account) throws Exception {
- service.unwatch(repo);
-
+ new UnstarRepoClient(context, repo.owner.login, repo.name).executeSync();
return null;
}
diff --git a/app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java b/app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java
index 48b22ead6..f8683d148 100644
--- a/app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/FollowUserTask.java
@@ -23,7 +23,7 @@
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
import org.eclipse.egit.github.core.service.UserService;
/**
diff --git a/app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java b/app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java
index fed4c7f28..a060795f4 100644
--- a/app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/RefreshUserTask.java
@@ -19,10 +19,11 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.services.user.RequestUserClient;
import com.github.pockethub.accounts.AuthenticatedUserTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
import org.eclipse.egit.github.core.service.UserService;
/**
@@ -51,7 +52,7 @@ public RefreshUserTask(Context context, String login) {
@Override
protected User run(Account account) throws Exception {
- return service.getUser(login);
+ return new RequestUserClient(context, login).executeSync();
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java b/app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java
index 2c93edee5..8b04db60b 100644
--- a/app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UnfollowUserTask.java
@@ -23,7 +23,7 @@
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
import org.eclipse.egit.github.core.service.UserService;
/**
diff --git a/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java b/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java
index 006167bd0..81f63dc1a 100644
--- a/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CreateCommentTask.java
@@ -19,15 +19,18 @@
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.request.CommitCommentRequest;
+import com.alorma.github.sdk.bean.dto.response.CommitComment;
+import com.alorma.github.sdk.services.commit.PublishCommitCommentClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.InfoUtils;
+import com.github.pockethub.util.RequestUtils;
import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.service.CommitService;
+import com.alorma.github.sdk.bean.dto.response.Repo;
/**
* Task to comment on a commit
@@ -36,14 +39,11 @@ public class CreateCommentTask extends ProgressDialogTask {
private static final String TAG = "CreateCommentTask";
- @Inject
- private CommitService service;
-
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
private final String commit;
- private final CommitComment comment;
+ private final CommitCommentRequest comment;
/**
* Create task to create a comment
@@ -54,8 +54,8 @@ public class CreateCommentTask extends ProgressDialogTask {
* @param comment
*/
protected CreateCommentTask(final Activity activity,
- final IRepositoryIdProvider repository, final String commit,
- final CommitComment comment) {
+ final Repo repository, final String commit,
+ final CommitCommentRequest comment) {
super(activity);
this.repository = repository;
@@ -76,9 +76,10 @@ public CreateCommentTask start() {
@Override
public CommitComment run(final Account account) throws Exception {
- CommitComment created = service.addComment(repository, commit, comment);
- String formatted = HtmlUtils.format(created.getBodyHtml()).toString();
- created.setBodyHtml(formatted);
+ CommitComment created = new PublishCommitCommentClient(context,
+ InfoUtils.createCommitInfo(repository, commit), comment).executeSync();
+
+ created.body_html = HtmlUtils.format(created.body_html).toString();
return created;
}
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java b/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java
index fce9a32b6..23434fe44 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/CreateCommentTask.java
@@ -19,6 +19,9 @@
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.request.CommentRequest;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.services.gists.PublishGistCommentClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.github.pockethub.util.HtmlUtils;
@@ -26,13 +29,13 @@
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
import org.eclipse.egit.github.core.service.GistService;
/**
* Task to comment on a {@link Gist}
*/
-public class CreateCommentTask extends ProgressDialogTask {
+public class CreateCommentTask extends ProgressDialogTask {
private static final String TAG = "CreateCommentTask";
@@ -69,10 +72,9 @@ public CreateCommentTask start() {
}
@Override
- public Comment run(Account account) throws Exception {
- Comment created = service.createComment(id, comment);
- String formatted = HtmlUtils.format(created.getBodyHtml()).toString();
- created.setBodyHtml(formatted);
+ public GithubComment run(Account account) throws Exception {
+ GithubComment created = new PublishGistCommentClient(context, id, new CommentRequest(comment)).executeSync();
+ created.body_html = HtmlUtils.format(created.body_html).toString();
return created;
}
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java b/app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java
index 6e28cde0f..894a59582 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/CreateGistTask.java
@@ -19,6 +19,8 @@
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.GistFile;
+import com.alorma.github.sdk.services.gists.PublishGistClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.github.pockethub.util.ToastUtils;
@@ -26,8 +28,8 @@
import java.util.Collections;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.GistFile;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+
import org.eclipse.egit.github.core.service.GistService;
/**
@@ -70,15 +72,15 @@ public CreateGistTask(Activity activity, String description,
@Override
public Gist run(Account account) throws Exception {
Gist gist = new Gist();
- gist.setDescription(description);
- gist.setPublic(isPublic);
+ gist.description = description;
+ gist.isPublic = isPublic;
GistFile file = new GistFile();
- file.setContent(content);
- file.setFilename(name);
- gist.setFiles(Collections.singletonMap(name, file));
+ file.content = content;
+ file.filename = name;
+ gist.files = Collections.singletonMap(name, file);
- return service.createGist(gist);
+ return new PublishGistClient(context, gist).executeSync();
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java b/app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java
index 75764af99..e7a27ab2c 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/DeleteCommentTask.java
@@ -15,43 +15,37 @@
*/
package com.github.pockethub.ui.gist;
-
-import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_COMMENTS;
-import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_GISTS;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.services.gists.DeleteGistCommentClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.service.GistService;
-
/**
* Task to delete a comment on a {@link Gist}
*/
-public class DeleteCommentTask extends ProgressDialogTask {
+public class DeleteCommentTask extends ProgressDialogTask {
private static final String TAG = "DeleteCommentTask";
- private final Comment comment;
-
- @Inject
- private GistService service;
+ private final GithubComment comment;
private final String gistId;
/**
* Delete task for deleting a comment on a {@link Gist}
*
- * @param context
- * @param repository
+ * @param activity
+ * @param gistId
* @param comment
*/
- public DeleteCommentTask(Activity activity, String gistId, Comment comment) {
+ public DeleteCommentTask(Activity activity, String gistId, GithubComment comment) {
super(activity);
this.gistId = gistId;
@@ -59,8 +53,8 @@ public DeleteCommentTask(Activity activity, String gistId, Comment comment) {
}
@Override
- protected Comment run(Account account) throws Exception {
- deleteComment(gistId, comment.getId());
+ protected GithubComment run(Account account) throws Exception {
+ new DeleteGistCommentClient(context, gistId, comment.id);
return comment;
}
@@ -84,17 +78,4 @@ protected void onException(Exception e) throws RuntimeException {
ToastUtils.show((Activity) getContext(), e.getMessage());
}
-
- /**
- * Delete the Gist comment with the given id
- *
- * TODO: Remove this method once egit GistService.java Gist Comment APIs are
- * fixed. https://github.com/eclipse/egit-github/pull/7
- *
- * @param commentId
- * @throws IOException
- */
- private void deleteComment(String gistId, long commentId) throws Exception {
- service.getClient().delete(SEGMENT_GISTS + '/' + gistId + SEGMENT_COMMENTS + '/' + commentId);
- }
}
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java b/app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java
index 42abc3d03..6dab2c2a7 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/DeleteGistTask.java
@@ -25,7 +25,7 @@
import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
import org.eclipse.egit.github.core.service.GistService;
/**
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java b/app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java
index 9a919564b..89c5c2ce1 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/EditCommentTask.java
@@ -15,33 +15,30 @@
*/
package com.github.pockethub.ui.gist;
-import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_COMMENTS;
-import static org.eclipse.egit.github.core.client.IGitHubConstants.SEGMENT_GISTS;
import android.accounts.Account;
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.request.CommentRequest;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.services.gists.EditGistCommentClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.github.pockethub.util.HtmlUtils;
import com.github.pockethub.util.ToastUtils;
-import com.google.inject.Inject;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.service.GistService;
+import com.alorma.github.sdk.bean.dto.response.Gist;
/**
* Task to edit a comment on a {@link Gist}
*/
-public class EditCommentTask extends ProgressDialogTask {
+public class EditCommentTask extends ProgressDialogTask {
private static final String TAG = "EditCommentTask";
- @Inject
- private GistService service;
+ private final String commentId;
- private final Comment comment;
+ private final String body;
private final String gistId;
@@ -49,13 +46,14 @@ public class EditCommentTask extends ProgressDialogTask {
* Edit task for editing a comment on a {@link Gist}
*
* @param activity
- * @param comment
+ * @param commentId
*/
- protected EditCommentTask(Activity activity, String gistId, Comment comment) {
+ protected EditCommentTask(Activity activity, String gistId, String commentId, String body) {
super(activity);
this.gistId = gistId;
- this.comment = comment;
+ this.commentId = commentId;
+ this.body = body;
}
/**
@@ -70,10 +68,9 @@ public EditCommentTask start() {
}
@Override
- public Comment run(Account account) throws Exception {
- Comment edited = editComment(gistId, comment);
- String formatted = HtmlUtils.format(edited.getBodyHtml()).toString();
- edited.setBodyHtml(formatted);
+ public GithubComment run(Account account) throws Exception {
+ GithubComment edited = new EditGistCommentClient(context, gistId, commentId, new CommentRequest(body)).executeSync();
+ edited.body_html = HtmlUtils.format(edited.body_html).toString();
return edited;
}
@@ -86,19 +83,4 @@ protected void onException(Exception e) throws RuntimeException {
ToastUtils.show((Activity) getContext(), e.getMessage());
}
-
- /**
- * Edit gist comment.
- *
- * TODO: Remove this method once egit GistService.java Gist Comment APIs are
- * fixed. https://github.com/eclipse/egit-github/pull/7
- *
- * @param comment
- * @return edited comment
- * @throws IOException
- */
- private Comment editComment(String gistId, Comment comment)
- throws Exception {
- return service.getClient().post(SEGMENT_GISTS + '/' + gistId + SEGMENT_COMMENTS + '/' + comment.getId(), comment, Comment.class);
- }
}
diff --git a/app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java b/app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java
index f8ff0b010..84129af73 100644
--- a/app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/gist/RandomGistTask.java
@@ -20,6 +20,9 @@
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.services.client.GithubClient;
+import com.alorma.github.sdk.services.gists.PublicGistsClient;
+import com.alorma.github.sdk.services.gists.UserGistsClient;
import com.github.pockethub.R;
import com.github.pockethub.core.gist.GistStore;
import com.github.pockethub.ui.ProgressDialogTask;
@@ -27,9 +30,10 @@
import com.google.inject.Inject;
import java.util.Collection;
+import java.util.List;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.client.PageIterator;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.github.pockethub.core.PageIterator;
import org.eclipse.egit.github.core.service.GistService;
/**
@@ -67,16 +71,21 @@ public void start() {
@Override
protected Gist run(Account account) throws Exception {
- PageIterator pages = service.pagePublicGists(1);
+ PageIterator pages = new PageIterator<>(new PageIterator.GitHubRequest>() {
+ @Override
+ public GithubClient> execute(int page) {
+ return new PublicGistsClient(context, 1);
+ }
+ }, 1);
pages.next();
int randomPage = 1 + (int) (Math.random() * ((pages.getLastPage() - 1) + 1));
- Collection gists = service.pagePublicGists(randomPage, 1).next();
+ Collection gists = pages.getRequest().execute(randomPage).executeSync();
// Make at least two tries since page numbers are volatile
if (gists.isEmpty()) {
randomPage = 1 + (int) (Math.random() * ((pages.getLastPage() - 1) + 1));
- gists = service.pagePublicGists(randomPage, 1).next();
+ gists = pages.getRequest().execute(randomPage).executeSync();
}
if (gists.isEmpty())
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java b/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java
deleted file mode 100644
index e82e09794..000000000
--- a/app/src/main/java/com/github/pockethub/ui/issue/CreateCommentTask.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2012 GitHub Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.pockethub.ui.issue;
-
-import android.accounts.Account;
-import android.app.Activity;
-import android.content.Context;
-import android.util.Log;
-
-import com.github.pockethub.R;
-import com.github.pockethub.ui.ProgressDialogTask;
-import com.github.pockethub.util.HtmlUtils;
-import com.github.pockethub.util.ToastUtils;
-import com.google.inject.Inject;
-
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.service.IssueService;
-
-/**
- * Task to comment on an issue in a repository
- */
-public class CreateCommentTask extends ProgressDialogTask {
-
- private static final String TAG = "CreateCommentTask";
-
- private final IRepositoryIdProvider repository;
-
- private final int issueNumber;
-
- private final String comment;
-
- @Inject
- private IssueService service;
-
- /**
- * Create task for creating a comment on the given issue in the given
- * repository
- *
- * @param context
- * @param repository
- * @param issueNumber
- * @param comment
- */
- public CreateCommentTask(final Context context,
- final IRepositoryIdProvider repository, final int issueNumber,
- final String comment) {
- super(context);
-
- this.repository = repository;
- this.issueNumber = issueNumber;
- this.comment = comment;
- }
-
- @Override
- protected Comment run(Account account) throws Exception {
- Comment created = service.createComment(repository, issueNumber,
- comment);
- String formatted = HtmlUtils.format(created.getBodyHtml()).toString();
- created.setBodyHtml(formatted);
- return created;
- }
-
- /**
- * Create comment
- *
- * @return this task
- */
- public CreateCommentTask start() {
- showIndeterminate(R.string.creating_comment);
-
- execute();
- return this;
- }
-
- @Override
- protected void onException(Exception e) throws RuntimeException {
- super.onException(e);
-
- Log.d(TAG, "Exception creating comment on issue", e);
-
- ToastUtils.show((Activity) getContext(), e.getMessage());
- }
-}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java b/app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java
index 10a92c57c..1f71f0d7c 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/CreateIssueTask.java
@@ -19,14 +19,18 @@
import android.app.Activity;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.request.IssueRequest;
+import com.alorma.github.sdk.services.issues.PostNewIssueClient;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.InfoUtils;
+import com.github.pockethub.util.RequestUtils;
import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Issue;
import org.eclipse.egit.github.core.service.IssueService;
/**
@@ -36,29 +40,24 @@ public class CreateIssueTask extends ProgressDialogTask {
private static final String TAG = "CreateIssueTask";
- @Inject
- private IssueService service;
-
@Inject
private IssueStore store;
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
- private final Issue issue;
+ private final IssueRequest request;
/**
* Create task to create an {@link Issue}
*
* @param activity
* @param repository
- * @param issue
- */
- public CreateIssueTask(final Activity activity,
- final IRepositoryIdProvider repository, final Issue issue) {
+ request */
+ public CreateIssueTask(final Activity activity, final Repo repository, final IssueRequest request) {
super(activity);
this.repository = repository;
- this.issue = issue;
+ this.request = request;
}
/**
@@ -75,7 +74,7 @@ public CreateIssueTask create() {
@Override
public Issue run(Account account) throws Exception {
- return store.addIssue(service.createIssue(repository, issue));
+ return new PostNewIssueClient(context, InfoUtils.createRepoInfo(repository), request).executeSync();
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java b/app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java
index 9f7d0e59f..5afa31061 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/DeleteCommentTask.java
@@ -20,28 +20,28 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.services.issues.DeleteIssueCommentClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.InfoUtils;
import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.IssueService;
/**
* Task to delete a comment on an issue in a repository
*/
-public class DeleteCommentTask extends ProgressDialogTask {
+public class DeleteCommentTask extends ProgressDialogTask {
private static final String TAG = "DeleteCommentTask";
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
- private final Comment comment;
-
- @Inject
- private IssueService service;
+ private final GithubComment comment;
/**
* Delete task for deleting a comment on the given issue in the given
@@ -52,8 +52,8 @@ public class DeleteCommentTask extends ProgressDialogTask {
* @param comment
*/
public DeleteCommentTask(final Context context,
- final IRepositoryIdProvider repository,
- final Comment comment) {
+ final Repo repository,
+ final GithubComment comment) {
super(context);
this.repository = repository;
@@ -61,8 +61,8 @@ public DeleteCommentTask(final Context context,
}
@Override
- protected Comment run(Account account) throws Exception {
- service.deleteComment(repository, comment.getId());
+ protected GithubComment run(Account account) throws Exception {
+ new DeleteIssueCommentClient(context, InfoUtils.createRepoInfo(repository), comment.id);
return comment;
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java
index 642462adc..23cccd1a9 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditAssigneeTask.java
@@ -18,15 +18,16 @@
import static com.github.pockethub.RequestCodes.ISSUE_ASSIGNEE_UPDATE;
import android.accounts.Account;
+import com.alorma.github.sdk.bean.dto.request.EditIssueAssigneeRequestDTO;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.DialogFragmentActivity;
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.User;
import org.eclipse.egit.github.core.service.CollaboratorService;
/**
@@ -42,7 +43,7 @@ public class EditAssigneeTask extends ProgressDialogTask {
private final AssigneeDialog assigneeDialog;
- private final IRepositoryIdProvider repositoryId;
+ private final Repo repositoryId;
private final int issueNumber;
@@ -56,13 +57,13 @@ public class EditAssigneeTask extends ProgressDialogTask {
* @param issueNumber
*/
public EditAssigneeTask(final DialogFragmentActivity activity,
- final IRepositoryIdProvider repositoryId, final int issueNumber) {
+ final Repo repositoryId, final int issueNumber) {
super(activity);
this.repositoryId = repositoryId;
this.issueNumber = issueNumber;
assigneeDialog = new AssigneeDialog(activity, ISSUE_ASSIGNEE_UPDATE,
- repositoryId, service);
+ repositoryId);
}
/**
@@ -94,12 +95,11 @@ public EditAssigneeTask edit(User user) {
@Override
protected Issue run(Account account) throws Exception {
- Issue editedIssue = new Issue();
+ EditIssueAssigneeRequestDTO edit = new EditIssueAssigneeRequestDTO();
if (assignee != null)
- editedIssue.setAssignee(assignee);
+ edit.assignee = assignee.login;
else
- editedIssue.setAssignee(new User().setLogin(""));
- editedIssue.setNumber(issueNumber);
- return store.editIssue(repositoryId, editedIssue);
+ edit.assignee = "";
+ return store.editIssue(repositoryId, issueNumber, edit);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java
index 8ce27a8e3..a7ca34aaf 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditCommentTask.java
@@ -20,29 +20,32 @@
import android.content.Context;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.request.CommentRequest;
+import com.alorma.github.sdk.bean.dto.response.GithubComment;
+import com.alorma.github.sdk.services.issues.EditIssueCommentClient;
import com.github.pockethub.R;
import com.github.pockethub.ui.ProgressDialogTask;
import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.InfoUtils;
import com.github.pockethub.util.ToastUtils;
import com.google.inject.Inject;
import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.service.IssueService;
/**
* Task to edit a comment on an issue in a repository
*/
-public class EditCommentTask extends ProgressDialogTask {
+public class EditCommentTask extends ProgressDialogTask {
private static final String TAG = "EditCommentTask";
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
- private final Comment comment;
+ private final String id;
- @Inject
- private IssueService service;
+ private final String comment;
/**
* Edit task for editing a comment on the given issue in the given
@@ -52,20 +55,20 @@ public class EditCommentTask extends ProgressDialogTask {
* @param repository
* @param comment
*/
- public EditCommentTask(final Context context,
- final IRepositoryIdProvider repository,
- final Comment comment) {
+ public EditCommentTask(final Context context, final Repo repository,
+ final String id, final String comment) {
super(context);
this.repository = repository;
+ this.id = id;
this.comment = comment;
}
@Override
- protected Comment run(Account account) throws Exception {
- Comment edited = service.editComment(repository, comment);
- String formatted = HtmlUtils.format(edited.getBodyHtml()).toString();
- edited.setBodyHtml(formatted);
+ protected GithubComment run(Account account) throws Exception {
+ GithubComment edited = new EditIssueCommentClient(context,
+ InfoUtils.createRepoInfo(repository), id, new CommentRequest(comment)).executeSync();
+ edited.body_html = HtmlUtils.format(edited.body_html).toString();
return edited;
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java
index 91f179d67..1336d68c6 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditIssueTask.java
@@ -17,14 +17,17 @@
import android.accounts.Account;
+import com.alorma.github.sdk.bean.dto.request.IssueRequest;
+import com.alorma.github.sdk.services.issues.EditIssueClient;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.DialogFragmentActivity;
import com.github.pockethub.ui.ProgressDialogTask;
+import com.github.pockethub.util.InfoUtils;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Issue;
/**
* Task to edit an entire issue
@@ -34,28 +37,32 @@ public class EditIssueTask extends ProgressDialogTask {
@Inject
private IssueStore store;
- private final IRepositoryIdProvider repositoryId;
+ private final Repo repositoryId;
- private final Issue issue;
+ private final int issueNumber;
+
+ private final IssueRequest issue;
/**
* Create task to edit a milestone
*
* @param activity
* @param repositoryId
+ * @param issueNumber
* @param issue
*/
public EditIssueTask(final DialogFragmentActivity activity,
- final IRepositoryIdProvider repositoryId, final Issue issue) {
+ final Repo repositoryId, final int issueNumber, final IssueRequest issue) {
super(activity);
this.repositoryId = repositoryId;
+ this.issueNumber = issueNumber;
this.issue = issue;
}
@Override
protected Issue run(Account account) throws Exception {
- return store.editIssue(repositoryId, issue);
+ return new EditIssueClient(context, InfoUtils.createIssueInfo(repositoryId, issueNumber), issue).executeSync();
}
/**
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java
index df8fc8efb..ee61b4fc0 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditLabelsTask.java
@@ -18,6 +18,8 @@
import static com.github.pockethub.RequestCodes.ISSUE_LABELS_UPDATE;
import android.accounts.Account;
+import com.alorma.github.sdk.bean.dto.request.EditIssueLabelsRequestDTO;
+import com.alorma.github.sdk.bean.dto.response.Label;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.DialogFragmentActivity;
@@ -27,9 +29,8 @@
import java.util.Arrays;
import java.util.List;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.Label;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Issue;
import org.eclipse.egit.github.core.service.LabelService;
/**
@@ -40,12 +41,9 @@ public class EditLabelsTask extends ProgressDialogTask {
@Inject
private IssueStore store;
- @Inject
- private LabelService service;
-
private final LabelsDialog labelsDialog;
- private final IRepositoryIdProvider repositoryId;
+ private final Repo repositoryId;
private final int issueNumber;
@@ -59,13 +57,13 @@ public class EditLabelsTask extends ProgressDialogTask {
* @param issueNumber
*/
public EditLabelsTask(final DialogFragmentActivity activity,
- final IRepositoryIdProvider repositoryId, final int issueNumber) {
+ final Repo repositoryId, final int issueNumber) {
super(activity);
this.repositoryId = repositoryId;
this.issueNumber = issueNumber;
labelsDialog = new LabelsDialog(activity, ISSUE_LABELS_UPDATE,
- repositoryId, service);
+ repositoryId);
}
/**
@@ -97,10 +95,11 @@ public EditLabelsTask edit(Label[] labels) {
@Override
public Issue run(Account account) throws Exception {
- Issue editedIssue = new Issue();
- editedIssue.setNumber(issueNumber);
- if (labels != null && labels.length > 0)
- editedIssue.setLabels(Arrays.asList(labels));
- return store.editIssue(repositoryId, editedIssue);
+ EditIssueLabelsRequestDTO requestDTO = new EditIssueLabelsRequestDTO();
+ requestDTO.labels = new String[labels.length];
+ for (int i = 0; i < labels.length; i++)
+ requestDTO.labels[i] = labels[i].name;
+
+ return store.editIssue(repositoryId, issueNumber, requestDTO);
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java
index 60ac3626b..5179b76cf 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditMilestoneTask.java
@@ -18,15 +18,17 @@
import static com.github.pockethub.RequestCodes.ISSUE_MILESTONE_UPDATE;
import android.accounts.Account;
+import com.alorma.github.sdk.bean.dto.request.EditIssueMilestoneRequestDTO;
+import com.alorma.github.sdk.bean.dto.response.Milestone;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.DialogFragmentActivity;
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.Milestone;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+
import org.eclipse.egit.github.core.service.MilestoneService;
/**
@@ -42,7 +44,7 @@ public class EditMilestoneTask extends ProgressDialogTask {
private final MilestoneDialog milestoneDialog;
- private final IRepositoryIdProvider repositoryId;
+ private final Repo repositoryId;
private final int issueNumber;
@@ -56,21 +58,20 @@ public class EditMilestoneTask extends ProgressDialogTask {
* @param issueNumber
*/
public EditMilestoneTask(final DialogFragmentActivity activity,
- final IRepositoryIdProvider repositoryId, final int issueNumber) {
+ final Repo repositoryId, final int issueNumber) {
super(activity);
this.repositoryId = repositoryId;
this.issueNumber = issueNumber;
milestoneDialog = new MilestoneDialog(activity, ISSUE_MILESTONE_UPDATE,
- repositoryId, service);
+ repositoryId);
}
@Override
protected Issue run(Account account) throws Exception {
- Issue editedIssue = new Issue();
- editedIssue.setNumber(issueNumber);
- editedIssue.setMilestone(new Milestone().setNumber(milestoneNumber));
- return store.editIssue(repositoryId, editedIssue);
+ EditIssueMilestoneRequestDTO editedIssue = new EditIssueMilestoneRequestDTO();
+ editedIssue.milestone = milestoneNumber;
+ return store.editIssue(repositoryId, issueNumber, editedIssue);
}
/**
@@ -93,8 +94,7 @@ public EditMilestoneTask prompt(Milestone milestone) {
*/
public EditMilestoneTask edit(Milestone milestone) {
if (milestone != null)
- milestoneNumber = milestone.getNumber();
- else
+ milestoneNumber = milestone.number;
milestoneNumber = -1;
showIndeterminate(R.string.updating_milestone);
diff --git a/app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java b/app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java
index 867756fa9..f70b75b12 100644
--- a/app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java
+++ b/app/src/main/java/com/github/pockethub/ui/issue/EditStateTask.java
@@ -21,6 +21,7 @@
import static org.eclipse.egit.github.core.service.IssueService.STATE_OPEN;
import android.accounts.Account;
+import com.alorma.github.sdk.bean.dto.response.IssueState;
import com.github.pockethub.R;
import com.github.pockethub.core.issue.IssueStore;
import com.github.pockethub.ui.ConfirmDialogFragment;
@@ -28,8 +29,8 @@
import com.github.pockethub.ui.ProgressDialogTask;
import com.google.inject.Inject;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.Issue;
/**
* Task to close or reopen an issue
@@ -39,7 +40,7 @@ public class EditStateTask extends ProgressDialogTask {
@Inject
private IssueStore store;
- private final IRepositoryIdProvider repositoryId;
+ private final Repo repositoryId;
private final int issueNumber;
@@ -53,7 +54,7 @@ public class EditStateTask extends ProgressDialogTask {
* @param issueNumber
*/
public EditStateTask(final DialogFragmentActivity activity,
- final IRepositoryIdProvider repositoryId, final int issueNumber) {
+ final Repo repositoryId, final int issueNumber) {
super(activity);
this.repositoryId = repositoryId;
@@ -81,13 +82,12 @@ ISSUE_REOPEN, getString(R.string.issue_confirm_reopen_title),
@Override
protected Issue run(Account account) throws Exception {
- Issue editedIssue = new Issue();
- editedIssue.setNumber(issueNumber);
+ IssueState state;
if (close)
- editedIssue.setState(STATE_CLOSED);
+ state = IssueState.closed;
else
- editedIssue.setState(STATE_OPEN);
- return store.editIssue(repositoryId, editedIssue);
+ state = IssueState.open;
+ return store.changeState(repositoryId, issueNumber, state);
}
/**
From 73811c194cd0014465465b627fc75e81f4d8e3bc Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:37:37 +0200
Subject: [PATCH 090/561] Updated Pagers (PageIterator and NoSuchPageException
slipped in earlier, those were ported from the old lib)
---
.../pockethub/core/commit/CommitPager.java | 18 ++++++++----------
.../github/pockethub/core/gist/GistPager.java | 5 ++---
.../pockethub/core/issue/IssuePager.java | 5 +++--
.../github/pockethub/core/user/UserPager.java | 4 ++--
.../github/pockethub/ui/user/EventPager.java | 9 +++++----
5 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/core/commit/CommitPager.java b/app/src/main/java/com/github/pockethub/core/commit/CommitPager.java
index dcf157315..6ed8ee120 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/CommitPager.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitPager.java
@@ -15,17 +15,16 @@
*/
package com.github.pockethub.core.commit;
+import com.alorma.github.sdk.bean.dto.response.Commit;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import com.github.pockethub.core.ResourcePager;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.RepositoryCommit;
-
/**
* Pager over commits
*/
-public abstract class CommitPager extends ResourcePager {
+public abstract class CommitPager extends ResourcePager {
- private final IRepositoryIdProvider repository;
+ private final Repo repository;
private final CommitStore store;
@@ -35,19 +34,18 @@ public abstract class CommitPager extends ResourcePager {
* @param repository
* @param store
*/
- public CommitPager(final IRepositoryIdProvider repository,
- final CommitStore store) {
+ public CommitPager(final Repo repository, final CommitStore store) {
this.repository = repository;
this.store = store;
}
@Override
- protected Object getId(final RepositoryCommit resource) {
- return resource.getSha();
+ protected Object getId(final Commit resource) {
+ return resource.sha;
}
@Override
- protected RepositoryCommit register(final RepositoryCommit resource) {
+ protected Commit register(final Commit resource) {
return store.addCommit(repository, resource);
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/gist/GistPager.java b/app/src/main/java/com/github/pockethub/core/gist/GistPager.java
index 5892d7d0e..f726c26b0 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/GistPager.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistPager.java
@@ -15,10 +15,9 @@
*/
package com.github.pockethub.core.gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
import com.github.pockethub.core.ResourcePager;
-import org.eclipse.egit.github.core.Gist;
-
/**
* Pager over Gists
*/
@@ -37,7 +36,7 @@ public GistPager(final GistStore store) {
@Override
protected Object getId(Gist resource) {
- return resource.getId();
+ return resource.id;
}
@Override
diff --git a/app/src/main/java/com/github/pockethub/core/issue/IssuePager.java b/app/src/main/java/com/github/pockethub/core/issue/IssuePager.java
index 9a59c19b1..81e31640c 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/IssuePager.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssuePager.java
@@ -17,7 +17,7 @@
import com.github.pockethub.core.ResourcePager;
-import org.eclipse.egit.github.core.Issue;
+import com.alorma.github.sdk.bean.dto.response.Issue;
/**
* Helper class for showing more and more pages of issues
@@ -36,6 +36,7 @@ public abstract class IssuePager extends ResourcePager {
*/
public IssuePager(final IssueStore store) {
this.store = store;
+
}
@Override
@@ -45,6 +46,6 @@ protected Issue register(Issue resource) {
@Override
protected Object getId(Issue resource) {
- return resource.getId();
+ return resource.id;
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/user/UserPager.java b/app/src/main/java/com/github/pockethub/core/user/UserPager.java
index c1721ef58..b91cac429 100644
--- a/app/src/main/java/com/github/pockethub/core/user/UserPager.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserPager.java
@@ -17,7 +17,7 @@
import com.github.pockethub.core.ResourcePager;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Pager over users
@@ -26,6 +26,6 @@ public abstract class UserPager extends ResourcePager {
@Override
protected Object getId(User resource) {
- return resource.getId();
+ return resource.id;
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/user/EventPager.java b/app/src/main/java/com/github/pockethub/ui/user/EventPager.java
index 268802903..99348d61d 100644
--- a/app/src/main/java/com/github/pockethub/ui/user/EventPager.java
+++ b/app/src/main/java/com/github/pockethub/ui/user/EventPager.java
@@ -15,6 +15,7 @@
*/
package com.github.pockethub.ui.user;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
import com.github.pockethub.core.ResourcePager;
import org.eclipse.egit.github.core.event.Event;
@@ -22,15 +23,15 @@
/**
* Pager over events
*/
-public abstract class EventPager extends ResourcePager {
+public abstract class EventPager extends ResourcePager {
@Override
- protected Object getId(Event resource) {
- return resource.getId();
+ protected Object getId(GithubEvent resource) {
+ return resource.id;
}
@Override
- protected Event register(Event resource) {
+ protected GithubEvent register(GithubEvent resource) {
return NewsListAdapter.isValid(resource) ? resource : null;
}
}
From a0d0cab46e4c65816ac7d7e6caaf22c81db0bc36 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:38:02 +0200
Subject: [PATCH 091/561] Stores updated to use new SDK
---
.../pockethub/core/commit/CommitStore.java | 60 +++---
.../github/pockethub/core/gist/GistStore.java | 40 ++--
.../pockethub/core/issue/IssueStore.java | 183 +++++++++---------
3 files changed, 140 insertions(+), 143 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/core/commit/CommitStore.java b/app/src/main/java/com/github/pockethub/core/commit/CommitStore.java
index c2247459a..e23621fba 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/CommitStore.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitStore.java
@@ -15,32 +15,38 @@
*/
package com.github.pockethub.core.commit;
+import android.content.Context;
+
+import com.alorma.github.sdk.bean.dto.response.Commit;
+import com.alorma.github.sdk.bean.dto.response.Content;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.services.commit.GetSingleCommitClient;
import com.github.pockethub.core.ItemStore;
+import com.github.pockethub.util.InfoUtils;
+
+import org.eclipse.egit.github.core.service.CommitService;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.eclipse.egit.github.core.service.CommitService;
/**
* Store of commits
*/
public class CommitStore extends ItemStore {
- private final Map> commits = new HashMap<>();
+ private final Map> commits = new HashMap<>();
- private final CommitService service;
+ private final Context context;
/**
* Create commit store
*
- * @param service
+ * @param context
*/
- public CommitStore(final CommitService service) {
- this.service = service;
+ public CommitStore(final Context context) {
+ this.context = context;
}
/**
@@ -50,10 +56,8 @@ public CommitStore(final CommitService service) {
* @param id
* @return commit or null if not in store
*/
- public RepositoryCommit getCommit(final IRepositoryIdProvider repo,
- final String id) {
- final ItemReferences repoCommits = commits.get(repo
- .generateId());
+ public Commit getCommit(final Repo repo, final String id) {
+ final ItemReferences repoCommits = commits.get(InfoUtils.createRepoId(repo));
return repoCommits != null ? repoCommits.get(id) : null;
}
@@ -64,27 +68,26 @@ public RepositoryCommit getCommit(final IRepositoryIdProvider repo,
* @param commit
* @return commit
*/
- public RepositoryCommit addCommit(IRepositoryIdProvider repo,
- RepositoryCommit commit) {
- RepositoryCommit current = getCommit(repo, commit.getSha());
+ public Commit addCommit(Repo repo, Commit commit) {
+ Commit current = getCommit(repo, commit.sha);
if (current != null) {
- current.setAuthor(commit.getAuthor());
- current.setCommit(commit.getCommit());
- current.setCommitter(commit.getCommitter());
- current.setFiles(commit.getFiles());
- current.setParents(commit.getParents());
- current.setSha(commit.getSha());
- current.setStats(commit.getStats());
- current.setUrl(commit.getUrl());
+ current.author = commit.author;
+ current.commit = commit.commit;
+ current.committer = commit.committer;
+ current.files = commit.files;
+ current.parents = commit.parents;
+ current.sha = commit.sha;
+ current.stats = commit.stats;
+ current.url = commit.url;
return current;
} else {
- String repoId = repo.generateId();
- ItemReferences repoCommits = commits.get(repoId);
+ String repoId = InfoUtils.createRepoId(repo);
+ ItemReferences repoCommits = commits.get(repoId);
if (repoCommits == null) {
repoCommits = new ItemReferences<>();
commits.put(repoId, repoCommits);
}
- repoCommits.put(commit.getSha(), commit);
+ repoCommits.put(commit.sha, commit);
return commit;
}
}
@@ -97,8 +100,7 @@ public RepositoryCommit addCommit(IRepositoryIdProvider repo,
* @return refreshed commit
* @throws IOException
*/
- public RepositoryCommit refreshCommit(final IRepositoryIdProvider repo,
- final String id) throws IOException {
- return addCommit(repo, service.getCommit(repo, id));
+ public Commit refreshCommit(final Repo repo, final String id) throws IOException {
+ return addCommit(repo, new GetSingleCommitClient(context, InfoUtils.createCommitInfo(repo, id)).executeSync());
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/gist/GistStore.java b/app/src/main/java/com/github/pockethub/core/gist/GistStore.java
index cd5b99233..505effdf8 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/GistStore.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistStore.java
@@ -15,18 +15,22 @@
*/
package com.github.pockethub.core.gist;
+import android.content.Context;
+
import static java.lang.String.CASE_INSENSITIVE_ORDER;
+import com.alorma.github.sdk.bean.dto.response.Commit;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.GistFile;
+import com.alorma.github.sdk.services.gists.EditGistClient;
+import com.alorma.github.sdk.services.gists.GetGistDetailClient;
import com.github.pockethub.core.ItemStore;
+import com.github.pockethub.util.RequestUtils;
import java.io.IOException;
import java.util.Map;
import java.util.TreeMap;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.GistFile;
-import org.eclipse.egit.github.core.service.GistService;
-
/**
* Store of Gists
*/
@@ -34,15 +38,15 @@ public class GistStore extends ItemStore {
private final ItemReferences gists = new ItemReferences<>();
- private final GistService service;
+ private Context context;
/**
* Create gist store
*
- * @param service
+ * @param context
*/
- public GistStore(final GistService service) {
- this.service = service;
+ public GistStore(final Context context) {
+ this.context = context;
}
/**
@@ -62,7 +66,7 @@ public Gist getGist(String id) {
* @return sorted files
*/
protected Map sortFiles(final Gist gist) {
- Map files = gist.getFiles();
+ Map files = gist.files;
if (files == null || files.size() < 2)
return files;
@@ -79,16 +83,16 @@ protected Map sortFiles(final Gist gist) {
* @return gist
*/
public Gist addGist(Gist gist) {
- Gist current = getGist(gist.getId());
+ Gist current = getGist(gist.id);
if (current != null) {
- current.setComments(gist.getComments());
- current.setDescription(gist.getDescription());
- current.setFiles(sortFiles(gist));
- current.setUpdatedAt(gist.getUpdatedAt());
+ current.comments = gist.comments;
+ current.description = gist.description;
+ current.files = sortFiles(gist);
+ current.updated_at = gist.updated_at;
return current;
} else {
- gist.setFiles(sortFiles(gist));
- gists.put(gist.getId(), gist);
+ gist.files = sortFiles(gist);
+ gists.put(gist.id, gist);
return gist;
}
}
@@ -101,7 +105,7 @@ public Gist addGist(Gist gist) {
* @throws IOException
*/
public Gist refreshGist(String id) throws IOException {
- return addGist(service.getGist(id));
+ return addGist(new GetGistDetailClient(context, id).executeSync());
}
/**
@@ -112,6 +116,6 @@ public Gist refreshGist(String id) throws IOException {
* @throws IOException
*/
public Gist editGist(Gist gist) throws IOException {
- return addGist(service.updateGist(gist));
+ return addGist(new EditGistClient(context, gist.id, RequestUtils.editGist(gist)).executeSync());
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/issue/IssueStore.java b/app/src/main/java/com/github/pockethub/core/issue/IssueStore.java
index 51d50d833..ba647fef7 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/IssueStore.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueStore.java
@@ -15,42 +15,46 @@
*/
package com.github.pockethub.core.issue;
+import android.content.Context;
+
+import com.alorma.github.sdk.bean.dto.request.EditIssueRequestDTO;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.IssueState;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
+import com.alorma.github.sdk.bean.info.IssueInfo;
+import com.alorma.github.sdk.bean.info.RepoInfo;
+import com.alorma.github.sdk.services.issues.ChangeIssueStateClient;
+import com.alorma.github.sdk.services.issues.EditIssueClient;
+import com.alorma.github.sdk.services.issues.GetIssueClient;
+import com.alorma.github.sdk.services.pullrequest.GetPullsClient;
+import com.alorma.github.sdk.services.pullrequest.GetSinglePullRequestClient;
import com.github.pockethub.core.ItemStore;
import com.github.pockethub.util.HtmlUtils;
+import com.github.pockethub.util.InfoUtils;
+import com.squareup.okhttp.internal.http.RequestException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.RepositoryId;
-import org.eclipse.egit.github.core.RepositoryIssue;
-import org.eclipse.egit.github.core.client.RequestException;
-import org.eclipse.egit.github.core.service.IssueService;
-import org.eclipse.egit.github.core.service.PullRequestService;
-
/**
* Store of loaded issues
*/
public class IssueStore extends ItemStore {
- private final Map> repos = new HashMap<>();
-
- private final IssueService issueService;
+ //+++
+ private final Map> repos = new HashMap<>();
- private final PullRequestService pullService;
+ private final Context context;
/**
* Create issue store
*
- * @param issueService
- * @param pullService
+ * @param context
*/
- public IssueStore(final IssueService issueService,
- final PullRequestService pullService) {
- this.issueService = issueService;
- this.pullService = pullService;
+ public IssueStore(final Context context) {
+ this.context = context;
}
/**
@@ -60,9 +64,8 @@ public IssueStore(final IssueService issueService,
* @param number
* @return issue or null if not in store
*/
- public RepositoryIssue getIssue(IRepositoryIdProvider repository, int number) {
- ItemReferences repoIssues = repos.get(repository
- .generateId());
+ public Issue getIssue(Repo repository, int number) {
+ ItemReferences repoIssues = repos.get(InfoUtils.createRepoId(repository));
return repoIssues != null ? repoIssues.get(number) : null;
}
@@ -72,39 +75,40 @@ public RepositoryIssue getIssue(IRepositoryIdProvider repository, int number) {
* @param issue
* @return issue
*/
- public RepositoryIssue addIssue(Issue issue) {
- IRepositoryIdProvider repo = null;
- if (issue instanceof RepositoryIssue)
- repo = ((RepositoryIssue) issue).getRepository();
- if (repo == null)
- repo = RepositoryId.createFromUrl(issue.getHtmlUrl());
+ public Issue addIssue(Issue issue) {
+ Repo repo = null;
+ if (issue != null) {
+ repo = issue.repository;
+ if (repo == null)
+ repo = repoFromUrl(issue.html_url);
+ }
return addIssue(repo, issue);
}
- private RepositoryIssue createRepositoryIssue(Issue issue) {
- if (issue instanceof RepositoryIssue)
- return (RepositoryIssue) issue;
+ private Repo repoFromUrl(String url){
+ if (url == null || url.length() == 0)
+ return null;
+ String owner = null;
+ String name = null;
+ for (String segment : url.split("/")) //$NON-NLS-1$
+ if (segment.length() > 0)
+ if (owner == null)
+ owner = segment;
+ else if (name == null)
+ name = segment;
+ else
+ break;
- RepositoryIssue repoIssue = new RepositoryIssue();
- repoIssue.setAssignee(issue.getAssignee());
- repoIssue.setBody(issue.getBody());
- repoIssue.setBodyHtml(issue.getBodyHtml());
- repoIssue.setBodyText(issue.getBodyText());
- repoIssue.setClosedAt(issue.getClosedAt());
- repoIssue.setComments(issue.getComments());
- repoIssue.setCreatedAt(issue.getCreatedAt());
- repoIssue.setHtmlUrl(issue.getHtmlUrl());
- repoIssue.setId(issue.getId());
- repoIssue.setLabels(issue.getLabels());
- repoIssue.setMilestone(issue.getMilestone());
- repoIssue.setNumber(issue.getNumber());
- repoIssue.setPullRequest(issue.getPullRequest());
- repoIssue.setState(issue.getState());
- repoIssue.setTitle(issue.getTitle());
- repoIssue.setUpdatedAt(issue.getUpdatedAt());
- repoIssue.setUrl(issue.getUrl());
- repoIssue.setUser(issue.getUser());
- return repoIssue;
+ if(owner != null && owner.length() > 0 && name != null && name.length() > 0){
+ Repo repo = new Repo();
+ User user = new User();
+ user.login = owner;
+ repo.owner = user;
+ repo.name = name;
+ return repo;
+ }else{
+ return null;
+ }
}
/**
@@ -114,35 +118,32 @@ private RepositoryIssue createRepositoryIssue(Issue issue) {
* @param issue
* @return issue
*/
- public RepositoryIssue addIssue(IRepositoryIdProvider repository,
- Issue issue) {
- issue.setBodyHtml(HtmlUtils.format(issue.getBodyHtml()).toString());
- RepositoryIssue current = getIssue(repository, issue.getNumber());
+ public Issue addIssue(Repo repository, Issue issue) {
+ issue.body_html = (HtmlUtils.format(issue.body_html).toString());
+ Issue current = getIssue(repository, issue.number);
if (current != null) {
- current.setAssignee(issue.getAssignee());
- current.setBody(issue.getBody());
- current.setBodyHtml(issue.getBodyHtml());
- current.setClosedAt(issue.getClosedAt());
- current.setComments(issue.getComments());
- current.setLabels(issue.getLabels());
- current.setMilestone(issue.getMilestone());
- current.setPullRequest(issue.getPullRequest());
- current.setState(issue.getState());
- current.setTitle(issue.getTitle());
- current.setUpdatedAt(issue.getUpdatedAt());
- if (issue instanceof RepositoryIssue)
- current.setRepository(((RepositoryIssue) issue).getRepository());
+ current.assignee = issue.assignee;
+ current.body = issue.body;
+ current.body_html = issue.body_html;
+ current.closedAt = issue.closedAt;
+ current.comments = issue.comments;
+ current.labels = issue.labels;
+ current.milestone = issue.milestone;
+ current.pullRequest = issue.pullRequest;
+ current.state = issue.state;
+ current.title = issue.title;
+ current.updated_at = issue.updated_at;
+ current.repository = issue.repository;
return current;
} else {
- String repoId = repository.generateId();
- ItemReferences repoIssues = repos.get(repoId);
+ String repoId = InfoUtils.createRepoId(repository);
+ ItemReferences repoIssues = repos.get(repoId);
if (repoIssues == null) {
repoIssues = new ItemReferences<>();
repos.put(repoId, repoIssues);
}
- RepositoryIssue repoIssue = createRepositoryIssue(issue);
- repoIssues.put(issue.getNumber(), repoIssue);
- return repoIssue;
+ repoIssues.put(issue.number, issue);
+ return issue;
}
}
@@ -154,26 +155,9 @@ public RepositoryIssue addIssue(IRepositoryIdProvider repository,
* @return refreshed issue
* @throws IOException
*/
- public RepositoryIssue refreshIssue(IRepositoryIdProvider repository,
- int number) throws IOException {
- Issue issue;
- try {
- issue = issueService.getIssue(repository, number);
- if (IssueUtils.isPullRequest(issue))
- issue = IssueUtils.toIssue(pullService.getPullRequest(
- repository, number));
- } catch (IOException e) {
- if (e instanceof RequestException
- && 410 == ((RequestException) e).getStatus())
- try {
- issue = IssueUtils.toIssue(pullService.getPullRequest(
- repository, number));
- } catch (IOException e2) {
- throw e;
- }
- else
- throw e;
- }
+ public Issue refreshIssue(Repo repository, int number) throws IOException {
+ IssueInfo issueInfo = InfoUtils.createIssueInfo(repository, number);
+ Issue issue = new GetIssueClient(context, issueInfo).executeSync();
return addIssue(repository, issue);
}
@@ -181,12 +165,19 @@ public RepositoryIssue refreshIssue(IRepositoryIdProvider repository,
* Edit issue
*
* @param repository
- * @param issue
+ * @param issueNumber
* @return edited issue
* @throws IOException
*/
- public RepositoryIssue editIssue(IRepositoryIdProvider repository,
- Issue issue) throws IOException {
- return addIssue(repository, issueService.editIssue(repository, issue));
+ public Issue editIssue(Repo repository, int issueNumber, EditIssueRequestDTO editIssueRequestDTO) throws IOException {
+ IssueInfo issueInfo = new IssueInfo(InfoUtils.createRepoInfo(repository));
+ issueInfo.num = issueNumber;
+ return addIssue(repository, new EditIssueClient(context, issueInfo, editIssueRequestDTO).executeSync());
+ }
+
+ public Issue changeState(Repo repository, int issueNumber, IssueState state) throws IOException {
+ IssueInfo issueInfo = new IssueInfo(InfoUtils.createRepoInfo(repository));
+ issueInfo.num = issueNumber;
+ return addIssue(repository, new ChangeIssueStateClient(context, issueInfo, state).executeSync());
}
}
From b87e8c4ddd9f4d8b3e3527a8e48e2248e10de257 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:39:20 +0200
Subject: [PATCH 092/561] Comparators and matchers updated to use new SDK
---
.../pockethub/core/commit/CommitMatch.java | 8 +-
.../core/commit/CommitUriMatcher.java | 12 +--
.../pockethub/core/gist/GistEventMatcher.java | 26 ++++---
.../pockethub/core/gist/GistUriMatcher.java | 8 +-
.../core/issue/IssueEventMatcher.java | 46 ++++++------
.../pockethub/core/issue/IssueUriMatcher.java | 22 +++---
.../core/repo/RepositoryEventMatcher.java | 74 +++++--------------
.../core/repo/RepositoryUriMatcher.java | 20 ++---
.../pockethub/core/user/UserComparator.java | 11 +--
.../pockethub/core/user/UserEventMatcher.java | 31 ++++----
.../pockethub/core/user/UserUriMatcher.java | 7 +-
.../ui/commit/CommitFileComparator.java | 7 +-
12 files changed, 128 insertions(+), 144 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java b/app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java
index d71debe99..a641cef15 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitMatch.java
@@ -15,7 +15,7 @@
*/
package com.github.pockethub.core.commit;
-import org.eclipse.egit.github.core.Repository;
+import com.alorma.github.sdk.bean.dto.response.Repo;
/**
* Match for a commit in a repository
@@ -23,9 +23,9 @@
public class CommitMatch {
/**
- * Repository of commit
+ * Repo of commit
*/
- public final Repository repository;
+ public final Repo repository;
/**
* SHA-1 of commit
@@ -38,7 +38,7 @@ public class CommitMatch {
* @param repository
* @param commit
*/
- public CommitMatch(final Repository repository, final String commit) {
+ public CommitMatch(final Repo repository, final String commit) {
this.repository = repository;
this.commit = commit;
}
diff --git a/app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java b/app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java
index c7568e915..21d247989 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitUriMatcher.java
@@ -21,8 +21,8 @@
import java.util.List;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Parses a {@link CommitMatch} from a {@link Uri}
@@ -56,9 +56,11 @@ public static CommitMatch getCommit(Uri uri) {
if (!CommitUtils.isValidCommit(commit))
return null;
- Repository repository = new Repository();
- repository.setName(repoName);
- repository.setOwner(new User().setLogin(repoOwner));
+ Repo repository = new Repo();
+ User owner = new User();
+ owner.login = repoOwner;
+ repository.name = repoName;
+ repository.owner = owner;
return new CommitMatch(repository, commit);
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java b/app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java
index f7bff1b25..fbacf2bd1 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistEventMatcher.java
@@ -15,12 +15,13 @@
*/
package com.github.pockethub.core.gist;
-import static org.eclipse.egit.github.core.event.Event.TYPE_GIST;
+import com.alorma.github.sdk.bean.dto.response.Gist;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+import com.alorma.github.sdk.bean.dto.response.events.EventType;
+import com.alorma.github.sdk.bean.dto.response.events.payload.GithubEventPayload;
+import com.github.pockethub.api.GistEventPayload;
+import com.google.gson.Gson;
-import org.eclipse.egit.github.core.Gist;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.EventPayload;
-import org.eclipse.egit.github.core.event.GistPayload;
/**
* Helper to find a {@link Gist} to open for an event
@@ -33,15 +34,18 @@ public class GistEventMatcher {
* @param event
* @return gist or null if event doesn't apply
*/
- public Gist getGist(final Event event) {
+ public Gist getGist(final GithubEvent event) {
if (event == null)
return null;
- EventPayload payload = event.getPayload();
- if (payload == null)
+ if (event.payload == null)
return null;
- String type = event.getType();
- if (TYPE_GIST.equals(type))
- return ((GistPayload) payload).getGist();
+
+ Gson gson = new Gson();
+ String json = gson.toJson(event.payload);
+
+ EventType type = event.getType();
+ if (EventType.GistEvent.equals(type))
+ return (gson.fromJson(json, GistEventPayload.class)).gist;
else
return null;
}
diff --git a/app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java b/app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java
index abb7ec204..63d69bbab 100644
--- a/app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/gist/GistUriMatcher.java
@@ -21,7 +21,7 @@
import java.util.List;
import java.util.regex.Pattern;
-import org.eclipse.egit.github.core.Gist;
+import com.alorma.github.sdk.bean.dto.response.Gist;
/**
* Parses a {@link Gist} from a {@link Uri}
@@ -47,11 +47,13 @@ public static Gist getGist(final Uri uri) {
if (TextUtils.isEmpty(gistId))
return null;
+ Gist gist = new Gist();
+ gist.id = gistId;
if (TextUtils.isDigitsOnly(gistId))
- return new Gist().setId(gistId);
+ return gist;
if (PATTERN.matcher(gistId).matches())
- return new Gist().setId(gistId);
+ return gist;
return null;
}
diff --git a/app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java b/app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java
index 74e4e6db9..06f521bf7 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueEventMatcher.java
@@ -15,16 +15,15 @@
*/
package com.github.pockethub.core.issue;
-import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUES;
-import static org.eclipse.egit.github.core.event.Event.TYPE_ISSUE_COMMENT;
-import static org.eclipse.egit.github.core.event.Event.TYPE_PULL_REQUEST;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+import com.alorma.github.sdk.bean.dto.response.events.payload.GithubEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.IssueCommentEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.IssueEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.PullRequestEventPayload;
+import com.google.gson.Gson;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.EventPayload;
-import org.eclipse.egit.github.core.event.IssueCommentPayload;
-import org.eclipse.egit.github.core.event.IssuesPayload;
-import org.eclipse.egit.github.core.event.PullRequestPayload;
+import java.util.Objects;
/**
* Helper to find an issue to open for an event
@@ -37,21 +36,24 @@ public class IssueEventMatcher {
* @param event
* @return issue or null if event doesn't apply
*/
- public Issue getIssue(Event event) {
+ public Issue getIssue(GithubEvent event) {
if (event == null)
return null;
- EventPayload payload = event.getPayload();
- if (payload == null)
- return null;
- String type = event.getType();
- if (TYPE_ISSUES.equals(type))
- return ((IssuesPayload) payload).getIssue();
- else if (TYPE_ISSUE_COMMENT.equals(type))
- return ((IssueCommentPayload) payload).getIssue();
- else if (TYPE_PULL_REQUEST.equals(type))
- return IssueUtils.toIssue(((PullRequestPayload) payload)
- .getPullRequest());
- else
+ if (event.payload == null)
return null;
+
+ Gson gson = new Gson();
+ String json = gson.toJson(event.payload);
+
+ switch (event.type) {
+ case IssuesEvent:
+ return gson.fromJson(json, IssueEventPayload.class).issue;
+ case IssueCommentEvent:
+ return gson.fromJson(json, IssueCommentEventPayload.class).issue;
+ case PullRequestEvent:
+ return gson.fromJson(json, PullRequestEventPayload.class).pull_request;
+ default:
+ return null;
+ }
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java b/app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java
index 06442e3e9..78e2e540e 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueUriMatcher.java
@@ -18,13 +18,14 @@
import android.net.Uri;
import android.text.TextUtils;
+import com.alorma.github.sdk.bean.dto.response.Issue;
import com.github.pockethub.core.repo.RepositoryUtils;
import java.util.List;
-import org.eclipse.egit.github.core.Repository;
+import com.alorma.github.sdk.bean.dto.response.Repo;
import org.eclipse.egit.github.core.RepositoryIssue;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Parses a {@link RepositoryIssue} from a {@link Uri}
@@ -38,7 +39,7 @@ public class IssueUriMatcher {
* @return {@link RepositoryIssue} or null if none found in given
* {@link Uri}
*/
- public static RepositoryIssue getIssue(Uri uri) {
+ public static Issue getIssue(Uri uri) {
List segments = uri.getPathSegments();
if (segments == null)
return null;
@@ -68,12 +69,15 @@ public static RepositoryIssue getIssue(Uri uri) {
if (issueNumber < 1)
return null;
- Repository repo = new Repository();
- repo.setName(repoName);
- repo.setOwner(new User().setLogin(repoOwner));
- RepositoryIssue issue = new RepositoryIssue();
- issue.setRepository(repo);
- issue.setNumber(issueNumber);
+ Repo repo = new Repo();
+ User owner = new User();
+ owner.login = repoOwner;
+ repo.name = repoName;
+ repo.owner = owner;
+
+ Issue issue = new Issue();
+ issue.repository = repo;
+ issue.number = issueNumber;
return issue;
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java b/app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java
index 5ffaeff76..e132f8a71 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RepositoryEventMatcher.java
@@ -15,18 +15,14 @@
*/
package com.github.pockethub.core.repo;
-import static org.eclipse.egit.github.core.event.Event.TYPE_CREATE;
-import static org.eclipse.egit.github.core.event.Event.TYPE_FORK;
-import static org.eclipse.egit.github.core.event.Event.TYPE_PUBLIC;
-import static org.eclipse.egit.github.core.event.Event.TYPE_WATCH;
import android.text.TextUtils;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.EventPayload;
-import org.eclipse.egit.github.core.event.EventRepository;
-import org.eclipse.egit.github.core.event.ForkPayload;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.events.EventType;
+import com.alorma.github.sdk.bean.dto.response.events.payload.ForkEventPayload;
+import com.github.pockethub.util.ConvertUtils;
+import com.google.gson.Gson;
/**
* Helper to find a {@link RepositoryEventMatcher} to open for an event
@@ -34,65 +30,31 @@
public class RepositoryEventMatcher {
/**
- * Get {@link Repository} from {@link EventRepository} and actor
- *
- * @param repo
- * @param actor
- * @param org
- * @return possibly null repository
- */
- public static Repository getRepository(final EventRepository repo,
- User actor, User org) {
- if (repo == null)
- return null;
-
- String id = repo.getName();
- int slash = id.indexOf('/');
- if (slash == -1 || slash + 1 >= id.length())
- return null;
-
- Repository full = new Repository();
- full.setId(repo.getId());
- full.setName(id.substring(slash + 1));
- String login = id.substring(0, slash);
- // Use actor if it matches login parsed from repository id
- if (actor != null && login.equals(actor.getLogin()))
- full.setOwner(actor);
- else if (org != null && login.equals(org.getLogin()))
- full.setOwner(org);
- else
- full.setOwner(new User().setLogin(id.substring(0, slash)));
- return full;
- }
-
- /**
- * Get {@link Repository} from event
+ * Get {@link Repo} from event
*
* @param event
* @return gist or null if event doesn't apply
*/
- public Repository getRepository(final Event event) {
+ public Repo getRepository(final GithubEvent event) {
if (event == null)
return null;
- EventPayload payload = event.getPayload();
- if (payload == null)
+ if (event.payload == null)
return null;
- String type = event.getType();
- if (TYPE_FORK.equals(type)) {
- Repository repository = ((ForkPayload) payload).getForkee();
+ EventType type = event.getType();
+ if (EventType.ForkEvent.equals(type)) {
+ Repo repository = ((ForkEventPayload)event.payload).forkee;
// Verify repository has valid name and owner
- if (repository != null && !TextUtils.isEmpty(repository.getName())
- && repository.getOwner() != null
- && !TextUtils.isEmpty(repository.getOwner().getLogin()))
+ if (repository != null && !TextUtils.isEmpty(repository.name)
+ && repository.owner!= null
+ && !TextUtils.isEmpty(repository.owner.login))
return repository;
}
- if (TYPE_CREATE.equals(type) || TYPE_WATCH.equals(type)
- || TYPE_PUBLIC.equals(type))
- return getRepository(event.getRepo(), event.getActor(),
- event.getOrg());
+ if (EventType.CreateEvent.equals(type) || EventType.WatchEvent.equals(type)
+ || EventType.PublicEvent.equals(type))
+ return ConvertUtils.eventRepoToRepo(event.repo);
return null;
}
diff --git a/app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java
index c01291557..dfc02e8c6 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUriMatcher.java
@@ -19,21 +19,21 @@
import java.util.List;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
- * Parses a {@link Repository} from a {@link Uri}
+ * Parses a {@link Repo} from a {@link Uri}
*/
public class RepositoryUriMatcher {
/**
- * Attempt to parse a {@link Repository} from the given {@link Uri}
+ * Attempt to parse a {@link Repo} from the given {@link Uri}
*
* @param uri
- * @return {@link Repository} or null if unparseable
+ * @return {@link Repo} or null if unparseable
*/
- public static Repository getRepository(Uri uri) {
+ public static Repo getRepository(Uri uri) {
List segments = uri.getPathSegments();
if (segments == null)
return null;
@@ -48,9 +48,11 @@ public static Repository getRepository(Uri uri) {
if (!RepositoryUtils.isValidRepo(repoName))
return null;
- Repository repository = new Repository();
- repository.setName(repoName);
- repository.setOwner(new User().setLogin(repoOwner));
+ Repo repository = new Repo();
+ User owner = new User();
+ owner.login = repoOwner;
+ repository.name = repoName;
+ repository.owner = owner;
return repository;
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/user/UserComparator.java b/app/src/main/java/com/github/pockethub/core/user/UserComparator.java
index 03e610e00..ad1e2452b 100644
--- a/app/src/main/java/com/github/pockethub/core/user/UserComparator.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserComparator.java
@@ -17,18 +17,19 @@
import static java.lang.String.CASE_INSENSITIVE_ORDER;
+import com.alorma.github.sdk.bean.dto.response.Organization;
import com.github.pockethub.accounts.GitHubAccount;
import com.google.inject.Inject;
import java.util.Comparator;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Sorts users and orgs in alphabetical order with special handling to put
* currently authenticated user first.
*/
-public class UserComparator implements Comparator {
+public class UserComparator implements Comparator {
private final String login;
@@ -43,9 +44,9 @@ public UserComparator(final GitHubAccount account) {
}
@Override
- public int compare(final User lhs, final User rhs) {
- final String lhsLogin = lhs.getLogin();
- final String rhsLogin = rhs.getLogin();
+ public int compare(final Organization lhs, final Organization rhs) {
+ final String lhsLogin = lhs.login;
+ final String rhsLogin = rhs.login;
if (lhsLogin.equals(login))
return rhsLogin.equals(login) ? 0 : -1;
diff --git a/app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java b/app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java
index fb69fb58f..4d4d8d03a 100644
--- a/app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserEventMatcher.java
@@ -15,20 +15,21 @@
*/
package com.github.pockethub.core.user;
-import static org.eclipse.egit.github.core.event.Event.TYPE_FOLLOW;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.EventPayload;
-import org.eclipse.egit.github.core.event.FollowPayload;
+import com.alorma.github.sdk.bean.dto.response.GithubEvent;
+import com.alorma.github.sdk.bean.dto.response.User;
+import com.alorma.github.sdk.bean.dto.response.events.EventType;
+import com.github.pockethub.api.FollowEventPayload;
+import com.alorma.github.sdk.bean.dto.response.events.payload.GithubEventPayload;
+import com.google.gson.Gson;
/**
- * Matches a {@link User} in an {@link Event}
+ * Matches a {@link User} in an {@link GithubEvent}
*/
public class UserEventMatcher {
/**
- * Pair of users in an {@link Event}
+ * Pair of users in an {@link GithubEvent}
*/
public static class UserPair {
@@ -54,18 +55,20 @@ private UserPair(final User from, final User to) {
* @param event
* @return user or null if event doesn't apply
*/
- public UserPair getUsers(final Event event) {
+ public UserPair getUsers(final GithubEvent event) {
if (event == null)
return null;
- EventPayload payload = event.getPayload();
- if (payload == null)
+ if (event.payload == null)
return null;
- String type = event.getType();
- if (TYPE_FOLLOW.equals(type)) {
- User from = event.getActor();
- User to = ((FollowPayload) event.getPayload()).getTarget();
+ Gson gson = new Gson();
+ String json = gson.toJson(event.payload);
+
+ EventType type = event.getType();
+ if (EventType.FollowEvent.equals(type)) {
+ User from = event.actor;
+ User to = gson.fromJson(json, FollowEventPayload.class).target;
if (from != null && to != null)
return new UserPair(from, to);
}
diff --git a/app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java b/app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java
index 5528d6587..5498942cb 100644
--- a/app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java
+++ b/app/src/main/java/com/github/pockethub/core/user/UserUriMatcher.java
@@ -21,7 +21,7 @@
import java.util.List;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Parses a {@link User} from a {@link Uri}
@@ -44,7 +44,8 @@ public static User getUser(Uri uri) {
String login = segments.get(0);
if (!RepositoryUtils.isValidOwner(login))
return null;
-
- return new User().setLogin(login);
+ User user = new User();
+ user.login = login;
+ return user;
}
}
diff --git a/app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java
index fc5ecefe3..fb96e8b72 100644
--- a/app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java
+++ b/app/src/main/java/com/github/pockethub/ui/commit/CommitFileComparator.java
@@ -15,11 +15,12 @@
*/
package com.github.pockethub.ui.commit;
+import com.alorma.github.sdk.bean.dto.response.CommitFile;
+
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import java.util.Comparator;
-import org.eclipse.egit.github.core.CommitFile;
/**
* Comparator for commit files
@@ -28,12 +29,12 @@ public class CommitFileComparator implements Comparator {
@Override
public int compare(final CommitFile lhs, final CommitFile rhs) {
- String lPath = lhs.getFilename();
+ String lPath = lhs.filename;
final int lSlash = lPath.lastIndexOf('/');
if (lSlash != -1)
lPath = lPath.substring(lSlash + 1);
- String rPath = rhs.getFilename();
+ String rPath = rhs.filename;
final int rSlash = rPath.lastIndexOf('/');
if (rSlash != -1)
rPath = rPath.substring(rSlash + 1);
From be85b6c896e7dc6ef516ba4b6fe79d2575e42e7f Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:40:36 +0200
Subject: [PATCH 093/561] Utils updated to use new SDK (Some slipped in here:
8a648ca)
---
.../pockethub/core/commit/CommitUtils.java | 91 +++++++++----------
.../pockethub/core/issue/IssueUtils.java | 43 ++++-----
.../github/pockethub/core/ref/RefUtils.java | 25 ++---
.../pockethub/core/repo/RepositoryUtils.java | 14 +--
4 files changed, 88 insertions(+), 85 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java b/app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java
index ec8c52ba2..92cf2726a 100644
--- a/app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/commit/CommitUtils.java
@@ -18,19 +18,18 @@
import android.text.TextUtils;
import android.widget.ImageView;
+import com.alorma.github.sdk.bean.dto.response.Commit;
+import com.alorma.github.sdk.bean.dto.response.CommitFile;
+import com.alorma.github.sdk.bean.dto.response.GitCommit;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.pockethub.ui.StyledText;
import com.github.pockethub.util.AvatarLoader;
+import com.github.pockethub.util.TimeUtils;
import java.text.NumberFormat;
import java.util.Collection;
import java.util.Date;
-import org.eclipse.egit.github.core.Commit;
-import org.eclipse.egit.github.core.CommitFile;
-import org.eclipse.egit.github.core.CommitUser;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.eclipse.egit.github.core.User;
-
/**
* Utilities for working with commits
*/
@@ -50,8 +49,8 @@ public class CommitUtils {
* @param commit
* @return abbreviated sha
*/
- public static String abbreviate(final RepositoryCommit commit) {
- return commit != null ? abbreviate(commit.getSha()) : null;
+ public static String abbreviate(final Commit commit) {
+ return commit != null ? abbreviate(commit.sha) : null;
}
/**
@@ -60,8 +59,8 @@ public static String abbreviate(final RepositoryCommit commit) {
* @param commit
* @return abbreviated sha
*/
- public static String abbreviate(final Commit commit) {
- return commit != null ? abbreviate(commit.getSha()) : null;
+ public static String abbreviate(final GitCommit commit) {
+ return commit != null ? abbreviate(commit.sha) : null;
}
/**
@@ -90,45 +89,45 @@ public static boolean isValidCommit(final String sha) {
/**
* Get author of commit
*
- * This checks both the {@link RepositoryCommit} and the underlying
+ * This checks both the {@link Commit} and the underlying
* {@link Commit} to retrieve a name
*
* @param commit
* @return author name or null if missing
*/
- public static String getAuthor(final RepositoryCommit commit) {
- User author = commit.getAuthor();
+ public static String getAuthor(final Commit commit) {
+ User author = commit.author;
if (author != null)
- return author.getLogin();
+ return author.login;
- Commit rawCommit = commit.getCommit();
+ GitCommit rawCommit = commit.commit;
if (rawCommit == null)
return null;
- CommitUser commitAuthor = rawCommit.getAuthor();
- return commitAuthor != null ? commitAuthor.getName() : null;
+ User commitAuthor = rawCommit.author;
+ return commitAuthor != null ? commitAuthor.login : null;
}
/**
* Get committer of commit
*
- * This checks both the {@link RepositoryCommit} and the underlying
+ * This checks both the {@link Commit} and the underlying
* {@link Commit} to retrieve a name
*
* @param commit
* @return committer name or null if missing
*/
- public static String getCommitter(final RepositoryCommit commit) {
- User committer = commit.getCommitter();
+ public static String getCommitter(final Commit commit) {
+ User committer = commit.committer;
if (committer != null)
- return committer.getLogin();
+ return committer.login;
- Commit rawCommit = commit.getCommit();
+ GitCommit rawCommit = commit.commit;
if (rawCommit == null)
return null;
- CommitUser commitCommitter = rawCommit.getCommitter();
- return commitCommitter != null ? commitCommitter.getName() : null;
+ User commitCommitter = rawCommit.committer;
+ return commitCommitter != null ? commitCommitter.login : null;
}
/**
@@ -137,13 +136,13 @@ public static String getCommitter(final RepositoryCommit commit) {
* @param commit
* @return author name or null if missing
*/
- public static Date getAuthorDate(final RepositoryCommit commit) {
- Commit rawCommit = commit.getCommit();
+ public static Date getAuthorDate(final Commit commit) {
+ GitCommit rawCommit = commit.commit;
if (rawCommit == null)
return null;
- CommitUser commitAuthor = rawCommit.getAuthor();
- return commitAuthor != null ? commitAuthor.getDate() : null;
+ User commitAuthor = rawCommit.author;
+ return commitAuthor != null && commitAuthor.date != null ? TimeUtils.stringToDate(commitAuthor.date) : null;
}
/**
@@ -152,13 +151,13 @@ public static Date getAuthorDate(final RepositoryCommit commit) {
* @param commit
* @return author name or null if missing
*/
- public static Date getCommitterDate(final RepositoryCommit commit) {
- Commit rawCommit = commit.getCommit();
+ public static Date getCommitterDate(final Commit commit) {
+ GitCommit rawCommit = commit.commit;
if (rawCommit == null)
return null;
- CommitUser commitCommitter = rawCommit.getCommitter();
- return commitCommitter != null ? commitCommitter.getDate() : null;
+ User commitCommitter = rawCommit.committer;
+ return commitCommitter != null && commitCommitter.date != null? TimeUtils.stringToDate(commitCommitter.date): null;
}
/**
@@ -169,15 +168,15 @@ public static Date getCommitterDate(final RepositoryCommit commit) {
* @param view
* @return view
*/
- public static ImageView bindAuthor(final RepositoryCommit commit,
+ public static ImageView bindAuthor(final Commit commit,
final AvatarLoader avatars, final ImageView view) {
- User author = commit.getAuthor();
+ User author = commit.author;
if (author != null)
avatars.bind(view, author);
else {
- Commit rawCommit = commit.getCommit();
+ GitCommit rawCommit = commit.commit;
if (rawCommit != null)
- avatars.bind(view, rawCommit.getAuthor());
+ avatars.bind(view, rawCommit.author);
}
return view;
}
@@ -190,15 +189,15 @@ public static ImageView bindAuthor(final RepositoryCommit commit,
* @param view
* @return view
*/
- public static ImageView bindCommitter(final RepositoryCommit commit,
+ public static ImageView bindCommitter(final Commit commit,
final AvatarLoader avatars, final ImageView view) {
- User committer = commit.getCommitter();
+ User committer = commit.committer;
if (committer != null)
avatars.bind(view, committer);
else {
- Commit rawCommit = commit.getCommit();
+ GitCommit rawCommit = commit.commit;
if (rawCommit != null)
- avatars.bind(view, rawCommit.getCommitter());
+ avatars.bind(view, rawCommit.committer);
}
return view;
}
@@ -209,10 +208,10 @@ public static ImageView bindCommitter(final RepositoryCommit commit,
* @param commit
* @return count
*/
- public static String getCommentCount(final RepositoryCommit commit) {
- final Commit rawCommit = commit.getCommit();
+ public static String getCommentCount(final Commit commit) {
+ final GitCommit rawCommit = commit.commit;
if (rawCommit != null)
- return FORMAT.format(rawCommit.getCommentCount());
+ return FORMAT.format(rawCommit.comment_count);
else
return "0";
}
@@ -230,8 +229,8 @@ public static StyledText formatStats(final Collection files) {
int changed = 0;
if (files != null)
for (CommitFile file : files) {
- added += file.getAdditions();
- deleted += file.getDeletions();
+ added += file.additions;
+ deleted += file.deletions;
changed++;
}
@@ -262,7 +261,7 @@ public static StyledText formatStats(final Collection files) {
* @return last segment of commit file path
*/
public static String getName(final CommitFile file) {
- return file != null ? getName(file.getFilename()) : null;
+ return file != null ? getName(file.getFileName()) : null;
}
/**
diff --git a/app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java b/app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java
index d171cc461..562a48fd3 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueUtils.java
@@ -17,8 +17,9 @@
import android.text.TextUtils;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.PullRequest;
+import com.alorma.github.sdk.PullRequest;
+import com.alorma.github.sdk.bean.dto.response.Issue;
+
/**
* Utilities for working with {@link Issue} models
@@ -32,8 +33,8 @@ public class IssueUtils {
* @return true if pull request, false otherwise
*/
public static boolean isPullRequest(final Issue issue) {
- return issue != null && issue.getPullRequest() != null
- && !TextUtils.isEmpty(issue.getPullRequest().getHtmlUrl());
+ return issue != null && issue.pullRequest != null
+ && !TextUtils.isEmpty(issue.pullRequest.html_url);
}
/**
@@ -47,23 +48,23 @@ public static Issue toIssue(final PullRequest pullRequest) {
return null;
Issue issue = new Issue();
- issue.setAssignee(pullRequest.getAssignee());
- issue.setBody(pullRequest.getBody());
- issue.setBodyHtml(pullRequest.getBodyHtml());
- issue.setBodyText(pullRequest.getBodyText());
- issue.setClosedAt(pullRequest.getClosedAt());
- issue.setComments(pullRequest.getComments());
- issue.setCreatedAt(pullRequest.getCreatedAt());
- issue.setHtmlUrl(pullRequest.getHtmlUrl());
- issue.setId(pullRequest.getId());
- issue.setMilestone(pullRequest.getMilestone());
- issue.setNumber(pullRequest.getNumber());
- issue.setPullRequest(pullRequest);
- issue.setState(pullRequest.getState());
- issue.setTitle(pullRequest.getTitle());
- issue.setUpdatedAt(pullRequest.getUpdatedAt());
- issue.setUrl(pullRequest.getUrl());
- issue.setUser(pullRequest.getUser());
+ issue.assignee = pullRequest.assignee;
+ issue.body = pullRequest.body;
+ issue.body_html = pullRequest.body_html;
+ issue.body = pullRequest.body;
+ issue.closedAt = pullRequest.closedAt;
+ issue.comments = pullRequest.comments;
+ issue.created_at = pullRequest.created_at;
+ issue.html_url = pullRequest.html_url;
+ issue.number = pullRequest.number;
+ issue.milestone = pullRequest.milestone;
+ issue.id = pullRequest.id;
+ issue.pullRequest = pullRequest;
+ issue.state = pullRequest.state;
+ issue.title = pullRequest.title;
+ issue.updated_at = pullRequest.updated_at;
+ issue.url = pullRequest.url;
+ issue.user = pullRequest.user;
return issue;
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/ref/RefUtils.java b/app/src/main/java/com/github/pockethub/core/ref/RefUtils.java
index 187118b7f..0adb5b39c 100644
--- a/app/src/main/java/com/github/pockethub/core/ref/RefUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/ref/RefUtils.java
@@ -17,10 +17,11 @@
import android.text.TextUtils;
-import org.eclipse.egit.github.core.Reference;
+import com.alorma.github.sdk.bean.dto.response.GitReference;
+
/**
- * Utilities for working with {@link Reference}s
+ * Utilities for working with {@link GitReference}s
*/
public class RefUtils {
@@ -38,9 +39,9 @@ public class RefUtils {
* @param ref
* @return true if branch, false otherwise
*/
- public static boolean isBranch(final Reference ref) {
+ public static boolean isBranch(final GitReference ref) {
if (ref != null) {
- String name = ref.getRef();
+ String name = ref.ref;
return !TextUtils.isEmpty(name) && name.startsWith(PREFIX_HEADS);
} else
return false;
@@ -52,8 +53,8 @@ public static boolean isBranch(final Reference ref) {
* @param ref
* @return true if tag, false otherwise
*/
- public static boolean isTag(final Reference ref) {
- return ref != null && isTag(ref.getRef());
+ public static boolean isTag(final GitReference ref) {
+ return ref != null && isTag(ref.ref);
}
/**
@@ -72,10 +73,10 @@ public static boolean isTag(final String name) {
* @param ref
* @return full path
*/
- public static String getPath(final Reference ref) {
+ public static String getPath(final GitReference ref) {
if (ref == null)
return null;
- String name = ref.getRef();
+ String name = ref.ref;
if (!TextUtils.isEmpty(name) && name.startsWith(PREFIX_REFS))
return name.substring(PREFIX_REFS.length());
else
@@ -88,9 +89,9 @@ public static String getPath(final Reference ref) {
* @param ref
* @return short name
*/
- public static String getName(final Reference ref) {
+ public static String getName(final GitReference ref) {
if (ref != null)
- return getName(ref.getRef());
+ return getName(ref.ref);
else
return null;
}
@@ -122,11 +123,11 @@ else if (name.startsWith(PREFIX_REFS))
* @param ref
* @return true if valid, false otherwise
*/
- public static boolean isValid(final Reference ref) {
+ public static boolean isValid(final GitReference ref) {
if (ref == null)
return false;
- String name = ref.getRef();
+ String name = ref.ref;
return !TextUtils.isEmpty(name) && !name.startsWith(PREFIX_PULL);
}
}
diff --git a/app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java
index 62577ad81..4d1dadfb0 100644
--- a/app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java
+++ b/app/src/main/java/com/github/pockethub/core/repo/RepositoryUtils.java
@@ -17,10 +17,12 @@
import android.text.TextUtils;
-import org.eclipse.egit.github.core.Repository;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+
+import com.alorma.github.sdk.bean.dto.response.Repo;
/**
- * Utilities for working with {@link Repository} objects
+ * Utilities for working with {@link Repo} objects
*/
public class RepositoryUtils {
@@ -35,10 +37,10 @@ public class RepositoryUtils {
* @return true if complete, false otherwise
*
*/
- public static boolean isComplete(final Repository repository) {
- return repository.isPrivate() || repository.isFork()
- || repository.getForks() > 0 || repository.getWatchers() > 0
- || repository.isHasIssues();
+ public static boolean isComplete(final Repo repository) {
+ return repository.isPrivate || repository.fork
+ || repository.forks_count > 0 || repository.watchers_count > 0
+ || repository.has_issues;
}
/**
From 154cfb4912df4d41ade49ca11a56a5139c5395c9 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:41:40 +0200
Subject: [PATCH 094/561] IssueFilter updated to use new SDK
---
.../pockethub/core/issue/IssueFilter.java | 92 +++++++++++++------
1 file changed, 65 insertions(+), 27 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java b/app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java
index 7541e1ef4..5ed161373 100644
--- a/app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java
+++ b/app/src/main/java/com/github/pockethub/core/issue/IssueFilter.java
@@ -15,6 +15,9 @@
*/
package com.github.pockethub.core.issue;
+import android.os.Parcel;
+import android.os.Parcelable;
+
import static java.lang.String.CASE_INSENSITIVE_ORDER;
import static org.eclipse.egit.github.core.service.IssueService.DIRECTION_DESCENDING;
import static org.eclipse.egit.github.core.service.IssueService.FIELD_DIRECTION;
@@ -38,22 +41,22 @@
import java.util.Set;
import java.util.TreeSet;
-import org.eclipse.egit.github.core.Label;
-import org.eclipse.egit.github.core.Milestone;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
+import com.alorma.github.sdk.bean.dto.response.Label;
+import com.alorma.github.sdk.bean.dto.response.Milestone;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
/**
* Issue filter containing at least one valid query
*/
-public class IssueFilter implements Serializable, Cloneable, Comparator {
+public class IssueFilter implements Parcelable, Cloneable, Comparator {
/** serialVersionUID */
private static final long serialVersionUID = 7310646589186299063L;
- private final Repository repository;
+ private final Repo repository;
- private Set labels;
+ private List labels;
private Milestone milestone;
@@ -66,11 +69,32 @@ public class IssueFilter implements Serializable, Cloneable, Comparator {
*
* @param repository
*/
- public IssueFilter(final Repository repository) {
+ public IssueFilter(final Repo repository) {
this.repository = repository;
open = true;
}
+ protected IssueFilter(Parcel in) {
+ repository = in.readParcelable(Repo.class.getClassLoader());
+ labels = new ArrayList<>();
+ in.readTypedList(labels, Label.CREATOR);
+ milestone = in.readParcelable(Milestone.class.getClassLoader());
+ assignee = in.readParcelable(User.class.getClassLoader());
+ open = in.readByte() != 0;
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public IssueFilter createFromParcel(Parcel in) {
+ return new IssueFilter(in);
+ }
+
+ @Override
+ public IssueFilter[] newArray(int size) {
+ return new IssueFilter[size];
+ }
+ };
+
/**
* Set only open issues to be returned
*
@@ -93,7 +117,7 @@ public IssueFilter addLabel(Label label) {
if (label == null)
return this;
if (labels == null)
- labels = new TreeSet<>(this);
+ labels = new ArrayList<>();
labels.add(label);
return this;
}
@@ -105,7 +129,7 @@ public IssueFilter addLabel(Label label) {
public IssueFilter setLabels(Collection labels) {
if (labels != null && !labels.isEmpty()) {
if (this.labels == null)
- this.labels = new TreeSet<>(this);
+ this.labels = new ArrayList<>();
else
this.labels.clear();
this.labels.addAll(labels);
@@ -117,14 +141,14 @@ public IssueFilter setLabels(Collection labels) {
/**
* @return labels
*/
- public Set getLabels() {
+ public List getLabels() {
return labels;
}
/**
* @return repository
*/
- public Repository getRepository() {
+ public Repo getRepository() {
return repository;
}
@@ -181,16 +205,16 @@ public Map toFilterMap() {
filter.put(FIELD_DIRECTION, DIRECTION_DESCENDING);
if (assignee != null)
- filter.put(FILTER_ASSIGNEE, assignee.getLogin());
+ filter.put(FILTER_ASSIGNEE, assignee.login);
if (milestone != null)
filter.put(FILTER_MILESTONE,
- Integer.toString(milestone.getNumber()));
+ Integer.toString(milestone.number));
if (labels != null && !labels.isEmpty()) {
StringBuilder labelsQuery = new StringBuilder();
for (Label label : labels)
- labelsQuery.append(label.getName()).append(',');
+ labelsQuery.append(label.name).append(',');
filter.put(FILTER_LABELS, labelsQuery.toString());
}
@@ -214,15 +238,15 @@ public CharSequence toDisplay() {
segments.add("Closed issues");
if (assignee != null)
- segments.add("Assignee: " + assignee.getLogin());
+ segments.add("Assignee: " + assignee.login);
if (milestone != null)
- segments.add("Milestone: " + milestone.getTitle());
+ segments.add("Milestone: " + milestone.title);
if (labels != null && !labels.isEmpty()) {
StringBuilder builder = new StringBuilder("Labels: ");
for (Label label : labels)
- builder.append(label.getName()).append(',').append(' ');
+ builder.append(label.name).append(',').append(' ');
builder.deleteCharAt(builder.length() - 1);
builder.deleteCharAt(builder.length() - 1);
segments.add(builder.toString());
@@ -242,10 +266,10 @@ public CharSequence toDisplay() {
@Override
public int hashCode() {
return Arrays.hashCode(new Object[] { open,
- assignee != null ? assignee.getId() : null,
- milestone != null ? milestone.getNumber() : null,
- assignee != null ? assignee.getId() : null,
- repository != null ? repository.getId() : null, labels });
+ assignee != null ? assignee.id : null,
+ milestone != null ? milestone.number : null,
+ assignee != null ? assignee.id : null,
+ repository != null ? repository.id : null, labels });
}
private boolean isEqual(Object a, Object b) {
@@ -257,17 +281,17 @@ private boolean isEqual(Object a, Object b) {
private boolean isEqual(Milestone a, Milestone b) {
if (a == null && b == null)
return true;
- return a != null && b != null && a.getNumber() == b.getNumber();
+ return a != null && b != null && a.number == b.number;
}
private boolean isEqual(User a, User b) {
if (a == null && b == null)
return true;
- return a != null && b != null && a.getId() == b.getId();
+ return a != null && b != null && a.id == b.id;
}
- private boolean isEqual(Repository a, Repository b) {
- return a != null && b != null && a.getId() == b.getId();
+ private boolean isEqual(Repo a, Repo b) {
+ return a != null && b != null && a.id == b.id;
}
@Override
@@ -296,6 +320,20 @@ public IssueFilter clone() {
@Override
public int compare(Label lhs, Label rhs) {
- return CASE_INSENSITIVE_ORDER.compare(lhs.getName(), rhs.getName());
+ return CASE_INSENSITIVE_ORDER.compare(lhs.name, rhs.name);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeParcelable(repository, flags);
+ dest.writeTypedList(labels);
+ dest.writeParcelable(milestone, flags);
+ dest.writeParcelable(assignee, flags);
+ dest.writeByte((byte) (open ? 1 : 0));
}
}
From 310db00bb69c49736c3b4cbede290341d1c0af5b Mon Sep 17 00:00:00 2001
From: Henrik
Date: Wed, 23 Sep 2015 16:42:41 +0200
Subject: [PATCH 095/561] Sync and persistence updated to use new SDK
---
.../persistence/AccountDataManager.java | 10 +-
.../persistence/OrganizationRepositories.java | 128 +++++++++---------
.../pockethub/persistence/Organizations.java | 44 +++---
.../github/pockethub/sync/SyncCampaign.java | 9 +-
4 files changed, 96 insertions(+), 95 deletions(-)
diff --git a/app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java b/app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java
index c13d8c56e..70f637696 100644
--- a/app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java
+++ b/app/src/main/java/com/github/pockethub/persistence/AccountDataManager.java
@@ -22,6 +22,9 @@
import android.database.sqlite.SQLiteQueryBuilder;
import android.util.Log;
+import com.alorma.github.sdk.bean.dto.response.Organization;
+import com.alorma.github.sdk.bean.dto.response.Repo;
+import com.alorma.github.sdk.bean.dto.response.User;
import com.github.pockethub.RequestFuture;
import com.github.pockethub.RequestReader;
import com.github.pockethub.RequestWriter;
@@ -41,9 +44,6 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.User;
-
/**
* Manager cache for an account
*/
@@ -154,7 +154,7 @@ protected Cursor query(SQLiteOpenHelper helper, String tables,
* @return list of user and Orgs
* @throws IOException
*/
- public List getOrgs(boolean forceReload) throws IOException {
+ public List getOrgs(boolean forceReload) throws IOException {
return forceReload ? dbCache.requestAndStore(userAndOrgsResource)
: dbCache.loadOrRequest(userAndOrgsResource);
}
@@ -171,7 +171,7 @@ public List getOrgs(boolean forceReload) throws IOException {
* @return list of repositories
* @throws IOException
*/
- public List