Reduce usage of Log.w()

This commit is contained in:
Greyson Parrelli 2018-08-02 09:25:33 -04:00
parent a498176043
commit 43068e0613
115 changed files with 400 additions and 387 deletions

View File

@ -274,7 +274,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onCreate(Bundle state, boolean ready) {
Log.w(TAG, "onCreate()");
Log.i(TAG, "onCreate()");
supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY);
setContentView(R.layout.conversation_activity);
@ -316,7 +316,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onNewIntent(Intent intent) {
Log.w(TAG, "onNewIntent()");
Log.i(TAG, "onNewIntent()");
if (isFinishing()) {
Log.w(TAG, "Activity is finishing...");
@ -370,7 +370,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
MessageNotifier.setVisibleThread(threadId);
markThreadAsRead();
Log.w(TAG, "onResume() Finished: " + (System.currentTimeMillis() - getIntent().getLongExtra(TIMING_EXTRA, 0)));
Log.i(TAG, "onResume() Finished: " + (System.currentTimeMillis() - getIntent().getLongExtra(TIMING_EXTRA, 0)));
}
@Override
@ -395,7 +395,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void onConfigurationChanged(Configuration newConfig) {
Log.w(TAG, "onConfigurationChanged(" + newConfig.orientation + ")");
Log.i(TAG, "onConfigurationChanged(" + newConfig.orientation + ")");
super.onConfigurationChanged(newConfig);
composeText.setTransport(sendButton.getSelectedTransport());
quickAttachmentDrawer.onConfigurationChanged();
@ -415,7 +415,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void onActivityResult(final int reqCode, int resultCode, Intent data) {
Log.w(TAG, "onActivityResult called: " + reqCode + ", " + resultCode + " , " + data);
Log.i(TAG, "onActivityResult called: " + reqCode + ", " + resultCode + " , " + data);
super.onActivityResult(reqCode, resultCode, data);
if ((data == null && reqCode != TAKE_PHOTO && reqCode != SMS_DEFAULT) ||
@ -589,7 +589,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void onBackPressed() {
Log.w(TAG, "onBackPressed()");
Log.d(TAG, "onBackPressed()");
if (container.isInputOpen()) container.hideCurrentInput(composeText);
else super.onBackPressed();
}
@ -972,7 +972,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void handleSecurityChange(boolean isSecureText, boolean isDefaultSms) {
Log.w(TAG, "handleSecurityChange(" + isSecureText + ", " + isDefaultSms + ")");
Log.i(TAG, "handleSecurityChange(" + isSecureText + ", " + isDefaultSms + ")");
if (isSecurityInitialized && isSecureText == this.isSecureText && isDefaultSms == this.isDefaultSms) {
return;
}
@ -1108,33 +1108,33 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
protected boolean[] doInBackground(Recipient... params) {
Context context = ConversationActivity.this;
Recipient recipient = params[0];
Log.w(TAG, "Resolving registered state...");
Log.i(TAG, "Resolving registered state...");
RegisteredState registeredState;
if (recipient.isPushGroupRecipient()) {
Log.w(TAG, "Push group recipient...");
Log.i(TAG, "Push group recipient...");
registeredState = RegisteredState.REGISTERED;
} else if (recipient.isResolving()) {
Log.w(TAG, "Talking to DB directly.");
Log.i(TAG, "Talking to DB directly.");
registeredState = DatabaseFactory.getRecipientDatabase(ConversationActivity.this).isRegistered(recipient.getAddress());
} else {
Log.w(TAG, "Checking through resolved recipient");
Log.i(TAG, "Checking through resolved recipient");
registeredState = recipient.resolve().getRegistered();
}
Log.w(TAG, "Resolved registered state: " + registeredState);
Log.i(TAG, "Resolved registered state: " + registeredState);
boolean signalEnabled = TextSecurePreferences.isPushRegistered(context);
if (registeredState == RegisteredState.UNKNOWN) {
try {
Log.w(TAG, "Refreshing directory for user: " + recipient.getAddress().serialize());
Log.i(TAG, "Refreshing directory for user: " + recipient.getAddress().serialize());
registeredState = DirectoryHelper.refreshDirectoryFor(context, recipient);
} catch (IOException e) {
Log.w(TAG, e);
}
}
Log.w(TAG, "Returning registered state...");
Log.i(TAG, "Returning registered state...");
return new boolean[] {registeredState == RegisteredState.REGISTERED && signalEnabled,
Util.isDefaultSmsProvider(context)};
}
@ -1142,7 +1142,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onPostExecute(boolean[] result) {
if (result[0] != currentSecureText || result[1] != currentIsDefaultSms) {
Log.w(TAG, "onPostExecute() handleSecurityChange: " + result[0] + " , " + result[1]);
Log.i(TAG, "onPostExecute() handleSecurityChange: " + result[0] + " , " + result[1]);
handleSecurityChange(result[0], result[1]);
}
future.set(true);
@ -1154,13 +1154,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void onSecurityUpdated() {
Log.w(TAG, "onSecurityUpdated()");
Log.i(TAG, "onSecurityUpdated()");
updateReminders(recipient.hasSeenInviteReminder());
updateDefaultSubscriptionId(recipient.getDefaultSubscriptionId());
}
protected void updateReminders(boolean seenInvite) {
Log.w(TAG, "updateReminders(" + seenInvite + ")");
Log.i(TAG, "updateReminders(" + seenInvite + ")");
if (UnauthorizedReminder.isEligible(this)) {
reminderView.get().showReminder(new UnauthorizedReminder(this));
@ -1187,7 +1187,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void updateDefaultSubscriptionId(Optional<Integer> defaultSubscriptionId) {
Log.w(TAG, "updateDefaultSubscriptionId(" + defaultSubscriptionId.orNull() + ")");
Log.i(TAG, "updateDefaultSubscriptionId(" + defaultSubscriptionId.orNull() + ")");
sendButton.setDefaultSubscriptionId(defaultSubscriptionId);
}
@ -1223,7 +1223,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
for (Recipient recipient : recipients) {
Log.w(TAG, "Loading identity for: " + recipient.getAddress());
Log.i(TAG, "Loading identity for: " + recipient.getAddress());
identityRecordList.add(identityDatabase.getIdentity(recipient.getAddress()));
}
@ -1238,16 +1238,16 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onPostExecute(@NonNull Pair<IdentityRecordList, String> result) {
Log.w(TAG, "Got identity records: " + result.first.isUnverified());
Log.i(TAG, "Got identity records: " + result.first.isUnverified());
identityRecords.replaceWith(result.first);
if (result.second != null) {
Log.w(TAG, "Replacing banner...");
Log.d(TAG, "Replacing banner...");
unverifiedBannerView.get().display(result.second, result.first.getUnverifiedRecords(),
new UnverifiedClickedListener(),
new UnverifiedDismissedListener());
} else if (unverifiedBannerView.resolved()) {
Log.w(TAG, "Clearing banner...");
Log.d(TAG, "Clearing banner...");
unverifiedBannerView.get().hide();
}
@ -1362,7 +1362,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void initializeProfiles() {
if (!isSecureText) {
Log.w(TAG, "SMS contact, no profile fetch needed.");
Log.i(TAG, "SMS contact, no profile fetch needed.");
return;
}
@ -1373,9 +1373,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void onModified(final Recipient recipient) {
Log.w(TAG, "onModified(" + recipient.getAddress().serialize() + ")");
Log.i(TAG, "onModified(" + recipient.getAddress().serialize() + ")");
Util.runOnMain(() -> {
Log.w(TAG, "onModifiedRun(): " + recipient.getRegistered());
Log.i(TAG, "onModifiedRun(): " + recipient.getRegistered());
titleView.setTitle(glideRequests, recipient);
titleView.setVerified(identityRecords.isVerified());
setBlockedUserState(recipient, isSecureText, isDefaultSms);
@ -1410,7 +1410,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
//////// Helper Methods
private void addAttachment(int type) {
Log.w("ComposeMessageActivity", "Selected: " + type);
Log.i(TAG, "Selected: " + type);
switch (type) {
case AttachmentTypeSelector.ADD_GALLERY:
AttachmentManager.selectGallery(this, PICK_GALLERY); break;
@ -1718,8 +1718,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
long expiresIn = recipient.getExpireMessages() * 1000L;
boolean initiating = threadId == -1;
Log.w(TAG, "isManual Selection: " + sendButton.isManualSelection());
Log.w(TAG, "forceSms: " + forceSms);
Log.i(TAG, "isManual Selection: " + sendButton.isManualSelection());
Log.i(TAG, "forceSms: " + forceSms);
if ((recipient.isMmsGroupRecipient() || recipient.getAddress().isEmail()) && !isMmsEnabled) {
handleManualMmsRequired();
@ -1747,7 +1747,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void sendMediaMessage(final boolean forceSms, final long expiresIn, final int subscriptionId, boolean initiating)
throws InvalidMessageException
{
Log.w(TAG, "Sending media message...");
Log.i(TAG, "Sending media message...");
sendMediaMessage(forceSms, getMessage(), attachmentManager.buildSlideDeck(), Collections.emptyList(), expiresIn, subscriptionId, initiating);
}
@ -2198,7 +2198,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private class UnverifiedClickedListener implements UnverifiedBannerView.ClickListener {
@Override
public void onClicked(final List<IdentityRecord> unverifiedIdentities) {
Log.w(TAG, "onClicked: " + unverifiedIdentities.size());
Log.i(TAG, "onClicked: " + unverifiedIdentities.size());
if (unverifiedIdentities.size() == 1) {
Intent intent = new Intent(ConversationActivity.this, VerifyIdentityActivity.class);
intent.putExtra(VerifyIdentityActivity.ADDRESS_EXTRA, unverifiedIdentities.get(0).getAddress());

View File

@ -209,7 +209,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
recordToPulseHighlight = null;
}
Log.w(TAG, "Bind time: " + (System.currentTimeMillis() - start));
Log.d(TAG, "Bind time: " + (System.currentTimeMillis() - start));
}
@Override
@ -228,7 +228,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
return true;
});
itemView.setEventListener(clickListener);
Log.w(TAG, "Inflate time: " + (System.currentTimeMillis() - start));
Log.d(TAG, "Inflate time: " + (System.currentTimeMillis() - start));
return new ViewHolder(itemView);
}

View File

@ -460,7 +460,7 @@ public class ConversationFragment extends Fragment
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
Log.w(TAG, "onCreateLoader");
Log.i(TAG, "onCreateLoader");
loaderStartTime = System.currentTimeMillis();
int limit = args.getInt(KEY_LIMIT, PARTIAL_CONVERSATION_LIMIT);
@ -477,7 +477,7 @@ public class ConversationFragment extends Fragment
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
long loadTime = System.currentTimeMillis() - loaderStartTime;
int count = cursor.getCount();
Log.w(TAG, "onLoadFinished - took " + loadTime + " ms to load a cursor of size " + count);
Log.i(TAG, "onLoadFinished - took " + loadTime + " ms to load a cursor of size " + count);
ConversationLoader loader = (ConversationLoader)cursorLoader;
ConversationAdapter adapter = getListAdapter();

View File

@ -890,9 +890,9 @@ public class ConversationItem extends LinearLayout
context.startActivity(intent);
} else if (slide.getUri() != null) {
Log.w(TAG, "Clicked: " + slide.getUri() + " , " + slide.getContentType());
Log.i(TAG, "Clicked: " + slide.getUri() + " , " + slide.getContentType());
Uri publicUri = PartAuthority.getAttachmentPublicUri(slide.getUri());
Log.w(TAG, "Public URI: " + publicUri);
Log.i(TAG, "Public URI: " + publicUri);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.setDataAndType(PartAuthority.getAttachmentPublicUri(slide.getUri()), slide.getContentType());

View File

@ -115,7 +115,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
this.masterSecret = KeyCachingService.getMasterSecret(this);
if (needsUpgradeTask()) {
Log.w("DatabaseUpgradeActivity", "Upgrading...");
Log.i("DatabaseUpgradeActivity", "Upgrading...");
setContentView(R.layout.database_upgrade_activity);
ProgressBar indeterminateProgress = findViewById(R.id.indeterminate_progress);
@ -135,13 +135,13 @@ public class DatabaseUpgradeActivity extends BaseActivity {
int currentVersionCode = Util.getCurrentApkReleaseVersion(this);
int lastSeenVersion = VersionTracker.getLastSeenVersion(this);
Log.w("DatabaseUpgradeActivity", "LastSeenVersion: " + lastSeenVersion);
Log.i("DatabaseUpgradeActivity", "LastSeenVersion: " + lastSeenVersion);
if (lastSeenVersion >= currentVersionCode)
return false;
for (int version : UPGRADE_VERSIONS) {
Log.w("DatabaseUpgradeActivity", "Comparing: " + version);
Log.i("DatabaseUpgradeActivity", "Comparing: " + version);
if (lastSeenVersion < version)
return true;
}
@ -192,7 +192,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
protected Void doInBackground(Integer... params) {
Context context = DatabaseUpgradeActivity.this.getApplicationContext();
Log.w("DatabaseUpgradeActivity", "Running background upgrade..");
Log.i("DatabaseUpgradeActivity", "Running background upgrade..");
DatabaseFactory.getInstance(DatabaseUpgradeActivity.this)
.onApplicationLevelUpgrade(context, masterSecret, params[0], this);
@ -314,16 +314,16 @@ public class DatabaseUpgradeActivity extends BaseActivity {
final MmsDatabase mmsDb = DatabaseFactory.getMmsDatabase(context);
final List<DatabaseAttachment> pendingAttachments = DatabaseFactory.getAttachmentDatabase(context).getPendingAttachments();
Log.w(TAG, pendingAttachments.size() + " pending parts.");
Log.i(TAG, pendingAttachments.size() + " pending parts.");
for (DatabaseAttachment attachment : pendingAttachments) {
final Reader reader = mmsDb.readerFor(mmsDb.getMessage(attachment.getMmsId()));
final MessageRecord record = reader.getNext();
if (attachment.hasData()) {
Log.w(TAG, "corrected a pending media part " + attachment.getAttachmentId() + "that already had data.");
Log.i(TAG, "corrected a pending media part " + attachment.getAttachmentId() + "that already had data.");
attachmentDb.setTransferState(attachment.getMmsId(), attachment.getAttachmentId(), AttachmentDatabase.TRANSFER_PROGRESS_DONE);
} else if (record != null && !record.isOutgoing() && record.isPush()) {
Log.w(TAG, "queuing new attachment download job for incoming push part " + attachment.getAttachmentId() + ".");
Log.i(TAG, "queuing new attachment download job for incoming push part " + attachment.getAttachmentId() + ".");
ApplicationContext.getInstance(context)
.getJobManager()
.add(new AttachmentDownloadJob(context, attachment.getMmsId(), attachment.getAttachmentId(), false));

View File

@ -172,7 +172,7 @@ public class ExperienceUpgradeActivity extends BaseActionBarActivity {
public static Optional<ExperienceUpgrade> getExperienceUpgrade(Context context) {
final int currentVersionCode = Util.getCurrentApkReleaseVersion(context);
final int lastSeenVersion = TextSecurePreferences.getLastExperienceVersionCode(context);
Log.w(TAG, "getExperienceUpgrade(" + lastSeenVersion + ")");
Log.i(TAG, "getExperienceUpgrade(" + lastSeenVersion + ")");
if (lastSeenVersion >= currentVersionCode) {
TextSecurePreferences.setLastExperienceVersionCode(context, currentVersionCode);

View File

@ -197,7 +197,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
finish();
}
Log.w(TAG, "Loading Part URI: " + initialMediaUri);
Log.i(TAG, "Loading Part URI: " + initialMediaUri);
if (conversationRecipient != null) {
getSupportLoaderManager().restartLoader(0, null, this);

View File

@ -34,6 +34,8 @@ import org.thoughtcrime.securesms.service.KeyCachingService;
*/
public abstract class PassphraseActivity extends BaseActionBarActivity {
private static final String TAG = PassphraseActivity.class.getSimpleName();
private KeyCachingService keyCachingService;
private MasterSecret masterSecret;
@ -62,8 +64,7 @@ public abstract class PassphraseActivity extends BaseActionBarActivity {
try {
startActivity(nextIntent);
} catch (java.lang.SecurityException e) {
Log.w("PassphraseActivity",
"Access permission not passed from PassphraseActivity, retry sharing.");
Log.w(TAG, "Access permission not passed from PassphraseActivity, retry sharing.");
}
}
finish();

View File

@ -88,7 +88,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
Log.w(TAG, "onCreate()");
Log.i(TAG, "onCreate()");
dynamicTheme.onCreate(this);
dynamicLanguage.onCreate(this);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
@ -269,11 +269,11 @@ public class PassphrasePromptActivity extends PassphraseActivity {
}
if (Build.VERSION.SDK_INT >= 16 && fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints()) {
Log.w(TAG, "Listening for fingerprints...");
Log.i(TAG, "Listening for fingerprints...");
fingerprintCancellationSignal = new CancellationSignal();
fingerprintManager.authenticate(null, 0, fingerprintCancellationSignal, fingerprintListener, null);
} else if (Build.VERSION.SDK_INT >= 21){
Log.w(TAG, "firing intent...");
Log.i(TAG, "firing intent...");
Intent intent = keyguardManager.createConfirmDeviceCredentialIntent("Unlock Signal", "");
startActivityForResult(intent, 1);
} else {
@ -345,7 +345,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
@Override
public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result) {
Log.w(TAG, "onAuthenticationSucceeded");
Log.i(TAG, "onAuthenticationSucceeded");
fingerprintPrompt.setImageResource(R.drawable.ic_check_white_48dp);
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.green_500), PorterDuff.Mode.SRC_IN);
fingerprintPrompt.animate().setInterpolator(new BounceInterpolator()).scaleX(1.1f).scaleY(1.1f).setDuration(500).setListener(new AnimationCompleteListener() {

View File

@ -38,7 +38,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
@Override
protected final void onCreate(Bundle savedInstanceState) {
Log.w(TAG, "onCreate(" + savedInstanceState + ")");
Log.i(TAG, "onCreate(" + savedInstanceState + ")");
this.networkAccess = new SignalServiceNetworkAccess(this);
onPreCreate();
@ -58,7 +58,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
@Override
protected void onResume() {
Log.w(TAG, "onResume()");
Log.i(TAG, "onResume()");
super.onResume();
KeyCachingService.registerPassphraseActivityStarted(this);
@ -70,7 +70,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
@Override
protected void onPause() {
Log.w(TAG, "onPause()");
Log.i(TAG, "onPause()");
super.onPause();
KeyCachingService.registerPassphraseActivityStopped(this);
@ -81,14 +81,14 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
@Override
protected void onDestroy() {
Log.w(TAG, "onDestroy()");
Log.i(TAG, "onDestroy()");
super.onDestroy();
removeClearKeyReceiver(this);
}
@Override
public void onMasterSecretCleared() {
Log.w(TAG, "onMasterSecretCleared()");
Log.i(TAG, "onMasterSecretCleared()");
if (isVisible) routeApplicationState(true);
else finish();
}
@ -134,7 +134,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
}
private Intent getIntentForState(int state) {
Log.w(TAG, "routeApplicationState(), state: " + state);
Log.i(TAG, "routeApplicationState(), state: " + state);
switch (state) {
case STATE_CREATE_PASSPHRASE: return getCreatePassphraseIntent();
@ -200,11 +200,11 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
}
private void initializeClearKeyReceiver() {
Log.w(TAG, "initializeClearKeyReceiver()");
Log.i(TAG, "initializeClearKeyReceiver()");
this.clearKeyReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.w(TAG, "onReceive() for clear key event");
Log.i(TAG, "onReceive() for clear key event");
onMasterSecretCleared();
}
};

View File

@ -247,7 +247,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
@Override
public void onCreate(Bundle icicle) {
Log.w(TAG, "onCreate (fragment)");
Log.i(TAG, "onCreate (fragment)");
super.onCreate(icicle);
initializeRecipients();
@ -279,7 +279,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
@Override
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
Log.w(TAG, "onCreatePreferences...");
Log.i(TAG, "onCreatePreferences...");
addPreferencesFromResource(R.xml.recipient_preferences);
}
@ -591,7 +591,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
private final IdentityRecord identityKey;
private IdentityClickedListener(IdentityRecord identityKey) {
Log.w(TAG, "Identity record: " + identityKey);
Log.i(TAG, "Identity record: " + identityKey);
this.identityKey = identityKey;
}

View File

@ -1006,7 +1006,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
private class ChallengeReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.w(TAG, "Got a challenge broadcast...");
Log.i(TAG, "Got a challenge broadcast...");
handleChallengeReceived(intent.getStringExtra(CHALLENGE_EXTRA));
}
}

View File

@ -110,7 +110,7 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onNewIntent(Intent intent) {
Log.w(TAG, "onNewIntent()");
Log.i(TAG, "onNewIntent()");
super.onNewIntent(intent);
setIntent(intent);
initializeMedia();
@ -118,7 +118,7 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
@Override
public void onResume() {
Log.w(TAG, "onResume()");
Log.i(TAG, "onResume()");
super.onResume();
dynamicTheme.onResume(this);
dynamicLanguage.onResume(this);

View File

@ -592,7 +592,7 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
protected Void doInBackground(Recipient... params) {
synchronized (SESSION_LOCK) {
if (isChecked) {
Log.w(TAG, "Saving identity: " + params[0].getAddress());
Log.i(TAG, "Saving identity: " + params[0].getAddress());
DatabaseFactory.getIdentityDatabase(getActivity())
.saveIdentity(params[0].getAddress(),
remoteIdentity,

View File

@ -70,7 +70,7 @@ public class WebRtcCallActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
Log.w(TAG, "onCreate()");
Log.i(TAG, "onCreate()");
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
super.onCreate(savedInstanceState);
@ -86,7 +86,7 @@ public class WebRtcCallActivity extends Activity {
@Override
public void onResume() {
Log.w(TAG, "onResume()");
Log.i(TAG, "onResume()");
super.onResume();
if (!networkAccess.isCensored(this)) MessageRetrievalService.registerActivityStarted(this);
initializeScreenshotSecurity();
@ -95,7 +95,7 @@ public class WebRtcCallActivity extends Activity {
@Override
public void onNewIntent(Intent intent){
Log.w(TAG, "onNewIntent");
Log.i(TAG, "onNewIntent");
if (ANSWER_ACTION.equals(intent.getAction())) {
handleAnswerCall();
} else if (DENY_ACTION.equals(intent.getAction())) {
@ -107,7 +107,7 @@ public class WebRtcCallActivity extends Activity {
@Override
public void onPause() {
Log.w(TAG, "onPause");
Log.i(TAG, "onPause");
super.onPause();
if (!networkAccess.isCensored(this)) MessageRetrievalService.registerActivityStopped(this);
EventBus.getDefault().unregister(this);
@ -202,7 +202,7 @@ public class WebRtcCallActivity extends Activity {
}
private void handleEndCall() {
Log.w(TAG, "Hangup pressed, handling termination now...");
Log.i(TAG, "Hangup pressed, handling termination now...");
Intent intent = new Intent(WebRtcCallActivity.this, WebRtcCallService.class);
intent.setAction(WebRtcCallService.ACTION_LOCAL_HANGUP);
startService(intent);
@ -217,7 +217,7 @@ public class WebRtcCallActivity extends Activity {
}
private void handleTerminate(@NonNull Recipient recipient /*, int terminationType */) {
Log.w(TAG, "handleTerminate called");
Log.i(TAG, "handleTerminate called");
callScreen.setActiveCall(recipient, getString(R.string.RedPhone_ending_call));
EventBus.getDefault().removeStickyEvent(WebRtcViewModel.class);
@ -314,7 +314,7 @@ public class WebRtcCallActivity extends Activity {
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public void onEventMainThread(final WebRtcViewModel event) {
Log.w(TAG, "Got message from service: " + event);
Log.i(TAG, "Got message from service: " + event);
switch (event.getState()) {
case CALL_CONNECTED: handleCallConnected(event); break;

View File

@ -276,15 +276,13 @@ public class AttachmentServer implements Runnable {
return;
StringTokenizer st = new StringTokenizer(inLine);
if (!st.hasMoreTokens())
Log.e(TAG,
"BAD REQUEST: Syntax error. Usage: GET /example/file.html");
Log.e(TAG, "BAD REQUEST: Syntax error. Usage: GET /example/file.html");
String method = st.nextToken();
pre.put("method", method);
if (!st.hasMoreTokens())
Log.e(TAG,
"BAD REQUEST: Missing URI. Usage: GET /example/file.html");
Log.e(TAG, "BAD REQUEST: Missing URI. Usage: GET /example/file.html");
String uri = st.nextToken();
@ -313,8 +311,7 @@ public class AttachmentServer implements Runnable {
pre.put("uri", uri);
} catch (IOException ioe) {
Log.e(TAG,
"SERVER INTERNAL ERROR: IOException: " + ioe.getMessage());
Log.e(TAG, "SERVER INTERNAL ERROR: IOException: " + ioe.getMessage());
}
}

View File

@ -38,10 +38,10 @@ public class AudioRecorder {
}
public void startRecording() {
Log.w(TAG, "startRecording()");
Log.i(TAG, "startRecording()");
executor.execute(() -> {
Log.w(TAG, "Running startRecording() + " + Thread.currentThread().getId());
Log.i(TAG, "Running startRecording() + " + Thread.currentThread().getId());
try {
if (audioCodec != null) {
throw new AssertionError("We can only record once at a time.");
@ -61,7 +61,7 @@ public class AudioRecorder {
}
public @NonNull ListenableFuture<Pair<Uri, Long>> stopRecording() {
Log.w(TAG, "stopRecording()");
Log.i(TAG, "stopRecording()");
final SettableFuture<Pair<Uri, Long>> future = new SettableFuture<>();

View File

@ -96,7 +96,7 @@ public class AudioSlidePlayer implements SensorEventListener {
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
Log.w(TAG, "onPrepared");
Log.i(TAG, "onPrepared");
synchronized (AudioSlidePlayer.this) {
if (mediaPlayer == null) return;
@ -118,7 +118,7 @@ public class AudioSlidePlayer implements SensorEventListener {
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.w(TAG, "onComplete");
Log.i(TAG, "onComplete");
synchronized (AudioSlidePlayer.this) {
mediaPlayer = null;
@ -171,7 +171,7 @@ public class AudioSlidePlayer implements SensorEventListener {
}
public synchronized void stop() {
Log.w(TAG, "Stop called!");
Log.i(TAG, "Stop called!");
removePlaying(this);

View File

@ -257,7 +257,7 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener
@Override
public void onClick(View v) {
try {
Log.w(TAG, "playbutton onClick");
Log.d(TAG, "playbutton onClick");
if (audioSlidePlayer != null) {
togglePlayToPause();
audioSlidePlayer.play(getProgress());
@ -272,7 +272,7 @@ public class AudioView extends FrameLayout implements AudioSlidePlayer.Listener
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void onClick(View v) {
Log.w(TAG, "pausebutton onClick");
Log.d(TAG, "pausebutton onClick");
if (audioSlidePlayer != null) {
togglePauseToPlay();
audioSlidePlayer.stop();

View File

@ -122,7 +122,7 @@ public class CustomDefaultPreference extends DialogPreference {
@Override
protected void onBindDialogView(@NonNull View view) {
Log.w(TAG, "onBindDialogView");
Log.i(TAG, "onBindDialogView");
super.onBindDialogView(view);
CustomDefaultPreference preference = (CustomDefaultPreference)getPreference();

View File

@ -164,7 +164,7 @@ public class InputPanel extends LinearLayout
long elapsedTime = onRecordHideEvent(x);
if (listener != null) {
Log.w(TAG, "Elapsed time: " + elapsedTime);
Log.d(TAG, "Elapsed time: " + elapsedTime);
if (elapsedTime > 1000) {
listener.onRecorderFinished();
} else {

View File

@ -86,7 +86,7 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
int oldRotation = rotation;
rotation = getDeviceRotation();
if (oldRotation != rotation) {
Log.w(TAG, "rotation changed");
Log.i(TAG, "rotation changed");
onKeyboardClose();
}
}
@ -132,14 +132,14 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
}
protected void onKeyboardOpen(int keyboardHeight) {
Log.w(TAG, "onKeyboardOpen(" + keyboardHeight + ")");
Log.i(TAG, "onKeyboardOpen(" + keyboardHeight + ")");
keyboardOpen = true;
notifyShownListeners();
}
protected void onKeyboardClose() {
Log.w(TAG, "onKeyboardClose()");
Log.i(TAG, "onKeyboardClose()");
keyboardOpen = false;
notifyHiddenListeners();
}

View File

@ -249,19 +249,19 @@ public class ThumbnailView extends FrameLayout {
}
if (Util.equals(slide, this.slide)) {
Log.w(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri());
Log.i(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri());
return new SettableFuture<>(false);
}
if (this.slide != null && this.slide.getFastPreflightId() != null &&
this.slide.getFastPreflightId().equals(slide.getFastPreflightId()))
{
Log.w(TAG, "Not re-loading slide for fast preflight: " + slide.getFastPreflightId());
Log.i(TAG, "Not re-loading slide for fast preflight: " + slide.getFastPreflightId());
this.slide = slide;
return new SettableFuture<>(false);
}
Log.w(TAG, "loading part with id " + slide.asAttachment().getDataUri()
Log.i(TAG, "loading part with id " + slide.asAttachment().getDataUri()
+ ", progress " + slide.getTransferState() + ", fast preflight id: " +
slide.asAttachment().getFastPreflightId());

View File

@ -65,7 +65,7 @@ public class ZoomingImageView extends FrameLayout {
final Context context = getContext();
final int maxTextureSize = BitmapUtil.getMaxTextureSize();
Log.w(TAG, "Max texture size: " + maxTextureSize);
Log.i(TAG, "Max texture size: " + maxTextureSize);
new AsyncTask<Void, Void, Pair<Integer, Integer>>() {
@Override
@ -82,13 +82,13 @@ public class ZoomingImageView extends FrameLayout {
}
protected void onPostExecute(@Nullable Pair<Integer, Integer> dimensions) {
Log.w(TAG, "Dimensions: " + (dimensions == null ? "(null)" : dimensions.first + ", " + dimensions.second));
Log.i(TAG, "Dimensions: " + (dimensions == null ? "(null)" : dimensions.first + ", " + dimensions.second));
if (dimensions == null || (dimensions.first <= maxTextureSize && dimensions.second <= maxTextureSize)) {
Log.w(TAG, "Loading in standard image view...");
Log.i(TAG, "Loading in standard image view...");
setImageViewUri(glideRequests, uri);
} else {
Log.w(TAG, "Loading in subsampling image view...");
Log.i(TAG, "Loading in subsampling image view...");
setSubsamplingImageViewUri(uri);
}
}

View File

@ -30,7 +30,7 @@ public class CameraUtils {
final int targetHeight = displayOrientation % 180 == 90 ? width : height;
final double targetRatio = (double) targetWidth / targetHeight;
Log.w(TAG, String.format("getPreferredPreviewSize(%d, %d, %d) -> target %dx%d, AR %.02f",
Log.d(TAG, String.format("getPreferredPreviewSize(%d, %d, %d) -> target %dx%d, AR %.02f",
displayOrientation, width, height,
targetWidth, targetHeight, targetRatio));
@ -39,14 +39,14 @@ public class CameraUtils {
List<Size> bigEnough = new LinkedList<>();
for (Size size : sizes) {
Log.w(TAG, String.format(" %dx%d (%.02f)", size.width, size.height, (float)size.width / size.height));
Log.d(TAG, String.format(" %dx%d (%.02f)", size.width, size.height, (float)size.width / size.height));
if (size.height == size.width * targetRatio && size.height >= targetHeight && size.width >= targetWidth) {
ideals.add(size);
Log.w(TAG, " (ideal ratio)");
Log.d(TAG, " (ideal ratio)");
} else if (size.width >= targetWidth && size.height >= targetHeight) {
bigEnough.add(size);
Log.w(TAG, " (good size, suboptimal ratio)");
Log.d(TAG, " (good size, suboptimal ratio)");
}
}

View File

@ -97,7 +97,7 @@ public class CameraView extends ViewGroup {
public void onResume() {
if (state != State.PAUSED) return;
state = State.RESUMED;
Log.w(TAG, "onResume() queued");
Log.i(TAG, "onResume() queued");
enqueueTask(new SerialAsyncTask<Void>() {
@Override
protected
@ -106,7 +106,7 @@ public class CameraView extends ViewGroup {
try {
long openStartMillis = System.currentTimeMillis();
camera = Optional.fromNullable(Camera.open(cameraId));
Log.w(TAG, "camera.open() -> " + (System.currentTimeMillis() - openStartMillis) + "ms");
Log.i(TAG, "camera.open() -> " + (System.currentTimeMillis() - openStartMillis) + "ms");
synchronized (CameraView.this) {
CameraView.this.notifyAll();
}
@ -130,7 +130,7 @@ public class CameraView extends ViewGroup {
if (getActivity().getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) {
onOrientationChange.enable();
}
Log.w(TAG, "onResume() completed");
Log.i(TAG, "onResume() completed");
}
});
}
@ -138,7 +138,7 @@ public class CameraView extends ViewGroup {
public void onPause() {
if (state == State.PAUSED) return;
state = State.PAUSED;
Log.w(TAG, "onPause() queued");
Log.i(TAG, "onPause() queued");
enqueueTask(new SerialAsyncTask<Void>() {
private Optional<Camera> cameraToDestroy;
@ -170,7 +170,7 @@ public class CameraView extends ViewGroup {
outputOrientation = -1;
removeView(surface);
addView(surface);
Log.w(TAG, "onPause() completed");
Log.i(TAG, "onPause() completed");
}
});
@ -220,7 +220,7 @@ public class CameraView extends ViewGroup {
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
Log.w(TAG, "onSizeChanged(" + oldw + "x" + oldh + " -> " + w + "x" + h + ")");
Log.i(TAG, "onSizeChanged(" + oldw + "x" + oldh + " -> " + w + "x" + h + ")");
super.onSizeChanged(w, h, oldw, oldh);
if (camera.isPresent()) startPreview(camera.get().getParameters());
}
@ -310,7 +310,7 @@ public class CameraView extends ViewGroup {
final Size preferredPreviewSize = getPreferredPreviewSize(parameters);
if (preferredPreviewSize != null && !parameters.getPreviewSize().equals(preferredPreviewSize)) {
Log.w(TAG, "starting preview with size " + preferredPreviewSize.width + "x" + preferredPreviewSize.height);
Log.i(TAG, "starting preview with size " + preferredPreviewSize.width + "x" + preferredPreviewSize.height);
if (state == State.ACTIVE) stopPreview();
previewSize = preferredPreviewSize;
parameters.setPreviewSize(preferredPreviewSize.width, preferredPreviewSize.height);
@ -320,7 +320,7 @@ public class CameraView extends ViewGroup {
}
long previewStartMillis = System.currentTimeMillis();
camera.startPreview();
Log.w(TAG, "camera.startPreview() -> " + (System.currentTimeMillis() - previewStartMillis) + "ms");
Log.i(TAG, "camera.startPreview() -> " + (System.currentTimeMillis() - previewStartMillis) + "ms");
state = State.ACTIVE;
Util.runOnMain(new Runnable() {
@Override
@ -445,11 +445,11 @@ public class CameraView extends ViewGroup {
final Size previewSize = camera.getParameters().getPreviewSize();
final Rect croppingRect = getCroppedRect(previewSize, previewRect, rotation);
Log.w(TAG, "previewSize: " + previewSize.width + "x" + previewSize.height);
Log.w(TAG, "data bytes: " + data.length);
Log.w(TAG, "previewFormat: " + camera.getParameters().getPreviewFormat());
Log.w(TAG, "croppingRect: " + croppingRect.toString());
Log.w(TAG, "rotation: " + rotation);
Log.i(TAG, "previewSize: " + previewSize.width + "x" + previewSize.height);
Log.i(TAG, "data bytes: " + data.length);
Log.i(TAG, "previewFormat: " + camera.getParameters().getPreviewFormat());
Log.i(TAG, "croppingRect: " + croppingRect.toString());
Log.i(TAG, "rotation: " + rotation);
new CaptureTask(previewSize, rotation, croppingRect).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, data);
}
});
@ -536,7 +536,7 @@ public class CameraView extends ViewGroup {
throw new PreconditionsNotMetException();
}
while (getMeasuredHeight() <= 0 || getMeasuredWidth() <= 0 || !surface.isReady()) {
Log.w(TAG, String.format("waiting. surface ready? %s", surface.isReady()));
Log.i(TAG, String.format("waiting. surface ready? %s", surface.isReady()));
Util.wait(CameraView.this, 0);
}
}

View File

@ -117,7 +117,7 @@ public class QuickAttachmentDrawer extends ViewGroup implements InputView, Camer
}
private void updateControlsView() {
Log.w(TAG, "updateControlsView()");
Log.i(TAG, "updateControlsView()");
View controls = LayoutInflater.from(getContext()).inflate(isLandscape() ? R.layout.quick_camera_controls_land
: R.layout.quick_camera_controls,
this, false);

View File

@ -28,6 +28,9 @@ import java.util.LinkedList;
import java.util.List;
public class EmojiDrawer extends LinearLayout implements InputView {
private static final String TAG = EmojiDrawer.class.getSimpleName();
private static final KeyEvent DELETE_KEY_EVENT = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL);
private ViewPager pager;
@ -62,7 +65,7 @@ public class EmojiDrawer extends LinearLayout implements InputView {
}
private void initializeResources(View v) {
Log.w("EmojiDrawer", "initializeResources()");
Log.i(TAG, "initializeResources()");
this.pager = (ViewPager) v.findViewById(R.id.emoji_pager);
this.strip = (PagerSlidingTabStrip) v.findViewById(R.id.tabs);
@ -85,7 +88,7 @@ public class EmojiDrawer extends LinearLayout implements InputView {
if (this.pager == null) initView();
ViewGroup.LayoutParams params = getLayoutParams();
params.height = height;
Log.w("EmojiDrawer", "showing emoji drawer with height " + params.height);
Log.i(TAG, "showing emoji drawer with height " + params.height);
setLayoutParams(params);
setVisibility(VISIBLE);
if (drawerListener != null) drawerListener.onShown();
@ -95,7 +98,7 @@ public class EmojiDrawer extends LinearLayout implements InputView {
public void hide(boolean immediate) {
setVisibility(GONE);
if (drawerListener != null) drawerListener.onHidden();
Log.w("EmojiDrawer", "hide()");
Log.i(TAG, "hide()");
}
private void initializeEmojiGrid() {
@ -104,7 +107,7 @@ public class EmojiDrawer extends LinearLayout implements InputView {
new EmojiSelectionListener() {
@Override
public void onEmojiSelected(String emoji) {
Log.w("EmojiDrawer", "onEmojiSelected()");
Log.i(TAG, "onEmojiSelected()");
recentModel.onCodePointSelected(emoji);
if (listener != null) listener.onEmojiSelected(emoji);
}

View File

@ -63,7 +63,7 @@ public class RecentEmojiPageModel implements EmojiPageModel {
}
public void onCodePointSelected(String emoji) {
Log.w(TAG, "onCodePointSelected(" + emoji + ")");
Log.i(TAG, "onCodePointSelected(" + emoji + ")");
recentlyUsed.remove(emoji);
recentlyUsed.add(emoji);

View File

@ -45,7 +45,7 @@ public class EmojiPageBitmap {
} else {
Callable<Bitmap> callable = () -> {
try {
Log.w(TAG, "loading page " + model.getSprite());
Log.i(TAG, "loading page " + model.getSprite());
return loadPage();
} catch (IOException ioe) {
Log.w(TAG, ioe);
@ -82,7 +82,7 @@ public class EmojiPageBitmap {
Bitmap scaledBitmap = Bitmap.createScaledBitmap(originalBitmap, (int)(originalBitmap.getWidth() * decodeScale), (int)(originalBitmap.getHeight() * decodeScale), false);
bitmapReference = new SoftReference<>(scaledBitmap);
Log.w(TAG, "onPageLoaded(" + model.getSprite() + ")");
Log.i(TAG, "onPageLoaded(" + model.getSprite() + ")");
return scaledBitmap;
} catch (InterruptedException e) {
Log.w(TAG, e);

View File

@ -68,7 +68,7 @@ public class UnverifiedBannerView extends LinearLayout {
this.container.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Log.w(TAG, "onClick()");
Log.i(TAG, "onClick()");
clickListener.onClicked(unverifiedIdentities);
}
});

View File

@ -27,7 +27,7 @@ public class AttachmentRegionDecoder implements ImageRegionDecoder {
@Override
public Point init(Context context, Uri uri) throws Exception {
Log.w(TAG, "Init!");
Log.d(TAG, "Init!");
if (!PartAuthority.isLocalUri(uri)) {
passthrough = new SkiaImageRegionDecoder();
return passthrough.init(context, uri);
@ -43,7 +43,7 @@ public class AttachmentRegionDecoder implements ImageRegionDecoder {
@Override
public Bitmap decodeRegion(Rect rect, int sampleSize) {
Log.w(TAG, "Decode region: " + rect);
Log.d(TAG, "Decode region: " + rect);
if (passthrough != null) {
return passthrough.decodeRegion(rect, sampleSize);
@ -65,7 +65,7 @@ public class AttachmentRegionDecoder implements ImageRegionDecoder {
}
public boolean isReady() {
Log.w(TAG, "isReady");
Log.d(TAG, "isReady");
return (passthrough != null && passthrough.isReady()) ||
(bitmapRegionDecoder != null && !bitmapRegionDecoder.isRecycled());
}

View File

@ -240,7 +240,7 @@ public class ContactsCursorLoader extends CursorLoader {
ContactsDatabase.NORMAL_TYPE});
}
}
Log.w(TAG, "filterNonPushContacts() -> " + (System.currentTimeMillis() - startMillis) + "ms");
Log.i(TAG, "filterNonPushContacts() -> " + (System.currentTimeMillis() - startMillis) + "ms");
return matrix;
} finally {
cursor.close();

View File

@ -89,7 +89,7 @@ public class ContactsDatabase {
try (Cursor cursor = context.getContentResolver().query(currentContactsUri, projection, RawContacts.DELETED + " = ?", new String[] {"1"}, null)) {
while (cursor != null && cursor.moveToNext()) {
long rawContactId = cursor.getLong(0);
Log.w(TAG, "Deleting raw contact: " + cursor.getString(1) + ", " + rawContactId);
Log.i(TAG, "Deleting raw contact: " + cursor.getString(1) + ", " + rawContactId);
context.getContentResolver().delete(currentContactsUri, RawContacts._ID + " = ?", new String[] {String.valueOf(rawContactId)});
}
@ -112,7 +112,7 @@ public class ContactsDatabase {
Optional<SystemContactInfo> systemContactInfo = getSystemContactInfo(registeredAddress);
if (systemContactInfo.isPresent()) {
Log.w(TAG, "Adding number: " + registeredAddress);
Log.i(TAG, "Adding number: " + registeredAddress);
addTextSecureRawContact(operations, account, systemContactInfo.get().number,
systemContactInfo.get().name, systemContactInfo.get().id);
}
@ -122,16 +122,16 @@ public class ContactsDatabase {
for (Map.Entry<Address, SignalContact> currentContactEntry : currentContacts.entrySet()) {
if (!registeredAddressSet.contains(currentContactEntry.getKey())) {
if (remove) {
Log.w(TAG, "Removing number: " + currentContactEntry.getKey());
Log.i(TAG, "Removing number: " + currentContactEntry.getKey());
removeTextSecureRawContact(operations, account, currentContactEntry.getValue().getId());
}
} else if (!currentContactEntry.getValue().isVoiceSupported()) {
Log.w(TAG, "Adding voice support: " + currentContactEntry.getKey());
Log.i(TAG, "Adding voice support: " + currentContactEntry.getKey());
addContactVoiceSupport(operations, currentContactEntry.getKey(), currentContactEntry.getValue().getId());
} else if (!Util.isStringEquals(currentContactEntry.getValue().getRawDisplayName(),
currentContactEntry.getValue().getAggregateDisplayName()))
{
Log.w(TAG, "Updating display name: " + currentContactEntry.getKey());
Log.i(TAG, "Updating display name: " + currentContactEntry.getKey());
updateDisplayName(operations, currentContactEntry.getValue().getAggregateDisplayName(), currentContactEntry.getValue().getId(), currentContactEntry.getValue().getDisplayNameSource());
}
}

View File

@ -25,7 +25,7 @@ public class ContactsSyncAdapter extends AbstractThreadedSyncAdapter {
public void onPerformSync(Account account, Bundle extras, String authority,
ContentProviderClient provider, SyncResult syncResult)
{
Log.w(TAG, "onPerformSync(" + authority +")");
Log.i(TAG, "onPerformSync(" + authority +")");
if (TextSecurePreferences.isPushRegistered(getContext())) {
try {

View File

@ -55,6 +55,8 @@ import javax.crypto.spec.SecretKeySpec;
public class MasterCipher {
private static final String TAG = MasterCipher.class.getSimpleName();
private final MasterSecret masterSecret;
private final Cipher encryptingCipher;
private final Cipher decryptingCipher;
@ -125,13 +127,13 @@ public class MasterCipher {
public boolean verifyMacFor(String content, byte[] theirMac) {
byte[] ourMac = getMacFor(content);
Log.w("MasterCipher", "Our Mac: " + Hex.toString(ourMac));
Log.w("MasterCipher", "Thr Mac: " + Hex.toString(theirMac));
Log.i(TAG, "Our Mac: " + Hex.toString(ourMac));
Log.i(TAG, "Thr Mac: " + Hex.toString(theirMac));
return Arrays.equals(ourMac, theirMac);
}
public byte[] getMacFor(String content) {
Log.w("MasterCipher", "Macing: " + content);
Log.w(TAG, "Macing: " + content);
try {
Mac mac = getMac(masterSecret.getMacKey());
return mac.doFinal(content.getBytes());

View File

@ -47,6 +47,8 @@ import java.security.Security;
*/
public final class PRNGFixes {
private static final String TAG = PRNGFixes.class.getSimpleName();
private static final int VERSION_CODE_JELLY_BEAN = 16;
private static final int VERSION_CODE_JELLY_BEAN_MR2 = 18;
private static final byte[] BUILD_FINGERPRINT_AND_DEVICE_SERIAL =
@ -226,8 +228,7 @@ public final class PRNGFixes {
} catch (IOException e) {
// On a small fraction of devices /dev/urandom is not writable.
// Log and ignore.
Log.w(PRNGFixes.class.getSimpleName(),
"Failed to mix seed into " + URANDOM_FILE);
Log.w(TAG, "Failed to mix seed into " + URANDOM_FILE);
} finally {
mSeeded = true;
}

View File

@ -30,6 +30,8 @@ import java.security.NoSuchAlgorithmException;
public class PublicKey {
private static final String TAG = PublicKey.class.getSimpleName();
public static final int KEY_SIZE = 3 + ECPublicKey.KEY_SIZE;
private final ECPublicKey publicKey;
@ -48,7 +50,7 @@ public class PublicKey {
}
public PublicKey(byte[] bytes, int offset) throws InvalidKeyException {
Log.w("PublicKey", "PublicKey Length: " + (bytes.length - offset));
Log.i(TAG, "PublicKey Length: " + (bytes.length - offset));
if ((bytes.length - offset) < KEY_SIZE)
throw new InvalidKeyException("Provided bytes are too short.");
@ -95,7 +97,7 @@ public class PublicKey {
byte[] keyIdBytes = Conversions.mediumToByteArray(id);
byte[] serializedPoint = publicKey.serialize();
Log.w("PublicKey", "Serializing public key point: " + Hex.toString(serializedPoint));
Log.i(TAG, "Serializing public key point: " + Hex.toString(serializedPoint));
return Util.combine(keyIdBytes, serializedPoint);
}

View File

@ -51,13 +51,13 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
Optional<IdentityRecord> identityRecord = identityDatabase.getIdentity(signalAddress);
if (!identityRecord.isPresent()) {
Log.w(TAG, "Saving new identity...");
Log.i(TAG, "Saving new identity...");
identityDatabase.saveIdentity(signalAddress, identityKey, VerifiedStatus.DEFAULT, true, System.currentTimeMillis(), nonBlockingApproval);
return false;
}
if (!identityRecord.get().getIdentityKey().equals(identityKey)) {
Log.w(TAG, "Replacing existing identity...");
Log.i(TAG, "Replacing existing identity...");
VerifiedStatus verifiedStatus;
if (identityRecord.get().getVerifiedStatus() == VerifiedStatus.VERIFIED ||
@ -75,7 +75,7 @@ public class TextSecureIdentityKeyStore implements IdentityKeyStore {
}
if (isNonBlockingApprovalRequired(identityRecord.get())) {
Log.w(TAG, "Setting approval status...");
Log.i(TAG, "Setting approval status...");
identityDatabase.setApproval(signalAddress, nonBlockingApproval);
return false;
}

View File

@ -123,7 +123,7 @@ public class ApnDatabase {
try {
if (apn != null) {
Log.w(TAG, "Querying table for MCC+MNC " + mccmnc + " and APN name " + apn);
Log.d(TAG, "Querying table for MCC+MNC " + mccmnc + " and APN name " + apn);
cursor = db.query(TABLE_NAME, null,
BASE_SELECTION + " AND " + APN_COLUMN + " = ?",
new String[] {mccmnc, apn},
@ -132,7 +132,7 @@ public class ApnDatabase {
if (cursor == null || !cursor.moveToFirst()) {
if (cursor != null) cursor.close();
Log.w(TAG, "Querying table for MCC+MNC " + mccmnc + " without APN name");
Log.d(TAG, "Querying table for MCC+MNC " + mccmnc + " without APN name");
cursor = db.query(TABLE_NAME, null,
BASE_SELECTION,
new String[] {mccmnc},
@ -145,7 +145,7 @@ public class ApnDatabase {
cursor.getString(cursor.getColumnIndexOrThrow(MMS_PORT_COLUMN)),
cursor.getString(cursor.getColumnIndexOrThrow(USER_COLUMN)),
cursor.getString(cursor.getColumnIndexOrThrow(PASSWORD_COLUMN)));
Log.w(TAG, "Returning preferred APN " + params);
Log.d(TAG, "Returning preferred APN " + params);
return params;
}

View File

@ -151,7 +151,7 @@ public class AttachmentDatabase extends Database {
public @NonNull InputStream getThumbnailStream(@NonNull AttachmentId attachmentId)
throws IOException
{
Log.w(TAG, "getThumbnailStream(" + attachmentId + ")");
Log.d(TAG, "getThumbnailStream(" + attachmentId + ")");
InputStream dataStream = getDataStream(attachmentId, THUMBNAIL, 0);
if (dataStream != null) {
@ -351,20 +351,20 @@ public class AttachmentDatabase extends Database {
@NonNull Map<Attachment, AttachmentId> insertAttachmentsForMessage(long mmsId, @NonNull List<Attachment> attachments, @NonNull List<Attachment> quoteAttachment)
throws MmsException
{
Log.w(TAG, "insertParts(" + attachments.size() + ")");
Log.d(TAG, "insertParts(" + attachments.size() + ")");
Map<Attachment, AttachmentId> insertedAttachments = new HashMap<>();
for (Attachment attachment : attachments) {
AttachmentId attachmentId = insertAttachment(mmsId, attachment, attachment.isQuote());
insertedAttachments.put(attachment, attachmentId);
Log.w(TAG, "Inserted attachment at ID: " + attachmentId);
Log.i(TAG, "Inserted attachment at ID: " + attachmentId);
}
for (Attachment attachment : quoteAttachment) {
AttachmentId attachmentId = insertAttachment(mmsId, attachment, true);
insertedAttachments.put(attachment, attachmentId);
Log.w(TAG, "Inserted quoted attachment at ID: " + attachmentId);
Log.i(TAG, "Inserted quoted attachment at ID: " + attachmentId);
}
return insertedAttachments;
@ -616,7 +616,7 @@ public class AttachmentDatabase extends Database {
private AttachmentId insertAttachment(long mmsId, Attachment attachment, boolean quote)
throws MmsException
{
Log.w(TAG, "Inserting attachment for mms id: " + mmsId);
Log.d(TAG, "Inserting attachment for mms id: " + mmsId);
SQLiteDatabase database = databaseHelper.getWritableDatabase();
DataInfo dataInfo = null;
@ -624,7 +624,7 @@ public class AttachmentDatabase extends Database {
if (attachment.getDataUri() != null) {
dataInfo = setAttachmentData(attachment.getDataUri());
Log.w(TAG, "Wrote part to file: " + dataInfo.file.getAbsolutePath());
Log.d(TAG, "Wrote part to file: " + dataInfo.file.getAbsolutePath());
}
ContentValues contentValues = new ContentValues();
@ -679,7 +679,7 @@ public class AttachmentDatabase extends Database {
thumbnailExecutor.submit(new ThumbnailFetchCallable(attachmentId));
}
} else {
Log.w(TAG, "Submitting thumbnail generation job...");
Log.i(TAG, "Submitting thumbnail generation job...");
thumbnailExecutor.submit(new ThumbnailFetchCallable(attachmentId));
}
}
@ -692,7 +692,7 @@ public class AttachmentDatabase extends Database {
protected void updateAttachmentThumbnail(AttachmentId attachmentId, InputStream in, float aspectRatio)
throws MmsException
{
Log.w(TAG, "updating part thumbnail for #" + attachmentId);
Log.i(TAG, "updating part thumbnail for #" + attachmentId);
DataInfo thumbnailFile = setAttachmentData(in);
@ -728,7 +728,7 @@ public class AttachmentDatabase extends Database {
@Override
public @Nullable InputStream call() throws Exception {
Log.w(TAG, "Executing thumbnail job...");
Log.d(TAG, "Executing thumbnail job...");
final InputStream stream = getDataStream(attachmentId, THUMBNAIL, 0);
if (stream != null) {
@ -776,7 +776,7 @@ public class AttachmentDatabase extends Database {
Bitmap bitmap = retriever.getFrameAtTime(1000);
Log.w(TAG, "Generated video thumbnail...");
Log.i(TAG, "Generated video thumbnail...");
return new ThumbnailData(bitmap);
}
}

View File

@ -13,8 +13,8 @@ public class EarlyReceiptCache {
private final LRUCache<Long, Map<Address, Long>> cache = new LRUCache<>(100);
public synchronized void increment(long timestamp, Address origin) {
Log.w(TAG, this+"");
Log.w(TAG, String.format("Early receipt: (%d, %s)", timestamp, origin.serialize()));
Log.i(TAG, this+"");
Log.i(TAG, String.format("Early receipt: (%d, %s)", timestamp, origin.serialize()));
Map<Address, Long> receipts = cache.get(timestamp);
@ -36,8 +36,8 @@ public class EarlyReceiptCache {
public synchronized Map<Address, Long> remove(long timestamp) {
Map<Address, Long> receipts = cache.remove(timestamp);
Log.w(TAG, this+"");
Log.w(TAG, String.format("Checking early receipts (%d): %d", timestamp, receipts == null ? 0 : receipts.size()));
Log.i(TAG, this+"");
Log.i(TAG, String.format("Checking early receipts (%d): %d", timestamp, receipts == null ? 0 : receipts.size()));
return receipts != null ? receipts : new HashMap<>();
}

View File

@ -800,7 +800,7 @@ public class MmsDatabase extends MessagingDatabase {
ContentValues contentValues = new ContentValues();
ContentValuesBuilder contentBuilder = new ContentValuesBuilder(contentValues);
Log.w(TAG, "Message received type: " + notification.getMessageType());
Log.i(TAG, "Message received type: " + notification.getMessageType());
contentBuilder.add(CONTENT_LOCATION, notification.getContentLocation());
@ -1056,11 +1056,11 @@ public class MmsDatabase extends MessagingDatabase {
where += (" ELSE " + DATE_RECEIVED + " < " + date + " END)");
Log.w("MmsDatabase", "Executing trim query: " + where);
Log.i("MmsDatabase", "Executing trim query: " + where);
cursor = db.query(TABLE_NAME, new String[] {ID}, where, new String[] {threadId+""}, null, null, null);
while (cursor != null && cursor.moveToNext()) {
Log.w("MmsDatabase", "Trimming: " + cursor.getLong(0));
Log.i("MmsDatabase", "Trimming: " + cursor.getLong(0));
delete(cursor.getLong(0));
}

View File

@ -362,7 +362,7 @@ public class MmsSmsDatabase extends Database {
@SuppressWarnings("deprecation")
String query = outerQueryBuilder.buildQuery(projection, null, null, null, null, null, null);
Log.w("MmsSmsDatabase", "Executing query: " + query);
Log.d(TAG, "Executing query: " + query);
SQLiteDatabase db = databaseHelper.getReadableDatabase();
return db.rawQuery(query, null);
}

View File

@ -117,7 +117,7 @@ public class SmsDatabase extends MessagingDatabase {
}
private void updateTypeBitmask(long id, long maskOff, long maskOn) {
Log.w("MessageDatabase", "Updating ID: " + id + " to base type: " + maskOn);
Log.i("MessageDatabase", "Updating ID: " + id + " to base type: " + maskOn);
SQLiteDatabase db = databaseHelper.getWritableDatabase();
db.execSQL("UPDATE " + TABLE_NAME +
@ -263,7 +263,7 @@ public class SmsDatabase extends MessagingDatabase {
}
public void markStatus(long id, int status) {
Log.w("MessageDatabase", "Updating ID: " + id + " to status: " + status);
Log.i("MessageDatabase", "Updating ID: " + id + " to status: " + status);
ContentValues contentValues = new ContentValues();
contentValues.put(STATUS, status);
@ -690,7 +690,7 @@ public class SmsDatabase extends MessagingDatabase {
}
public boolean deleteMessage(long messageId) {
Log.w("MessageDatabase", "Deleting: " + messageId);
Log.i("MessageDatabase", "Deleting: " + messageId);
SQLiteDatabase db = databaseHelper.getWritableDatabase();
long threadId = getThreadIdForMessage(messageId);
db.delete(TABLE_NAME, ID_WHERE, new String[] {messageId+""});

View File

@ -220,7 +220,7 @@ public class ThreadDatabase extends Database {
}
public void trimThread(long threadId, int length) {
Log.w("ThreadDatabase", "Trimming thread: " + threadId + " to: " + length);
Log.i("ThreadDatabase", "Trimming thread: " + threadId + " to: " + length);
Cursor cursor = null;
try {
@ -232,7 +232,7 @@ public class ThreadDatabase extends Database {
long lastTweetDate = cursor.getLong(cursor.getColumnIndexOrThrow(MmsSmsColumns.NORMALIZED_DATE_RECEIVED));
Log.w("ThreadDatabase", "Cut off tweet date: " + lastTweetDate);
Log.i("ThreadDatabase", "Cut off tweet date: " + lastTweetDate);
DatabaseFactory.getSmsDatabase(context).deleteMessagesInThreadBeforeDate(threadId, lastTweetDate);
DatabaseFactory.getMmsDatabase(context).deleteMessagesInThreadBeforeDate(threadId, lastTweetDate);

View File

@ -180,10 +180,10 @@ public class ClassicOpenHelper extends SQLiteOpenHelper {
Cursor smsCursor = null;
Log.w("DatabaseFactory", "Upgrade count: " + (smsCount + threadCount));
Log.i("DatabaseFactory", "Upgrade count: " + (smsCount + threadCount));
do {
Log.w("DatabaseFactory", "Looping SMS cursor...");
Log.i("DatabaseFactory", "Looping SMS cursor...");
if (smsCursor != null)
smsCursor.close();
@ -235,7 +235,7 @@ public class ClassicOpenHelper extends SQLiteOpenHelper {
skip = 0;
do {
Log.w("DatabaseFactory", "Looping thread cursor...");
Log.i("DatabaseFactory", "Looping thread cursor...");
if (threadCursor != null)
threadCursor.close();
@ -294,13 +294,13 @@ public class ClassicOpenHelper extends SQLiteOpenHelper {
}
if (fromVersion < DatabaseUpgradeActivity.MMS_BODY_VERSION) {
Log.w("DatabaseFactory", "Update MMS bodies...");
Log.i("DatabaseFactory", "Update MMS bodies...");
MasterCipher masterCipher = new MasterCipher(masterSecret);
Cursor mmsCursor = db.query("mms", new String[] {"_id"},
"msg_box & " + 0x80000000L + " != 0",
null, null, null, null);
Log.w("DatabaseFactory", "Got MMS rows: " + (mmsCursor == null ? "null" : mmsCursor.getCount()));
Log.i("DatabaseFactory", "Got MMS rows: " + (mmsCursor == null ? "null" : mmsCursor.getCount()));
while (mmsCursor != null && mmsCursor.moveToNext()) {
listener.setProgress(mmsCursor.getPosition(), mmsCursor.getCount());
@ -353,7 +353,7 @@ public class ClassicOpenHelper extends SQLiteOpenHelper {
new String[] {partCount+"", mmsId+""});
}
Log.w("DatabaseFactory", "Updated body: " + body + " and part_count: " + partCount);
Log.i("DatabaseFactory", "Updated body: " + body + " and part_count: " + partCount);
}
}

View File

@ -50,7 +50,7 @@ class PreKeyMigrationHelper {
contentValues.put(OneTimePreKeyDatabase.PUBLIC_KEY, Base64.encodeBytes(preKey.getKeyPair().getPublicKey().serialize()));
contentValues.put(OneTimePreKeyDatabase.PRIVATE_KEY, Base64.encodeBytes(preKey.getKeyPair().getPrivateKey().serialize()));
database.insert(OneTimePreKeyDatabase.TABLE_NAME, null, contentValues);
Log.w(TAG, "Migrated one-time prekey: " + preKey.getId());
Log.i(TAG, "Migrated one-time prekey: " + preKey.getId());
} catch (IOException | InvalidMessageException e) {
Log.w(TAG, e);
clean = false;
@ -74,7 +74,7 @@ class PreKeyMigrationHelper {
contentValues.put(SignedPreKeyDatabase.SIGNATURE, Base64.encodeBytes(signedPreKey.getSignature()));
contentValues.put(SignedPreKeyDatabase.TIMESTAMP, signedPreKey.getTimestamp());
database.insert(SignedPreKeyDatabase.TABLE_NAME, null, contentValues);
Log.w(TAG, "Migrated signed prekey: " + signedPreKey.getId());
Log.i(TAG, "Migrated signed prekey: " + signedPreKey.getId());
} catch (IOException | InvalidMessageException e) {
Log.w(TAG, e);
clean = false;
@ -92,7 +92,7 @@ class PreKeyMigrationHelper {
PreKeyIndex index = JsonUtils.fromJson(reader, PreKeyIndex.class);
reader.close();
Log.w(TAG, "Setting next prekey id: " + index.nextPreKeyId);
Log.i(TAG, "Setting next prekey id: " + index.nextPreKeyId);
TextSecurePreferences.setNextPreKeyId(context, index.nextPreKeyId);
} catch (IOException e) {
Log.w(TAG, e);
@ -105,8 +105,8 @@ class PreKeyMigrationHelper {
SignedPreKeyIndex index = JsonUtils.fromJson(reader, SignedPreKeyIndex.class);
reader.close();
Log.w(TAG, "Setting next signed prekey id: " + index.nextSignedPreKeyId);
Log.w(TAG, "Setting active signed prekey id: " + index.activeSignedPreKeyId);
Log.i(TAG, "Setting next signed prekey id: " + index.nextSignedPreKeyId);
Log.i(TAG, "Setting active signed prekey id: " + index.activeSignedPreKeyId);
TextSecurePreferences.setNextSignedPreKeyId(context, index.nextSignedPreKeyId);
TextSecurePreferences.setActiveSignedPreKeyId(context, index.activeSignedPreKeyId);
} catch (IOException e) {
@ -123,11 +123,11 @@ class PreKeyMigrationHelper {
if (preKeyFiles != null) {
for (File preKeyFile : preKeyFiles) {
Log.w(TAG, "Deleting: " + preKeyFile.getAbsolutePath());
Log.i(TAG, "Deleting: " + preKeyFile.getAbsolutePath());
preKeyFile.delete();
}
Log.w(TAG, "Deleting: " + preKeyDirectory.getAbsolutePath());
Log.i(TAG, "Deleting: " + preKeyDirectory.getAbsolutePath());
preKeyDirectory.delete();
}
@ -136,11 +136,11 @@ class PreKeyMigrationHelper {
if (signedPreKeyFiles != null) {
for (File signedPreKeyFile : signedPreKeyFiles) {
Log.w(TAG, "Deleting: " + signedPreKeyFile.getAbsolutePath());
Log.i(TAG, "Deleting: " + signedPreKeyFile.getAbsolutePath());
signedPreKeyFile.delete();
}
Log.w(TAG, "Deleting: " + signedPreKeyDirectory.getAbsolutePath());
Log.i(TAG, "Deleting: " + signedPreKeyDirectory.getAbsolutePath());
signedPreKeyDirectory.delete();
}
}

View File

@ -125,7 +125,7 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.w(TAG, "Upgrading database: " + oldVersion + ", " + newVersion);
Log.i(TAG, "Upgrading database: " + oldVersion + ", " + newVersion);
db.beginTransaction();

View File

@ -65,13 +65,13 @@ class SessionStoreMigrationHelper {
SessionRecord sessionRecord;
if (versionMarker == SINGLE_STATE_VERSION) {
Log.w(TAG, "Migrating single state version: " + sessionFile.getAbsolutePath());
Log.i(TAG, "Migrating single state version: " + sessionFile.getAbsolutePath());
SessionStructure sessionStructure = SessionStructure.parseFrom(serialized);
SessionState sessionState = new SessionState(sessionStructure);
sessionRecord = new SessionRecord(sessionState);
} else if (versionMarker >= ARCHIVE_STATES_VERSION) {
Log.w(TAG, "Migrating session: " + sessionFile.getAbsolutePath());
Log.i(TAG, "Migrating session: " + sessionFile.getAbsolutePath());
sessionRecord = new SessionRecord(serialized);
} else {
throw new AssertionError("Unknown version: " + versionMarker + ", " + sessionFile.getAbsolutePath());

View File

@ -161,12 +161,12 @@ public class SignalCommunicationModule {
@Override
public void onConnected() {
Log.w(TAG, "onConnected()");
Log.i(TAG, "onConnected()");
}
@Override
public void onConnecting() {
Log.w(TAG, "onConnecting()");
Log.i(TAG, "onConnecting()");
}
@Override

View File

@ -23,7 +23,7 @@ public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
String messageType = gcm.getMessageType(intent);
if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)) {
Log.w(TAG, "GCM message...");
Log.i(TAG, "GCM message...");
if (!TextSecurePreferences.isPushRegistered(context)) {
Log.w(TAG, "Not push registered!");

View File

@ -31,7 +31,7 @@ public class EncryptedBitmapCacheDecoder extends EncryptedCoder implements Resou
public boolean handles(@NonNull File source, @NonNull Options options)
throws IOException
{
Log.w(TAG, "Checking item for encrypted Bitmap cache decoder: " + source.toString());
Log.i(TAG, "Checking item for encrypted Bitmap cache decoder: " + source.toString());
try (InputStream inputStream = createEncryptedInputStream(secret, source)) {
return streamBitmapDecoder.handles(inputStream, options);
@ -46,7 +46,7 @@ public class EncryptedBitmapCacheDecoder extends EncryptedCoder implements Resou
public Resource<Bitmap> decode(@NonNull File source, int width, int height, @NonNull Options options)
throws IOException
{
Log.w(TAG, "Encrypted Bitmap cache decoder running: " + source.toString());
Log.i(TAG, "Encrypted Bitmap cache decoder running: " + source.toString());
try (InputStream inputStream = createEncryptedInputStream(secret, source)) {
return streamBitmapDecoder.decode(inputStream, width, height, options);
}

View File

@ -33,7 +33,7 @@ public class EncryptedBitmapResourceEncoder extends EncryptedCoder implements Re
@SuppressWarnings("EmptyCatchBlock")
@Override
public boolean encode(@NonNull Resource<Bitmap> data, @NonNull File file, @NonNull Options options) {
Log.w(TAG, "Encrypted resource encoder running: " + file.toString());
Log.i(TAG, "Encrypted resource encoder running: " + file.toString());
Bitmap bitmap = data.get();
Bitmap.CompressFormat format = getFormat(bitmap, options);

View File

@ -29,7 +29,7 @@ public class EncryptedCacheEncoder extends EncryptedCoder implements Encoder<Inp
@SuppressWarnings("EmptyCatchBlock")
@Override
public boolean encode(@NonNull InputStream data, @NonNull File file, @NonNull Options options) {
Log.w(TAG, "Encrypted cache encoder running: " + file.toString());
Log.i(TAG, "Encrypted cache encoder running: " + file.toString());
byte[] buffer = byteArrayPool.get(ArrayPool.STANDARD_BUFFER_SIZE_BYTES, byte[].class);

View File

@ -29,7 +29,7 @@ public class EncryptedGifCacheDecoder extends EncryptedCoder implements Resource
@Override
public boolean handles(@NonNull File source, @NonNull Options options) {
Log.w(TAG, "Checking item for encrypted GIF cache decoder: " + source.toString());
Log.i(TAG, "Checking item for encrypted GIF cache decoder: " + source.toString());
try (InputStream inputStream = createEncryptedInputStream(secret, source)) {
return gifDecoder.handles(inputStream, options);
@ -42,7 +42,7 @@ public class EncryptedGifCacheDecoder extends EncryptedCoder implements Resource
@Nullable
@Override
public Resource<GifDrawable> decode(@NonNull File source, int width, int height, @NonNull Options options) throws IOException {
Log.w(TAG, "Encrypted GIF cache decoder running...");
Log.i(TAG, "Encrypted GIF cache decoder running...");
try (InputStream inputStream = createEncryptedInputStream(secret, source)) {
return gifDecoder.decode(inputStream, width, height, options);
}

View File

@ -87,7 +87,7 @@ public class AttachmentDownloadJob extends MasterSecretJob implements Injectable
return;
}
Log.w(TAG, "Downloading push part " + attachmentId);
Log.i(TAG, "Downloading push part " + attachmentId);
database.setTransferState(messageId, attachmentId, AttachmentDatabase.TRANSFER_PROGRESS_STARTED);
retrieveAttachment(messageId, attachmentId, attachment);
@ -154,9 +154,9 @@ public class AttachmentDownloadJob extends MasterSecretJob implements Injectable
}
if (attachment.getDigest() != null) {
Log.w(TAG, "Downloading attachment with digest: " + Hex.toString(attachment.getDigest()));
Log.i(TAG, "Downloading attachment with digest: " + Hex.toString(attachment.getDigest()));
} else {
Log.w(TAG, "Downloading attachment with no digest...");
Log.i(TAG, "Downloading attachment with no digest...");
}
return new SignalServiceAttachmentPointer(id, null, key, relay,

View File

@ -75,7 +75,7 @@ public class AvatarDownloadJob extends MasterSecretJob implements InjectableType
}
if (digest.isPresent()) {
Log.w(TAG, "Downloading group avatar with digest: " + Hex.toString(digest.get()));
Log.i(TAG, "Downloading group avatar with digest: " + Hex.toString(digest.get()));
}
attachment = File.createTempFile("avatar", "tmp", context.getCacheDir());

View File

@ -51,7 +51,7 @@ public class CleanPreKeysJob extends MasterSecretJob implements InjectableType {
@Override
public void onRun(MasterSecret masterSecret) throws IOException {
try {
Log.w(TAG, "Cleaning prekeys...");
Log.i(TAG, "Cleaning prekeys...");
int activeSignedPreKeyId = PreKeyUtil.getActiveSignedPreKeyId(context);
SignedPreKeyStore signedPreKeyStore = signedPreKeyStoreFactory.create();
@ -64,8 +64,8 @@ public class CleanPreKeysJob extends MasterSecretJob implements InjectableType {
Collections.sort(oldRecords, new SignedPreKeySorter());
Log.w(TAG, "Active signed prekey: " + activeSignedPreKeyId);
Log.w(TAG, "Old signed prekey record count: " + oldRecords.size());
Log.i(TAG, "Active signed prekey: " + activeSignedPreKeyId);
Log.i(TAG, "Old signed prekey record count: " + oldRecords.size());
boolean foundAgedRecord = false;
@ -76,7 +76,7 @@ public class CleanPreKeysJob extends MasterSecretJob implements InjectableType {
if (!foundAgedRecord) {
foundAgedRecord = true;
} else {
Log.w(TAG, "Removing signed prekey record: " + oldRecord.getId() + " with timestamp: " + oldRecord.getTimestamp());
Log.i(TAG, "Removing signed prekey record: " + oldRecord.getId() + " with timestamp: " + oldRecord.getTimestamp());
signedPreKeyStore.removeSignedPreKey(oldRecord.getId());
}
}

View File

@ -16,6 +16,8 @@ import java.io.IOException;
public class DirectoryRefreshJob extends ContextJob {
private static final String TAG = DirectoryRefreshJob.class.getSimpleName();
@Nullable private transient Recipient recipient;
private transient boolean notifyOfNewUsers;
@ -41,7 +43,7 @@ public class DirectoryRefreshJob extends ContextJob {
@Override
public void onRun() throws IOException {
Log.w("DirectoryRefreshJob", "DirectoryRefreshJob.onRun()");
Log.i(TAG, "DirectoryRefreshJob.onRun()");
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Directory Refresh");

View File

@ -62,7 +62,7 @@ public class GcmRefreshJob extends ContextJob implements InjectableType {
public void onRun() throws Exception {
if (TextSecurePreferences.isGcmDisabled(context)) return;
Log.w(TAG, "Reregistering GCM...");
Log.i(TAG, "Reregistering GCM...");
int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);
if (result != ConnectionResult.SUCCESS) {

View File

@ -41,7 +41,7 @@ public class LocalBackupJob extends ContextJob {
@Override
public void onRun() throws NoExternalStorageException, IOException {
Log.w(TAG, "Executing backup job...");
Log.i(TAG, "Executing backup job...");
if (!Permissions.hasAll(context, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
throw new IOException("No external storage permission!");

View File

@ -113,7 +113,7 @@ public class MmsDownloadJob extends MasterSecretJob {
Log.w(TAG, e);
}
Log.w(TAG, "Downloading mms at " + Uri.parse(contentLocation).getHost() + ", subscription ID: " + notification.get().getSubscriptionId());
Log.i(TAG, "Downloading mms at " + Uri.parse(contentLocation).getHost() + ", subscription ID: " + notification.get().getSubscriptionId());
RetrieveConf retrieveConf = new CompatMmsConnection(context).retrieve(contentLocation, transactionId, notification.get().getSubscriptionId());

View File

@ -60,7 +60,7 @@ public class MmsReceiveJob extends ContextJob {
MmsDatabase database = DatabaseFactory.getMmsDatabase(context);
Pair<Long, Long> messageAndThreadId = database.insertMessageInbox((NotificationInd)pdu, subscriptionId);
Log.w(TAG, "Inserted received MMS notification...");
Log.i(TAG, "Inserted received MMS notification...");
ApplicationContext.getInstance(context)
.getJobManager()

View File

@ -138,8 +138,8 @@ public class MmsSendJob extends SendJob {
}
private boolean isInconsistentResponse(SendReq message, SendConf response) {
Log.w(TAG, "Comparing: " + Hex.toString(message.getTransactionId()));
Log.w(TAG, "With: " + Hex.toString(response.getTransactionId()));
Log.i(TAG, "Comparing: " + Hex.toString(message.getTransactionId()));
Log.i(TAG, "With: " + Hex.toString(response.getTransactionId()));
return !Arrays.equals(message.getTransactionId(), response.getTransactionId());
}

View File

@ -200,7 +200,7 @@ public class PushDecryptJob extends ContextJob {
else if (syncMessage.getVerified().isPresent()) handleSynchronizeVerifiedMessage(syncMessage.getVerified().get());
else Log.w(TAG, "Contains no known sync types...");
} else if (content.getCallMessage().isPresent()) {
Log.w(TAG, "Got call message...");
Log.i(TAG, "Got call message...");
SignalServiceCallMessage message = content.getCallMessage().get();
if (message.getOfferMessage().isPresent()) handleCallOfferMessage(envelope, message.getOfferMessage().get(), smsMessageId);
@ -266,7 +266,7 @@ public class PushDecryptJob extends ContextJob {
private void handleCallAnswerMessage(@NonNull SignalServiceEnvelope envelope,
@NonNull AnswerMessage message)
{
Log.w(TAG, "handleCallAnswerMessage...");
Log.i(TAG, "handleCallAnswerMessage...");
Intent intent = new Intent(context, WebRtcCallService.class);
intent.setAction(WebRtcCallService.ACTION_RESPONSE_MESSAGE);
intent.putExtra(WebRtcCallService.EXTRA_CALL_ID, message.getId());
@ -297,7 +297,7 @@ public class PushDecryptJob extends ContextJob {
@NonNull HangupMessage message,
@NonNull Optional<Long> smsMessageId)
{
Log.w(TAG, "handleCallHangupMessage");
Log.i(TAG, "handleCallHangupMessage");
if (smsMessageId.isPresent()) {
DatabaseFactory.getSmsDatabase(context).markAsMissedCall(smsMessageId.get());
} else {
@ -846,7 +846,7 @@ public class PushDecryptJob extends ContextJob {
@NonNull SignalServiceReceiptMessage message)
{
for (long timestamp : message.getTimestamps()) {
Log.w(TAG, String.format("Received encrypted delivery receipt: (XXXXX, %d)", timestamp));
Log.i(TAG, String.format("Received encrypted delivery receipt: (XXXXX, %d)", timestamp));
DatabaseFactory.getMmsSmsDatabase(context)
.incrementDeliveryReceiptCount(new SyncMessageId(Address.fromExternal(context, envelope.getSource()), timestamp), System.currentTimeMillis());
}
@ -857,7 +857,7 @@ public class PushDecryptJob extends ContextJob {
{
if (TextSecurePreferences.isReadReceiptsEnabled(context)) {
for (long timestamp : message.getTimestamps()) {
Log.w(TAG, String.format("Received encrypted read receipt: (XXXXX, %d)", timestamp));
Log.i(TAG, String.format("Received encrypted read receipt: (XXXXX, %d)", timestamp));
DatabaseFactory.getMmsSmsDatabase(context)
.incrementReadReceiptCount(new SyncMessageId(Address.fromExternal(context, envelope.getSource()), timestamp), envelope.getTimestamp());
@ -882,7 +882,7 @@ public class PushDecryptJob extends ContextJob {
MessageRecord message = DatabaseFactory.getMmsSmsDatabase(context).getMessageFor(quote.get().getId(), author);
if (message != null) {
Log.w(TAG, "Found matching message record...");
Log.i(TAG, "Found matching message record...");
List<Attachment> attachments = new LinkedList<>();

View File

@ -53,7 +53,7 @@ public abstract class PushReceivedJob extends ContextJob {
}
private void handleReceipt(SignalServiceEnvelope envelope) {
Log.w(TAG, String.format("Received receipt: (XXXXX, %d)", envelope.getTimestamp()));
Log.i(TAG, String.format("Received receipt: (XXXXX, %d)", envelope.getTimestamp()));
DatabaseFactory.getMmsSmsDatabase(context).incrementDeliveryReceiptCount(new SyncMessageId(Address.fromExternal(context, envelope.getSource()),
envelope.getTimestamp()), System.currentTimeMillis());
}

View File

@ -51,7 +51,7 @@ public class PushTextSendJob extends PushSendJob implements InjectableType {
SmsMessageRecord record = database.getMessage(messageId);
try {
Log.w(TAG, "Sending message: " + messageId);
Log.i(TAG, "Sending message: " + messageId);
deliver(record);
database.markAsSent(messageId, true);

View File

@ -53,7 +53,7 @@ public class RefreshPreKeysJob extends MasterSecretJob implements InjectableType
int availableKeys = accountManager.getPreKeysCount();
if (availableKeys >= PREKEY_MINIMUM && TextSecurePreferences.isSignedPreKeyRegistered(context)) {
Log.w(TAG, "Available keys sufficient: " + availableKeys);
Log.i(TAG, "Available keys sufficient: " + availableKeys);
return;
}
@ -61,7 +61,7 @@ public class RefreshPreKeysJob extends MasterSecretJob implements InjectableType
IdentityKeyPair identityKey = IdentityKeyUtil.getIdentityKeyPair(context);
SignedPreKeyRecord signedPreKeyRecord = PreKeyUtil.generateSignedPreKey(context, identityKey, false);
Log.w(TAG, "Registering new prekeys...");
Log.i(TAG, "Registering new prekeys...");
accountManager.setPreKeys(identityKey.getPublicKey(), signedPreKeyRecord, preKeyRecords);

View File

@ -41,7 +41,7 @@ public class RotateSignedPreKeyJob extends MasterSecretJob implements Injectable
@Override
public void onRun(MasterSecret masterSecret) throws Exception {
Log.w(TAG, "Rotating signed prekey...");
Log.i(TAG, "Rotating signed prekey...");
IdentityKeyPair identityKey = IdentityKeyUtil.getIdentityKeyPair(context);
SignedPreKeyRecord signedPreKeyRecord = PreKeyUtil.generateSignedPreKey(context, identityKey, false);

View File

@ -45,7 +45,7 @@ public class SmsReceiveJob extends ContextJob {
@Override
public void onRun() throws MigrationPendingException {
Log.w(TAG, "onRun()");
Log.i(TAG, "onRun()");
Optional<IncomingTextMessage> message = assembleMessageFragments(pdus, subscriptionId);

View File

@ -48,7 +48,7 @@ public class SmsSendJob extends SendJob {
SmsMessageRecord record = database.getMessage(messageId);
try {
Log.w(TAG, "Sending message: " + messageId);
Log.i(TAG, "Sending message: " + messageId);
deliver(record);
} catch (UndeliverableMessageException ude) {
@ -106,8 +106,8 @@ public class SmsSendJob extends SendJob {
getSmsManagerFor(message.getSubscriptionId()).sendMultipartTextMessage(recipient, null, messages, sentIntents, deliveredIntents);
} catch (NullPointerException | IllegalArgumentException npe) {
Log.w(TAG, npe);
Log.w(TAG, "Recipient: " + recipient);
Log.w(TAG, "Message Parts: " + messages.size());
Log.i(TAG, "Recipient: " + recipient);
Log.i(TAG, "Message Parts: " + messages.size());
try {
for (int i=0;i<messages.size();i++) {

View File

@ -43,7 +43,7 @@ public class SmsSentJob extends MasterSecretJob {
@Override
public void onRun(MasterSecret masterSecret) {
Log.w(TAG, "Got SMS callback: " + action + " , " + result);
Log.i(TAG, "Got SMS callback: " + action + " , " + result);
switch (action) {
case SmsDeliveryListener.SENT_SMS_ACTION:

View File

@ -52,7 +52,7 @@ public class UpdateApkJob extends ContextJob {
public void onRun() throws IOException, PackageManager.NameNotFoundException {
if (!BuildConfig.PLAY_STORE_DISABLED) return;
Log.w(TAG, "Checking for APK update...");
Log.i(TAG, "Checking for APK update...");
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(String.format("%s/latest.json", BuildConfig.NOPLAY_UPDATE_URL)).build();
@ -66,18 +66,18 @@ public class UpdateApkJob extends ContextJob {
UpdateDescriptor updateDescriptor = JsonUtils.fromJson(response.body().string(), UpdateDescriptor.class);
byte[] digest = Hex.fromStringCondensed(updateDescriptor.getDigest());
Log.w(TAG, "Got descriptor: " + updateDescriptor);
Log.i(TAG, "Got descriptor: " + updateDescriptor);
if (updateDescriptor.getVersionCode() > getVersionCode()) {
DownloadStatus downloadStatus = getDownloadStatus(updateDescriptor.getUrl(), digest);
Log.w(TAG, "Download status: " + downloadStatus.getStatus());
Log.i(TAG, "Download status: " + downloadStatus.getStatus());
if (downloadStatus.getStatus() == DownloadStatus.Status.COMPLETE) {
Log.w(TAG, "Download status complete, notifying...");
Log.i(TAG, "Download status complete, notifying...");
handleDownloadNotify(downloadStatus.getDownloadId());
} else if (downloadStatus.getStatus() == DownloadStatus.Status.MISSING) {
Log.w(TAG, "Download status missing, starting download...");
Log.i(TAG, "Download status missing, starting download...");
handleDownloadStart(updateDescriptor.getUrl(), updateDescriptor.getVersionName(), digest);
}
}

View File

@ -162,14 +162,14 @@ public class AttachmentManager {
private void cleanup(final @Nullable Uri uri) {
if (uri != null && PersistentBlobProvider.isAuthority(context, uri)) {
Log.w(TAG, "cleaning up " + uri);
Log.d(TAG, "cleaning up " + uri);
PersistentBlobProvider.getInstance(context).delete(context, uri);
}
}
private void markGarbage(@Nullable Uri uri) {
if (uri != null && PersistentBlobProvider.isAuthority(context, uri)) {
Log.w(TAG, "Marking garbage that needs cleaning: " + uri);
Log.d(TAG, "Marking garbage that needs cleaning: " + uri);
garbage.add(uri);
}
}
@ -301,7 +301,7 @@ public class AttachmentManager {
height = dimens.second;
}
Log.w(TAG, "remote slide with size " + fileSize + " took " + (System.currentTimeMillis() - start) + "ms");
Log.d(TAG, "remote slide with size " + fileSize + " took " + (System.currentTimeMillis() - start) + "ms");
return mediaType.createSlide(context, uri, fileName, mimeType, fileSize, width, height);
}
} finally {
@ -337,7 +337,7 @@ public class AttachmentManager {
height = dimens.second;
}
Log.w(TAG, "local slide with size " + mediaSize + " took " + (System.currentTimeMillis() - start) + "ms");
Log.d(TAG, "local slide with size " + mediaSize + " took " + (System.currentTimeMillis() - start) + "ms");
return mediaType.createSlide(context, uri, fileName, mimeType, mediaSize, width, height);
}
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
@ -435,7 +435,7 @@ public class AttachmentManager {
if (captureUri == null) {
captureUri = PersistentBlobProvider.getInstance(context).createForExternal(context, MediaUtil.IMAGE_JPEG);
}
Log.w(TAG, "captureUri path is " + captureUri.getPath());
Log.d(TAG, "captureUri path is " + captureUri.getPath());
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, captureUri);
activity.startActivityForResult(captureIntent, requestCode);
}

View File

@ -31,17 +31,17 @@ public class CompatMmsConnection implements OutgoingMmsConnection, IncomingMmsCo
{
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP_MR1) {
try {
Log.w(TAG, "Sending via Lollipop API");
Log.i(TAG, "Sending via Lollipop API");
return new OutgoingLollipopMmsConnection(context).send(pduBytes, subscriptionId);
} catch (UndeliverableMessageException e) {
Log.w(TAG, e);
}
Log.w(TAG, "Falling back to legacy connection...");
Log.i(TAG, "Falling back to legacy connection...");
}
if (subscriptionId == -1) {
Log.w(TAG, "Sending via legacy connection");
Log.i(TAG, "Sending via legacy connection");
try {
SendConf result = new OutgoingLegacyMmsConnection(context).send(pduBytes, subscriptionId);
@ -56,7 +56,7 @@ public class CompatMmsConnection implements OutgoingMmsConnection, IncomingMmsCo
}
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP && VERSION.SDK_INT < VERSION_CODES.LOLLIPOP_MR1) {
Log.w(TAG, "Falling back to sending via Lollipop API");
Log.i(TAG, "Falling back to sending via Lollipop API");
return new OutgoingLollipopMmsConnection(context).send(pduBytes, subscriptionId);
}
@ -71,18 +71,18 @@ public class CompatMmsConnection implements OutgoingMmsConnection, IncomingMmsCo
throws MmsException, MmsRadioException, ApnUnavailableException, IOException
{
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP_MR1) {
Log.w(TAG, "Receiving via Lollipop API");
Log.i(TAG, "Receiving via Lollipop API");
try {
return new IncomingLollipopMmsConnection(context).retrieve(contentLocation, transactionId, subscriptionId);
} catch (MmsException e) {
Log.w(TAG, e);
}
Log.w(TAG, "Falling back to receiving via legacy connection");
Log.i(TAG, "Falling back to receiving via legacy connection");
}
if (VERSION.SDK_INT < 22 || subscriptionId == -1) {
Log.w(TAG, "Receiving via legacy API");
Log.i(TAG, "Receiving via legacy API");
try {
return new IncomingLegacyMmsConnection(context).retrieve(contentLocation, transactionId, subscriptionId);
} catch (MmsRadioException | ApnUnavailableException | IOException e) {
@ -91,7 +91,7 @@ public class CompatMmsConnection implements OutgoingMmsConnection, IncomingMmsCo
}
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP && VERSION.SDK_INT < VERSION_CODES.LOLLIPOP_MR1) {
Log.w(TAG, "Falling back to receiving via Lollipop API");
Log.i(TAG, "Falling back to receiving via Lollipop API");
return new IncomingLollipopMmsConnection(context).retrieve(contentLocation, transactionId, subscriptionId);
}

View File

@ -78,7 +78,7 @@ public class IncomingLegacyMmsConnection extends LegacyMmsConnection implements
Apn contentApn = new Apn(contentLocation, apn.getProxy(), Integer.toString(apn.getPort()), apn.getUsername(), apn.getPassword());
if (isDirectConnect()) {
Log.w(TAG, "Connecting directly...");
Log.i(TAG, "Connecting directly...");
try {
return retrieve(contentApn, transactionId, false, false);
} catch (IOException | ApnUnavailableException e) {
@ -86,11 +86,11 @@ public class IncomingLegacyMmsConnection extends LegacyMmsConnection implements
}
}
Log.w(TAG, "Changing radio to MMS mode..");
Log.i(TAG, "Changing radio to MMS mode..");
radio.connect();
try {
Log.w(TAG, "Downloading in MMS mode with proxy...");
Log.i(TAG, "Downloading in MMS mode with proxy...");
try {
return retrieve(contentApn, transactionId, true, true);
@ -98,7 +98,7 @@ public class IncomingLegacyMmsConnection extends LegacyMmsConnection implements
Log.w(TAG, e);
}
Log.w(TAG, "Downloading in MMS mode without proxy...");
Log.i(TAG, "Downloading in MMS mode without proxy...");
return retrieve(contentApn, transactionId, true, false);
@ -117,7 +117,7 @@ public class IncomingLegacyMmsConnection extends LegacyMmsConnection implements
? contentApn.getProxy()
: Uri.parse(contentApn.getMmsc()).getHost();
if (checkRouteToHost(context, targetHost, usingMmsRadio)) {
Log.w(TAG, "got successful route to host " + targetHost);
Log.i(TAG, "got successful route to host " + targetHost);
pdu = execute(constructRequest(contentApn, useProxy));
}

View File

@ -54,9 +54,9 @@ public class IncomingLollipopMmsConnection extends LollipopMmsConnection impleme
@Override
public synchronized void onResult(Context context, Intent intent) {
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP_MR1) {
Log.w(TAG, "HTTP status: " + intent.getIntExtra(SmsManager.EXTRA_MMS_HTTP_STATUS, -1));
Log.i(TAG, "HTTP status: " + intent.getIntExtra(SmsManager.EXTRA_MMS_HTTP_STATUS, -1));
}
Log.w(TAG, "code: " + getResultCode() + ", result string: " + getResultData());
Log.i(TAG, "code: " + getResultCode() + ", result string: " + getResultData());
}
@Override
@ -70,7 +70,7 @@ public class IncomingLollipopMmsConnection extends LollipopMmsConnection impleme
try {
MmsBodyProvider.Pointer pointer = MmsBodyProvider.makeTemporaryPointer(getContext());
Log.w(TAG, "downloading multimedia from " + contentLocation + " to " + pointer.getUri());
Log.i(TAG, "downloading multimedia from " + contentLocation + " to " + pointer.getUri());
SmsManager smsManager;
@ -92,7 +92,7 @@ public class IncomingLollipopMmsConnection extends LollipopMmsConnection impleme
Util.copy(pointer.getInputStream(), baos);
pointer.close();
Log.w(TAG, baos.size() + "-byte response: ");// + Hex.dump(baos.toByteArray()));
Log.i(TAG, baos.size() + "-byte response: ");// + Hex.dump(baos.toByteArray()));
RetrieveConf retrieved = (RetrieveConf) new PduParser(baos.toByteArray()).parse();

View File

@ -127,13 +127,13 @@ public abstract class LegacyMmsConnection {
return true;
}
Log.w(TAG, "Checking route to address: " + host + ", " + inetAddress.getHostAddress());
Log.i(TAG, "Checking route to address: " + host + ", " + inetAddress.getHostAddress());
ConnectivityManager manager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
try {
final Method requestRouteMethod = manager.getClass().getMethod("requestRouteToHostAddress", Integer.TYPE, InetAddress.class);
final boolean routeToHostObtained = (Boolean) requestRouteMethod.invoke(manager, MmsRadio.TYPE_MOBILE_MMS, inetAddress);
Log.w(TAG, "requestRouteToHostAddress(" + inetAddress + ") -> " + routeToHostObtained);
Log.i(TAG, "requestRouteToHostAddress(" + inetAddress + ") -> " + routeToHostObtained);
return routeToHostObtained;
} catch (NoSuchMethodException nsme) {
Log.w(TAG, nsme);
@ -151,7 +151,7 @@ public abstract class LegacyMmsConnection {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Util.copy(in, baos);
Log.w(TAG, "Received full server response, " + baos.size() + " bytes");
Log.i(TAG, "Received full server response, " + baos.size() + " bytes");
return baos.toByteArray();
}
@ -183,7 +183,7 @@ public abstract class LegacyMmsConnection {
}
protected byte[] execute(HttpUriRequest request) throws IOException {
Log.w(TAG, "connecting to " + apn.getMmsc());
Log.i(TAG, "connecting to " + apn.getMmsc());
CloseableHttpClient client = null;
CloseableHttpResponse response = null;
@ -191,7 +191,7 @@ public abstract class LegacyMmsConnection {
client = constructHttpClient();
response = client.execute(request);
Log.w(TAG, "* response code: " + response.getStatusLine());
Log.i(TAG, "* response code: " + response.getStatusLine());
if (response.getStatusLine().getStatusCode() == 200) {
return parseResponse(response.getEntity().getContent());

View File

@ -45,7 +45,7 @@ public abstract class LollipopMmsConnection extends BroadcastReceiver {
@Override
public synchronized void onReceive(Context context, Intent intent) {
Log.w(TAG, "onReceive()");
Log.i(TAG, "onReceive()");
if (!action.equals(intent.getAction())) {
Log.w(TAG, "received broadcast with unexpected action " + intent.getAction());
return;

View File

@ -49,14 +49,14 @@ public class MmsRadio {
}
public synchronized void disconnect() {
Log.w("MmsRadio", "MMS Radio Disconnect Called...");
Log.i(TAG, "MMS Radio Disconnect Called...");
wakeLock.release();
connectedCounter--;
Log.w("MmsRadio", "Reference count: " + connectedCounter);
Log.i(TAG, "Reference count: " + connectedCounter);
if (connectedCounter == 0) {
Log.w("MmsRadio", "Turning off MMS radio...");
Log.i(TAG, "Turning off MMS radio...");
try {
final Method stopUsingNetworkFeatureMethod = connectivityManager.getClass().getMethod("stopUsingNetworkFeature", Integer.TYPE, String.class);
stopUsingNetworkFeatureMethod.invoke(connectivityManager, ConnectivityManager.TYPE_MOBILE, FEATURE_ENABLE_MMS);
@ -69,7 +69,7 @@ public class MmsRadio {
}
if (connectivityListener != null) {
Log.w("MmsRadio", "Unregistering receiver...");
Log.i(TAG, "Unregistering receiver...");
context.unregisterReceiver(connectivityListener);
connectivityListener = null;
}
@ -90,7 +90,7 @@ public class MmsRadio {
throw new MmsRadioException(ite);
}
Log.w("MmsRadio", "startUsingNetworkFeature status: " + status);
Log.i(TAG, "startUsingNetworkFeature status: " + status);
if (status == APN_ALREADY_ACTIVE) {
wakeLock.acquire();
@ -109,7 +109,7 @@ public class MmsRadio {
Util.wait(this, 30000);
if (!isConnected()) {
Log.w("MmsRadio", "Got back from connectivity wait, and not connected...");
Log.w(TAG, "Got back from connectivity wait, and not connected...");
disconnect();
throw new MmsRadioException("Unable to successfully enable MMS radio.");
}
@ -119,7 +119,7 @@ public class MmsRadio {
private boolean isConnected() {
NetworkInfo info = connectivityManager.getNetworkInfo(TYPE_MOBILE_MMS);
Log.w("MmsRadio", "Connected: " + info);
Log.i(TAG, "Connected: " + info);
if ((info == null) || (info.getType() != TYPE_MOBILE_MMS) || !info.isConnected())
return false;
@ -141,13 +141,13 @@ public class MmsRadio {
private synchronized void issueConnectivityChange() {
if (isConnected()) {
Log.w("MmsRadio", "Notifying connected...");
Log.i(TAG, "Notifying connected...");
notifyAll();
return;
}
if (!isConnected() && (isConnectivityFailure() || !isConnectivityPossible())) {
Log.w("MmsRadio", "Notifying not connected...");
Log.i(TAG, "Notifying not connected...");
notifyAll();
return;
}
@ -156,7 +156,7 @@ public class MmsRadio {
private class ConnectivityListener extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.w("MmsRadio", "Got connectivity change...");
Log.i(TAG, "Got connectivity change...");
issueConnectivityChange();
}
}

View File

@ -78,7 +78,7 @@ public class OutgoingLegacyMmsConnection extends LegacyMmsConnection implements
MmsRadio radio = MmsRadio.getInstance(context);
if (isDirectConnect()) {
Log.w(TAG, "Sending MMS directly without radio change...");
Log.i(TAG, "Sending MMS directly without radio change...");
try {
return send(pduBytes, false, false);
} catch (IOException e) {
@ -86,7 +86,7 @@ public class OutgoingLegacyMmsConnection extends LegacyMmsConnection implements
}
}
Log.w(TAG, "Sending MMS with radio change and proxy...");
Log.i(TAG, "Sending MMS with radio change and proxy...");
radio.connect();
try {
@ -96,7 +96,7 @@ public class OutgoingLegacyMmsConnection extends LegacyMmsConnection implements
Log.w(TAG, e);
}
Log.w(TAG, "Sending MMS with radio change and without proxy...");
Log.i(TAG, "Sending MMS with radio change and without proxy...");
try {
return send(pduBytes, true, false);
@ -126,13 +126,13 @@ public class OutgoingLegacyMmsConnection extends LegacyMmsConnection implements
? apn.getProxy()
: Uri.parse(apn.getMmsc()).getHost();
Log.w(TAG, "Sending MMS of length: " + pduBytes.length
Log.i(TAG, "Sending MMS of length: " + pduBytes.length
+ (useMmsRadio ? ", using mms radio" : "")
+ (useProxy ? ", using proxy" : ""));
try {
if (checkRouteToHost(context, targetHost, useMmsRadio)) {
Log.w(TAG, "got successful route to host " + targetHost);
Log.i(TAG, "got successful route to host " + targetHost);
byte[] response = execute(constructRequest(pduBytes, useProxy));
if (response != null) return response;
}

View File

@ -53,7 +53,7 @@ public class OutgoingLollipopMmsConnection extends LollipopMmsConnection impleme
@Override
public synchronized void onResult(Context context, Intent intent) {
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP_MR1) {
Log.w(TAG, "HTTP status: " + intent.getIntExtra(SmsManager.EXTRA_MMS_HTTP_STATUS, -1));
Log.i(TAG, "HTTP status: " + intent.getIntExtra(SmsManager.EXTRA_MMS_HTTP_STATUS, -1));
}
response = intent.getByteArrayExtra(SmsManager.EXTRA_MMS_DATA);
@ -96,7 +96,7 @@ public class OutgoingLollipopMmsConnection extends LollipopMmsConnection impleme
waitForResult();
Log.w(TAG, "MMS broadcast received and processed.");
Log.i(TAG, "MMS broadcast received and processed.");
pointer.close();
if (response == null) {

View File

@ -50,7 +50,7 @@ public class MarkReadReceiver extends BroadcastReceiver {
List<MarkedMessageInfo> messageIdsCollection = new LinkedList<>();
for (long threadId : threadIds) {
Log.w(TAG, "Marking as read: " + threadId);
Log.i(TAG, "Marking as read: " + threadId);
List<MarkedMessageInfo> messageIds = DatabaseFactory.getThreadDatabase(context).setRead(threadId, true);
messageIdsCollection.addAll(messageIds);
}

View File

@ -196,7 +196,7 @@ public class MessageNotifier {
public static void updateNotification(@NonNull Context context, long threadId)
{
if (System.currentTimeMillis() - lastDesktopActivityTimestamp < DESKTOP_ACTIVITY_PERIOD) {
Log.w(TAG, "Scheduling delayed notification...");
Log.i(TAG, "Scheduling delayed notification...");
executor.execute(new DelayedNotification(context, threadId));
} else {
updateNotification(context, threadId, true);
@ -526,14 +526,14 @@ public class MessageNotifier {
MessageNotifier.updateNotification(context);
long delayMillis = delayUntil - System.currentTimeMillis();
Log.w(TAG, "Waiting to notify: " + delayMillis);
Log.i(TAG, "Waiting to notify: " + delayMillis);
if (delayMillis > 0) {
Util.sleep(delayMillis);
}
if (!canceled.get()) {
Log.w(TAG, "Not canceled, notifying...");
Log.i(TAG, "Not canceled, notifying...");
MessageNotifier.updateNotification(context, threadId, true);
MessageNotifier.cancelDelayedNotifications();
} else {

View File

@ -19,6 +19,8 @@ import java.util.List;
public class NotificationState {
private static final String TAG = NotificationState.class.getSimpleName();
private final LinkedList<NotificationItem> notifications = new LinkedList<>();
private final LinkedHashSet<Long> threads = new LinkedHashSet<>();
@ -102,7 +104,7 @@ public class NotificationState {
int index = 0;
for (long thread : threads) {
Log.w("NotificationState", "Added thread: " + thread);
Log.i(TAG, "Added thread: " + thread);
threadArray[index++] = thread;
}
@ -145,7 +147,7 @@ public class NotificationState {
long[] threadArray = new long[threads.size()];
int index = 0;
for (long thread : threads) {
Log.w("NotificationState", "getAndroidAutoHeardIntent Added thread: " + thread);
Log.i(TAG, "getAndroidAutoHeardIntent Added thread: " + thread);
threadArray[index++] = thread;
}

View File

@ -70,7 +70,7 @@ public class AdvancedPreferenceFragment extends CorrectedPreferenceFragment {
public void onActivityResult(int reqCode, int resultCode, Intent data) {
super.onActivityResult(reqCode, resultCode, data);
Log.w(TAG, "Got result: " + resultCode + " for req: " + reqCode);
Log.i(TAG, "Got result: " + resultCode + " for req: " + reqCode);
if (resultCode == Activity.RESULT_OK && reqCode == PICK_IDENTITY_CONTACT) {
handleIdentitySelection(data);
}

View File

@ -160,7 +160,7 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.ifNecessary()
.onAllGranted(() -> {
Log.w(TAG, "Queing backup...");
Log.i(TAG, "Queing backup...");
ApplicationContext.getInstance(getContext())
.getJobManager()
.add(new LocalBackupJob(getContext()));
@ -198,7 +198,7 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
private class MediaDownloadChangeListener implements Preference.OnPreferenceChangeListener {
@SuppressWarnings("unchecked")
@Override public boolean onPreferenceChange(Preference preference, Object newValue) {
Log.w(TAG, "onPreferenceChange");
Log.i(TAG, "onPreferenceChange");
preference.setSummary(getSummaryForMediaPreference((Set<String>)newValue));
return true;
}

View File

@ -57,11 +57,11 @@ public class MmsBodyProvider extends ContentProvider {
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
Log.w(TAG, "openFile(" + uri + ", " + mode + ")");
Log.i(TAG, "openFile(" + uri + ", " + mode + ")");
switch (uriMatcher.match(uri)) {
case SINGLE_ROW:
Log.w(TAG, "Fetching message body for a single row...");
Log.i(TAG, "Fetching message body for a single row...");
File tmpFile = getFile(uri);
final int fileMode;
@ -73,7 +73,7 @@ public class MmsBodyProvider extends ContentProvider {
default: throw new IllegalArgumentException("requested file mode unsupported");
}
Log.w(TAG, "returning file " + tmpFile.getAbsolutePath());
Log.i(TAG, "returning file " + tmpFile.getAbsolutePath());
return ParcelFileDescriptor.open(tmpFile, fileMode);
}

View File

@ -59,7 +59,7 @@ public class PartProvider extends ContentProvider {
@Override
public boolean onCreate() {
Log.w(TAG, "onCreate()");
Log.i(TAG, "onCreate()");
return true;
}
@ -70,7 +70,7 @@ public class PartProvider extends ContentProvider {
@Override
public ParcelFileDescriptor openFile(@NonNull Uri uri, @NonNull String mode) throws FileNotFoundException {
Log.w(TAG, "openFile() called!");
Log.i(TAG, "openFile() called!");
if (KeyCachingService.isLocked(getContext())) {
Log.w(TAG, "masterSecret was null, abandoning.");
@ -79,7 +79,7 @@ public class PartProvider extends ContentProvider {
switch (uriMatcher.match(uri)) {
case SINGLE_ROW:
Log.w(TAG, "Parting out a single row...");
Log.i(TAG, "Parting out a single row...");
try {
final PartUriParser partUri = new PartUriParser(uri);
return getParcelStreamForAttachment(partUri.getPartId());
@ -94,13 +94,13 @@ public class PartProvider extends ContentProvider {
@Override
public int delete(@NonNull Uri arg0, String arg1, String[] arg2) {
Log.w(TAG, "delete() called");
Log.i(TAG, "delete() called");
return 0;
}
@Override
public String getType(@NonNull Uri uri) {
Log.w(TAG, "getType() called: " + uri);
Log.i(TAG, "getType() called: " + uri);
switch (uriMatcher.match(uri)) {
case SINGLE_ROW:
@ -118,13 +118,13 @@ public class PartProvider extends ContentProvider {
@Override
public Uri insert(@NonNull Uri arg0, ContentValues arg1) {
Log.w(TAG, "insert() called");
Log.i(TAG, "insert() called");
return null;
}
@Override
public Cursor query(@NonNull Uri url, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
Log.w(TAG, "query() called: " + url);
Log.i(TAG, "query() called: " + url);
if (projection == null || projection.length <= 0) return null;
@ -153,7 +153,7 @@ public class PartProvider extends ContentProvider {
@Override
public int update(@NonNull Uri arg0, ContentValues arg1, String arg2, String[] arg3) {
Log.w(TAG, "update() called");
Log.i(TAG, "update() called");
return 0;
}

View File

@ -29,6 +29,8 @@ import org.thoughtcrime.securesms.logging.Log;
*/
public abstract class TwoFingerGestureDetector extends BaseGestureDetector {
private static final String TAG = TwoFingerGestureDetector.class.getSimpleName();
private final float mEdgeSlop;
protected float mPrevFingerDiffX;
protected float mPrevFingerDiffY;
@ -134,7 +136,7 @@ public abstract class TwoFingerGestureDetector extends BaseGestureDetector {
final float y1 = getRawY(event, 1);
Log.w("TwoFinger",
Log.d(TAG,
String.format("x0: %f, y0: %f, x1: %f, y1: %f, EdgeSlop: %f, RightSlop: %f, BottomSlop: %f",
x0, y0, x1, y1, edgeSlop, rightSlop, bottomSlop));

View File

@ -60,7 +60,7 @@ public class Layer {
}
public void postScale(float scaleDiff) {
Log.w("Layer", "ScaleDiff: " + scaleDiff);
Log.i("Layer", "ScaleDiff: " + scaleDiff);
float newVal = scale + scaleDiff;
if (newVal >= getMinScale() && newVal <= getMaxScale()) {
scale = newVal;

View File

@ -444,7 +444,7 @@ public class MotionView extends FrameLayout implements TextWatcher {
public boolean onScale(ScaleGestureDetector detector) {
if (selectedEntity != null) {
float scaleFactorDiff = detector.getScaleFactor();
Log.w(TAG, "ScaleFactorDiff: " + scaleFactorDiff);
Log.d(TAG, "ScaleFactorDiff: " + scaleFactorDiff);
selectedEntity.getLayer().postScale(scaleFactorDiff - 1.0F);
selectedEntity.updateEntity();
updateUI();

View File

@ -126,7 +126,7 @@ public class KeyCachingService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent == null) return START_NOT_STICKY;
Log.w("KeyCachingService", "onStartCommand, " + intent.getAction());
Log.d(TAG, "onStartCommand, " + intent.getAction());
if (intent.getAction() != null) {
switch (intent.getAction()) {
@ -145,7 +145,7 @@ public class KeyCachingService extends Service {
@Override
public void onCreate() {
Log.w("KeyCachingService", "onCreate()");
Log.i(TAG, "onCreate()");
super.onCreate();
this.pending = PendingIntent.getService(this, 0, new Intent(PASSPHRASE_EXPIRED_EVENT, null,
this, KeyCachingService.class), 0);
@ -163,7 +163,7 @@ public class KeyCachingService extends Service {
@Override
public void onDestroy() {
super.onDestroy();
Log.w("KeyCachingService", "KCS Is Being Destroyed!");
Log.w(TAG, "KCS Is Being Destroyed!");
handleClearKey();
}
@ -179,7 +179,7 @@ public class KeyCachingService extends Service {
}
private void handleActivityStarted() {
Log.w("KeyCachingService", "Incrementing activity count...");
Log.d(TAG, "Incrementing activity count...");
AlarmManager alarmManager = ServiceUtil.getAlarmManager(this);
alarmManager.cancel(pending);
@ -187,7 +187,7 @@ public class KeyCachingService extends Service {
}
private void handleActivityStopped() {
Log.w("KeyCachingService", "Decrementing activity count...");
Log.d(TAG, "Decrementing activity count...");
activitiesRunning--;
startTimeoutIfAppropriate();
@ -195,7 +195,7 @@ public class KeyCachingService extends Service {
@SuppressLint("StaticFieldLeak")
private void handleClearKey() {
Log.w("KeyCachingService", "handleClearKey()");
Log.i(TAG, "handleClearKey()");
KeyCachingService.masterSecret = null;
stopForeground(true);
@ -253,7 +253,7 @@ public class KeyCachingService extends Service {
if (!TextSecurePreferences.isPasswordDisabled(this)) timeoutMillis = TimeUnit.MINUTES.toMillis(passphraseTimeoutMinutes);
else timeoutMillis = TimeUnit.SECONDS.toMillis(screenLockTimeoutSeconds);
Log.w("KeyCachingService", "Starting timeout: " + timeoutMillis);
Log.i(TAG, "Starting timeout: " + timeoutMillis);
AlarmManager alarmManager = ServiceUtil.getAlarmManager(this);
alarmManager.cancel(pending);
@ -263,7 +263,7 @@ public class KeyCachingService extends Service {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void foregroundServiceModern() {
Log.w("KeyCachingService", "foregrounding KCS");
Log.i(TAG, "foregrounding KCS");
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setContentTitle(getString(R.string.KeyCachingService_passphrase_cached));
@ -322,7 +322,7 @@ public class KeyCachingService extends Service {
}
private void broadcastNewSecret() {
Log.w("service", "Broadcasting new secret...");
Log.i(TAG, "Broadcasting new secret...");
Intent intent = new Intent(NEW_KEY_EVENT);
intent.setPackage(getApplicationContext().getPackageName());

View File

@ -116,13 +116,13 @@ public class MessageRetrievalService extends Service implements InjectableType,
private synchronized void incrementActive() {
activeActivities++;
Log.w(TAG, "Active Count: " + activeActivities);
Log.d(TAG, "Active Count: " + activeActivities);
notifyAll();
}
private synchronized void decrementActive() {
activeActivities--;
Log.w(TAG, "Active Count: " + activeActivities);
Log.d(TAG, "Active Count: " + activeActivities);
notifyAll();
}
@ -142,7 +142,7 @@ public class MessageRetrievalService extends Service implements InjectableType,
private synchronized boolean isConnectionNecessary() {
boolean isGcmDisabled = TextSecurePreferences.isGcmDisabled(this);
Log.w(TAG, String.format("Network requirement: %s, active activities: %s, push pending: %s, gcm disabled: %b",
Log.d(TAG, String.format("Network requirement: %s, active activities: %s, push pending: %s, gcm disabled: %b",
networkRequirement.isPresent(), activeActivities, pushPending.size(), isGcmDisabled));
return TextSecurePreferences.isPushRegistered(this) &&
@ -195,10 +195,10 @@ public class MessageRetrievalService extends Service implements InjectableType,
@Override
public void run() {
while (!stopThread.get()) {
Log.w(TAG, "Waiting for websocket state change....");
Log.i(TAG, "Waiting for websocket state change....");
waitForConnectionNecessary();
Log.w(TAG, "Making websocket connection....");
Log.i(TAG, "Making websocket connection....");
pipe = receiver.createMessagePipe();
SignalServiceMessagePipe localPipe = pipe;
@ -206,10 +206,10 @@ public class MessageRetrievalService extends Service implements InjectableType,
try {
while (isConnectionNecessary() && !stopThread.get()) {
try {
Log.w(TAG, "Reading message...");
Log.i(TAG, "Reading message...");
localPipe.read(REQUEST_TIMEOUT_MINUTES, TimeUnit.MINUTES,
envelope -> {
Log.w(TAG, "Retrieved envelope! " + envelope.getSource());
Log.i(TAG, "Retrieved envelope! " + envelope.getSource());
PushContentReceiveJob receiveJob = new PushContentReceiveJob(MessageRetrievalService.this);
receiveJob.handle(envelope);
@ -229,10 +229,10 @@ public class MessageRetrievalService extends Service implements InjectableType,
shutdown(localPipe);
}
Log.w(TAG, "Looping...");
Log.i(TAG, "Looping...");
}
Log.w(TAG, "Exiting...");
Log.i(TAG, "Exiting...");
}
private void stopThread() {

View File

@ -55,14 +55,14 @@ public class MmsListener extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.w(TAG, "Got MMS broadcast..." + intent.getAction());
Log.i(TAG, "Got MMS broadcast..." + intent.getAction());
if ((Telephony.Sms.Intents.WAP_PUSH_DELIVER_ACTION.equals(intent.getAction()) &&
Util.isDefaultSmsProvider(context)) ||
(Telephony.Sms.Intents.WAP_PUSH_RECEIVED_ACTION.equals(intent.getAction()) &&
isRelevant(context, intent)))
{
Log.w(TAG, "Relevant!");
Log.i(TAG, "Relevant!");
int subscriptionId = intent.getExtras().getInt("subscription", -1);
ApplicationContext.getInstance(context)

View File

@ -26,7 +26,7 @@ public abstract class PersistentAlarmManagerListener extends BroadcastReceiver {
scheduledTime = onAlarm(context, scheduledTime);
}
Log.w(TAG, getClass() + " scheduling for: " + scheduledTime);
Log.i(TAG, getClass() + " scheduling for: " + scheduledTime);
alarmManager.cancel(pendingIntent);
alarmManager.set(AlarmManager.RTC_WAKEUP, scheduledTime, pendingIntent);

View File

@ -46,7 +46,7 @@ public class SmsDeliveryListener extends BroadcastReceiver {
int status = message.getStatus();
Log.w(TAG, "Original status: " + status);
Log.i(TAG, "Original status: " + status);
// Note: https://developer.android.com/reference/android/telephony/SmsMessage.html#getStatus()
// " CDMA: For not interfering with status codes from GSM, the value is shifted to the bits 31-16"

View File

@ -142,7 +142,7 @@ public class SmsListener extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.w("SMSListener", "Got SMS broadcast...");
Log.i("SMSListener", "Got SMS broadcast...");
String messageBody = getSmsMessageBodyFromIntent(intent);
if (SMS_RECEIVED_ACTION.equals(intent.getAction()) && isChallenge(context, messageBody)) {
@ -155,7 +155,7 @@ public class SmsListener extends BroadcastReceiver {
} else if ((intent.getAction().equals(SMS_DELIVERED_ACTION)) ||
(intent.getAction().equals(SMS_RECEIVED_ACTION)) && isRelevant(context, intent))
{
Log.w("SmsListener", "Constructing SmsReceiveJob...");
Log.i("SmsListener", "Constructing SmsReceiveJob...");
Object[] pdus = (Object[]) intent.getExtras().get("pdus");
int subscriptionId = intent.getExtras().getInt("subscription", -1);

View File

@ -31,7 +31,7 @@ public class UpdateApkReadyListener extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.w(TAG, "onReceive()");
Log.i(TAG, "onReceive()");
if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction())) {
long downloadId = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -2);

Some files were not shown because too many files have changed in this diff Show More