Update App info behavior for mainline module
As requested by framework team, the mainline module should be considered as system apps and not stoppable and disable-able. Since many of these modules provide critical functionality, disabling them can result in a very unstable device. According to the request, Settings will apply below changes to App info page for protecting mainline modules: - Hide "Force stop" and "Disable" in App info. - Disable "Clear storage" and "Clear cache" in "Storage & cache". Since the mainline module checking API interface changed, also change the dependent files and test cases. Fixes: 156955322 Test: robotest and verify "Cell Broadcast Service" in App info Change-Id: Ibc239bdaf3364eda541a33add382364cfdc6fc9b
This commit is contained in:
@@ -744,7 +744,9 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp
|
||||
}
|
||||
|
||||
private boolean isSystemModule() {
|
||||
return mAppEntry != null && AppUtils.isSystemModule(mContext, mAppEntry.info.packageName);
|
||||
return mAppEntry != null
|
||||
&& (AppUtils.isSystemModule(mContext, mAppEntry.info.packageName)
|
||||
|| AppUtils.isMainlineModule(mPm, mAppEntry.info.packageName));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user