From da2226171a82e2ea89ecbf6053499cbb3a3a298e Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Tue, 12 Jan 2016 14:24:49 -0800 Subject: [PATCH 1/7] Integrating new msa --- app/build.gradle | 3 +- app/src/main/AndroidManifest.xml | 3 +- .../BaseActivity.java | 2 +- .../SignInActivity.java | 18 ++++--- .../SnippetDetailFragment.java | 49 +++++++++++++------ .../inject/AppModule.java | 2 +- .../util/SharedPrefsUtil.java | 2 +- 7 files changed, 52 insertions(+), 27 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 82f8293..6e4e8c5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,6 +23,7 @@ android { } } + dependencies { // Support libs compile 'com.android.support:appcompat-v7:22.1.1' @@ -33,7 +34,7 @@ dependencies { } // MSA Authentication - compile 'com.microsoft.orc:live-auth:0.14.2' + compile 'com.microsoft.services.msa:msa-auth:0.8.4' // Dagger compiler for DI annotation support provided 'com.squareup.dagger:dagger-compiler:1.2.2' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c07a666..1945891 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,7 +10,8 @@ android:theme="@style/AppTheme"> + android:label="@string/app_name" + android:screenOrientation="portrait"> diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java index 8d292f5..952df02 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java @@ -6,12 +6,12 @@ import com.microsoft.AzureADModule; import com.microsoft.AzureAppCompatActivity; -import com.microsoft.live.LiveAuthClient; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; import com.microsoft.o365_android_onenote_rest.conf.ServiceConstants; import com.microsoft.o365_android_onenote_rest.inject.AzureModule; import com.microsoft.o365_android_onenote_rest.inject.ObjectGraphInjector; import com.microsoft.o365_android_onenote_rest.model.Scope; +import com.microsoft.services.msa.LiveAuthClient; import java.util.ArrayList; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index 930d10d..1b4f5ed 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -9,13 +9,13 @@ import com.microsoft.aad.adal.AuthenticationCallback; import com.microsoft.aad.adal.AuthenticationResult; -import com.microsoft.live.LiveAuthException; -import com.microsoft.live.LiveAuthListener; -import com.microsoft.live.LiveConnectSession; -import com.microsoft.live.LiveStatus; import com.microsoft.o365_android_onenote_rest.conf.ServiceConstants; import com.microsoft.o365_android_onenote_rest.util.SharedPrefsUtil; import com.microsoft.o365_android_onenote_rest.util.User; +import com.microsoft.services.msa.LiveAuthException; +import com.microsoft.services.msa.LiveAuthListener; +import com.microsoft.services.msa.LiveConnectSession; +import com.microsoft.services.msa.LiveStatus; import java.net.URI; import java.util.UUID; @@ -126,9 +126,9 @@ public void onError(Exception e) { } @Override - public void onAuthComplete(LiveStatus status, - LiveConnectSession session, - Object userState) { + public void onAuthComplete(final LiveStatus status, + final LiveConnectSession session, + final Object userState) { Timber.d("MSA: Auth Complete..."); if (null != status) { Timber.d(status.toString()); @@ -140,7 +140,9 @@ public void onAuthComplete(LiveStatus status, if (null != userState) { Timber.d(userState.toString()); } - start(); + if (status == LiveStatus.CONNECTED) { + start(); + } } @Override diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java index 593e37e..8f18e9f 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java @@ -30,11 +30,6 @@ import com.microsoft.AuthenticationManager; import com.microsoft.aad.adal.AuthenticationCallback; import com.microsoft.aad.adal.AuthenticationResult; -import com.microsoft.live.LiveAuthClient; -import com.microsoft.live.LiveAuthException; -import com.microsoft.live.LiveAuthListener; -import com.microsoft.live.LiveConnectSession; -import com.microsoft.live.LiveStatus; import com.microsoft.o365_android_onenote_rest.snippet.AbstractSnippet; import com.microsoft.o365_android_onenote_rest.snippet.Callback; import com.microsoft.o365_android_onenote_rest.snippet.Input; @@ -42,6 +37,11 @@ import com.microsoft.o365_android_onenote_rest.util.SharedPrefsUtil; import com.microsoft.o365_android_onenote_rest.util.User; import com.microsoft.onenotevos.BaseVO; +import com.microsoft.services.msa.LiveAuthClient; +import com.microsoft.services.msa.LiveAuthException; +import com.microsoft.services.msa.LiveAuthListener; +import com.microsoft.services.msa.LiveConnectSession; +import com.microsoft.services.msa.LiveStatus; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringEscapeUtils; @@ -457,9 +457,16 @@ public Map getParams() { } @Override - public void onSuccess(AuthenticationResult authenticationResult) { - SharedPrefsUtil.persistAuthToken(authenticationResult); - ready(); + public void onSuccess(final AuthenticationResult authenticationResult) { + if (null != getActivity()) { + getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + SharedPrefsUtil.persistAuthToken(authenticationResult); + ready(); + } + }); + } } private void ready() { @@ -491,16 +498,30 @@ public void onClick(DialogInterface dialog, int which) { } @Override - public void onAuthComplete(LiveStatus status, LiveConnectSession session, Object userState) { - if (null != session) { - SharedPrefsUtil.persistAuthToken(session); + public void onAuthComplete(LiveStatus status, final LiveConnectSession session, Object userState) { + if (null != getActivity()) { + getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + if (null != session) { + SharedPrefsUtil.persistAuthToken(session); + } + ready(); + } + }); } - ready(); } @Override - public void onAuthError(LiveAuthException exception, Object userState) { - onError(exception); + public void onAuthError(final LiveAuthException exception, Object userState) { + if (null != getActivity()) { + getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + onError(exception); + } + }); + } } } // ********************************************************* diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java index 1b41720..c8d9aa1 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java @@ -7,11 +7,11 @@ import android.content.Context; import android.content.SharedPreferences; -import com.microsoft.live.LiveAuthClient; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; import com.microsoft.o365_android_onenote_rest.conf.ServiceConstants; import com.microsoft.o365_android_onenote_rest.util.SharedPrefsUtil; import com.microsoft.onenoteapi.service.GsonDateTime; +import com.microsoft.services.msa.LiveAuthClient; import javax.inject.Singleton; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java index d74d9fb..d287f7d 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java @@ -7,9 +7,9 @@ import android.content.SharedPreferences; import com.microsoft.aad.adal.AuthenticationResult; -import com.microsoft.live.LiveConnectSession; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; import com.microsoft.o365_android_onenote_rest.inject.AppModule; +import com.microsoft.services.msa.LiveConnectSession; public class SharedPrefsUtil { From c8ab8aacb329f8d557e425ffe8433258eb36da27 Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Tue, 12 Jan 2016 14:34:46 -0800 Subject: [PATCH 2/7] no more license txt in src --- .../com/microsoft/AuthenticationManager.java | 34 +----------------- .../java/com/microsoft/AzureADModule.java | 34 +----------------- .../com/microsoft/AzureAppCompatActivity.java | 34 +----------------- .../BaseActivity.java | 34 +----------------- .../BaseFragment.java | 34 +----------------- .../SignInActivity.java | 33 +---------------- .../SnippetDetailActivity.java | 33 +---------------- .../SnippetDetailFragment.java | 33 +---------------- .../SnippetListActivity.java | 33 +---------------- .../SnippetListAdapter.java | 33 +---------------- .../SnippetListFragment.java | 34 +----------------- .../application/SnippetApp.java | 34 +----------------- .../inject/AppModule.java | 32 ----------------- .../inject/AzureModule.java | 33 +---------------- .../inject/ObjectGraphInjector.java | 34 +----------------- .../model/Scope.java | 31 ---------------- .../snippet/AbstractSnippet.java | 34 +----------------- .../snippet/Callback.java | 33 +---------------- .../snippet/Input.java | 33 +---------------- .../snippet/NotebookSnippet.java | 34 +----------------- .../snippet/PagesSnippet.java | 34 +----------------- .../snippet/SectionGroupSnippet.java | 34 +----------------- .../snippet/SectionSnippet.java | 34 +----------------- .../snippet/SnippetCategory.java | 34 +----------------- .../snippet/SnippetContent.java | 34 +----------------- .../util/SharedPrefsUtil.java | 33 +---------------- .../o365_android_onenote_rest/util/User.java | 33 +---------------- .../service/DateTimeDeserializer.java | 34 +----------------- .../service/DateTimeSerializer.java | 34 +----------------- .../onenoteapi/service/GsonDateTime.java | 33 +---------------- .../onenoteapi/service/NotebooksService.java | 34 +----------------- .../onenoteapi/service/OneNotePartsMap.java | 33 +---------------- .../onenoteapi/service/PagesService.java | 34 +----------------- .../onenoteapi/service/PatchCommand.java | 33 +---------------- .../service/SectionGroupsService.java | 34 +----------------- .../onenoteapi/service/SectionsService.java | 35 +------------------ .../java/com/microsoft/onenotevos/BaseVO.java | 34 +----------------- .../com/microsoft/onenotevos/Envelope.java | 34 +----------------- .../java/com/microsoft/onenotevos/Links.java | 33 +---------------- .../com/microsoft/onenotevos/Notebook.java | 33 +---------------- .../java/com/microsoft/onenotevos/Page.java | 33 +---------------- .../com/microsoft/onenotevos/Section.java | 33 +---------------- .../microsoft/onenotevos/SectionGroup.java | 33 +---------------- 43 files changed, 41 insertions(+), 1399 deletions(-) diff --git a/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java b/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java index 32ba4d7..4f7e428 100644 --- a/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java +++ b/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java @@ -1,7 +1,3 @@ -/* - * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. - * See full license at the bottom of this file. - */ package com.microsoft; import android.app.Activity; @@ -145,32 +141,4 @@ private void removeUserId() { editor.apply(); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/O365-auth/src/main/java/com/microsoft/AzureADModule.java b/O365-auth/src/main/java/com/microsoft/AzureADModule.java index 2e5e230..1d4f08f 100644 --- a/O365-auth/src/main/java/com/microsoft/AzureADModule.java +++ b/O365-auth/src/main/java/com/microsoft/AzureADModule.java @@ -1,7 +1,3 @@ -/* - * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. - * See full license at the bottom of this file. - */ package com.microsoft; import android.app.Activity; @@ -128,32 +124,4 @@ public AuthenticationManager providesAuthenticationManager( mBuilder.mRedirectUri); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java b/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java index 4ef1266..8451f8d 100644 --- a/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java +++ b/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java @@ -1,7 +1,3 @@ -/* - * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. - * See full license at the bottom of this file. - */ package com.microsoft; import android.os.Bundle; @@ -54,32 +50,4 @@ protected ObjectGraph getRootGraph() { return null; } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java index 952df02..924b9f5 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest; import com.microsoft.AzureADModule; @@ -64,32 +60,4 @@ protected ObjectGraph getRootGraph() { public void inject(Object target) { mObjectGraph.inject(target); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java index d6f2241..dfaecf3 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest; import android.os.Bundle; @@ -16,32 +12,4 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { ((BaseActivity) getActivity()).inject(this); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index 1b4f5ed..8c9030c 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest; import android.content.Intent; @@ -149,32 +146,4 @@ public void onAuthComplete(final LiveStatus status, public void onAuthError(LiveAuthException exception, Object userState) { exception.printStackTrace(); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java index b4a0c8f..a6824f0 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest; import android.content.Intent; @@ -39,32 +36,4 @@ public boolean onOptionsItemSelected(MenuItem item) { } return super.onOptionsItemSelected(item); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java index 8f18e9f..ef5c91d 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest; import android.annotation.TargetApi; @@ -523,32 +520,4 @@ public void run() { }); } } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java index 4a42d9c..b09ab58 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest; import android.content.Context; @@ -76,32 +73,4 @@ public void onDisconnectClicked() { login.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(login); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java index b343170..d59d2e8 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest; import android.content.Context; @@ -82,32 +79,4 @@ private boolean isWrongViewType(boolean isSegment, View convertView) { return !isSegment && null == v || (isSegment && null != v); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java index e20b351..6481da2 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest; import android.app.Activity; @@ -125,32 +121,4 @@ private void setActivatedPosition(int position) { mActivatedPosition = position; } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java index 26df966..329dada 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.application; import android.app.Application; @@ -64,32 +60,4 @@ public RestAdapter getRestAdapter() { .setRequestInterceptor(requestInterceptor) .build(); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java index c8d9aa1..942028d 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.inject; import android.content.Context; @@ -70,31 +66,3 @@ public LiveAuthClient providesLiveAuthClient() { return new LiveAuthClient(SnippetApp.getApp(), ServiceConstants.MSA_CLIENT_ID); } } -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java index cd25f49..c3a7ad9 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest.inject; import com.microsoft.AzureADModule; @@ -21,32 +18,4 @@ } ) public class AzureModule { -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java index 5cdb7ec..4c9a6d9 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java @@ -1,39 +1,7 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.inject; public interface ObjectGraphInjector { void inject(Object target); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java index b41793f..7f64790 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest.model; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; @@ -60,31 +57,3 @@ private static String getString(int res) { return SnippetApp.getApp().getString(res); } } -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java index 9eaec03..b902b78 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; @@ -166,32 +162,4 @@ public String getSection() { */ public abstract void request(Service service, Callback callback); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java index 3272221..ef20401 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest.snippet; import java.util.Map; @@ -8,32 +5,4 @@ public interface Callback extends retrofit.Callback { Map getParams(); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java index afde666..a68fcf9 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java @@ -1,36 +1,5 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest.snippet; public enum Input { None, Text, Spinner, Both -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java index 1e776f5..fb412f2 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonObject; @@ -280,32 +276,4 @@ public Map getParams() { }); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java index d30fcc9..9bc4723 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonArray; @@ -929,32 +925,4 @@ public Map getParams() { }); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java index 8b71ef4..9b5d504 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonObject; @@ -268,32 +264,4 @@ public Map getParams() { }); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java index 0def809..c0a2f96 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonObject; @@ -355,32 +351,4 @@ public Map getParams() { }); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java index 0e457d5..f021a57 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; @@ -39,32 +35,4 @@ public class SnippetCategory { private static T create(Class clazz) { return SnippetApp.getApp().getRestAdapter().create(clazz); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java index 9522594..bc0e084 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.o365_android_onenote_rest.snippet; import java.util.ArrayList; @@ -30,32 +26,4 @@ public class SnippetContent { } } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java index d287f7d..459c2cc 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest.util; import android.content.Context; @@ -32,32 +29,4 @@ public static void persistAuthToken(LiveConnectSession session) { private static void setAccessToken(String accessToken) { getSharedPreferences().edit().putString(PREF_AUTH_TOKEN, accessToken).commit(); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java index 37f5c23..3f590e7 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.o365_android_onenote_rest.util; public class User { @@ -35,32 +32,4 @@ private static void set(String which, boolean state) { .putBoolean(which, state) .commit(); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java index ebd7d45..3852b97 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java @@ -1,6 +1,3 @@ -/* - * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. - */ package com.microsoft.onenoteapi.service; import com.google.gson.JsonDeserializationContext; @@ -17,33 +14,4 @@ public DateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationC throws JsonParseException { return new DateTime(json.getAsJsonPrimitive().getAsString()); } -} - -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java index 9b8a4b2..39e6138 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java @@ -1,6 +1,3 @@ -/* - * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. - */ package com.microsoft.onenoteapi.service; import com.google.gson.JsonElement; @@ -16,33 +13,4 @@ public class DateTimeSerializer implements JsonSerializer { public JsonElement serialize(DateTime src, Type typeOfSrc, JsonSerializationContext context) { return new JsonPrimitive(src.toString()); } -} - -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java index 9747eef..726b8f2 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java @@ -1,6 +1,3 @@ -/* - * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. - */ package com.microsoft.onenoteapi.service; import com.google.gson.GsonBuilder; @@ -16,32 +13,4 @@ public static GsonBuilder getOneNoteBuilder() { return gsonBuilder; } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java index 2efef04..0e13069 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; @@ -96,32 +92,4 @@ void postNotebook( @Body TypedString body, Callback> callback ); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java index 228bb0d..81593f7 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenoteapi.service; import java.util.HashMap; @@ -16,32 +13,4 @@ public OneNotePartsMap(TypedInput initValue) { put(MANDATORY_PART_NAME, initValue); } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java index 9561946..b55c993 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; @@ -189,32 +185,4 @@ void patchPage( @Body TypedString body, Callback> callback ); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java index 8ca38cd..51b7e10 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenoteapi.service; import android.util.Log; @@ -32,32 +29,4 @@ public JsonElement serialize(PatchCommand patchCommand, Log.i(getClass().getSimpleName(), result.toString()); return result; } -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java index a6b402a..e01ebd3 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; @@ -90,32 +86,4 @@ void postSectionGroupInSectionGroup( @Body TypedString content, Callback> callback ); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java index a835130..359bfd6 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java @@ -1,8 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - - package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; @@ -120,32 +115,4 @@ void deleteSection( Callback callback ); -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java b/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java index ac0a647..8f83371 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java @@ -1,7 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.onenotevos; import com.google.gson.annotations.SerializedName; @@ -36,32 +32,4 @@ public abstract class BaseVO { public String self; public String userRole; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java index fe29372..a3fea47 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java @@ -1,37 +1,5 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ - package com.microsoft.onenotevos; public class Envelope extends BaseVO { public T[] value; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java index 5bb8876..6b102a9 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenotevos; public class Links { @@ -16,32 +13,4 @@ public static class OneNoteWebUrl extends Url {} public OneNoteClientUrl oneNoteClientUrl; public OneNoteWebUrl oneNoteWebUrl; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java index 6e91cf7..5e0da1d 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenotevos; public class Notebook extends BaseVO { @@ -8,32 +5,4 @@ public class Notebook extends BaseVO { public String sectionGroupsUrl; public String sectionsUrl; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java index 380b2d4..3cb2ec0 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java @@ -1,37 +1,6 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenotevos; public class Page extends BaseVO { public String title; public String contentUrl; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java index 3550889..638f714 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java @@ -1,6 +1,3 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenotevos; import com.google.gson.annotations.SerializedName; @@ -17,32 +14,4 @@ public class Section extends BaseVO { @SerializedName("parentNotebook@odata.context") public String parentNotebook_odata_context; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* \ No newline at end of file +} \ No newline at end of file diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java b/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java index df2b426..695a8e7 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java @@ -1,36 +1,5 @@ -/* -* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. -*/ package com.microsoft.onenotevos; public class SectionGroup extends BaseVO { public String pagesUrl; -} -// ********************************************************* -// -// Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer -// -// Copyright (c) Microsoft Corporation -// All rights reserved. -// -// MIT License: -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ********************************************************* +} \ No newline at end of file From 81e64ff28c2a3a6c2b965f4561a45047a32cca1c Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Tue, 12 Jan 2016 14:41:23 -0800 Subject: [PATCH 3/7] Adding updated license text --- .../src/main/java/com/microsoft/AuthenticationManager.java | 4 ++++ O365-auth/src/main/java/com/microsoft/AzureADModule.java | 4 ++++ .../main/java/com/microsoft/AzureAppCompatActivity.java | 4 ++++ .../microsoft/o365_android_onenote_rest/BaseActivity.java | 4 ++++ .../microsoft/o365_android_onenote_rest/BaseFragment.java | 4 ++++ .../o365_android_onenote_rest/SignInActivity.java | 4 ++++ .../o365_android_onenote_rest/SnippetDetailActivity.java | 5 ++++- .../o365_android_onenote_rest/SnippetDetailFragment.java | 4 ++++ .../o365_android_onenote_rest/SnippetListActivity.java | 4 ++++ .../o365_android_onenote_rest/SnippetListAdapter.java | 4 ++++ .../o365_android_onenote_rest/SnippetListFragment.java | 4 ++++ .../o365_android_onenote_rest/application/SnippetApp.java | 4 ++++ .../o365_android_onenote_rest/inject/AppModule.java | 4 ++++ .../o365_android_onenote_rest/inject/AzureModule.java | 7 +++++-- .../inject/ObjectGraphInjector.java | 4 ++++ .../microsoft/o365_android_onenote_rest/model/Scope.java | 4 ++++ .../o365_android_onenote_rest/snippet/AbstractSnippet.java | 4 ++++ .../o365_android_onenote_rest/snippet/Callback.java | 4 ++++ .../microsoft/o365_android_onenote_rest/snippet/Input.java | 4 ++++ .../o365_android_onenote_rest/snippet/NotebookSnippet.java | 4 ++++ .../o365_android_onenote_rest/snippet/PagesSnippet.java | 4 ++++ .../snippet/SectionGroupSnippet.java | 4 ++++ .../o365_android_onenote_rest/snippet/SectionSnippet.java | 4 ++++ .../o365_android_onenote_rest/snippet/SnippetCategory.java | 4 ++++ .../o365_android_onenote_rest/snippet/SnippetContent.java | 4 ++++ .../o365_android_onenote_rest/util/SharedPrefsUtil.java | 4 ++++ .../com/microsoft/o365_android_onenote_rest/util/User.java | 4 ++++ .../microsoft/onenoteapi/service/DateTimeDeserializer.java | 4 ++++ .../microsoft/onenoteapi/service/DateTimeSerializer.java | 4 ++++ .../com/microsoft/onenoteapi/service/GsonDateTime.java | 4 ++++ .../com/microsoft/onenoteapi/service/NotebooksService.java | 4 ++++ .../com/microsoft/onenoteapi/service/OneNotePartsMap.java | 4 ++++ .../com/microsoft/onenoteapi/service/PagesService.java | 4 ++++ .../com/microsoft/onenoteapi/service/PatchCommand.java | 4 ++++ .../microsoft/onenoteapi/service/SectionGroupsService.java | 4 ++++ .../com/microsoft/onenoteapi/service/SectionsService.java | 4 ++++ .../src/main/java/com/microsoft/onenotevos/BaseVO.java | 4 ++++ .../src/main/java/com/microsoft/onenotevos/Envelope.java | 4 ++++ .../src/main/java/com/microsoft/onenotevos/Links.java | 4 ++++ .../src/main/java/com/microsoft/onenotevos/Notebook.java | 4 ++++ .../src/main/java/com/microsoft/onenotevos/Page.java | 4 ++++ .../src/main/java/com/microsoft/onenotevos/Section.java | 4 ++++ .../main/java/com/microsoft/onenotevos/SectionGroup.java | 4 ++++ 43 files changed, 173 insertions(+), 3 deletions(-) diff --git a/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java b/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java index 4f7e428..baa6abf 100644 --- a/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java +++ b/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft; import android.app.Activity; diff --git a/O365-auth/src/main/java/com/microsoft/AzureADModule.java b/O365-auth/src/main/java/com/microsoft/AzureADModule.java index 1d4f08f..fd1505f 100644 --- a/O365-auth/src/main/java/com/microsoft/AzureADModule.java +++ b/O365-auth/src/main/java/com/microsoft/AzureADModule.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft; import android.app.Activity; diff --git a/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java b/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java index 8451f8d..b88dd59 100644 --- a/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java +++ b/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft; import android.os.Bundle; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java index 924b9f5..18b1290 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import com.microsoft.AzureADModule; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java index dfaecf3..4aaf0a4 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.os.Bundle; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index 8c9030c..8ab27f5 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.content.Intent; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java index a6824f0..084750e 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.content.Intent; @@ -5,7 +9,6 @@ import android.support.v4.app.NavUtils; import android.view.MenuItem; - public class SnippetDetailActivity extends BaseActivity { @Override diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java index ef5c91d..d7704e2 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.annotation.TargetApi; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java index b09ab58..9efe0bf 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.content.Context; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java index d59d2e8..f90395e 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.content.Context; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java index 6481da2..d6cbf53 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest; import android.app.Activity; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java index 329dada..1b7bb7b 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.application; import android.app.Application; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java index 942028d..2b6a036 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.inject; import android.content.Context; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java index c3a7ad9..83bf169 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.inject; import com.microsoft.AzureADModule; @@ -17,5 +21,4 @@ SnippetDetailFragment.class } ) -public class AzureModule { -} \ No newline at end of file +public class AzureModule {} \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java index 4c9a6d9..bba290a 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.inject; public interface ObjectGraphInjector { diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java index 7f64790..fe52f25 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/model/Scope.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.model; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java index b902b78..b0e11e6 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java index ef20401..95f6b8f 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import java.util.Map; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java index a68fcf9..856c016 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; public enum Input { diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java index fb412f2..bbf6809 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonObject; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java index 9bc4723..ce72d57 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonArray; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java index 9b5d504..06a3643 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonObject; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java index c0a2f96..cbd6072 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import com.google.gson.JsonObject; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java index f021a57..dbfbe55 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java index bc0e084..28192eb 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.snippet; import java.util.ArrayList; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java index 459c2cc..faccc7b 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.util; import android.content.Context; diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java index 3f590e7..29f2720 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.o365_android_onenote_rest.util; public class User { diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java index 3852b97..7207222 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.google.gson.JsonDeserializationContext; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java index 39e6138..6502bfe 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.google.gson.JsonElement; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java index 726b8f2..6eb716d 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.google.gson.GsonBuilder; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java index 0e13069..9edde1d 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java index 81593f7..796cd7e 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import java.util.HashMap; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java index b55c993..aafcac7 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java index 51b7e10..9f046b7 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import android.util.Log; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java index e01ebd3..c9246d2 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java index 359bfd6..53ebd82 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenoteapi.service; import com.microsoft.onenotevos.Envelope; diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java b/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java index 8f83371..4567aa9 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; import com.google.gson.annotations.SerializedName; diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java index a3fea47..86f35c0 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; public class Envelope extends BaseVO { diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java index 6b102a9..5bc0d8b 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; public class Links { diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java index 5e0da1d..d1c9234 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; public class Notebook extends BaseVO { diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java index 3cb2ec0..9c3cd1b 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; public class Page extends BaseVO { diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java index 638f714..ad2ebd5 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; import com.google.gson.annotations.SerializedName; diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java b/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java index 695a8e7..7623101 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java @@ -1,3 +1,7 @@ +/* + * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ package com.microsoft.onenotevos; public class SectionGroup extends BaseVO { From 1eb121a16069e02f5c18ee227916ef1a8f98cea9 Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Wed, 13 Jan 2016 14:24:19 -0800 Subject: [PATCH 4/7] Bugfix for Activity 'doubling'. This change also addresses #7 --- .../SignInActivity.java | 64 +++++++++++-------- .../SnippetListFragment.java | 2 + .../inject/AppModule.java | 7 +- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index 8ab27f5..a854912 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -30,7 +30,35 @@ public class SignInActivity extends BaseActivity - implements AuthenticationCallback, LiveAuthListener { + implements AuthenticationCallback { + + protected final LiveAuthListener mLiveAuthListener = new LiveAuthListener() { + + @Override + public void onAuthComplete(final LiveStatus status, + final LiveConnectSession session, + final Object userState) { + Timber.d("MSA: Auth Complete..."); + if (null != status) { + Timber.d(status.toString()); + } + if (null != session) { + Timber.d(session.toString()); + SharedPrefsUtil.persistAuthToken(session); + } + if (null != userState) { + Timber.d(userState.toString()); + } + if (status == LiveStatus.CONNECTED) { + start(); + } + } + + @Override + public void onAuthError(LiveAuthException exception, Object userState) { + exception.printStackTrace(); + } + }; @Override protected void onCreate(Bundle savedInstanceState) { @@ -38,6 +66,11 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_signin); if (User.isOrg()) { mAuthenticationManager.connect(this); + } else if (User.isMsa() + // this check has side effects: see mLiveAuthListener implementation + && mLiveAuthClient.loginSilent(mLiveAuthListener)) { + // callback will be fired, do not inject ButterKnife + return; } ButterKnife.inject(this); } @@ -92,7 +125,7 @@ public void onSignInMsaClicked() { private void authenticateMsa() { try { validateMsaArgs(); - mLiveAuthClient.login(this, sSCOPES, this); + mLiveAuthClient.login(this, sSCOPES, mLiveAuthListener); } catch (IllegalArgumentException e) { warnBadClient(); } @@ -106,12 +139,12 @@ private void validateMsaArgs() throws IllegalArgumentException { @Override public void onSuccess(AuthenticationResult authenticationResult) { - finish(); SharedPrefsUtil.persistAuthToken(authenticationResult); start(); } private void start() { + finish(); Intent appLaunch = new Intent(this, SnippetListActivity.class); startActivity(appLaunch); } @@ -125,29 +158,4 @@ public void onError(Exception e) { } Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); } - - @Override - public void onAuthComplete(final LiveStatus status, - final LiveConnectSession session, - final Object userState) { - Timber.d("MSA: Auth Complete..."); - if (null != status) { - Timber.d(status.toString()); - } - if (null != session) { - Timber.d(session.toString()); - SharedPrefsUtil.persistAuthToken(session); - } - if (null != userState) { - Timber.d(userState.toString()); - } - if (status == LiveStatus.CONNECTED) { - start(); - } - } - - @Override - public void onAuthError(LiveAuthException exception, Object userState) { - exception.printStackTrace(); - } } \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java index d6cbf53..1f1f189 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java @@ -125,4 +125,6 @@ private void setActivatedPosition(int position) { mActivatedPosition = position; } + + } \ No newline at end of file diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java index 2b6a036..4ebbaae 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AppModule.java @@ -7,6 +7,7 @@ import android.content.Context; import android.content.SharedPreferences; +import com.microsoft.o365_android_onenote_rest.BaseActivity; import com.microsoft.o365_android_onenote_rest.application.SnippetApp; import com.microsoft.o365_android_onenote_rest.conf.ServiceConstants; import com.microsoft.o365_android_onenote_rest.util.SharedPrefsUtil; @@ -67,6 +68,10 @@ public void intercept(RequestFacade request) { @Provides @Singleton public LiveAuthClient providesLiveAuthClient() { - return new LiveAuthClient(SnippetApp.getApp(), ServiceConstants.MSA_CLIENT_ID); + return new LiveAuthClient( + SnippetApp.getApp(), + ServiceConstants.MSA_CLIENT_ID, + BaseActivity.sSCOPES + ); } } From d8056bf0bd35f5ccf12cb7d48f2e1d13782f5b6d Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Wed, 13 Jan 2016 15:05:13 -0800 Subject: [PATCH 5/7] params no longer final --- .../microsoft/o365_android_onenote_rest/SignInActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index a854912..5b0f476 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -35,9 +35,9 @@ public class SignInActivity protected final LiveAuthListener mLiveAuthListener = new LiveAuthListener() { @Override - public void onAuthComplete(final LiveStatus status, - final LiveConnectSession session, - final Object userState) { + public void onAuthComplete(LiveStatus status, + LiveConnectSession session, + Object userState) { Timber.d("MSA: Auth Complete..."); if (null != status) { Timber.d(status.toString()); From 03c126cca410456af1f756aeb0bd84d864978e1a Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Wed, 13 Jan 2016 15:10:43 -0800 Subject: [PATCH 6/7] newline to end --- .../src/main/java/com/microsoft/AuthenticationManager.java | 2 +- O365-auth/src/main/java/com/microsoft/AzureADModule.java | 2 +- .../src/main/java/com/microsoft/AzureAppCompatActivity.java | 2 +- .../com/microsoft/o365_android_onenote_rest/BaseActivity.java | 2 +- .../com/microsoft/o365_android_onenote_rest/BaseFragment.java | 2 +- .../microsoft/o365_android_onenote_rest/SignInActivity.java | 2 +- .../o365_android_onenote_rest/SnippetDetailActivity.java | 2 +- .../o365_android_onenote_rest/SnippetDetailFragment.java | 2 +- .../o365_android_onenote_rest/SnippetListActivity.java | 2 +- .../o365_android_onenote_rest/SnippetListAdapter.java | 2 +- .../o365_android_onenote_rest/SnippetListFragment.java | 4 +--- .../o365_android_onenote_rest/application/SnippetApp.java | 2 +- .../o365_android_onenote_rest/inject/AzureModule.java | 2 +- .../o365_android_onenote_rest/inject/ObjectGraphInjector.java | 2 +- .../o365_android_onenote_rest/snippet/AbstractSnippet.java | 2 +- .../microsoft/o365_android_onenote_rest/snippet/Callback.java | 2 +- .../microsoft/o365_android_onenote_rest/snippet/Input.java | 2 +- .../o365_android_onenote_rest/snippet/NotebookSnippet.java | 2 +- .../o365_android_onenote_rest/snippet/PagesSnippet.java | 2 +- .../snippet/SectionGroupSnippet.java | 2 +- .../o365_android_onenote_rest/snippet/SectionSnippet.java | 2 +- .../o365_android_onenote_rest/snippet/SnippetCategory.java | 2 +- .../o365_android_onenote_rest/snippet/SnippetContent.java | 2 +- .../o365_android_onenote_rest/util/SharedPrefsUtil.java | 2 +- .../com/microsoft/o365_android_onenote_rest/util/User.java | 2 +- .../microsoft/onenoteapi/service/DateTimeDeserializer.java | 2 +- .../com/microsoft/onenoteapi/service/DateTimeSerializer.java | 2 +- .../java/com/microsoft/onenoteapi/service/GsonDateTime.java | 3 +-- .../com/microsoft/onenoteapi/service/NotebooksService.java | 2 +- .../com/microsoft/onenoteapi/service/OneNotePartsMap.java | 2 +- .../java/com/microsoft/onenoteapi/service/PagesService.java | 2 +- .../java/com/microsoft/onenoteapi/service/PatchCommand.java | 2 +- .../microsoft/onenoteapi/service/SectionGroupsService.java | 2 +- .../com/microsoft/onenoteapi/service/SectionsService.java | 2 +- onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java | 2 +- .../src/main/java/com/microsoft/onenotevos/Envelope.java | 2 +- onenotevos/src/main/java/com/microsoft/onenotevos/Links.java | 2 +- .../src/main/java/com/microsoft/onenotevos/Notebook.java | 2 +- onenotevos/src/main/java/com/microsoft/onenotevos/Page.java | 2 +- .../src/main/java/com/microsoft/onenotevos/Section.java | 2 +- .../src/main/java/com/microsoft/onenotevos/SectionGroup.java | 2 +- 41 files changed, 41 insertions(+), 44 deletions(-) diff --git a/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java b/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java index baa6abf..8aac5f3 100644 --- a/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java +++ b/O365-auth/src/main/java/com/microsoft/AuthenticationManager.java @@ -145,4 +145,4 @@ private void removeUserId() { editor.apply(); } -} \ No newline at end of file +} diff --git a/O365-auth/src/main/java/com/microsoft/AzureADModule.java b/O365-auth/src/main/java/com/microsoft/AzureADModule.java index fd1505f..04c4692 100644 --- a/O365-auth/src/main/java/com/microsoft/AzureADModule.java +++ b/O365-auth/src/main/java/com/microsoft/AzureADModule.java @@ -128,4 +128,4 @@ public AuthenticationManager providesAuthenticationManager( mBuilder.mRedirectUri); } -} \ No newline at end of file +} diff --git a/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java b/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java index b88dd59..b35132a 100644 --- a/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java +++ b/O365-auth/src/main/java/com/microsoft/AzureAppCompatActivity.java @@ -54,4 +54,4 @@ protected ObjectGraph getRootGraph() { return null; } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java index 18b1290..0162751 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseActivity.java @@ -64,4 +64,4 @@ protected ObjectGraph getRootGraph() { public void inject(Object target) { mObjectGraph.inject(target); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java index 4aaf0a4..a598181 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/BaseFragment.java @@ -16,4 +16,4 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { ((BaseActivity) getActivity()).inject(this); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index 5b0f476..a61e1d3 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -158,4 +158,4 @@ public void onError(Exception e) { } Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java index 084750e..0e3ebaf 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailActivity.java @@ -39,4 +39,4 @@ public boolean onOptionsItemSelected(MenuItem item) { } return super.onOptionsItemSelected(item); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java index d7704e2..f4490b6 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java @@ -524,4 +524,4 @@ public void run() { }); } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java index 9efe0bf..e087dd6 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListActivity.java @@ -77,4 +77,4 @@ public void onDisconnectClicked() { login.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(login); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java index f90395e..f478c47 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListAdapter.java @@ -83,4 +83,4 @@ private boolean isWrongViewType(boolean isSegment, View convertView) { return !isSegment && null == v || (isSegment && null != v); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java index 1f1f189..8055919 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetListFragment.java @@ -125,6 +125,4 @@ private void setActivatedPosition(int position) { mActivatedPosition = position; } - - -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java index 1b7bb7b..d63c1e7 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/application/SnippetApp.java @@ -64,4 +64,4 @@ public RestAdapter getRestAdapter() { .setRequestInterceptor(requestInterceptor) .build(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java index 83bf169..90c225d 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/AzureModule.java @@ -21,4 +21,4 @@ SnippetDetailFragment.class } ) -public class AzureModule {} \ No newline at end of file +public class AzureModule {} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java index bba290a..3d8524c 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/inject/ObjectGraphInjector.java @@ -8,4 +8,4 @@ public interface ObjectGraphInjector { void inject(Object target); -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java index b0e11e6..ab3b24f 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/AbstractSnippet.java @@ -166,4 +166,4 @@ public String getSection() { */ public abstract void request(Service service, Callback callback); -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java index 95f6b8f..06eee8a 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Callback.java @@ -9,4 +9,4 @@ public interface Callback extends retrofit.Callback { Map getParams(); -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java index 856c016..2980bcd 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/Input.java @@ -6,4 +6,4 @@ public enum Input { None, Text, Spinner, Both -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java index bbf6809..e129e1d 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/NotebookSnippet.java @@ -280,4 +280,4 @@ public Map getParams() { }); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java index ce72d57..21fad49 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/PagesSnippet.java @@ -929,4 +929,4 @@ public Map getParams() { }); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java index 06a3643..ef97500 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionGroupSnippet.java @@ -268,4 +268,4 @@ public Map getParams() { }); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java index cbd6072..896746c 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SectionSnippet.java @@ -355,4 +355,4 @@ public Map getParams() { }); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java index dbfbe55..718720e 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetCategory.java @@ -39,4 +39,4 @@ public class SnippetCategory { private static T create(Class clazz) { return SnippetApp.getApp().getRestAdapter().create(clazz); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java index 28192eb..4cf46c3 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/snippet/SnippetContent.java @@ -30,4 +30,4 @@ public class SnippetContent { } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java index faccc7b..8a562eb 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/SharedPrefsUtil.java @@ -33,4 +33,4 @@ public static void persistAuthToken(LiveConnectSession session) { private static void setAccessToken(String accessToken) { getSharedPreferences().edit().putString(PREF_AUTH_TOKEN, accessToken).commit(); } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java index 29f2720..549f48a 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/util/User.java @@ -36,4 +36,4 @@ private static void set(String which, boolean state) { .putBoolean(which, state) .commit(); } -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java index 7207222..5297271 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java @@ -18,4 +18,4 @@ public DateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationC throws JsonParseException { return new DateTime(json.getAsJsonPrimitive().getAsString()); } -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java index 6502bfe..84cd3d4 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java @@ -17,4 +17,4 @@ public class DateTimeSerializer implements JsonSerializer { public JsonElement serialize(DateTime src, Type typeOfSrc, JsonSerializationContext context) { return new JsonPrimitive(src.toString()); } -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java index 6eb716d..caf20ad 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java @@ -16,5 +16,4 @@ public static GsonBuilder getOneNoteBuilder() { gsonBuilder.registerTypeAdapter(DateTime.class, new DateTimeDeserializer()); return gsonBuilder; } - -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java index 9edde1d..fcfd25e 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java @@ -96,4 +96,4 @@ void postNotebook( @Body TypedString body, Callback> callback ); -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java index 796cd7e..d6e516a 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java @@ -17,4 +17,4 @@ public OneNotePartsMap(TypedInput initValue) { put(MANDATORY_PART_NAME, initValue); } -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java index aafcac7..38331da 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java @@ -189,4 +189,4 @@ void patchPage( @Body TypedString body, Callback> callback ); -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java index 9f046b7..c7fd919 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java @@ -33,4 +33,4 @@ public JsonElement serialize(PatchCommand patchCommand, Log.i(getClass().getSimpleName(), result.toString()); return result; } -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java index c9246d2..97bb0fc 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java @@ -90,4 +90,4 @@ void postSectionGroupInSectionGroup( @Body TypedString content, Callback> callback ); -} \ No newline at end of file +} diff --git a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java index 53ebd82..bff2567 100644 --- a/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java +++ b/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java @@ -119,4 +119,4 @@ void deleteSection( Callback callback ); -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java b/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java index 4567aa9..269a6d2 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java @@ -36,4 +36,4 @@ public abstract class BaseVO { public String self; public String userRole; -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java index 86f35c0..827a2e0 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java @@ -6,4 +6,4 @@ public class Envelope extends BaseVO { public T[] value; -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java index 5bc0d8b..07f335f 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java @@ -17,4 +17,4 @@ public static class OneNoteWebUrl extends Url {} public OneNoteClientUrl oneNoteClientUrl; public OneNoteWebUrl oneNoteWebUrl; -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java index d1c9234..f003e71 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java @@ -9,4 +9,4 @@ public class Notebook extends BaseVO { public String sectionGroupsUrl; public String sectionsUrl; -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java index 9c3cd1b..980c0e3 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java @@ -7,4 +7,4 @@ public class Page extends BaseVO { public String title; public String contentUrl; -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java b/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java index ad2ebd5..e97eaba 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java @@ -18,4 +18,4 @@ public class Section extends BaseVO { @SerializedName("parentNotebook@odata.context") public String parentNotebook_odata_context; -} \ No newline at end of file +} diff --git a/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java b/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java index 7623101..7c72731 100644 --- a/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java +++ b/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java @@ -6,4 +6,4 @@ public class SectionGroup extends BaseVO { public String pagesUrl; -} \ No newline at end of file +} From 165bd7131585b6e5faa94ef65d9bce0d96dd508f Mon Sep 17 00:00:00 2001 From: Brian Melton Date: Wed, 13 Jan 2016 15:42:12 -0800 Subject: [PATCH 7/7] Removing unnecessary thread marshalling --- .../o365_android_onenote_rest/SignInActivity.java | 10 +++++++--- .../SnippetDetailFragment.java | 11 ++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java index a61e1d3..aeab2ea 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java @@ -64,15 +64,19 @@ public void onAuthError(LiveAuthException exception, Object userState) { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_signin); + boolean authSuccess = false; if (User.isOrg()) { mAuthenticationManager.connect(this); - } else if (User.isMsa() + } else if (authSuccess = (User.isMsa() // this check has side effects: see mLiveAuthListener implementation - && mLiveAuthClient.loginSilent(mLiveAuthListener)) { + && mLiveAuthClient.loginSilent(mLiveAuthListener))) { // callback will be fired, do not inject ButterKnife return; } - ButterKnife.inject(this); + + if (!authSuccess) { + ButterKnife.inject(this); + } } @OnClick(o365_signin) diff --git a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java index f4490b6..0b2ef3c 100644 --- a/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java +++ b/app/src/main/java/com/microsoft/o365_android_onenote_rest/SnippetDetailFragment.java @@ -459,15 +459,8 @@ public Map getParams() { @Override public void onSuccess(final AuthenticationResult authenticationResult) { - if (null != getActivity()) { - getActivity().runOnUiThread(new Runnable() { - @Override - public void run() { - SharedPrefsUtil.persistAuthToken(authenticationResult); - ready(); - } - }); - } + SharedPrefsUtil.persistAuthToken(authenticationResult); + ready(); } private void ready() {