Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 4b085e4

Browse files
nitish1211Sam1301
authored andcommitted
Format code in the entire Module.
1 parent f6224f5 commit 4b085e4

23 files changed

+182
-191
lines changed

app/lint.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<lint>
3-
<issue id="GradleDependency" severity="ignore"/>
4-
<issue id="GradleDynamicVersion" severity="ignore"/>
5-
<issue id="GradleOverrides" severity="ignore"/>
6-
<issue id="OldTargetApi" severity="ignore"/>
3+
<issue id="GradleDependency" severity="ignore" />
4+
<issue id="GradleDynamicVersion" severity="ignore" />
5+
<issue id="GradleOverrides" severity="ignore" />
6+
<issue id="OldTargetApi" severity="ignore" />
77
<!-- Change the severity of hardcoded strings to "error"
88
when #260 is merged-->
99
<issue id="HardcodedText" severity="ignore" />
10-
<issue id="IconDensities" severity="ignore"/>
11-
<issue id="InvalidPackage" severity="ignore"/>
10+
<issue id="IconDensities" severity="ignore" />
11+
<issue id="InvalidPackage" severity="ignore" />
1212
<issue id="UnusedResources" severity="error">
13-
<ignore path="**/ic_person_24dp.png"/>
14-
<ignore path="**/ic_search_24dp.png"/>
13+
<ignore path="**/ic_person_24dp.png" />
14+
<ignore path="**/ic_search_24dp.png" />
1515
</issue>
16-
<issue id="UnusedNamespace" severity="error"/>
17-
<issue id="UnusedAttribute" severity="error"/>
18-
<issue id="Deprecated" severity="error"/>
19-
<issue id="Typos" severity="error"/>
20-
<issue id="SdCardPath" severity="error"/>
21-
<issue id="NewerVersionAvailable" severity="error"/>
16+
<issue id="UnusedNamespace" severity="error" />
17+
<issue id="UnusedAttribute" severity="error" />
18+
<issue id="Deprecated" severity="error" />
19+
<issue id="Typos" severity="error" />
20+
<issue id="SdCardPath" severity="error" />
21+
<issue id="NewerVersionAvailable" severity="error" />
2222
</lint>

app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@
2222
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
2323
<uses-permission android:name="android.permission.VIBRATE" />
2424

25-
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="13"
26-
tools:overrideLibrary="com.android.support:customtabs:23.3.0,android.support.customtabs"/>
25+
<uses-sdk
26+
android:minSdkVersion="13"
27+
android:targetSdkVersion="23"
28+
tools:overrideLibrary="com.android.support:customtabs:23.3.0,android.support.customtabs" />
2729

2830
<application
2931
android:name=".ZulipApp"
3032
android:allowBackup="false"
3133
android:icon="@drawable/ic_launcher"
3234
android:label="@string/app_name"
33-
android:theme="@style/AppTheme.DayNight.NoActionBar"
3435
android:supportsRtl="false"
36+
android:theme="@style/AppTheme.DayNight.NoActionBar"
3537
tools:ignore="GoogleAppIndexingWarning">
3638
<provider
3739
android:name="android.support.v4.content.FileProvider"
@@ -60,14 +62,12 @@
6062
</activity>
6163
<activity
6264
android:name=".activities.LoginActivity"
63-
android:label="@string/app_name"
64-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
65-
</activity>
65+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
66+
android:label="@string/app_name"></activity>
6667
<activity
6768
android:name=".activities.PhotoViewActivity"
6869
android:parentActivityName=".activities.ZulipActivity"
69-
tools:ignore="UnusedAttribute">
70-
</activity>
70+
tools:ignore="UnusedAttribute"></activity>
7171
<activity
7272
android:name=".activities.LegalActivity"
7373
android:label="@string/title_activity_legal" />

app/src/main/assets/legal.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
white-space: pre-wrap;
99
word-wrap: break-word;
1010
}
11+
1112
</style>
1213
</head>
1314
<body>

