Loading packages/Keyguard/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" /> <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL" /> <uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" /> <uses-permission android:name="android.permission.READ_CALL_LOG" /> <application android:label="@string/app_name" android:process="com.android.systemui" Loading packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java +13 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import android.os.Handler; import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.provider.MediaStore; import android.util.Log; import android.view.WindowManager; Loading @@ -51,6 +53,7 @@ public abstract class KeyguardActivityLauncher { private static final Intent INSECURE_CAMERA_INTENT = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA); private static final Intent CALL_INTENT = new Intent(Intent.ACTION_DIAL); private static final Intent CALL_LOG_LIST_INTENT = new Intent(Intent.ACTION_VIEW); private static final Intent SMS_INTENT = new Intent(Intent.ACTION_MAIN); abstract Context getContext(); Loading Loading @@ -124,8 +127,17 @@ public abstract class KeyguardActivityLauncher { } public void launchCall() { KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(getContext()); final int missedCount = monitor.getUnreadCallCount(); if (missedCount > 0) { // Go to call log list CALL_LOG_LIST_INTENT.setType(CallLog.Calls.CONTENT_TYPE); launchActivity(CALL_LOG_LIST_INTENT, false, false, null, null); } else { // Go to dialer by default launchActivity(CALL_INTENT, false, false, null, null); } } public void launchMessage() { SMS_INTENT.setType("vnd.android-dir/mms-sms"); Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,13 @@ public class KeyguardUpdateMonitor { private ComponentName []mComponentName; private boolean mShowLockscreenCustomTargets; public int getUnreadCallCount() { if (mShowLockscreenCustomTargets) { return mUnreadNum[DIALER_UNREAD]; } return -1; } private final Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { Loading Loading
packages/Keyguard/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" /> <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL" /> <uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" /> <uses-permission android:name="android.permission.READ_CALL_LOG" /> <application android:label="@string/app_name" android:process="com.android.systemui" Loading
packages/Keyguard/src/com/android/keyguard/KeyguardActivityLauncher.java +13 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import android.os.Handler; import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.provider.MediaStore; import android.util.Log; import android.view.WindowManager; Loading @@ -51,6 +53,7 @@ public abstract class KeyguardActivityLauncher { private static final Intent INSECURE_CAMERA_INTENT = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA); private static final Intent CALL_INTENT = new Intent(Intent.ACTION_DIAL); private static final Intent CALL_LOG_LIST_INTENT = new Intent(Intent.ACTION_VIEW); private static final Intent SMS_INTENT = new Intent(Intent.ACTION_MAIN); abstract Context getContext(); Loading Loading @@ -124,8 +127,17 @@ public abstract class KeyguardActivityLauncher { } public void launchCall() { KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(getContext()); final int missedCount = monitor.getUnreadCallCount(); if (missedCount > 0) { // Go to call log list CALL_LOG_LIST_INTENT.setType(CallLog.Calls.CONTENT_TYPE); launchActivity(CALL_LOG_LIST_INTENT, false, false, null, null); } else { // Go to dialer by default launchActivity(CALL_INTENT, false, false, null, null); } } public void launchMessage() { SMS_INTENT.setType("vnd.android-dir/mms-sms"); Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,13 @@ public class KeyguardUpdateMonitor { private ComponentName []mComponentName; private boolean mShowLockscreenCustomTargets; public int getUnreadCallCount() { if (mShowLockscreenCustomTargets) { return mUnreadNum[DIALER_UNREAD]; } return -1; } private final Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { Loading