New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANDAUTH-50 Add edit contact activity to be able edit user contacts #25

Merged
merged 17 commits into from Jul 13, 2018

Conversation

Projects
None yet
2 participants
@InsanusMokrassar
Contributor

InsanusMokrassar commented Jul 12, 2018

Was added

  • Activity for edit contact info
  • Additional extensions on Kotlin which will upgrade readability of code
  • Functions in ContactOperations which provide work with contact info

Look like
Prohibited action
Success update

@InsanusMokrassar InsanusMokrassar self-assigned this Jul 12, 2018

@InsanusMokrassar InsanusMokrassar requested review from tmortagne and pa1pal Jul 12, 2018

@pa1pal

crashed while updating my phone number.

object : Observer<ResponseBody> {
override fun onError(e: Throwable?) {
if (e ?. unauthorized == true) {
XWikiHttp.relogin(

This comment has been minimized.

@pa1pal

pa1pal Jul 13, 2018

Member

crashed while updating my phone number.

 Process: org.xwiki.android.sync, PID: 17650
    java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
        at android.os.Handler.handleCallback(Handler.java:761)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:156)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
     Caused by: rx.exceptions.OnErrorFailedException: Error occurred when trying to propagate error to Observer.onError
        at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:187)
        at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
        at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.onError(OperatorSubscribeOn.java:80)
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.checkTerminated(OperatorObserveOn.java:273)
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:216)
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
        at android.os.Handler.handleCallback(Handler.java:761) 
        at android.os.Handler.dispatchMessage(Handler.java:98) 
        at android.os.Looper.loop(Looper.java:156) 
        at android.app.ActivityThread.main(ActivityThread.java:6523) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) 
     Caused by: rx.exceptions.CompositeException: 2 exceptions occurred. 
        at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:187) 
        at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115) 
        at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.onError(OperatorSubscribeOn.java:80) 
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.checkTerminated(OperatorObserveOn.java:273) 
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:216) 
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) 
        at android.os.Handler.handleCallback(Handler.java:761) 
        at android.os.Handler.dispatchMessage(Handler.java:98) 
        at android.os.Looper.loop(Looper.java:156) 
        at android.app.ActivityThread.main(ActivityThread.java:6523) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) 
     Caused by: rx.exceptions.CompositeException$CompositeExceptionCausalChain: Chain of Causes for CompositeException In Order Received =>
        at android.util.Log.printlns(Log.java:438)
        at com.android.internal.os.RuntimeInit.Clog_e(RuntimeInit.java:61)
        at com.android.internal.os.RuntimeInit.-wrap0(RuntimeInit.java)
        at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:86)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
        at rx.internal.schedulers.ScheduledAction.signalError(ScheduledAction.java:68)
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
        at android.os.Handler.handleCallback(Handler.java:761) 
        at android.os.Handler.dispatchMessage(Handler.java:98) 
        at android.os.Looper.loop(Looper.java:156) 
        at android.app.ActivityThread.main(ActivityThread.java:6523) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) 
     Caused by: retrofit2.adapter.rxjava.HttpException: HTTP 401 
        at retrofit2.adapter.rxjava.BodyOnSubscribe$BodySubscriber.onNext(BodyOnSubscribe.java:51)
        at retrofit2.adapter.rxjava.BodyOnSubscribe$BodySubscriber.onNext(BodyOnSubscribe.java:36)
        at retrofit2.adapter.rxjava.CallArbiter.deliverResponse(CallArbiter.java:115)
        at retrofit2.adapter.rxjava.CallArbiter.emitResponse(CallArbiter.java:97)
        at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:46)
        at retrofit2.adapter.rxjava.CallExecuteOnSubscribe.call(CallExecuteOnSubscribe.java:24)
        at retrofit2.adapter.rxjava.BodyOnSubscribe.call(BodyOnSubscribe.java:33)
        at retrofit2.adapter.rxjava.BodyOnSubscribe.call(BodyOnSubscribe.java:25)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
        at rx.Observable.unsafeSubscribe(Observable.java:10256)
        at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call(OperatorSubscribeOn.java:100)
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:776)
     Caused by: java.lang.SecurityException: uid 10390 cannot get secrets for accounts of type: com.twitter.android.auth.login
        at android.os.Parcel.readException(Parcel.java:1665)
        at android.os.Parcel.readException(Parcel.java:1618)
        at android.accounts.IAccountManager$Stub$Proxy.getPassword(IAccountManager.java:799)
        at android.accounts.AccountManager.getPassword(AccountManager.java:354)
        at org.xwiki.android.sync.rest.XWikiHttp.relogin(XWikiHttp.java:153)
        at org.xwiki.android.sync.activities.EditContact.EditContactActivity$saveData$$inlined$also$lambda$1.onError(EditContactActivity.kt:207)
        at rx.internal.util.ObserverSubscriber.onError(ObserverSubscriber.java:39)
        at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:153)
        at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
        at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.onError(OperatorSubscribeOn.java:80)
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.checkTerminated(OperatorObserveOn.java:273)
        at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:216)
        at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
        at android.os.Handler.handleCallback(Handler.java:761)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:156)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

This comment has been minimized.

@InsanusMokrassar

InsanusMokrassar Jul 13, 2018

Contributor

@pa1pal , can you try again?

@pa1pal

pa1pal approved these changes Jul 13, 2018

@pa1pal pa1pal merged commit d9b0eab into master Jul 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment