使用set函数不会更改calender.HOUR_OF_DAY字段?

时间:2017-05-19 14:14:01

标签: java android

public void startAlarm(View view) {
    Toast.makeText(this, "Alarm Started", Toast.LENGTH_SHORT).show();
    Intent i1 = new Intent();
    i1.setAction("com.techies.AlarmManagerDemo");
    i1.addCategory("android.intent.category.DEFAULT");
    PendingIntent pd = PendingIntent.getBroadcast(this,0,i1,0);
    // Set the alarm
    Calendar calendar = Calendar.getInstance();
    calendar.setTimeInMillis(System.currentTimeMillis());
    Log.e("Hour Before", "startAlarm: "+Calendar.HOUR_OF_DAY);
    calendar.set(calendar.HOUR_OF_DAY, 14);
    Log.e("Hour Before", "startAlarm: "+Calendar.HOUR_OF_DAY);
    Toast.makeText(this, ""+Calendar.HOUR_OF_DAY,     Toast.LENGTH_SHORT).show();
}

toast始终将Calendar.HOUR_OF_DAY的值显示为11(根据Android文档的默认值)。我尝试设置分钟并遇到类似的问题。在调用set方法之前和之后,Calender.MINUTE值为12(我通过输入日志消息进行检查)。

这是日志

