Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit e25407e

Browse files
committed
Code cleanup
1 parent b1191e1 commit e25407e

22 files changed

+3
-103
lines changed

app/src/androidTest/java/com/microsoft/graph/snippets/SignInActivityTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@
1010
import android.support.test.espresso.web.webdriver.Locator;
1111
import android.support.test.rule.ActivityTestRule;
1212
import android.support.test.runner.AndroidJUnit4;
13-
1413
import junit.framework.AssertionFailedError;
15-
1614
import org.junit.After;
1715
import org.junit.Before;
1816
import org.junit.BeforeClass;
1917
import org.junit.Rule;
2018
import org.junit.Test;
2119
import org.junit.runner.RunWith;
22-
2320
import java.io.FileNotFoundException;
24-
2521
import static android.support.test.espresso.Espresso.onView;
2622
import static android.support.test.espresso.action.ViewActions.click;
2723
import static android.support.test.espresso.intent.Intents.intended;

app/src/androidTest/java/com/microsoft/graph/snippets/SnippetDetailActivityTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,14 @@
99
import android.support.test.espresso.intent.Intents;
1010
import android.support.test.rule.ActivityTestRule;
1111
import android.support.test.runner.AndroidJUnit4;
12-
1312
import org.junit.After;
1413
import org.junit.Before;
1514
import org.junit.BeforeClass;
1615
import org.junit.Rule;
1716
import org.junit.Test;
1817
import org.junit.runner.RunWith;
19-
2018
import java.io.FileNotFoundException;
2119
import java.util.List;
22-
2320
import static android.support.test.espresso.Espresso.onView;
2421
import static android.support.test.espresso.Espresso.registerIdlingResources;
2522
import static android.support.test.espresso.Espresso.unregisterIdlingResources;

app/src/androidTest/java/com/microsoft/graph/snippets/SnippetListActivityTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@
1010
import android.support.test.runner.AndroidJUnit4;
1111
import android.widget.ListAdapter;
1212
import android.widget.ListView;
13-
1413
import com.microsoft.graph.snippets.snippet.AbstractSnippet;
15-
1614
import org.junit.After;
1715
import org.junit.Assert;
1816
import org.junit.Before;
1917
import org.junit.Rule;
2018
import org.junit.Test;
2119
import org.junit.runner.RunWith;
22-
2320
import java.util.ArrayList;
2421
import java.util.List;
25-
2622
import static android.support.test.espresso.Espresso.onView;
2723
import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
2824
import static android.support.test.espresso.action.ViewActions.click;

app/src/androidTest/java/com/microsoft/graph/snippets/TestCredentials.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
package com.microsoft.graph.snippets;
66

77
import android.os.Environment;
8-
98
import com.google.gson.JsonObject;
109
import com.google.gson.JsonParser;
11-
1210
import java.io.File;
1311
import java.io.FileNotFoundException;
1412
import java.io.FileReader;

app/src/main/java/com/microsoft/graph/snippets/AuthenticationManager.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,15 @@
99
import android.app.Activity;
1010
import android.content.Context;
1111
import android.util.Log;
12-
1312
import com.microsoft.graph.authentication.IAuthenticationProvider;
1413
import com.microsoft.graph.http.IHttpRequest;
1514
import com.microsoft.graph.models.extensions.User;
1615
import com.microsoft.graph.snippets.application.SnippetApp;
1716
import com.microsoft.identity.client.AuthenticationCallback;
1817
import com.microsoft.identity.client.AuthenticationResult;
19-
//import com.microsoft.identity.client.MsalException;
2018
import com.microsoft.identity.client.IAccount;
2119
import com.microsoft.identity.client.PublicClientApplication;
22-
//import com.microsoft.identity.client.User;
2320
import com.microsoft.identity.client.exception.MsalException;
24-
2521
import java.io.IOException;
2622

