diff --git a/testapps/TestRcsApp/TestApp/AndroidManifest.xml b/testapps/TestRcsApp/TestApp/AndroidManifest.xml
index 35a0822..3ec9b69 100644
--- a/testapps/TestRcsApp/TestApp/AndroidManifest.xml
+++ b/testapps/TestRcsApp/TestApp/AndroidManifest.xml
@@ -56,6 +56,7 @@
         <activity android:name=".ContactListActivity" />
         <activity android:name=".ProvisioningActivity" />
         <activity android:name=".FileUploadActivity" />
+        <activity android:name=".carrierLock.CarrieLockModeListActivity" />
 
         <provider
             android:name=".util.ChatProvider"
@@ -117,6 +118,10 @@
             </intent-filter>
         </service>
 
+        <provider
+            android:name=".carrierLock.CarrierLockProvider"
+            android:authorities="com.sample.lockProvider"
+            android:exported="true" />
     </application>
 
 </manifest>
diff --git a/testapps/TestRcsApp/TestApp/res/layout/CarrierLockListLayout.xml b/testapps/TestRcsApp/TestApp/res/layout/CarrierLockListLayout.xml
new file mode 100644
index 0000000..f07c65c
--- /dev/null
+++ b/testapps/TestRcsApp/TestApp/res/layout/CarrierLockListLayout.xml
@@ -0,0 +1,77 @@
+<!--
+  ~ Copyright (C) 2023 The Android Open Source 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.
+  -->
+
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".MainActivity">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <Button
+            android:id="@+id/noLockMode"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_LockMode"
+            android:textAlignment="center"
+            android:textAllCaps="false" />
+
+        <Button
+            android:id="@+id/lockToVZW"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_LockTo_VZW"
+            android:textAlignment="center"
+            android:textAllCaps="false" />
+
+        <Button
+            android:id="@+id/lockToATT"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_LockTo_ATT"
+            android:textAlignment="center"
+            android:textAllCaps="false" />
+
+        <Button
+            android:id="@+id/lockToTMO"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_LockTo_TMO"
+            android:textAlignment="center"
+            android:textAllCaps="false" />
+
+        <Button
+            android:id="@+id/lockToKOODOS"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_LockTo_KOODOS"
+            android:textAlignment="center"
+            android:textAllCaps="false" />
+
+        <Button
+            android:id="@+id/lockToTELUS"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_LockTo_TELUS"
+            android:textAlignment="center"
+            android:textAllCaps="false" />
+    </LinearLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/testapps/TestRcsApp/TestApp/res/layout/activity_main.xml b/testapps/TestRcsApp/TestApp/res/layout/activity_main.xml
index 939feb0..ebf5508 100644
--- a/testapps/TestRcsApp/TestApp/res/layout/activity_main.xml
+++ b/testapps/TestRcsApp/TestApp/res/layout/activity_main.xml
@@ -74,6 +74,14 @@
             android:textAlignment="center"
             android:textAllCaps="false" />
 
+        <Button
+            android:id="@+id/setCarrierLockMode"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/setCarrierLockMode"
+            android:textAlignment="center"
+            android:textAllCaps="false"/>
+
         <TextView
             android:id="@+id/version_info"
             android:layout_width="match_parent"
diff --git a/testapps/TestRcsApp/TestApp/res/values/donottranslate_strings.xml b/testapps/TestRcsApp/TestApp/res/values/donottranslate_strings.xml
index f52b70d..b017139 100644
--- a/testapps/TestRcsApp/TestApp/res/values/donottranslate_strings.xml
+++ b/testapps/TestRcsApp/TestApp/res/values/donottranslate_strings.xml
@@ -72,6 +72,8 @@
     <string name="browse">Browse</string>
     <string name="upload">Upload</string>
     <string name="upload_file_gba">Upload File with GBA</string>
+    <string name="setCarrierLockMode">CarrierLock</string>
+
     <string name="invalid_parameters">Invalid Parameters</string>
     <string name="server">Server:</string>
     <string name="file_name">File Name:</string>
@@ -79,6 +81,13 @@
     <string name="file_empty">File is empty</string>
     <string name="version_info">Version: %s</string>
 
+    <string name="no_LockMode">NoLock/ UnLocked</string>
+    <string name="no_LockTo_VZW">Lock to Verizon</string>
+    <string name="no_LockTo_ATT">Lock to ATT</string>
+    <string name="no_LockTo_TMO">Lock to TMO</string>
+    <string name="no_LockTo_KOODOS">Lock to KOODO</string>
+    <string name="no_LockTo_TELUS">Lock to TELUS</string>
+
     <string-array name="rcs_profile">
         <item>UP_1.0</item>
         <item>UP_2.3</item>
diff --git a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/MainActivity.java b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/MainActivity.java
index 89c5268..5d2db73 100644
--- a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/MainActivity.java
+++ b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/MainActivity.java
@@ -29,6 +29,8 @@
 
 import androidx.appcompat.app.AppCompatActivity;
 
+import com.google.android.sample.rcsclient.carrierLock.CarrieLockModeListActivity;
+
 /** An activity to show function list. */
 public class MainActivity extends AppCompatActivity {
     private static final String TAG = "TestRcsApp.MainActivity";
@@ -39,6 +41,7 @@
     private Button mMessageClientButton;
     private Button mFileUploadButton;
     private TextView mVersionInfo;
+    private Button mCarrierLockModeListBtn;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -56,6 +59,7 @@
         mGbaButton = (Button) this.findViewById(R.id.gba);
         mFileUploadButton = findViewById(R.id.uploadFile);
         mVersionInfo = this.findViewById(R.id.version_info);
+        mCarrierLockModeListBtn = findViewById(R.id.setCarrierLockMode);
         mProvisionButton.setOnClickListener(view -> {
             Intent intent = new Intent(this, ProvisioningActivity.class);
             MainActivity.this.startActivity(intent);
@@ -90,6 +94,11 @@
                     appVersionName);
             mVersionInfo.setText(version);
         }
+
+        mCarrierLockModeListBtn.setOnClickListener(view -> {
+            Intent intent = new Intent(this, CarrieLockModeListActivity.class);
+            MainActivity.this.startActivity(intent);
+        });
     }
 
     @Override
diff --git a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrieLockModeListActivity.java b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrieLockModeListActivity.java
new file mode 100644
index 0000000..24cd4e4
--- /dev/null
+++ b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrieLockModeListActivity.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2023 The Android Open Source 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.
+ */
+
+package com.google.android.sample.rcsclient.carrierLock;
+
+import android.os.Bundle;
+import android.widget.Button;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.R;
+import androidx.appcompat.app.AppCompatActivity;
+
+public class CarrieLockModeListActivity extends AppCompatActivity {
+
+    private final CarrierLockProvider mCarrierLockProvider = new CarrierLockProvider();
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.CarrierLockListLayout);
+
+        Button noLockModeBtn = this.findViewById(R.id.noLockMode);
+        assert noLockModeBtn != null;
+        noLockModeBtn.setOnClickListener(view -> {
+            mCarrierLockProvider.setLockMode(CarrierRestriction.UNLOCKED);
+            Toast.makeText(this, "Lock mode set to UNLOCKED", Toast.LENGTH_LONG).show();
+        });
+
+        Button vzwLockModeBtn = this.findViewById(R.id.lockToVZW);
+        assert vzwLockModeBtn != null;
+        vzwLockModeBtn.setOnClickListener(view -> {
+            mCarrierLockProvider.setLockMode(CarrierRestriction.LOCK_TO_VZW);
+            Toast.makeText(this, "Lock mode set to VZW", Toast.LENGTH_LONG).show();
+        });
+
+        Button attLockModeBtn = this.findViewById(R.id.lockToATT);
+        assert attLockModeBtn != null;
+        attLockModeBtn.setOnClickListener(view -> {
+            mCarrierLockProvider.setLockMode(CarrierRestriction.LOCK_TO_ATT);
+            Toast.makeText(this, "Lock mode set to ATT", Toast.LENGTH_LONG).show();
+        });
+
+        Button tmoLockModeBtn = this.findViewById(R.id.lockToTMO);
+        assert tmoLockModeBtn != null;
+        tmoLockModeBtn.setOnClickListener(view -> {
+            mCarrierLockProvider.setLockMode(CarrierRestriction.LOCK_TO_TMO);
+            Toast.makeText(this, "Lock mode set to TMO", Toast.LENGTH_LONG).show();
+        });
+
+        Button koodoLockModeBtn = this.findViewById(R.id.lockToKOODOS);
+        assert koodoLockModeBtn != null;
+        koodoLockModeBtn.setOnClickListener(view -> {
+            mCarrierLockProvider.setLockMode(CarrierRestriction.LOCK_TO_KOODO);
+            Toast.makeText(this, "Lock mode set to KOODO", Toast.LENGTH_LONG).show();
+        });
+
+        Button telusLockModeBtn = this.findViewById(R.id.lockToTELUS);
+        assert telusLockModeBtn != null;
+        telusLockModeBtn.setOnClickListener(view -> {
+            mCarrierLockProvider.setLockMode(CarrierRestriction.LOCK_TO_TELUS);
+            Toast.makeText(this, "Lock mode set to TELUS", Toast.LENGTH_LONG).show();
+        });
+    }
+}
diff --git a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrierLockProvider.java b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrierLockProvider.java
new file mode 100644
index 0000000..7c86161
--- /dev/null
+++ b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrierLockProvider.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2023 The Android Open Source 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.
+ */
+
+package com.google.android.sample.rcsclient.carrierLock;
+
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringJoiner;
+
+public class CarrierLockProvider extends ContentProvider {
+
+    public static final String AUTHORITY = "com.sample.lockProvider";
+    public static final String TAG = "TestCarrierLockProvider";
+
+    public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/carrierLock");
+    // content://com.sample.lockProvider/carrierLock
+
+    private static CarrierRestriction mLockMode = CarrierRestriction.UNLOCKED;
+    private static final List<Integer> mCarrierIds = new ArrayList<>();
+
+    @Override
+    public boolean onCreate() {
+        return true;
+    }
+
+    @Override
+    public Bundle call(String method, String args, Bundle extras) {
+        Bundle result = new Bundle();
+        Log.d(TAG, "call query STARTED on method = " + method);
+        switch (method) {
+            case "getCarrierRestrictionStatus":
+                try {
+                    if (mLockMode == CarrierRestriction.UNLOCKED) {
+                        result.putInt("restriction_status", 0); // Unlocked
+                    } else {
+                        result.putInt("restriction_status", 2); // Locked/Restricted
+                    }
+                    mCarrierIds.clear();
+                    Log.d(TAG, "Query come : Lock mode set to " + mLockMode);
+                    switch (mLockMode) {
+                        case UNLOCKED:
+                            // Do Nothing
+                            break;
+                        case LOCK_TO_VZW:
+                            mCarrierIds.add(1839);
+                            break;
+                        case LOCK_TO_ATT:
+                            mCarrierIds.add(1187);
+                            mCarrierIds.add(10021);
+                            mCarrierIds.add(2119);
+                            mCarrierIds.add(2120);
+                            mCarrierIds.add(1779);
+                            mCarrierIds.add(10028);
+                            break;
+                        case LOCK_TO_TMO:
+                            mCarrierIds.add(1);
+                            break;
+                        case LOCK_TO_KOODO:
+                            mCarrierIds.add(2020);
+                            break;
+                        case LOCK_TO_TELUS:
+                            mCarrierIds.add(1404);
+                            break;
+                        default:
+                            // Nothing
+                    }
+                    StringJoiner joiner = new StringJoiner(", ");
+                    if (!mCarrierIds.isEmpty()) {
+                        for (Integer num : mCarrierIds) {
+                            joiner.add(num.toString());
+                        }
+                        result.putString("allowed_carrier_ids", joiner.toString());
+                        Log.d(TAG, "Locked to carrierIds = " + joiner.toString());
+                    } else {
+                        result.putString("allowed_carrier_ids", "");
+                    }
+
+                } catch (Exception e) {
+                    Log.e(TAG, " call :: query :: exception = " + e.getMessage());
+                }
+                return result;
+
+            case "getList:":
+                String list = String.valueOf(
+                        mCarrierIds.size());
+                result.putString("carrierList", list);
+                return result;
+            default:
+                return null;
+        }
+    }
+
+    private void updateLockValue(int lockValue) {
+        Log.d(TAG, "updateLockValue through ADB to = " + lockValue);
+        switch (lockValue) {
+            case 1:
+                mLockMode = CarrierRestriction.LOCK_TO_VZW;
+                break;
+            case 2:
+                mLockMode = CarrierRestriction.LOCK_TO_ATT;
+                break;
+            case 3:
+                mLockMode = CarrierRestriction.LOCK_TO_TMO;
+                break;
+            case 4:
+                mLockMode = CarrierRestriction.LOCK_TO_KOODO;
+                break;
+            case 5:
+                mLockMode = CarrierRestriction.LOCK_TO_TELUS;
+                break;
+            default:
+                mLockMode = CarrierRestriction.UNLOCKED;
+                break;
+        }
+    }
+
+    @Override
+    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+            String sortOrder) {
+        Log.d(TAG, "CarrierLockProvider Query");
+        return null;
+    }
+
+    @Override
+    public String getType(Uri uri) {
+        return "vnd.android.cursor.dir/vnd." + AUTHORITY + ".books";
+    }
+
+    @Override
+    public Uri insert(Uri uri, ContentValues values) {
+        Log.d(TAG, "CarrierLockProvider insert START");
+        assert values != null;
+        int newValue = values.getAsInteger("newValue");
+        updateLockValue(newValue);
+        return CONTENT_URI;
+    }
+
+    @Override
+    public int delete(Uri uri, String selection, String[] selectionArgs) {
+        return 0;
+    }
+
+    @Override
+    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+        return 0;
+    }
+
+    public void setLockMode(CarrierRestriction lockMode) {
+        mLockMode = lockMode;
+        Log.d(TAG, "Setting lockMode to " + mLockMode);
+    }
+}
\ No newline at end of file
diff --git a/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrierRestriction.java b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrierRestriction.java
new file mode 100644
index 0000000..34f9e7b
--- /dev/null
+++ b/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/carrierLock/CarrierRestriction.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2023 The Android Open Source 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.
+ */
+
+package com.google.android.sample.rcsclient.carrierLock;
+
+public enum CarrierRestriction {
+    UNLOCKED,
+    LOCK_TO_VZW,
+    LOCK_TO_ATT,
+    LOCK_TO_TMO,
+    LOCK_TO_KOODO,
+    LOCK_TO_TELUS
+}