app/src/main/java/com/zulip/android/ZulipApp.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
import com.zulip.android.models.Emoji;
3131
import com.zulip.android.models.Message;
3232
import com.zulip.android.models.MessageType;
33+
import com.zulip.android.models.PeopleDrawerList;
3334
import com.zulip.android.models.Person;
3435
import com.zulip.android.models.Presence;
3536
import com.zulip.android.models.Stream;
36-
import com.zulip.android.models.PeopleDrawerList;
3737
import com.zulip.android.networking.AsyncUnreadMessagesUpdate;
3838
import com.zulip.android.networking.ZulipInterceptor;
3939
import com.zulip.android.networking.response.UserConfigurationResponse;
@@ -94,7 +94,7 @@ public class ZulipApp extends Application {
9494
* Map of recent PM person with their email
9595
* Updated when new private message is arrived
9696
*/
97-
public final Map<String,PeopleDrawerList> recentPMPersons = new ConcurrentHashMap<>();
97+
public final Map<String, PeopleDrawerList> recentPMPersons = new ConcurrentHashMap<>();
9898
// This object's intrinsic lock is used to prevent multiple threads from
9999
// making conflicting updates to ranges
100100
public Object updateRangeLock = new Object();
@@ -213,6 +213,10 @@ public ZulipServices getZulipServices() {
213213
return zulipServices;
214214
}
215215

216+
public void setZulipServices(ZulipServices zulipServices) {
217+
this.zulipServices = zulipServices;
218+
}
219+
216220
public ZulipServices getUploadServices() {
217221
if (uploadServices == null) {
218222
HttpLoggingInterceptor logging = new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.HEADERS);
@@ -229,10 +233,6 @@ public ZulipServices getUploadServices() {
229233
return uploadServices;
230234
}
231235

232-
public void setZulipServices(ZulipServices zulipServices) {
233-
this.zulipServices = zulipServices;
234-
}
235-
236236
public Gson getGson() {
237237
if (gson == null) {
238238
gson = buildGson();

app/src/main/java/com/zulip/android/activities/MessageListFragment.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
import com.zulip.android.networking.ZulipAsyncPushTask;
4343
import com.zulip.android.networking.response.EditResponse;
4444
import com.zulip.android.networking.response.RawMessageResponse;
45+
import com.zulip.android.networking.response.StarResponse;
4546
import com.zulip.android.networking.util.DefaultCallback;
4647
import com.zulip.android.util.CommonProgressDialog;
4748
import com.zulip.android.util.Constants;
48-
import com.zulip.android.networking.response.StarResponse;
4949
import com.zulip.android.util.MessageListener;
5050
import com.zulip.android.util.MutedTopics;
5151
import com.zulip.android.util.ZLog;
@@ -271,6 +271,7 @@ private void initializeNarrow() {
271271

272272
/**
273273
* Stars a message passed as parameter
274+
*
274275
* @param message Message to be starred
275276
*/
276277
private void starMessage(final Message message, final int position) {
@@ -299,6 +300,7 @@ public void onFailure(Call<StarResponse> call, Throwable t) {
299300

300301
/**
301302
* Unstars a message passed as parameter
303+
*
302304
* @param message Message to be unstarred
303305
*/
304306
private void unStarMessage(final Message message, final int position) {

app/src/main/java/com/zulip/android/activities/RefreshableCursorAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ public abstract class RefreshableCursorAdapter extends RecyclerView.Adapter<Recy
3131
private Context mContext;
3232
private ZulipApp mApp;
3333

34-
protected abstract void onPeopleSelect(int id);
35-
3634
RefreshableCursorAdapter(Context context, List<PeopleDrawerList> list, ZulipApp app) {
3735
this.mList = list;
3836
this.mContext = context;
3937
this.mApp = app;
4038
}
4139

40+
protected abstract void onPeopleSelect(int id);
41+
4242
void filterList(List<PeopleDrawerList> list) {
4343
this.mList = list;
4444
notifyDataSetChanged();

app/src/main/java/com/zulip/android/activities/ZulipActivity.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ public void onReceive(Context contenxt, Intent intent) {
229229
private LinearLayout composeStatus;
230230
private String tempStreamSave = null;
231231
private TopSnackBar topSnackBar;
232+
private NotificationManager mNotificationManager;
233+
private NotificationCompat.Builder mBuilder;
234+
private HashMap<Integer, Call<UploadResponse>> mCancelHashMap;
232235

233236
@Override
234237
public void removeChatBox(boolean animToRight) {
@@ -812,6 +815,7 @@ public void afterTextChanged(Editable s) {
812815

813816
/**
814817
* Filter'keyWords people drawer according to name
818+
*
815819
* @param keyWords removes names which don't contain keyWords
816820
*/
817821
private void filterPeopleDrawer(String keyWords) {
@@ -837,6 +841,7 @@ private void filterPeopleDrawer(String keyWords) {
837841

838842
/**
839843
* Refreshes recyclerView of people drawer
844+
*
840845
* @throws SQLException
841846
*/
842847
public void refreshPeopleDrawer() throws SQLException {
@@ -879,6 +884,7 @@ public void refreshPeopleDrawer() throws SQLException {
879884

880885
/**
881886
* Combine list of recent private messages persons and persons with no recent messages
887+
*
882888
* @param drawerLists persons with whom no recent messages
883889
*/
884890
private void combineList(List<PeopleDrawerList> drawerLists) {
@@ -1124,12 +1130,7 @@ private MultipartBody.Part prepareFilePart(String partName, final File file, int
11241130
return MultipartBody.Part.createFormData(partName, file.getName(), request);
11251131
}
11261132

1127-
private NotificationManager mNotificationManager;
1128-
private NotificationCompat.Builder mBuilder;
1129-
1130-
private HashMap<Integer, Call<UploadResponse>> mCancelHashMap;
1131-
1132-
public void cancelRequest(int notificationId) throws NullPointerException{
1133+
public void cancelRequest(int notificationId) throws NullPointerException {
11331134
Call<UploadResponse> call = mCancelHashMap.get(notificationId);
11341135
if (call != null) {
11351136
call.cancel();
@@ -1321,7 +1322,7 @@ private String getNotifTitle() {
13211322
if (filter == null) {
13221323
title = getString(R.string.app_name);
13231324
} else {
1324-
title = filter.getTitle() + (filter.getSubtitle() != null ? " > " + filter.getSubtitle() : "");
1325+
title = filter.getTitle() + (filter.getSubtitle() != null ? " > " + filter.getSubtitle() : "");
13251326
}
13261327
}
13271328

app/src/main/java/com/zulip/android/filters/NarrowFilterMentioned.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
package com.zulip.android.filters;
22

33
import android.os.Parcel;
4-
import android.support.v4.content.ContextCompat;
5-
import android.text.TextUtils;
64

7-
import com.j256.ormlite.stmt.SelectArg;
85
import com.j256.ormlite.stmt.Where;
96
import com.zulip.android.R;
107
import com.zulip.android.ZulipApp;
118
import com.zulip.android.models.Message;
12-
import com.zulip.android.models.MessageType;
13-
import com.zulip.android.models.Person;
149
import com.zulip.android.models.Stream;
1510

1611
import org.json.JSONArray;
1712
import org.json.JSONException;
1813

1914
import java.sql.SQLException;
20-
import java.util.ArrayList;
2115
import java.util.Arrays;
22-
import java.util.List;
2316

2417
public class NarrowFilterMentioned implements NarrowFilter {
2518
public static final Creator<NarrowFilterMentioned> CREATOR = new Creator<NarrowFilterMentioned>() {

app/src/main/java/com/zulip/android/gcm/GcmBroadcastReceiver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
public class GcmBroadcastReceiver extends BroadcastReceiver {
2626

2727
private static final String TAG = "GCM";
28+
2829
public static String getGCMReceiverAction(Context appContext) {
2930
return appContext.getPackageName() + ".PushMessage.BROADCAST";
3031
}

app/src/main/java/com/zulip/android/models/PeopleDrawerList.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ public int getGroupId() {
4040
return groupId;
4141
}
4242

43-
public String getGroupName() {
44-
return groupName;
45-
}
46-
4743
public void setGroupId(int groupId) {
4844
this.groupId = groupId;
4945
}
5046

47+
public String getGroupName() {
48+
return groupName;
49+
}
50+
5151
public void setGroupName(String groupName) {
5252
this.groupName = groupName;
5353
}

0 commit comments

Comments
 (0)