Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 213409c8 authored by zhidou's avatar zhidou
Browse files

throw exception if read from deviceConfig doesn't work

This change will throw exception if read from deviceConfig doesn't work.
It could be caused by early accessing issue or isolated process issue.

Test: atest aconfig.test.java
Bug: n/a
Flag: EXEMPT refactor
Change-Id: Ibe76921304022a8f4a4cb8653fbc58c211cfae21
parent f64e2f84
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -561,6 +561,8 @@ mod tests {
                        + "flag declaration.",
                        + "flag declaration.",
                        e
                        e
                    );
                    );
                } catch (SecurityException e) {
                    // for isolated process case, skip loading flag value from the storage, use the default
                }
                }
                aconfig_test_is_cached = true;
                aconfig_test_is_cached = true;
            }
            }
@@ -579,6 +581,8 @@ mod tests {
                        + "flag declaration.",
                        + "flag declaration.",
                        e
                        e
                    );
                    );
                } catch (SecurityException e) {
                    // for isolated process case, skip loading flag value from the storage, use the default
                }
                }
                other_namespace_is_cached = true;
                other_namespace_is_cached = true;
            }
            }
@@ -787,6 +791,8 @@ mod tests {
                        + "flag declaration.",
                        + "flag declaration.",
                        e
                        e
                    );
                    );
                } catch (SecurityException e) {
                    // for isolated process case, skip loading flag value from the storage, use the default
                }
                }
                aconfig_test_is_cached = true;
                aconfig_test_is_cached = true;
            }
            }
+2 −0
Original line number Original line Diff line number Diff line
@@ -73,6 +73,8 @@ public final class FeatureFlagsImpl implements FeatureFlags \{
                + "flag declaration.",
                + "flag declaration.",
                e
                e
            );
            );
        } catch (SecurityException e) \{
            // for isolated process case, skip loading flag value from the storage, use the default
        }
        }
        {namespace_with_flags.namespace}_is_cached = true;
        {namespace_with_flags.namespace}_is_cached = true;
    }
    }