session-android/src/org/thoughtcrime/securesms/service/QuickResponseService.java
Moxie Marlinspike b0216e1494 Finish KitKat compatibility details.
1) The system does actually enforce having a BROADCAST_SMS
   permission on the SMS receiver. Break out the "delivered"
   parts of this into a separate Receiver, so the permission
   won't trip up GB devices.

2) The system does actually enforce having "quick response"
   intents.  Add a no-op for now.

3) Add a "make default" prompt.

4) Update settings to reflect what's going on in KitKat.
2013-12-02 12:31:59 -08:00

32 lines
896 B
Java

package org.thoughtcrime.securesms.service;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.Toast;
import org.thoughtcrime.securesms.R;
public class QuickResponseService extends Service {
public int onStartCommand(Intent intent, int flags, int startId) {
if (!TelephonyManager.ACTION_RESPOND_VIA_MESSAGE.equals(intent.getAction())) {
Log.w("QuickResponseService", "Received unknown intent: " + intent.getAction());
return START_NOT_STICKY;
}
Toast.makeText(this,
getString(R.string.QuickResponseService_sorry_quick_response_is_not_yet_supported_by_textsecure),
Toast.LENGTH_LONG).show();
return START_NOT_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
}