IntentService启动了两次

时间:2017-02-28 09:19:28

标签: android json retrofit2 intentservice

我使用IntentSerivce下载了一个大型的json。我首先使用了GsonRetrofit2。在我发现Jackson对于大型json的编组更好之后。

此问题开始,intentService已被触发两次,即使在代码中只调用一次。

我从启动画面触发intentService,设备的方向是横向的。没有向上/向下翻转所以我想在方向改变时没有重新开始活动。 app也是硬编码以横向开始。

以下是来自logCat的日志

 I/APPLICATION CLASS: DB FOUND
02-28 10:15:25.034 1561-2108/? I/ActivityManager: START u0 {flg=0x10000000 cmp=aoc.netcast.rs.android_ott_client/.view.SplashScreen} from uid 10073 on display 0
  

02-28 10:15:25.040 3195-3195 /? I /意图表演:开始意图...

     

02-28 10:15:25.041 3195-3195 /? I /意图表演:意图开始......

02-28 10:15:25.053 1206-1286/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
02-28 10:15:25.062 3195-3210/? W/nAnnotationIntrospector: Unable to load JDK7 annotation types; will have to skip
  

02-28 10:15:25.074 3195-3195 /? I /意图表演:开始意图...

     

02-28 10:15:25.074 3195-3195 /? I /意图表演:意图开始......

02-28 10:15:25.090 3195-3210/? W/System.err: WARNING: could not load Java7 Path class
02-28 10:15:25.330 1206-1206/? E/SurfaceFlinger: rejecting buffer: bufWidth=1080, bufHeight=1920, front.active.{w=1080, h=1776}

                                                 [ 02-28 10:15:25.341  3195: 3209 D/         ]
                                                 HostConnection::get() New Host Connection established 0x7fa7db557360, tid 3209
02-28 10:15:25.344 3195-3209/? I/OpenGLRenderer: Initialized EGL, version 1.4
02-28 10:15:25.344 1561-1612/? I/InputReader: Reconfiguring input devices.  changes=0x00000004
02-28 10:15:25.344 1561-1612/? I/InputReader: Device reconfigured: id=0, name='qwerty2', size 1080x1920, orientation 1, mode 1, display id 0
02-28 10:15:25.350 1694-2096/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7fa7cf1b1b10
02-28 10:15:25.353 1694-2096/? E/EGL_emulation: tid 2096: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-28 10:15:25.353 1694-2096/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7fa7ce77fa80, error=EGL_BAD_MATCH
02-28 10:15:25.365 3195-3209/? E/EGL_emulation: tid 3209: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-28 10:15:25.365 3195-3209/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7fa7db548c40, error=EGL_BAD_MATCH
02-28 10:15:25.367 1694-2096/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7fa7cf1b23d0
02-28 10:15:25.378 1694-2096/? E/EGL_emulation: tid 2096: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
02-28 10:15:25.378 1694-2096/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7fa7ce77fac0, error=EGL_BAD_MATCH
02-28 10:15:25.449 1561-1580/? I/ActivityManager: Displayed aoc.netcast.rs.android_ott_client/.view.SplashScreen: +390ms (total +578ms)
02-28 10:15:25.458 1561-1580/? I/WindowManager: Screen frozen for +559ms due to Window{85b86c9 u0 aoc.netcast.rs.android_ott_client/aoc.netcast.rs.android_ott_client.view.SplashScreen}
02-28 10:15:27.461 1561-1580/? I/art: Starting a blocking GC Explicit
02-28 10:15:27.471 1561-1580/? I/art: Explicit concurrent mark sweep GC freed 14571(904KB) AllocSpace objects, 3(60KB) LOS objects, 31% free, 8MB/12MB, paused 127us total 9.460ms
02-28 10:15:30.335 1561-2989/? I/AccountManagerService: getTypesVisibleToCaller: isPermitted? true

我不知道为什么会这样,你能帮我解决一下吗?

0 个答案:

没有答案