@@ -1687,18 +1687,9 @@ private Set<String> getOverlayInstantAppAccessibleSettings(int settingsType) {
16871687 }
16881688
16891689 private List <String > getSettingsNamesLocked (int settingsType , int userId ) {
1690- boolean instantApp ;
1691- if (UserHandle .getAppId (Binder .getCallingUid ()) < Process .FIRST_APPLICATION_UID ) {
1692- instantApp = false ;
1693- } else {
1694- ApplicationInfo ai = getCallingApplicationInfoOrThrow ();
1695- instantApp = ai .isInstantApp ();
1696- }
1697- if (instantApp ) {
1698- return new ArrayList <String >(getInstantAppAccessibleSettings (settingsType ));
1699- } else {
1700- return mSettingsRegistry .getSettingsNamesLocked (settingsType , userId );
1701- }
1690+ // Don't enforce the instant app whitelist for now -- its too prone to unintended breakage
1691+ // in the current form.
1692+ return mSettingsRegistry .getSettingsNamesLocked (settingsType , userId );
17021693 }
17031694
17041695 private void enforceSettingReadable (String settingName , int settingsType , int userId ) {
@@ -1711,8 +1702,10 @@ private void enforceSettingReadable(String settingName, int settingsType, int us
17111702 }
17121703 if (!getInstantAppAccessibleSettings (settingsType ).contains (settingName )
17131704 && !getOverlayInstantAppAccessibleSettings (settingsType ).contains (settingName )) {
1714- throw new SecurityException ("Setting " + settingName + " is not accessible from"
1715- + " ephemeral package " + getCallingPackage ());
1705+ // Don't enforce the instant app whitelist for now -- its too prone to unintended
1706+ // breakage in the current form.
1707+ Slog .w (LOG_TAG , "Instant App " + ai .packageName
1708+ + " trying to access unexposed setting, this will be an error in the future." );
17161709 }
17171710 }
17181711
0 commit comments