History log of /frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
92545464c47273c4d309a7473cd3aaeec764acec 07-Jan-2017 Jeff Davidson <jpd@google.com> Linger the carrier service binding when privileges drop.

If, when rebinding, no app has carrier privileges, but a binding is
active, instead of immediately unbinding, we schedule an unbind in 30
seconds. During that time period, if any other app comes up with
carrier privileges, the scheduled task is cancelled and the binding is
immediately dropped. If the same app and component regains carrier
privileges, the scheduled task is canceled and the binding left alive.

This keeps the binding alive through temporary blips in carrier
privileges. Note that apart from foreground status, the binding itself
profers no additional privileges or abilities onto the bound
application.

Bug: 33057511
Test: Remove/reinsert SIM before/after 30 seconds, disabling carrier
app entirely.
Change-Id: Ice194fe6ce58f1372369b1799d4d20bd5304f684
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
72461457ecf97b19a98d8b581ae72e9819db3ade 02-Jun-2016 Jeff Davidson <jpd@google.com> More carrier bind fixes: direct boot and package changes.

For direct boot, we must listen to ACTION_USER_UNLOCKED and rebind
upon unlock in case the carrier service is not direct boot aware.

Also, previously, we only evaluated bindings on package changes to the
package that was currently bound to, if any. But if no binding is
present, and then a package change leads to a scenario where a binding
should be made, the binding would never be established. This can
happen when a new carrier package is first installed, or if the
component/package goes from disabled to enabled. Thus, when package
changes occur, also reevaluate bindings for any phones which have no
binding information.

Fixes: 28964849
Fixes: 29043701
Change-Id: Ia60c7035d2a3f3f02445f017920f8c4650f464f4
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
4effa398215d02824e08a300cd6af63c67f408ea 24-May-2016 Jeff Davidson <jpd@google.com> Simplify carrier service binding and make it more robust.

-Change bind() to rebind(), and have it ensure the binding is always
in the right state. It will drop the binding if it's unneeded,
establish a new binding if the parameters have changed, or else leave
the existing binding alone.

-Use a PackageMonitor instead of a BroadcastReceiver as a minor
simplification. Handle add/remove/update as before.

-Handle package changes by rebinding.

-Handle package force stops by explicitly unbinding and rebinding.

-Remove the bind timeout. This was designed to catch cases where
onBind returned null, but leaving the binding isn't actually harmful,
and having a timeout introduces risk that the binding is dropped when
it is legitimately taking a while to establish.

-Fix log tag which is > 23 characters and thus invalid.

Bug: 28897103
Change-Id: I2e9311588dc378bfb3bc221f2149d3e2d27ce351
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
c77603fefc09b85a526d5d6277a9838fcf8e93f2 05-Apr-2016 Junda Liu <junda@google.com> Merge "No unbind if carrier app is the same." into nyc-dev
c334d3e3ececb4fbe52fbad1df656fe0599cea13 01-Apr-2016 Junda Liu <junda@google.com> Merge "Add forground flag to carrierservice binder." into nyc-dev
5c1ddc684185b37cdb79533b95d73e636e38e586 31-Mar-2016 Junda Liu <junda@google.com> Add forground flag to carrierservice binder.

The persistent carrier binding is made with only the BIND_AUTO_CREATE flag, not the BIND_FOREGROUND_SERVICE flag. Without this flag, the binding alone is not enough to keep the application from being restricted in various power saving modes, which is a major purpose of the binding.

Bug: b/27853835
Change-Id: I03c36e886fb03d8a410913eaf4bffa38c12a4499
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
fa77d101a89df78c3fb655c101b3ee1f0ebb7134 15-Mar-2016 Junda Liu <junda@google.com> No unbind if carrier app is the same.

Previously unbind is called first within bind, this will briefly
disconnect carrier app even though the new one is the same. This change
checks current binding and keep it if package is the same.

Bug: b/27499289
Change-Id: Ie5887d385a50818722116691424fb87bb928efa4
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
3de2956a41a987a00932eeb5dd25b66279f6094a 11-Mar-2016 Junda Liu <junda@google.com> Fix carrier service binding.

Ignore duplicated simstate and no more unbind when sim is unknown.

Bug: b/27499289
Change-Id: I37036f3f9ac55c035250f03c2fdab30366a2aaa7
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
69027fb2fbdb046467b8902ebc70120b89301cee 15-Aug-2015 Jonathan Basseri <misterikkit@google.com> Add null check

resolveService() is allowed to return null, so check the return value
before using it.

Bug: 23041089
Change-Id: I75af183d551770048fa925676b9adfbd078e22ba
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
2dc7607bae115d015083afad7dec3a3beee7c4c3 22-Jun-2015 Zach Johnson <zachoverflow@google.com> Update long lived bindings on package update

b/21080696

Change-Id: I48e313a09f403e1d2f083ddab23e6e59d1e83655
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java
4a3d736dbf0b8262290d3720085779538ceaad72 15-May-2015 Zach Johnson <zachoverflow@google.com> Bind to carrier apps that request it

Also plumb through dumpsys output for
carrier app bindings.

b/21080696

Change-Id: I82e3f119e4f08f040da0f1071fe1dd15077b2797
/frameworks/opt/telephony/src/java/com/android/internal/telephony/CarrierServiceBindHelper.java