2723
/**

app/src/main/java/com/microsoft/graph/snippets/BaseActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66

77
import android.app.Activity;
88

9-
109
public abstract class BaseActivity extends Activity {
1110
}

app/src/main/java/com/microsoft/graph/snippets/MSALAuthenticationCallback.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package com.microsoft.graph.snippets;
22

33
import com.microsoft.identity.client.AuthenticationResult;
4-
//import com.microsoft.identity.client.MsalException;
54
import com.microsoft.identity.client.exception.MsalException;
65

7-
86
interface MSALAuthenticationCallback {
97
void onSuccess(AuthenticationResult authenticationResult);
108
void onError(MsalException exception);

app/src/main/java/com/microsoft/graph/snippets/SignInActivity.java

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import android.view.View;
1111
import android.widget.TextView;
1212
import android.widget.Toast;
13-
1413
import com.microsoft.graph.models.extensions.User;
1514
import com.microsoft.graph.snippets.util.IManifestReader;
1615
import com.microsoft.graph.snippets.util.ManifestReader;
@@ -22,20 +21,12 @@
2221
import com.microsoft.identity.client.exception.MsalException;
2322
import com.microsoft.identity.client.exception.MsalServiceException;
2423
import com.microsoft.identity.client.exception.MsalUiRequiredException;
25-
//import com.microsoft.identity.client.MsalClientException;
26-
//import com.microsoft.identity.client.MsalException;
27-
//import com.microsoft.identity.client.MsalServiceException;
28-
//import com.microsoft.identity.client.MsalUiRequiredException;
29-
//import com.microsoft.identity.client.User;
30-
3124
import java.net.URI;
3225
import java.util.List;
3326
import java.util.UUID;
34-
3527
import butterknife.BindView;
3628
import butterknife.ButterKnife;
3729
import butterknife.OnClick;
38-
3930
import static android.view.View.INVISIBLE;
4031
import static android.view.View.VISIBLE;
4132
import static com.microsoft.graph.snippets.R.id.layout_diagnostics;
@@ -152,7 +143,7 @@ private void warnBadClient() {
152143
private void authenticate() throws IllegalArgumentException {
153144
validateOrganizationArgs();
154145
connect();
155-
//AuthenticationManager.getInstance().
146+
AuthenticationManager.getInstance();
156147
}
157148

158149
private void connect() {
@@ -191,13 +182,7 @@ private void connect() {
191182
this);
192183
}
193184
}
194-
195-
// catch (MsalClientException e) {
196-
// Log.d(TAG, "MSAL Exception Generated while getting users: " + e.toString());
197-
// Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
198-
//
199-
//
200-
// }
185+
201186
catch (IndexOutOfBoundsException e) {
202187
Log.d(TAG, "User at this position does not exist: " + e.toString());
203188
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();

app/src/main/java/com/microsoft/graph/snippets/SnippetDetailFragment.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,17 @@
2323
import android.widget.ProgressBar;
2424
import android.widget.TextView;
2525
import android.widget.Toast;
26-
2726
import com.google.gson.Gson;
2827
import com.google.gson.GsonBuilder;
2928
import com.microsoft.graph.concurrency.ICallback;
3029
import com.microsoft.graph.core.ClientException;
3130
import com.microsoft.graph.snippets.snippet.AbstractSnippet;
3231
import com.microsoft.graph.snippets.snippet.SnippetContent;
33-
3432
import java.io.PrintWriter;
3533
import java.io.StringWriter;
36-
3734
import butterknife.BindView;
3835
import butterknife.ButterKnife;
3936
import butterknife.OnClick;
40-
4137
import static android.view.View.GONE;
4238
import static android.view.View.VISIBLE;
4339
import static com.microsoft.graph.snippets.R.color.code_1xx;

app/src/main/java/com/microsoft/graph/snippets/SnippetListActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import android.content.Context;
88
import android.content.Intent;
99
import android.os.Bundle;
10-
1110
import com.microsoft.graph.snippets.application.SnippetApp;
1211
import com.microsoft.graph.snippets.application.AppModule;
1312

0 commit comments

Comments
 (0)