Loading AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" coreApp="true" package="com.android.dialer" android:versionCode="240000" android:versionName="18.0"> android:versionCode="250000" android:versionName="19.0"> <uses-sdk android:minSdkVersion="23" Loading java/com/android/dialer/binary/google/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" coreApp="true" package="com.google.android.google_stub_dialer" android:versionCode="240000" android:versionName="18.0"> android:versionCode="250000" android:versionName="19.0"> <uses-sdk android:minSdkVersion="23" Loading java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java +18 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.support.v4.content.LocalBroadcastManager; import com.android.dialer.common.LogUtil; import com.android.dialer.logging.ReportingLocation; /** * Notifies that a dialog for blocking a number and/or marking it as spam/not spam should be shown. Loading @@ -35,9 +36,15 @@ public final class ShowBlockReportSpamDialogNotifier { * @param normalizedNumber The number to be blocked/marked as spam * @param countryIso The ISO 3166-1 two letters country code for the number * @param callType Call type defined in {@link android.provider.CallLog.Calls} * @param reportingLocation The location where the number is reported. See {@link * ReportingLocation.Type}. */ public static void notifyShowDialogToBlockNumberAndOptionallyReportSpam( Context context, String normalizedNumber, String countryIso, int callType) { Context context, String normalizedNumber, String countryIso, int callType, ReportingLocation.Type reportingLocation) { LogUtil.enterBlock( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam"); Loading @@ -49,6 +56,8 @@ public final class ShowBlockReportSpamDialogNotifier { intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER, normalizedNumber); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO, countryIso); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE, callType); intent.putExtra( ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION, reportingLocation.getNumber()); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } Loading @@ -60,9 +69,15 @@ public final class ShowBlockReportSpamDialogNotifier { * @param normalizedNumber The number to be reported as not spam * @param countryIso The ISO 3166-1 two letters country code for the number * @param callType Call type defined in {@link android.provider.CallLog.Calls} * @param reportingLocation The location where the number is reported. See {@link * ReportingLocation.Type}. */ public static void notifyShowDialogToReportNotSpam( Context context, String normalizedNumber, String countryIso, int callType) { Context context, String normalizedNumber, String countryIso, int callType, ReportingLocation.Type reportingLocation) { LogUtil.enterBlock("ShowBlockReportSpamDialogNotifier.notifyShowDialogToReportNotSpam"); Intent intent = new Intent(); Loading @@ -70,6 +85,7 @@ public final class ShowBlockReportSpamDialogNotifier { intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER, normalizedNumber); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO, countryIso); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE, callType); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION, reportingLocation); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } Loading java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogReceiver.java +15 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { static final String EXTRA_NUMBER = "number"; static final String EXTRA_COUNTRY_ISO = "country_iso"; static final String EXTRA_CALL_TYPE = "call_type"; static final String EXTRA_REPORTING_LOCATION = "reporting_location"; /** {@link FragmentManager} needed to show a {@link android.app.DialogFragment}. */ private final FragmentManager fragmentManager; Loading Loading @@ -87,10 +88,16 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { Assert.checkArgument(intent.hasExtra(EXTRA_NUMBER)); Assert.checkArgument(intent.hasExtra(EXTRA_COUNTRY_ISO)); Assert.checkArgument(intent.hasExtra(EXTRA_CALL_TYPE)); Assert.checkArgument(intent.hasExtra(EXTRA_REPORTING_LOCATION)); String normalizedNumber = intent.getStringExtra(EXTRA_NUMBER); String countryIso = intent.getStringExtra(EXTRA_COUNTRY_ISO); int callType = intent.getIntExtra(EXTRA_CALL_TYPE, 0); ReportingLocation.Type reportingLocation = ReportingLocation.Type.forNumber( intent.getIntExtra( EXTRA_REPORTING_LOCATION, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION.getNumber())); Spam spam = SpamComponent.get(context).spam(); Loading @@ -113,7 +120,7 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { normalizedNumber, countryIso, callType, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION /* TODO(a bug): Fix. */, reportingLocation, ContactSource.Type.UNKNOWN_SOURCE_TYPE /* TODO(a bug): Fix. */); } Loading @@ -140,10 +147,16 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { Assert.checkArgument(intent.hasExtra(EXTRA_NUMBER)); Assert.checkArgument(intent.hasExtra(EXTRA_COUNTRY_ISO)); Assert.checkArgument(intent.hasExtra(EXTRA_CALL_TYPE)); Assert.checkArgument(intent.hasExtra(EXTRA_REPORTING_LOCATION)); String normalizedNumber = intent.getStringExtra(EXTRA_NUMBER); String countryIso = intent.getStringExtra(EXTRA_COUNTRY_ISO); int callType = intent.getIntExtra(EXTRA_CALL_TYPE, 0); ReportingLocation.Type reportingLocation = ReportingLocation.Type.forNumber( intent.getIntExtra( EXTRA_REPORTING_LOCATION, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION.getNumber())); // Set up the positive listener for the dialog. OnConfirmListener onConfirmListener = Loading @@ -158,7 +171,7 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { normalizedNumber, countryIso, callType, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION /* TODO(a bug): Fix. */, reportingLocation, ContactSource.Type.UNKNOWN_SOURCE_TYPE /* TODO(a bug): Fix. */); } }; Loading java/com/android/dialer/calllog/ui/menu/Modules.java +3 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import com.android.dialer.contactactions.DividerModule; import com.android.dialer.contactactions.IntentModule; import com.android.dialer.contactactions.SharedModules; import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.logging.ReportingLocation; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.telecom.TelecomUtil; import com.google.common.base.Optional; Loading Loading @@ -79,7 +80,8 @@ final class Modules { row.number().getCountryIso(), row.callType(), row.numberAttributes().getIsBlocked(), row.numberAttributes().getIsSpam()); row.numberAttributes().getIsSpam(), ReportingLocation.Type.CALL_LOG_HISTORY); SharedModules.maybeAddModuleForCopyingNumber(context, modules, normalizedNumber); } Loading Loading
AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" coreApp="true" package="com.android.dialer" android:versionCode="240000" android:versionName="18.0"> android:versionCode="250000" android:versionName="19.0"> <uses-sdk android:minSdkVersion="23" Loading
java/com/android/dialer/binary/google/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" coreApp="true" package="com.google.android.google_stub_dialer" android:versionCode="240000" android:versionName="18.0"> android:versionCode="250000" android:versionName="19.0"> <uses-sdk android:minSdkVersion="23" Loading
java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java +18 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.support.v4.content.LocalBroadcastManager; import com.android.dialer.common.LogUtil; import com.android.dialer.logging.ReportingLocation; /** * Notifies that a dialog for blocking a number and/or marking it as spam/not spam should be shown. Loading @@ -35,9 +36,15 @@ public final class ShowBlockReportSpamDialogNotifier { * @param normalizedNumber The number to be blocked/marked as spam * @param countryIso The ISO 3166-1 two letters country code for the number * @param callType Call type defined in {@link android.provider.CallLog.Calls} * @param reportingLocation The location where the number is reported. See {@link * ReportingLocation.Type}. */ public static void notifyShowDialogToBlockNumberAndOptionallyReportSpam( Context context, String normalizedNumber, String countryIso, int callType) { Context context, String normalizedNumber, String countryIso, int callType, ReportingLocation.Type reportingLocation) { LogUtil.enterBlock( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam"); Loading @@ -49,6 +56,8 @@ public final class ShowBlockReportSpamDialogNotifier { intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER, normalizedNumber); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO, countryIso); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE, callType); intent.putExtra( ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION, reportingLocation.getNumber()); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } Loading @@ -60,9 +69,15 @@ public final class ShowBlockReportSpamDialogNotifier { * @param normalizedNumber The number to be reported as not spam * @param countryIso The ISO 3166-1 two letters country code for the number * @param callType Call type defined in {@link android.provider.CallLog.Calls} * @param reportingLocation The location where the number is reported. See {@link * ReportingLocation.Type}. */ public static void notifyShowDialogToReportNotSpam( Context context, String normalizedNumber, String countryIso, int callType) { Context context, String normalizedNumber, String countryIso, int callType, ReportingLocation.Type reportingLocation) { LogUtil.enterBlock("ShowBlockReportSpamDialogNotifier.notifyShowDialogToReportNotSpam"); Intent intent = new Intent(); Loading @@ -70,6 +85,7 @@ public final class ShowBlockReportSpamDialogNotifier { intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER, normalizedNumber); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO, countryIso); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE, callType); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION, reportingLocation); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } Loading
java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogReceiver.java +15 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { static final String EXTRA_NUMBER = "number"; static final String EXTRA_COUNTRY_ISO = "country_iso"; static final String EXTRA_CALL_TYPE = "call_type"; static final String EXTRA_REPORTING_LOCATION = "reporting_location"; /** {@link FragmentManager} needed to show a {@link android.app.DialogFragment}. */ private final FragmentManager fragmentManager; Loading Loading @@ -87,10 +88,16 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { Assert.checkArgument(intent.hasExtra(EXTRA_NUMBER)); Assert.checkArgument(intent.hasExtra(EXTRA_COUNTRY_ISO)); Assert.checkArgument(intent.hasExtra(EXTRA_CALL_TYPE)); Assert.checkArgument(intent.hasExtra(EXTRA_REPORTING_LOCATION)); String normalizedNumber = intent.getStringExtra(EXTRA_NUMBER); String countryIso = intent.getStringExtra(EXTRA_COUNTRY_ISO); int callType = intent.getIntExtra(EXTRA_CALL_TYPE, 0); ReportingLocation.Type reportingLocation = ReportingLocation.Type.forNumber( intent.getIntExtra( EXTRA_REPORTING_LOCATION, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION.getNumber())); Spam spam = SpamComponent.get(context).spam(); Loading @@ -113,7 +120,7 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { normalizedNumber, countryIso, callType, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION /* TODO(a bug): Fix. */, reportingLocation, ContactSource.Type.UNKNOWN_SOURCE_TYPE /* TODO(a bug): Fix. */); } Loading @@ -140,10 +147,16 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { Assert.checkArgument(intent.hasExtra(EXTRA_NUMBER)); Assert.checkArgument(intent.hasExtra(EXTRA_COUNTRY_ISO)); Assert.checkArgument(intent.hasExtra(EXTRA_CALL_TYPE)); Assert.checkArgument(intent.hasExtra(EXTRA_REPORTING_LOCATION)); String normalizedNumber = intent.getStringExtra(EXTRA_NUMBER); String countryIso = intent.getStringExtra(EXTRA_COUNTRY_ISO); int callType = intent.getIntExtra(EXTRA_CALL_TYPE, 0); ReportingLocation.Type reportingLocation = ReportingLocation.Type.forNumber( intent.getIntExtra( EXTRA_REPORTING_LOCATION, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION.getNumber())); // Set up the positive listener for the dialog. OnConfirmListener onConfirmListener = Loading @@ -158,7 +171,7 @@ public final class ShowBlockReportSpamDialogReceiver extends BroadcastReceiver { normalizedNumber, countryIso, callType, ReportingLocation.Type.UNKNOWN_REPORTING_LOCATION /* TODO(a bug): Fix. */, reportingLocation, ContactSource.Type.UNKNOWN_SOURCE_TYPE /* TODO(a bug): Fix. */); } }; Loading
java/com/android/dialer/calllog/ui/menu/Modules.java +3 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import com.android.dialer.contactactions.DividerModule; import com.android.dialer.contactactions.IntentModule; import com.android.dialer.contactactions.SharedModules; import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.logging.ReportingLocation; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.telecom.TelecomUtil; import com.google.common.base.Optional; Loading Loading @@ -79,7 +80,8 @@ final class Modules { row.number().getCountryIso(), row.callType(), row.numberAttributes().getIsBlocked(), row.numberAttributes().getIsSpam()); row.numberAttributes().getIsSpam(), ReportingLocation.Type.CALL_LOG_HISTORY); SharedModules.maybeAddModuleForCopyingNumber(context, modules, normalizedNumber); } Loading