Treat Telephony as legacy app for now.

Telephony stack is relying on non-existant ContentProviders for
sending Uri change notifications; it'll eventually need to move over
to using real ContentProviders, but apply this band-aid for now.

Test: builds, boots, SMS send/receive works
Bug: 35792675
Change-Id: Ice66278f876f1c754852300da7eb045a7c778d14
This commit is contained in:
Jeff Sharkey
2017-02-27 15:58:24 -07:00
parent 694986326b
commit 2afae796de

View File

@@ -36,6 +36,7 @@ import android.database.IContentObserver;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.CancellationSignal;
import android.os.DeadObjectException;
@@ -500,7 +501,12 @@ public abstract class ContentResolver {
public ContentResolver(Context context) {
mContext = context != null ? context : ActivityThread.currentApplication();
mPackageName = mContext.getOpPackageName();
mTargetSdkVersion = mContext.getApplicationInfo().targetSdkVersion;
if (android.os.Process.myUid() == android.os.Process.PHONE_UID) {
// STOPSHIP: Telephony needs to fix b/35792675
mTargetSdkVersion = Build.VERSION_CODES.N_MR1;
} else {
mTargetSdkVersion = mContext.getApplicationInfo().targetSdkVersion;
}
}
/** @hide */