Loading src/java/com/android/internal/telephony/InboundSmsHandler.java +19 −19 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.database.Cursor; import android.database.SQLException; Loading @@ -49,8 +50,11 @@ import android.os.Bundle; import android.os.Message; import android.os.PowerManager; import android.os.PowerWhitelistManager; import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; import android.provider.Telephony; import android.provider.Telephony.Sms.Intents; import android.service.carrier.CarrierMessagingService; Loading Loading @@ -661,22 +665,18 @@ public abstract class InboundSmsHandler extends StateMachine { return Intents.RESULT_SMS_HANDLED; } // // onlyCore indicates if the device is in cryptkeeper // boolean onlyCore = false; // try { // onlyCore = IPackageManager.Stub.asInterface( // TelephonyFrameworkInitializer // .getTelephonyServiceManager() // .getPackageManagerServiceRegisterer() // .get()). // isOnlyCoreApps(); // } catch (RemoteException e) { // } // if (onlyCore) { // // Device is unable to receive SMS in encrypted state // log("Received a short message in encrypted state. Rejecting."); // return Intents.RESULT_SMS_RECEIVED_WHILE_ENCRYPTED; // } // onlyCore indicates if the device is in cryptkeeper boolean onlyCore = false; try { onlyCore = IPackageManager.Stub.asInterface(ServiceManager.getService("package")) .isOnlyCoreApps(); } catch (RemoteException e) { } if (onlyCore) { // Device is unable to receive SMS in encrypted state log("Received a short message in encrypted state. Rejecting."); return Intents.RESULT_SMS_RECEIVED_WHILE_ENCRYPTED; } int result = dispatchMessageRadioSpecific(smsb); Loading Loading @@ -1059,9 +1059,9 @@ public abstract class InboundSmsHandler extends StateMachine { @UnsupportedAppUsage private void showNewMessageNotification() { // Do not show the notification on non-FBE devices. // if (!StorageManager.isFileEncryptedNativeOrEmulated()) { // return; // } if (!StorageManager.isFileEncryptedNativeOrEmulated()) { return; } log("Show new message notification."); PendingIntent intent = PendingIntent.getBroadcast( mContext, Loading src/java/com/android/internal/telephony/PhoneConfigurationManager.java +9 −13 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.os.RegistrantList; import android.os.storage.StorageManager; import android.sysprop.TelephonyProperties; import android.telephony.PhoneCapability; import android.telephony.SubscriptionManager; Loading Loading @@ -100,20 +101,15 @@ public class PhoneConfigurationManager { mPhones = PhoneFactory.getPhones(); /* * To support FDE (deprecated), additional check is needed: * * if (!StorageManager.inCryptKeeperBounce()) { * // for loop below * } else { * for (Phone phone : mPhones) { * phone.mCi.registerForOn(mHandler, Phone.EVENT_RADIO_ON, phone); * } * } */ if (!StorageManager.inCryptKeeperBounce()) { for (Phone phone : mPhones) { phone.mCi.registerForAvailable(mHandler, Phone.EVENT_RADIO_AVAILABLE, phone); } } else { for (Phone phone : mPhones) { phone.mCi.registerForOn(mHandler, Phone.EVENT_RADIO_ON, phone); } } } private PhoneCapability getDefaultCapability() { Loading src/java/com/android/internal/telephony/uicc/UiccController.java +6 −10 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.Handler; import android.os.Message; import android.os.Registrant; import android.os.RegistrantList; import android.os.storage.StorageManager; import android.preference.PreferenceManager; import android.telephony.CarrierConfigManager; import android.telephony.TelephonyManager; Loading Loading @@ -229,16 +230,11 @@ public class UiccController extends Handler { for (int i = 0; i < mCis.length; i++) { mCis[i].registerForIccStatusChanged(this, EVENT_ICC_STATUS_CHANGED, i); /* * To support FDE (deprecated), additional check is needed: * * if (!StorageManager.inCryptKeeperBounce()) { * mCis[i].registerForAvailable(this, EVENT_RADIO_AVAILABLE, i); * } else { * mCis[i].registerForOn(this, EVENT_RADIO_ON, i); * } */ if (!StorageManager.inCryptKeeperBounce()) { mCis[i].registerForAvailable(this, EVENT_RADIO_AVAILABLE, i); } else { mCis[i].registerForOn(this, EVENT_RADIO_ON, i); } mCis[i].registerForNotAvailable(this, EVENT_RADIO_UNAVAILABLE, i); mCis[i].registerForIccRefresh(this, EVENT_SIM_REFRESH, i); Loading Loading
src/java/com/android/internal/telephony/InboundSmsHandler.java +19 −19 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.IPackageManager; import android.content.pm.PackageManager; import android.database.Cursor; import android.database.SQLException; Loading @@ -49,8 +50,11 @@ import android.os.Bundle; import android.os.Message; import android.os.PowerManager; import android.os.PowerWhitelistManager; import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; import android.os.UserManager; import android.os.storage.StorageManager; import android.provider.Telephony; import android.provider.Telephony.Sms.Intents; import android.service.carrier.CarrierMessagingService; Loading Loading @@ -661,22 +665,18 @@ public abstract class InboundSmsHandler extends StateMachine { return Intents.RESULT_SMS_HANDLED; } // // onlyCore indicates if the device is in cryptkeeper // boolean onlyCore = false; // try { // onlyCore = IPackageManager.Stub.asInterface( // TelephonyFrameworkInitializer // .getTelephonyServiceManager() // .getPackageManagerServiceRegisterer() // .get()). // isOnlyCoreApps(); // } catch (RemoteException e) { // } // if (onlyCore) { // // Device is unable to receive SMS in encrypted state // log("Received a short message in encrypted state. Rejecting."); // return Intents.RESULT_SMS_RECEIVED_WHILE_ENCRYPTED; // } // onlyCore indicates if the device is in cryptkeeper boolean onlyCore = false; try { onlyCore = IPackageManager.Stub.asInterface(ServiceManager.getService("package")) .isOnlyCoreApps(); } catch (RemoteException e) { } if (onlyCore) { // Device is unable to receive SMS in encrypted state log("Received a short message in encrypted state. Rejecting."); return Intents.RESULT_SMS_RECEIVED_WHILE_ENCRYPTED; } int result = dispatchMessageRadioSpecific(smsb); Loading Loading @@ -1059,9 +1059,9 @@ public abstract class InboundSmsHandler extends StateMachine { @UnsupportedAppUsage private void showNewMessageNotification() { // Do not show the notification on non-FBE devices. // if (!StorageManager.isFileEncryptedNativeOrEmulated()) { // return; // } if (!StorageManager.isFileEncryptedNativeOrEmulated()) { return; } log("Show new message notification."); PendingIntent intent = PendingIntent.getBroadcast( mContext, Loading
src/java/com/android/internal/telephony/PhoneConfigurationManager.java +9 −13 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.os.RegistrantList; import android.os.storage.StorageManager; import android.sysprop.TelephonyProperties; import android.telephony.PhoneCapability; import android.telephony.SubscriptionManager; Loading Loading @@ -100,20 +101,15 @@ public class PhoneConfigurationManager { mPhones = PhoneFactory.getPhones(); /* * To support FDE (deprecated), additional check is needed: * * if (!StorageManager.inCryptKeeperBounce()) { * // for loop below * } else { * for (Phone phone : mPhones) { * phone.mCi.registerForOn(mHandler, Phone.EVENT_RADIO_ON, phone); * } * } */ if (!StorageManager.inCryptKeeperBounce()) { for (Phone phone : mPhones) { phone.mCi.registerForAvailable(mHandler, Phone.EVENT_RADIO_AVAILABLE, phone); } } else { for (Phone phone : mPhones) { phone.mCi.registerForOn(mHandler, Phone.EVENT_RADIO_ON, phone); } } } private PhoneCapability getDefaultCapability() { Loading
src/java/com/android/internal/telephony/uicc/UiccController.java +6 −10 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.Handler; import android.os.Message; import android.os.Registrant; import android.os.RegistrantList; import android.os.storage.StorageManager; import android.preference.PreferenceManager; import android.telephony.CarrierConfigManager; import android.telephony.TelephonyManager; Loading Loading @@ -229,16 +230,11 @@ public class UiccController extends Handler { for (int i = 0; i < mCis.length; i++) { mCis[i].registerForIccStatusChanged(this, EVENT_ICC_STATUS_CHANGED, i); /* * To support FDE (deprecated), additional check is needed: * * if (!StorageManager.inCryptKeeperBounce()) { * mCis[i].registerForAvailable(this, EVENT_RADIO_AVAILABLE, i); * } else { * mCis[i].registerForOn(this, EVENT_RADIO_ON, i); * } */ if (!StorageManager.inCryptKeeperBounce()) { mCis[i].registerForAvailable(this, EVENT_RADIO_AVAILABLE, i); } else { mCis[i].registerForOn(this, EVENT_RADIO_ON, i); } mCis[i].registerForNotAvailable(this, EVENT_RADIO_UNAVAILABLE, i); mCis[i].registerForIccRefresh(this, EVENT_SIM_REFRESH, i); Loading