Back to project page HistoryCleanerPro.
The source code is released under:
Copyright (c) 2014, John Phillips All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project HistoryCleanerPro listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ayros.historycleaner.cleaning.items; //ww w . j ava 2s.c om import android.content.pm.PackageManager; import com.ayros.historycleaner.Globals; import com.ayros.historycleaner.cleaning.Category; import com.ayros.historycleaner.cleaning.CleanItem; public class _System_RecentCalls extends CleanItem { public _System_RecentCalls(Category parent) { super(parent); } @Override public String getDisplayName() { return "Recent Calls"; } @Override public String getPackageName() { return "com.android.phone"; } @Override public boolean isApplicable() { PackageManager pm = Globals.getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY); } @Override public boolean runOnUIThread() { return true; } @Override public boolean isRootRequired() { return false; } @Override public boolean clean() { Globals.getContext().getContentResolver().delete(android.provider.CallLog.Calls.CONTENT_URI, null, null); return true; } }