Add UI for mainline modules licenses.
Added a module licenses option that lives in Legal information settings. Clicking that option opens module licenses page, which displays every module by name, filtered to exclude modules without license files. Clicking a module in the list opens HTMLViewer. Created ModuleLicensesProvider, a new ContentProvider that serves as a redirect for the Uris sent to HTMLViewer so that they open asset files. In order to provide the redirect, the provider will write the license file to a file in Settings' cache directory when the license does not exist in the cache or is outdated. The provider then opens that cached file. Fixes: 135183006 Test: robotests Change-Id: I7d69da34780c8c4efb150d0c0411078c12bc80d8
This commit is contained in:
@@ -986,6 +986,18 @@
|
||||
android:value="true" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".Settings$ModuleLicensesActivity"
|
||||
android:label="@string/module_license_title">
|
||||
<intent-filter>
|
||||
<action android:name="android.settings.MODULE_LICENSES" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.deviceinfo.legal.ModuleLicensesDashboard" />
|
||||
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
|
||||
android:value="true" />
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="Settings$ManageApplicationsActivity"
|
||||
android:label="@string/applications_settings">
|
||||
@@ -2662,6 +2674,12 @@
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<provider
|
||||
android:name=".deviceinfo.legal.ModuleLicenseProvider"
|
||||
android:authorities="com.android.settings.module_licenses"
|
||||
android:grantUriPermissions="true"
|
||||
android:exported="false"/>
|
||||
|
||||
<activity android:name=".sim.SimPreferenceDialog"
|
||||
android:theme="@style/Theme.AlertDialog"
|
||||
android:excludeFromRecents="true" />
|
||||
|
||||
Reference in New Issue
Block a user