CMSDK: Introduce factored out resources from framework.
Change-Id: I4193db99f3f883260354cde98366f94c608f6163
This commit is contained in:
parent
1ba6ee279a
commit
6e46829eb7
|
@ -108,8 +108,8 @@ public class ProfileManagerService extends SystemService {
|
|||
mBackupManager = new BackupManager(mContext);
|
||||
|
||||
mWildcardGroup = new NotificationGroup(
|
||||
mContext.getString(com.android.internal.R.string.wildcardProfile),
|
||||
com.android.internal.R.string.wildcardProfile,
|
||||
mContext.getString(org.cyanogenmod.platform.internal.R.string.wildcardProfile),
|
||||
org.cyanogenmod.platform.internal.R.string.wildcardProfile,
|
||||
mWildcardUUID);
|
||||
|
||||
initialize();
|
||||
|
@ -536,7 +536,7 @@ public class ProfileManagerService extends SystemService {
|
|||
|
||||
private void initialiseStructure() throws XmlPullParserException, IOException {
|
||||
XmlResourceParser xml = mContext.getResources().getXml(
|
||||
com.android.internal.R.xml.profile_default);
|
||||
org.cyanogenmod.platform.internal.R.xml.profile_default);
|
||||
try {
|
||||
loadXml(xml, mContext);
|
||||
mDirty = true;
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The CyanogenMod Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/ic_settings_profiles"
|
||||
android:tint="?android:attr/colorControlNormal" />
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#009688"
|
||||
android:pathData="M14.304,5.455l0.79-1.93c0.079-0.193-0.013-0.413-0.206-0.492c-0.193-0.079-0.413,0.013-0.492,0.206 l-0.818,2c-0.903-0.207-2.055-0.286-3.433-0.286v0.005h0V4.953c-0.18,0-0.355,0.002-0.527,0.005H9.615 C8.468,4.976,7.495,5.06,6.71,5.239l-0.819-2C5.812,3.046,5.592,2.954,5.399,3.033C5.206,3.112,5.114,3.332,5.193,3.525l0.79,1.93 C4.934,5.852,4.377,6.523,4.377,7.6v2.261v0.587v0.644c0,1.98,1.876,2.588,5.238,2.643v0.003h0.209 c0.105,0.001,0.212,0.002,0.32,0.002v-0.002h0v0.002c0.108,0,0.214-0.001,0.32-0.002h0.015c3.484-0.034,5.432-0.628,5.432-2.646 v-0.644V9.861V7.6C15.909,6.523,15.352,5.852,14.304,5.455Z M7.179,11.014c-0.953,0-1.725-0.772-1.725-1.724 c0-0.953,0.772-1.725,1.725-1.725c0.952,0,1.724,0.772,1.724,1.725C8.904,10.242,8.132,11.014,7.179,11.014z M10.325,12.265H9.961 c-0.268,0-0.485-0.217-0.485-0.485c0-0.01,0.002-0.019,0.003-0.029h1.328c0.001,0.01,0.003,0.019,0.003,0.029 C10.81,12.048,10.593,12.265,10.325,12.265z M13.107,11.014c-0.953,0-1.725-0.772-1.725-1.724c0-0.953,0.772-1.725,1.725-1.725 c0.952,0,1.724,0.772,1.724,1.725C14.832,10.242,14.06,11.014,13.107,11.014z M21.44,10.402c-0.261,1.016-0.5,4.301-5.798,7.557 c-0.439,0.269-0.884,0.974-0.884,2.152l0.05,0.89h-1.922v0h-0.014c0-1.492-1.214-2.706-2.706-2.706 c-1.492,0-2.706,1.214-2.706,2.706v0H5.525l0.07-1.243c0,0-0.203,0.516-0.489,1.243H2.501l1.563-4.171 c0.303-0.793,1.013-1.282,1.733-1.529c0.524-0.18,1.593-0.386,3.586-0.485h1.569c0.492,0.025,0.926,0.055,1.311,0.091 c0,0,0,0,0.001,0s0,0,0.001,0c0.296,0.027,0.563,0.057,0.801,0.089c1.028,0.062,2.506-0.095,4.131-1.475 c1.423-1.209,1.591-2.051,2.28-3.895C20.285,7.463,21.816,8.936,21.44,10.402z M12.316,21h0.013v0H8.02v0H8.019 c0-1.185,0.964-2.148,2.149-2.148C11.352,18.851,12.316,19.815,12.316,21z" />
|
||||
</vector>
|
|
@ -26,4 +26,23 @@
|
|||
|
||||
<!-- Label to show for a service that is running because it is observing the user's custom tiles. -->
|
||||
<string name="custom_tile_listener_binding_label">Custom tile listener</string>
|
||||
|
||||
<!-- Profiles -->
|
||||
<!-- Names of default profiles. -->
|
||||
<string name="profileNameDefault">Default</string>
|
||||
<string name="profileNameWork">Work</string>
|
||||
<string name="profileNameHome">Home</string>
|
||||
<string name="profileNameSilent">Silent</string>
|
||||
<string name="profileNameNight">Night</string>
|
||||
<string name="profileNameAutomobile">Automobile</string>
|
||||
|
||||
<!-- Names of application groups. -->
|
||||
<string name="profileGroupPhone">Phone</string>
|
||||
<string name="profileGroupCalendar">Calendar</string>
|
||||
<string name="profileGroupGmail">Gmail</string>
|
||||
<string name="profileGroupEmail">Email</string>
|
||||
<string name="profileGroupSMS">SMS</string>
|
||||
|
||||
<!-- Name of wildcard profile. -->
|
||||
<string name="wildcardProfile">Other</string>
|
||||
</resources>
|
||||
|
|
|
@ -20,4 +20,9 @@
|
|||
<private-symbols package="org.cyanogenmod.platform.internal" />
|
||||
|
||||
<java-symbol type="string" name="custom_tile_listener_binding_label" />
|
||||
|
||||
<!-- Profiles -->
|
||||
<java-symbol type="xml" name="profile_default" />
|
||||
<java-symbol type="string" name="wildcardProfile" />
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<profiles>
|
||||
<profile
|
||||
nameres="profileNameDefault"
|
||||
uuid="0230226d-0d05-494a-a9bd-d222a1117655">
|
||||
<ringModeDescriptor>
|
||||
<value>normal</value>
|
||||
<override>true</override>
|
||||
</ringModeDescriptor>
|
||||
</profile>
|
||||
<profile
|
||||
nameres="profileNameSilent"
|
||||
uuid="e4e77d03-82ce-4417-9257-7d6c9ffb8fd1">
|
||||
<ringModeDescriptor>
|
||||
<value>mute</value>
|
||||
<override>true</override>
|
||||
</ringModeDescriptor>
|
||||
</profile>
|
||||
<profile
|
||||
nameres="profileNameAutomobile"
|
||||
uuid="6a181391-12ef-4f43-a701-32b11ed69449">
|
||||
<!-- turn GPS on -->
|
||||
<connectionDescriptor>
|
||||
<connectionId>4</connectionId>
|
||||
<value>1</value>
|
||||
<override>true</override>
|
||||
</connectionDescriptor>
|
||||
<!-- turn Bluetooth on -->
|
||||
<connectionDescriptor>
|
||||
<connectionId>7</connectionId>
|
||||
<value>1</value>
|
||||
<override>true</override>
|
||||
</connectionDescriptor>
|
||||
</profile>
|
||||
</profiles>
|
|
@ -703,7 +703,8 @@ public final class Profile implements Parcelable, Comparable {
|
|||
String profileName = null;
|
||||
|
||||
if (value != null) {
|
||||
profileNameResId = context.getResources().getIdentifier(value, "string", "android");
|
||||
profileNameResId = context.getResources().getIdentifier(value, "string",
|
||||
"cyanogenmod.platform");
|
||||
if (profileNameResId > 0) {
|
||||
profileName = context.getResources().getString(profileNameResId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue