diff --git a/app/src/main/java/com/example/hochi/nextcompanion/LoginActivity.java b/app/src/main/java/com/example/hochi/nextcompanion/LoginActivity.java index 201dc3a..215b72a 100644 --- a/app/src/main/java/com/example/hochi/nextcompanion/LoginActivity.java +++ b/app/src/main/java/com/example/hochi/nextcompanion/LoginActivity.java @@ -49,7 +49,7 @@ import static android.Manifest.permission.READ_CONTACTS; /** * A login screen that offers login via email/password. */ -public class LoginActivity extends AppCompatActivity implements LoaderCallbacks { +public class LoginActivity extends AppCompatActivity { /** * Keep track of the login task to ensure we can cancel it if requested. @@ -182,43 +182,6 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks< } } - @Override - public Loader onCreateLoader(int i, Bundle bundle) { - return new CursorLoader(this, - // Retrieve data rows for the device user's 'profile' contact. - Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI, - ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION, - - // Select only email addresses. - ContactsContract.Contacts.Data.MIMETYPE + - " = ?", new String[]{ContactsContract.CommonDataKinds.Email - .CONTENT_ITEM_TYPE}, - - // Show primary email addresses first. Note that there won't be - // a primary email address if the user hasn't specified one. - ContactsContract.Contacts.Data.IS_PRIMARY + " DESC"); - } - - @Override - public void onLoadFinished(Loader loader, Cursor data) { - - } - - @Override - public void onLoaderReset(Loader cursorLoader) { - - } - - private interface ProfileQuery { - String[] PROJECTION = { - ContactsContract.CommonDataKinds.Email.ADDRESS, - ContactsContract.CommonDataKinds.Email.IS_PRIMARY, - }; - - int ADDRESS = 0; - int IS_PRIMARY = 1; - } - /** * Represents an asynchronous login/registration task used to authenticate * the user. @@ -298,7 +261,7 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks< connection.disconnect(); } } - return true; + return success; } @Override