05-19 19:35:09.876 20651-20651/? I/art: Late-enabling -Xcheck:jni
05-19 19:35:10.142 20651-20651/com.techies.projects.alarmmanagerdemo D/LenovoAppIconTheme: ExtraResources;cleanCachedIcon;clear cache..
05-19 19:35:10.693 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.063 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.164 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.261 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.361 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.460 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.567 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.667 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.774 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.885 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:11.985 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/data/app/com.techies.projects.alarmmanagerdemo-2/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.techies.projects.alarmmanagerdemo-2@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
05-19 19:35:12.001 20651-20651/com.techies.projects.alarmmanagerdemo W/System: ClassLoader referenced unknown path: /data/app/com.techies.projects.alarmmanagerdemo-2/lib/arm64
05-19 19:35:12.003 20651-20651/com.techies.projects.alarmmanagerdemo D/ActivityThread: installProvider: context.getPackageName()=com.techies.projects.alarmmanagerdemo
05-19 19:35:12.009 20651-20651/com.techies.projects.alarmmanagerdemo I/InstantRun: starting instant run server: is main process
05-19 19:35:12.016 20651-20651/com.techies.projects.alarmmanagerdemo V/InstantRun: Starting server socket listening for package com.techies.projects.alarmmanagerdemo on android.net.LocalSocketAddress@b90ff8a
05-19 19:35:12.017 20651-20651/com.techies.projects.alarmmanagerdemo V/InstantRun: Started server for package com.techies.projects.alarmmanagerdemo
05-19 19:35:12.020 20651-20651/com.techies.projects.alarmmanagerdemo D/ActivityThread: BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{561ea18 com.techies.projects.alarmmanagerdemo}}
05-19 19:35:12.025 20651-20651/com.techies.projects.alarmmanagerdemo V/ActivityThread: Handling launch of ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}} startsNotResumed=false
05-19 19:35:12.049 20651-20661/com.techies.projects.alarmmanagerdemo I/System: FinalizerDaemon: finalize objects = 1
05-19 19:35:12.159 20651-20659/com.techies.projects.alarmmanagerdemo W/art: Suspending all threads took: 5.460ms
05-19 19:35:12.228 20651-20651/com.techies.projects.alarmmanagerdemo V/ActivityThread: ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}}: app=android.app.Application@ee1ead, appName=com.techies.projects.alarmmanagerdemo, pkg=com.techies.projects.alarmmanagerdemo, comp={com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}, dir=/data/app/com.techies.projects.alarmmanagerdemo-2/base.apk
05-19 19:35:12.241 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: getVibeFontPathWithCTS(): fontPath = 
05-19 19:35:12.241 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: getVibeFontPathWithCTS(): fontName = 
05-19 19:35:12.241 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: getVibeFontPathWithCTS(): isForceToSystemDefault = false
05-19 19:35:12.243 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: VIBEUI_setThemeFont(): sVibeFontPath =  null,fontPath = 
05-19 19:35:12.244 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: Pinit()
05-19 19:35:12.244 20651-20651/com.techies.projects.alarmmanagerdemo D/Typeface: hj dbg: init() start, current country=US,language id=en
05-19 19:35:12.591 20651-20651/com.techies.projects.alarmmanagerdemo E/Minikin: addFont failed to create font /system/fonts/Padauk.ttf
05-19 19:35:12.779 20651-20651/com.techies.projects.alarmmanagerdemo E/Minikin: addFont failed to create font /system/fonts/NanumGothic.ttf
05-19 19:35:12.782 20651-20651/com.techies.projects.alarmmanagerdemo E/Minikin: addFont failed to create font /system/fonts/DroidSansFallback.ttf
05-19 19:35:12.782 20651-20651/com.techies.projects.alarmmanagerdemo E/Minikin: addFont failed to create font /system/fonts/MTLmr3m.ttf
05-19 19:35:12.785 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: VIBEUI_setDefaultFont()
05-19 19:35:12.785 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: getVibeFontPathWithCTS(): fontPath = 
05-19 19:35:12.785 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: getVibeFontPathWithCTS(): fontName = 
05-19 19:35:12.785 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: getVibeFontPathWithCTS(): isForceToSystemDefault = false
05-19 19:35:12.785 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: VIBEUI_SYSPROP_FONT_PATH:
05-19 19:35:12.814 20651-20651/com.techies.projects.alarmmanagerdemo W/Typeface: Font is Set to System DefaultFont!
05-19 19:35:13.134 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
05-19 19:35:13.221 20651-20651/com.techies.projects.alarmmanagerdemo E/MultiWindowProxy: getServiceInstance failed!
05-19 19:35:13.223 20651-20651/com.techies.projects.alarmmanagerdemo D/wangcy9: not using Theme.DeviceDefault / Theme.DeviceDefault.Light
05-19 19:35:13.721 20651-20651/com.techies.projects.alarmmanagerdemo V/ActivityThread: Performing resume of ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}}
05-19 19:35:13.738 20651-20651/com.techies.projects.alarmmanagerdemo D/ActivityThread: ACT-AM_ON_RESUME_CALLED ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}}
05-19 19:35:13.738 20651-20651/com.techies.projects.alarmmanagerdemo V/ActivityThread: Resume ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}} started activity: false, hideForNow: false, finished: false
05-19 19:35:13.739 20651-20651/com.techies.projects.alarmmanagerdemo V/PhoneWindow: DecorView setVisiblity: visibility = 4 ,Parent =null, this =com.android.internal.policy.PhoneWindow$DecorView{85fe430 I.E...... R.....ID 0,0-0,0}
05-19 19:35:13.756 20651-20651/com.techies.projects.alarmmanagerdemo D/WindowClient: Add to mViews: com.android.internal.policy.PhoneWindow$DecorView{85fe430 I.E...... R.....ID 0,0-0,0}, this = android.view.WindowManagerGlobal@2b43fec
05-19 19:35:13.761 20651-20651/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: Dumper init 4 threads <0x7fa5aab3c0>
05-19 19:35:13.761 20651-20651/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: <com.techies.projects.alarmmanagerdemo> is running.
05-19 19:35:13.765 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: false
05-19 19:35:13.765 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CanvasContext() 0x7fa106a800
05-19 19:35:13.860 20651-20651/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f4798c0), client(42), share_fd(40)
05-19 19:35:13.860 20651-20651/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f4798c0) (w:1088 h:2048 s:1088 f:0x1 u:0x000100)
05-19 19:35:13.861 20651-20651/com.techies.projects.alarmmanagerdemo D/ViewRootImpl: hardware acceleration is enabled, this = ViewRoot{ec14fb5 com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity,ident = 0}
05-19 19:35:13.868 20651-20651/com.techies.projects.alarmmanagerdemo V/ActivityThread: Resuming ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}} with isForward=true
05-19 19:35:13.881 20651-20651/com.techies.projects.alarmmanagerdemo D/lenovotintstatusbar: Check tint and icon theme, false, false
05-19 19:35:13.881 20651-20651/com.techies.projects.alarmmanagerdemo V/PhoneWindow: DecorView setVisiblity: visibility = 0 ,Parent =ViewRoot{ec14fb5 com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity,ident = 0}, this =com.android.internal.policy.PhoneWindow$DecorView{85fe430 V.E...... R.....ID 0,0-0,0}
05-19 19:35:13.881 20651-20651/com.techies.projects.alarmmanagerdemo V/ActivityThread: Scheduling idle handler for ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}}
05-19 19:35:13.882 20651-20651/com.techies.projects.alarmmanagerdemo D/ActivityThread: ACT-LAUNCH_ACTIVITY handled : 0 / ActivityRecord{6942c71 token=android.os.BinderProxy@ae04ad7 {com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity}}
05-19 19:35:13.994 20651-20663/com.techies.projects.alarmmanagerdemo I/art: Background partial concurrent mark sweep GC freed 462(47KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 1785KB/2MB, paused 483us total 107.346ms
05-19 19:35:14.031 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CanvasContext() 0x7fa106a800 initialize window=0x7fa715f010, title=com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity
05-19 19:35:14.031 20651-20651/com.techies.projects.alarmmanagerdemo D/Surface: Surface::allocateBuffers(this=0x7fa715f000)
05-19 19:35:14.140 20651-20888/com.techies.projects.alarmmanagerdemo E/GED: Failed to get GED Log Buf, err(0)
05-19 19:35:14.145 20651-20888/com.techies.projects.alarmmanagerdemo I/OpenGLRenderer: Initialized EGL, version 1.4
05-19 19:35:14.167 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: Created EGL context (0x7fa58e7300)
05-19 19:35:14.179 20651-20888/com.techies.projects.alarmmanagerdemo I/OpenGLRenderer: Get enable program binary service property (1)
05-19 19:35:14.179 20651-20888/com.techies.projects.alarmmanagerdemo I/OpenGLRenderer: Initializing program atlas...
05-19 19:35:14.184 20651-20888/com.techies.projects.alarmmanagerdemo D/ProgramBinary/Service: BpProgramBinaryService.getFileDescriptor
05-19 19:35:14.189 20651-20888/com.techies.projects.alarmmanagerdemo D/ProgramBinary/Service: BpProgramBinaryService.getProgramMapLen
05-19 19:35:14.189 20651-20888/com.techies.projects.alarmmanagerdemo D/ProgramBinary/Service: BpProgramBinaryService.getProgramMapArray
05-19 19:35:14.190 20651-20888/com.techies.projects.alarmmanagerdemo D/ProgramBinary/Service: BpProgramBinaryService.getProgramBinaryLen
05-19 19:35:14.192 20651-20888/com.techies.projects.alarmmanagerdemo I/OpenGLRenderer: Program binary detail: Binary length is 172384, program map length is 152.
05-19 19:35:14.192 20651-20888/com.techies.projects.alarmmanagerdemo I/OpenGLRenderer: Succeeded to mmap program binaries. File descriptor is 47, and path is /dev/ashmem�.
05-19 19:35:14.192 20651-20888/com.techies.projects.alarmmanagerdemo I/OpenGLRenderer: No need to use file discriptor anymore, close fd(47).
05-19 19:35:14.195 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: Initializing program cache from 0x7faac19bc8, size = 5
05-19 19:35:14.198 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: -- init (key = 0x0000000000000000)
05-19 19:35:14.200 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: -- init (key = 0x0000000000000001)
05-19 19:35:14.202 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: -- init (key = 0x0000000800000003)
05-19 19:35:14.203 20651-20651/com.techies.projects.alarmmanagerdemo W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
05-19 19:35:14.204 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: -- init (key = 0x0000001000500040)
05-19 19:35:14.206 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: -- init (key = 0x0000003800000000)
05-19 19:35:14.207 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::connect(this=0x7fa715f000,api=1)
05-19 19:35:14.208 20651-20888/com.techies.projects.alarmmanagerdemo W/libEGL: [ANDROID_RECORDABLE] format: 1
05-19 19:35:14.209 20651-20888/com.techies.projects.alarmmanagerdemo D/mali_winsys: new_window_surface returns 0x3000
05-19 19:35:14.237 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CacheTexture 2 upload: x, y, width height = 0, 0, 243, 215
05-19 19:35:14.246 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f47a2c0), client(42), share_fd(49)
05-19 19:35:14.246 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f47a2c0) (w:1080 h:1920 s:1088 f:0x1 u:0x000b00)
05-19 19:35:14.254 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: ProgramCache save to disk, size = 5
05-19 19:35:14.260 20651-20651/com.techies.projects.alarmmanagerdemo V/InputMethodManager: onWindowFocus: null softInputMode=288 first=true flags=#81810100
05-19 19:35:14.260 20651-20651/com.techies.projects.alarmmanagerdemo V/InputMethodManager: START INPUT: com.android.internal.policy.PhoneWindow$DecorView{85fe430 V.E...... R.....ID 0,0-1080,1920} ic=null tba=android.view.inputmethod.EditorInfo@4adf669 controlFlags=#104
05-19 19:35:14.284 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f47a5e0), client(42), share_fd(52)
05-19 19:35:14.284 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f47a5e0) (w:1080 h:1920 s:1088 f:0x1 u:0x000b00)
05-19 19:35:17.189 20651-20659/com.techies.projects.alarmmanagerdemo W/art: Suspending all threads took: 35.851ms
05-19 19:35:17.192 20651-20651/com.techies.projects.alarmmanagerdemo D/ViewRootImpl: doProcessInputEvents ViewRoot{ec14fb5 com.techies.projects.alarmmanagerdemo/com.techies.projects.alarmmanagerdemo.MainActivity,ident = 0}
05-19 19:35:17.192 20651-20651/com.techies.projects.alarmmanagerdemo D/View: Touch up dispatch to android.support.v7.widget.AppCompatButton{8a4778d VFED..C.. ...p.... 365,150-715,294 #7f0b005e app:id/button}, event = MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=175.49951, y[0]=12.790192, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=51750450, downTime=51750403, deviceId=7, source=0x1002 }
05-19 19:35:17.212 20651-20651/com.techies.projects.alarmmanagerdemo V/SettingsInterface: invalidate [system]: current 80 != cached 0
05-19 19:35:17.219 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f47a680), client(42), share_fd(54)
05-19 19:35:17.219 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f47a680) (w:1080 h:1920 s:1088 f:0x1 u:0x000b00)
05-19 19:35:17.352 20651-20651/com.techies.projects.alarmmanagerdemo E/Hour Before: startAlarm: 11
05-19 19:35:17.352 20651-20651/com.techies.projects.alarmmanagerdemo E/Hour Before: startAlarm: 11
05-19 19:35:17.361 20651-20651/com.techies.projects.alarmmanagerdemo D/WindowClient: Add to mViews: android.widget.LinearLayout{72a57c6 V.E...... ......I. 0,0-0,0}, this = android.view.WindowManagerGlobal@2b43fec
05-19 19:35:17.369 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f47afe0), client(42), share_fd(56)
05-19 19:35:17.369 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f47afe0) (w:1080 h:1920 s:1088 f:0x1 u:0x000b00)
05-19 19:35:17.377 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CanvasContext() 0x7fa5a82000
05-19 19:35:17.379 20651-20651/com.techies.projects.alarmmanagerdemo D/ViewRootImpl: hardware acceleration is enabled, this = ViewRoot{e4ac620 Toast,ident = 1}
05-19 19:35:17.435 20651-20651/com.techies.projects.alarmmanagerdemo D/Surface: Surface::allocateBuffers(this=0x7f8b1f5200)
05-19 19:35:17.436 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CanvasContext() 0x7fa5a82000 initialize window=0x7f8b1f5210, title=Toast
05-19 19:35:17.437 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::connect(this=0x7f8b1f5200,api=1)
05-19 19:35:17.437 20651-20888/com.techies.projects.alarmmanagerdemo W/libEGL: [ANDROID_RECORDABLE] format: 1
05-19 19:35:17.439 20651-20888/com.techies.projects.alarmmanagerdemo D/mali_winsys: new_window_surface returns 0x3000
05-19 19:35:17.487 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f47a720), client(42), share_fd(60)
05-19 19:35:17.488 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f47a720) (w:380 h:132 s:384 f:0x1 u:0x000b00)
05-19 19:35:17.489 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CacheTexture 2 upload: x, y, width height = 0, 0, 250, 154
05-19 19:35:17.550 20651-20888/com.techies.projects.alarmmanagerdemo V/RenderScript: 0x7f8b17e000 Launching thread(s), CPUs 8
05-19 19:35:19.346 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::disconnect(this=0x7f8b1f5200,api=1)
05-19 19:35:19.349 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: unregister, handle(0x7f8f47a720) (w:380 h:132 s:384 f:0x1 u:0x000b00)
05-19 19:35:19.349 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [-]r_hnd(0x7f8f47a720), client(42), share_fd(60)
05-19 19:35:19.349 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::disconnect(this=0x7f8b1f5200,api=1)
05-19 19:35:19.351 20651-20651/com.techies.projects.alarmmanagerdemo D/WindowClient: Add to mViews: android.widget.LinearLayout{4642a52 V.E...... ......I. 0,0-0,0}, this = android.view.WindowManagerGlobal@2b43fec
05-19 19:35:19.352 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CanvasContext() 0x7fa5a85800
05-19 19:35:19.353 20651-20651/com.techies.projects.alarmmanagerdemo D/ViewRootImpl: hardware acceleration is enabled, this = ViewRoot{bf6999e Toast,ident = 2}
05-19 19:35:19.366 20651-20651/com.techies.projects.alarmmanagerdemo D/WindowClient: Remove from mViews: android.widget.LinearLayout{72a57c6 V.E...... ......I. 0,0-380,132}, this = android.view.WindowManagerGlobal@2b43fec
05-19 19:35:19.385 20651-20651/com.techies.projects.alarmmanagerdemo D/Surface: Surface::allocateBuffers(this=0x7f8b1f5200)
05-19 19:35:19.388 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CanvasContext() 0x7fa5a85800 initialize window=0x7f8b1f5210, title=Toast
05-19 19:35:19.388 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::connect(this=0x7f8b1f5200,api=1)
05-19 19:35:19.388 20651-20888/com.techies.projects.alarmmanagerdemo W/libEGL: [ANDROID_RECORDABLE] format: 1
05-19 19:35:19.389 20651-20888/com.techies.projects.alarmmanagerdemo D/mali_winsys: new_window_surface returns 0x3000
05-19 19:35:19.402 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [+]r_hnd(0x7f8f47a720), client(42), share_fd(64)
05-19 19:35:19.402 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: register, handle(0x7f8f47a720) (w:192 h:132 s:192 f:0x1 u:0x000b00)
05-19 19:35:19.403 20651-20888/com.techies.projects.alarmmanagerdemo D/OpenGLRenderer: CacheTexture 2 upload: x, y, width height = 148, 100, 13, 32
05-19 19:35:21.351 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::disconnect(this=0x7f8b1f5200,api=1)
05-19 19:35:21.353 20651-20888/com.techies.projects.alarmmanagerdemo D/GraphicBuffer: unregister, handle(0x7f8f47a720) (w:192 h:132 s:192 f:0x1 u:0x000b00)
05-19 19:35:21.354 20651-20888/com.techies.projects.alarmmanagerdemo I/[MALI][Gralloc]: [-]r_hnd(0x7f8f47a720), client(42), share_fd(64)
05-19 19:35:21.354 20651-20888/com.techies.projects.alarmmanagerdemo D/Surface: Surface::disconnect(this=0x7f8b1f5200,api=1)
05-19 19:35:21.359 20651-20651/com.techies.projects.alarmmanagerdemo D/WindowClient: Remove from mViews: android.widget.LinearLayout{4642a52 V.E...... ........ 0,0-192,132}, this = android.view.WindowManagerGlobal@2b43fec

1 个答案:

答案 0 :(得分:0)

如果我理解正确,您想要更改从Calendar.getInstance()获得的小时数?

简单地说:

librosa

然后日历(cal)将具有第14天和第14分钟的小时。 要从cal:

中检索小时和分钟值
Calendar cal = Calendar.getInstance(TimeZone.getDefault());
    cal.set(Calendar.HOUR_OF_DAY, 14);
    cal.set(Calendar.MINUTE, 14);