Android KK version after receiving SMS, light screen operation

Source: Internet
Author: User

Alps/packages/apps/mms/src/comandroid\mms\transation\messagingnotification.java
private static void UpdateNotification () method

if (isnew) {
Messageutils.handlenewnotification (context, messagecount);
M:add for OP09 @{
if (Mmsconfig.issupportctfeature ()) {
Wakeupscreen (context);//Here is actually the way to wake up the screen, but because it is in accordance with the needs of OP09, the inside requirements in the condition of inserting headphones will wake up, if acceptable, please remove the above if judgment, if not accept, In the next else branch, write another method.
}

else{
PowerManager PowerManager = (PowerManager) (Context.getsystemservice (Context.power_service));
Powermanager.wakelock WakeLock = null;
WakeLock = Powermanager.newwakelock (Powermanager.full_wake_lock | Powermanager.acquire_causes_wakeup
| Powermanager.on_after_release, "Mms_wake_lock");
Long wakeuptime = 0;
try {
Contentresolver CR = Context.getcontentresolver ();
Wakeuptime = Android.provider.Settings.System.getInt (CR, Settings.System.SCREEN_OFF_TIMEOUT);
} catch (Settingnotfoundexception e) {
MMSLOG.E (TAG, "Exception occured in Wakeupscreen ()");
}
Wakelock.acquire (Wakeuptime); }
}

/// @}
}

Android KK version after receiving SMS, light screen operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.